1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Tutorial SMC3 Arduino 3DOF Motor Driver and Windows Utilities

Discussion in 'SimTools compatible interfaces' started by RufusDufus, Dec 1, 2013.

  1. Padmaraj

    Padmaraj New Member

    Joined:
    May 10, 2016
    Messages:
    2
    Balance:
    147Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF
    Can anyone help me how to connect smc3 to unity. Now I'm using serial port but I'm loosing some data also my unity crashes quit often. Please help me out.
  2. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,952Coins
    Ratings:
    +1,016 / 10 / -1
    Need more info.
  3. Padmaraj

    Padmaraj New Member

    Joined:
    May 10, 2016
    Messages:
    2
    Balance:
    147Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF
    I need a tutorial on how to communicate arduino with unity. Now I'm connecting through serial port but often my unity is crashing.
  4. Malik10

    Malik10 Member

    Joined:
    Mar 3, 2016
    Messages:
    68
    Location:
    MALAYSIA
    Balance:
    657Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino, SimforceGT, Motion platform
    who have other coding and good coding because i don t what is my problem from actuator or coding because it become delay on my real driving simulator.. i don t know what is problem..can anyone help me?
    i m paste my coding here.
    Code:
    #include <SoftwareSerial.h>
    
    
    
    const int RedLedPin =  2;
    const int YelLedPin =  3;
    const int GreenLedPin =  4;
    const int Actuator1_Fwd_Pin=6;
    const int Actuator1_Rvs_Pin=5;
    const int Actuator2_Fwd_Pin=8;
    const int Actuator2_Rvs_Pin=7;
    const int Actuator3_Fwd_Pin=10;
    const int Actuator3_Rvs_Pin=9;
    const int Limit_Switch1_Pin=11;
    const int Rx_Pin=12;
    const int Tx_Pin=13;
    int Red_LED_State = LOW;
    int Yel_LED_State = LOW;
    int Green_LED_State = LOW;
    
    unsigned long Red_LED_previousMillis = 0;
    unsigned long Yel_LED_previousMillis = 0;
    unsigned long Green_LED_previousMillis = 0;
    unsigned long Actuator1Fwd_previousMillis=0;
    unsigned long Actuator1Rvs_previousMillis=0;
    unsigned long Actuator2Fwd_previousMillis=0;
    unsigned long Actuator2Rvs_previousMillis=0;
    unsigned long Actuator3Fwd_previousMillis=0;
    unsigned long Actuator3Rvs_previousMillis=0;
    
    char numStr[16];      // the number characters and null
    String X_axis[]="";
    long data_X;          // the number stored as a long integer
    long data_Y;          // the number stored as a long integer
    long data_Z;          // the number stored as a long integer
    int position_X;
    int position_Y;
    int position_Z;
    char data_serial[3];
    char X_axis_data[3];
    
    SoftwareSerial mySerial(12, 13); // RX, TX
    void setup()
    {
    pinMode(RedLedPin, OUTPUT);
    pinMode(YelLedPin, OUTPUT);
    pinMode(GreenLedPin, OUTPUT);
    pinMode(Actuator1_Fwd_Pin, OUTPUT);
    pinMode(Actuator1_Rvs_Pin, OUTPUT);
    pinMode(Actuator2_Fwd_Pin, OUTPUT);
    pinMode(Actuator2_Rvs_Pin, OUTPUT);
    pinMode(Actuator3_Fwd_Pin, OUTPUT);
    pinMode(Actuator3_Rvs_Pin, OUTPUT);
    pinMode(Limit_Switch1_Pin, INPUT);
    
    
    Serial.begin(9600);
    mySerial.begin(9600);
    
    }
    
    void Red_LED_Blink(const long interval_Red)
    {
      unsigned long Red_LED_currentMillis = millis();
    
      if(Red_LED_currentMillis - Red_LED_previousMillis >= interval_Red) {
        // save the last time you blinked the LED
        Red_LED_previousMillis = Red_LED_currentMillis; 
    
        // if the LED is off turn it on and vice-versa:
        if (Red_LED_State == LOW)
          Red_LED_State = HIGH;
        else
          Red_LED_State = LOW;
    
        // set the LED with the ledState of the variable:
        digitalWrite(RedLedPin, Red_LED_State);
      }
    }
    
    
    void Yel_LED_Blink(const long interval_Yel)
    {
      unsigned long Yel_LED_currentMillis = millis();
    
      if(Yel_LED_currentMillis - Yel_LED_previousMillis >= interval_Yel) {
        // save the last time you blinked the LED
        Yel_LED_previousMillis = Yel_LED_currentMillis; 
    
        // if the LED is off turn it on and vice-versa:
        if (Yel_LED_State == LOW)
          Yel_LED_State = HIGH;
        else
          Yel_LED_State = LOW;
    
        // set the LED with the ledState of the variable:
        digitalWrite(YelLedPin, Yel_LED_State);
      }
    }
    
    void Green_LED_Blink(const long interval_Green)
    {
      unsigned long Green_LED_currentMillis = millis();
    
      if(Green_LED_currentMillis - Green_LED_previousMillis >= interval_Green) {
        // save the last time you blinked the LED
        Green_LED_previousMillis = Green_LED_currentMillis; 
    
        // if the LED is off turn it on and vice-versa:
        if (Green_LED_State == LOW)
          Green_LED_State = HIGH;
        else
          Green_LED_State = LOW;
    
        // set the LED with the ledState of the variable:
        digitalWrite(GreenLedPin, Green_LED_State);
      }
    }
    
    void move_actuator1_fwd(const long interval_actuator1)
    {
      unsigned long Actuator1Fwd_currentMillis = millis();
      digitalWrite(Actuator1_Fwd_Pin,HIGH);
      digitalWrite(Actuator1_Rvs_Pin,LOW);
      if(Actuator1Fwd_currentMillis - Actuator1Fwd_previousMillis >= interval_actuator1) {
    Actuator1Fwd_previousMillis = Actuator1Fwd_currentMillis;
        digitalWrite(Actuator1_Fwd_Pin,LOW);
        digitalWrite(Actuator1_Rvs_Pin,LOW);
      }
    delay(50);
    }
    
    
    void move_actuator1_rvs(const long interval_actuator1)
    {
      unsigned long Actuator1Rvs_currentMillis = millis();
      digitalWrite(Actuator1_Rvs_Pin,HIGH);
      digitalWrite(Actuator1_Fwd_Pin,LOW);
    if(Actuator1Rvs_currentMillis - Actuator1Rvs_previousMillis >= interval_actuator1) {
      Actuator1Rvs_previousMillis = Actuator1Rvs_currentMillis;
      digitalWrite(Actuator1_Fwd_Pin,LOW);
      digitalWrite(Actuator1_Rvs_Pin,LOW);
      }
    delay(50);
    }
    
    
    
    
    void move_actuator2_fwd(const long interval_actuator2)
    {
      unsigned long Actuator2Fwd_currentMillis = millis();
      digitalWrite(Actuator2_Fwd_Pin,HIGH);
      digitalWrite(Actuator2_Rvs_Pin,LOW);
      if(Actuator2Fwd_currentMillis - Actuator2Fwd_previousMillis >= interval_actuator2) {
    Actuator2Fwd_previousMillis = Actuator2Fwd_currentMillis;
        digitalWrite(Actuator2_Fwd_Pin,LOW);
        digitalWrite(Actuator2_Rvs_Pin,LOW);
      }
    
    }
    
    
    void move_actuator2_rvs(const long interval_actuator2)
    {
      unsigned long Actuator2Rvs_currentMillis = millis();
      digitalWrite(Actuator2_Rvs_Pin,HIGH);
      digitalWrite(Actuator2_Fwd_Pin,LOW);
    if(Actuator2Rvs_currentMillis - Actuator2Rvs_previousMillis >= interval_actuator2) {
      Actuator2Rvs_previousMillis = Actuator2Rvs_currentMillis;
      digitalWrite(Actuator2_Fwd_Pin,LOW);
      digitalWrite(Actuator2_Rvs_Pin,LOW);
      }
    
    }
    
    
    
    void move_actuator3_fwd(const long interval_actuator3)
    {
      unsigned long Actuator3Fwd_currentMillis = millis();
      digitalWrite(Actuator3_Fwd_Pin,HIGH);
      digitalWrite(Actuator3_Rvs_Pin,LOW);
      if(Actuator3Fwd_currentMillis - Actuator3Fwd_previousMillis >= interval_actuator3) {
    Actuator3Fwd_previousMillis = Actuator3Fwd_currentMillis;
        digitalWrite(Actuator3_Fwd_Pin,LOW);
        digitalWrite(Actuator3_Rvs_Pin,LOW);
      }
    
    }
    
    
    void move_actuator3_rvs(const long interval_actuator3)
    {
      unsigned long Actuator3Rvs_currentMillis = millis();
      digitalWrite(Actuator3_Rvs_Pin,HIGH);
      digitalWrite(Actuator3_Fwd_Pin,LOW);
    if(Actuator3Rvs_currentMillis - Actuator3Rvs_previousMillis >= interval_actuator3) {
      Actuator3Rvs_previousMillis = Actuator3Rvs_currentMillis;
      digitalWrite(Actuator3_Fwd_Pin,LOW);
      digitalWrite(Actuator3_Rvs_Pin,LOW);
      }
    
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    void Red_LED_Off()
    {
        digitalWrite(RedLedPin,LOW);
    
    }
    void Yel_LED_Off()
    {
    
        digitalWrite(YelLedPin,LOW);
    
    }
    
    void Green_LED_Off()
    {
    
        digitalWrite(GreenLedPin,LOW);
    }
    
    
    void initialize_actuator_position()
    {
    
      digitalWrite(Actuator1_Fwd_Pin,LOW);
      digitalWrite(Actuator1_Rvs_Pin,LOW);
      digitalWrite(Actuator2_Fwd_Pin,LOW);
      digitalWrite(Actuator2_Rvs_Pin,LOW);
      digitalWrite(Actuator3_Fwd_Pin,LOW);
      digitalWrite(Actuator3_Rvs_Pin,LOW);
    
    
    digitalWrite(RedLedPin,LOW);
    delay(100);
    int initialize=1;
    int fwd_status=1;
    int rvs_status=0;
    int  count_fwd=0;
    int count_rvs=0;
    int count=0;
    while(initialize)
    {
      int rand_val=rand();
      if (rand_val>1000){rand_val=1000;}
      Yel_LED_Blink(rand_val);
      if((fwd_status==1)&&(rvs_status==0))
      {
      count_fwd=count_fwd+1;
      count_rvs=0;
      digitalWrite(Actuator1_Fwd_Pin,HIGH);
      digitalWrite(Actuator1_Rvs_Pin,LOW);
      delay(100);
      digitalWrite(Actuator2_Fwd_Pin,HIGH);
      digitalWrite(Actuator2_Rvs_Pin,LOW);
      delay(100);
      digitalWrite(Actuator3_Fwd_Pin,HIGH);
      digitalWrite(Actuator3_Rvs_Pin,LOW);                                         
      if(count_fwd==40){
                          fwd_status=0;
                          rvs_status=1;
                          count=count+1;
                            digitalWrite(Actuator1_Fwd_Pin,LOW);
                            digitalWrite(Actuator1_Rvs_Pin,LOW);
                            digitalWrite(Actuator2_Fwd_Pin,LOW);
                            digitalWrite(Actuator2_Rvs_Pin,LOW);
                            digitalWrite(Actuator3_Fwd_Pin,LOW);
                            digitalWrite(Actuator3_Rvs_Pin,LOW);
                            delay(100);
                       }
      int   switch_status=digitalRead(Limit_Switch1_Pin);
    
      if(switch_status==0){initialize=0;
                           Yel_LED_Off();
                            digitalWrite(GreenLedPin,HIGH);
                            digitalWrite(Actuator1_Fwd_Pin,LOW);
                            digitalWrite(Actuator1_Rvs_Pin,LOW);
                            digitalWrite(Actuator2_Fwd_Pin,LOW);
                            digitalWrite(Actuator2_Rvs_Pin,LOW);
                            digitalWrite(Actuator3_Fwd_Pin,LOW);
                            digitalWrite(Actuator3_Rvs_Pin,LOW);
                            delay(100);
                           }
      }
    
      if((fwd_status==0)&&(rvs_status==1))
      {
      count_fwd=0;
      count_rvs=count_rvs+1;
      digitalWrite(Actuator1_Fwd_Pin,LOW);
      digitalWrite(Actuator1_Rvs_Pin,HIGH);
      delay(100);
      digitalWrite(Actuator2_Fwd_Pin,LOW);
      digitalWrite(Actuator2_Rvs_Pin,HIGH); 
      delay(100);
      digitalWrite(Actuator3_Fwd_Pin,LOW);
      digitalWrite(Actuator3_Rvs_Pin,HIGH);
    
      if(count_rvs==40){
                          fwd_status=1;
                          rvs_status=0;
                          count=count+1;
                            digitalWrite(Actuator1_Fwd_Pin,LOW);
                            digitalWrite(Actuator1_Rvs_Pin,LOW);
                            digitalWrite(Actuator2_Fwd_Pin,LOW);
                            digitalWrite(Actuator2_Rvs_Pin,LOW);
                            digitalWrite(Actuator3_Fwd_Pin,LOW);
                            digitalWrite(Actuator3_Rvs_Pin,LOW);
                            delay(100);
                       }
      int   switch_status=digitalRead(Limit_Switch1_Pin);
    
      if(switch_status==0){initialize=0;
                           Yel_LED_Off();
                            digitalWrite(GreenLedPin,HIGH);
                            digitalWrite(Actuator1_Fwd_Pin,LOW);
                            digitalWrite(Actuator1_Rvs_Pin,LOW);
                            digitalWrite(Actuator2_Fwd_Pin,LOW);
                            digitalWrite(Actuator2_Rvs_Pin,LOW);
                            digitalWrite(Actuator3_Fwd_Pin,LOW);
                            digitalWrite(Actuator3_Rvs_Pin,LOW);
                            delay(100);
                           }
      }
    
    
    
        if(count==5){
    
                            digitalWrite(Actuator1_Fwd_Pin,LOW);
                            digitalWrite(Actuator1_Rvs_Pin,LOW);
                            digitalWrite(Actuator2_Fwd_Pin,LOW);
                            digitalWrite(Actuator2_Rvs_Pin,LOW);
                            digitalWrite(Actuator3_Fwd_Pin,LOW);
                            digitalWrite(Actuator3_Rvs_Pin,LOW);
                            digitalWrite(RedLedPin,HIGH);
                            while(1){}
                   }
    
    
    }
    }
    
    
    
    
    
    void loop()
    {
    Red_LED_Off();
    Yel_LED_Off();
    Green_LED_Off();
    delay(100); 
    initialize_actuator_position();
    unsigned previous_data_X=511;
    unsigned  previous_data_Y=511;
    unsigned previous_data_Z=511;
    signed int val_X;
    signed int val_Y;
    signed int val_Z;
    while(1)
    {
    
    int rand_val=rand();
    if (rand_val>1000){rand_val=1000;}
    Green_LED_Blink(rand_val);
    int check_data=1;
    int count=0;
    while(check_data)
         {
               if ( Serial.available () > 0 )
                {
                
                  numStr[count]=Serial.read();
                  mySerial.write(numStr[count]);
    
                 }
    
                if(numStr[count]=='C')
                    {
                  
                      check_data=0;
                    }
    
               count=count+1;
              
           }
    
    
    
    
      //mySerial.write(numStr);
    
    
    String data= String(numStr);
    mySerial.println(data);
    
    String data_x=data.substring(2,5);
    int X=data_x.toInt();
    mySerial.println(X);
    String data_y=data.substring(6,9);
    int Y=data_y.toInt();
    mySerial.println(Y);
    String data_z=data.substring(10,13);
    int Z=data_z.toInt();
    mySerial.println(Z);
    
    if(X<previous_data_X)
    {
      move_actuator1_rvs(1000);
      delay(250);                                   
      previous_data_X=X;
    }
    if(X>previous_data_X)
    { 
    
      move_actuator1_fwd(1000);
      delay(250);                                   
      previous_data_X=X;
    
    }
    
    if(Y<previous_data_Y)
    {
    
      move_actuator2_rvs(1000);
      delay(250);                                   
      previous_data_Y=Y;
    }
    if(Y>previous_data_Y)
    { 
    
      move_actuator2_fwd(1000);
      delay(250);                                   
      previous_data_Y=Y;
    
    }
    
    if(Z<previous_data_Z)
    {
    
      move_actuator3_rvs(1000);
      delay(250);                                   
      previous_data_Z=Z;
    }
    if(Z>previous_data_Z)
    { 
    
      move_actuator3_fwd(1000);
      delay(250);                                   
      previous_data_Z=Z;
    
    }
    
    
        
      }
    }
  5. E1m0

    E1m0 Member

    Joined:
    Feb 13, 2016
    Messages:
    53
    Occupation:
    Plant Engineer
    Location:
    Finland
    Balance:
    217Coins
    Ratings:
    +28 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    I'm having 3 motors of which 2 should be reversed. I'm using hall effect sensors, so I can't just switch the GND and +5V.
    In the code there is reverse motor1, but I cant find reverse options for other motors.
    EDIT: uncommenting the reverse_motor1, didn't reverse the direction of motor1.
    What should I do?
    Last edited: May 26, 2016
  6. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,621Coins
    Ratings:
    +1,835 / 32 / -1
    Since you can't reverse the leads on a hall pot try reversing the motor leads instead.

    ps To reverse hall pots in code, on a 10bit adc for example, you would use 1023 - read hall value = reversed hall value.
    Last edited: May 26, 2016
  7. E1m0

    E1m0 Member

    Joined:
    Feb 13, 2016
    Messages:
    53
    Occupation:
    Plant Engineer
    Location:
    Finland
    Balance:
    217Coins
    Ratings:
    +28 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    Thanks!

    :oops: (facepalm) of course...
    I read it twice from the first page but as I've always just reversed the leads of pots, I didn't think of anything else.

    Actually I tried to reverse the hall pots in code just like you said, but in SMC3 0.7 there are quite a few places where one should change the value and I ended up breaking the code completely :p
    Had to download the code again.
  8. speedy

    speedy Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    1,193
    Location:
    Alexandria , Egypt
    Balance:
    7,933Coins
    Ratings:
    +1,287 / 10 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino, Motion platform
  9. E1m0

    E1m0 Member

    Joined:
    Feb 13, 2016
    Messages:
    53
    Occupation:
    Plant Engineer
    Location:
    Finland
    Balance:
    217Coins
    Ratings:
    +28 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    • Like Like x 1
  10. speedy

    speedy Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    1,193
    Location:
    Alexandria , Egypt
    Balance:
    7,933Coins
    Ratings:
    +1,287 / 10 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino, Motion platform
    Glad to know ... thanks for sharing the result :thumbs.
  11. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,142
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,547Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Google Translate:
    Hello me you can lend a hand with the pololu code. I have arduino one to plate H pololu me what you can lend a hand agradesco. I do not recognize the potentiometers. Thank you

    You can duel post in your native language as long as you include and English translation.

    We have bi-lingual speakers from many different language groups so if Google Translate really messes it up they can help clarify what was intended.

    What Pololu do you mean, a picture or link to it would help to understand what you are using.
  12. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
  13. Twinsen Yuen

    Twinsen Yuen Member

    Joined:
    May 12, 2016
    Messages:
    44
    Occupation:
    IT
    Location:
    Hong Kong
    Balance:
    288Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Tks, Man, I am going to use it for my first DOF motion sims
  14. Simon Husum

    Simon Husum Member

    Joined:
    Oct 25, 2014
    Messages:
    84
    Occupation:
    Electrician
    Location:
    Viborg, Denmark
    Balance:
    217Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT
    I need your help guys.. REALLY :sos

    A year ago I builded a 2dof with the racingmat program on a Arduino R3 and some cheap H bridges with wiper motors.

    It has worked just great.

    BUT there were a lot of sound inteference from the motors.

    So I have now converted it to the SMC3 code with some motors from motion dynamics. Some 90ZYT 155 12v 50:1 ratio.

    I have 2x 30A 12v PSU with some 12v batteries to the current spikes to motors can give.

    2x moto monster shield for controlling the motors.

    Everything works. Meaning that the motors rotate the right way and the directions is correct.
    The problem is that after a single lap it freezes.
    Believe that it is the moto monsters that are shutting down because of heat.
    Running with 200 in kp and all the pwm max and reverse is no more than 100 (See attached picture for all settings ) :)

    Have now tried with my old wiper motors.
    Thought it would work just great as it did before with racingmat code.
    BUT NO!
    Still shuts down and gets hot.

    Now there are bigger h-bridges and 12v battery backup to the psu's.
    Have tried with a low fpwm. That seems to be a little bit better. But them Im having some noise from the motors which I would like to get rid off..

    So asume there is something I have misunderstood in the smc3 utility?

    Have checked all wirings to arduino from moto monsters. Everything is fine.

    My only guess woukd be if the heatsinks were to small?
    But they cover the chips and did the job well on the other h-bridge.
    And with the low parameters Im going with there shouldn't be much heat I guess.
    Asume the wiper motors uses the same current no matter what software/code you are using!

    It would really make my day if someone could help me as I'm pretty much stuck here :):sos

    Best regards Simon

    Attached Files:

    Last edited: Jun 30, 2016
  15. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,286
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,112Coins
    Ratings:
    +1,238 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    fpid should be at 1
    fpwm set to 20
    the pid settings are not the same with different motors. your settings do seem a bit conservative tho. i use 400-500kp, 0 ki and 8 kd. I also use about 215 pwm max. I would recommend fans for the monsters they shut down when hot. i use laser thermometer (non contact) to measure the temp of components. you may want to be sure your psu's arent shutting down either. I recommend wiring them in parallel to spread the load. gl hope this helps
    • Informative Informative x 2
    • Like Like x 1
  16. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    in addition to the comment of @bruce stephen the active cooling of the MMs is a mandatory. The cooler itself is too small.
    Furthermore the Ard doesn't need any cooler ;)
    Try high kp settings like 400-500 and lower PWMmax settings first, f. eg 120.

    If you still have issues check the wiring and the voltage output of each single channel.
    • Like Like x 1
    • Agree Agree x 1
    • Informative Informative x 1
  17. Simon Husum

    Simon Husum Member

    Joined:
    Oct 25, 2014
    Messages:
    84
    Occupation:
    Electrician
    Location:
    Viborg, Denmark
    Balance:
    217Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT
    Thank you guys. Got a chance to try out your suggestions last night.

    Works great with the old wiper motors now. And when i try with the worm gears it works perfect for a while but it still gets a bit too hot I think even tgough it rund with little pwmmax.
    Will do a upgrade on the cooling side and make a test with your tutorial @Pit with 2 Moto Monsters per motor.

    And find 2x 47a psu.
    Then I should have enough power from the PSU's and enough MM power.

    Will also do a heatsink + fan upgrade.

    It seems the main reason to get it working was changing the fpid from 2 to 1.

    I see a bit in here uses fpid2?

    What does it do?
    Quote: Fpid / By default the PID loop performs 4000 calculation updates per second. This divider enables you to reduce the number of PID calculations per second by the divided amount. Sometimes this can help if the motor windings are producing audible noise. The approx number of calcs per second is displayed in the center bottom of the SMC3 Utils window. (This may jump around a bit as it is just an indicator)

    Don't get it..

    Is it how many times er second it calculates he pid parameters?

    Again..
    Big thanks for your help @bruce stephen and @Pit ;):):cheers

    Regards Simon
  18. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,952Coins
    Ratings:
    +1,016 / 10 / -1
    Yes the default loop runs 4000 times a second. If you have Fpid/2 then it only updates the pid calcs every 2nd time round the loop, if it is Fpid/3 then it only calculates every third time round the loop etc.

    In reality 4000 calcs per second is probably way more than is needed and I would doubt you would notice any degradation in performance even if changed to Fpid/4 - lowering the value may make the motors quieter though so worth experimenting.

    Unfortunately because the way the calculations have been optimised/simplified, changing the Fpid will impact the effect of current PID parameters so you may need to re-tune them after changing Fpid.
    • Informative Informative x 2
    • Like Like x 1
  19. Simon Husum

    Simon Husum Member

    Joined:
    Oct 25, 2014
    Messages:
    84
    Occupation:
    Electrician
    Location:
    Viborg, Denmark
    Balance:
    217Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT
    Arh okay.. Now I get it.. Thanks a lot for the explanation @RufusDufus :thumbs
  20. Deleted member 22447

    Deleted member 22447

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hello,

    Hope you are all doing well, I'm a long time lurker of this projects and have been inspired to start my own. I wanted to ask of you fine people a couple simple "noob" questions. One being on the first page when the diagram labeled "motor pots" do you recommend any for this setup? Also the two spaces on the Monster Moto Shield for Arduino labeled motor 1 and 2. would I be able to attach two servos directly to here? If not could you recommend a motor suitable to attach to it instead.

    Thank you so much

    Panaccg77