1. 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!
  2. 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
  3. 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. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    14,031Coins
    Ratings:
    +965 / 7 / -1
    If you use the windows SMC3Utils program for the initial setup then all values are automatically saved to arduino EEPROM and you don't have to worry about it from then on.
    • Informative Informative x 1
  2. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,085
    Location:
    London
    Balance:
    7,809Coins
    Ratings:
    +244 / 6 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Wow thats awesome - didn't realise you could save the numbers to the eprom !

    : )
  3. gigi

    gigi Active Member

    Joined:
    Nov 16, 2013
    Messages:
    440
    Balance:
    1,241Coins
    Ratings:
    +133 / 1 / -0
    My Motion Simulator:
    2DOF, JRK, 4DOF
    Hi Rufus thanks For your replay.
    Hi Rufus, thanks For your replay. The PWMMMAX is how fast rum my motor. If the motor rub fast also with PWMMMAX at 255 but without inverti in of direction no problem. The problem appeal where the motor rum fast and i invert manually or with with smc3 the direction. Anyway I post my question to smc3 sabertooth.
    Another question for you. To run the motor i push "on" button. But For stopping the only way is move the pot out of the range. I I push off or close smc3 utility the motor not stop. Can you confirm that is correct? Thanks
  4. matthew loomis

    matthew loomis Member

    Joined:
    May 18, 2017
    Messages:
    94
    Location:
    rochester,ny
    Balance:
    560Coins
    Ratings:
    +82 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I've read a few of your posts. I use a 2x32 as well. Your smc3 sounds right. That is typical behavior. It should work even after closing the utility.
    About your power supply. Have you setup the voltage clamp resistors? They should help with the ps kicking off.
    You can invert each axis with sim tools so as long as your pots are set right, it should be ok. For mine one starts at the bottom of the graph the other starts at the top. Not an issue.
  5. gigi

    gigi Active Member

    Joined:
    Nov 16, 2013
    Messages:
    440
    Balance:
    1,241Coins
    Ratings:
    +133 / 1 / -0
    My Motion Simulator:
    2DOF, JRK, 4DOF
    Hi Matthew and thanks for your support, really appreciate
    - If I correct understand you confirm me that the only way to stop the motor and close smc3 utility is to move the pot out of the range that I set. The botton on/off in smc3 work only in "on" but not in "off". Correct?
    - regards the psu is very strange problem. the psu have 1400w 94A. In the video test i use sabertooth 2x32 (64A peak for each motor) with connected only one motor ZYT90 (23A rated and 40Apeak)....his peak is less than half of the ratde current of the psu. This evening I will try to amperometric caliper to see how many Ah there are when the psu shotting down in peak protection.
  6. gigi

    gigi Active Member

    Joined:
    Nov 16, 2013
    Messages:
    440
    Balance:
    1,241Coins
    Ratings:
    +133 / 1 / -0
    My Motion Simulator:
    2DOF, JRK, 4DOF
    I attached the datasheet of psu. As you can see there are output 12.0V 90.4A and 12.0VL 14.06A
    Wich is the difference beetween 12.0V - 90.4A and 12.0VL - 14.6A??

    Attached Files:

  7. gigi

    gigi Active Member

    Joined:
    Nov 16, 2013
    Messages:
    440
    Balance:
    1,241Coins
    Ratings:
    +133 / 1 / -0
    My Motion Simulator:
    2DOF, JRK, 4DOF
    just test with amperometric caliper. the psu shutting off in peak protection when motor need moore than 20A more or less. this happen over 85 PWMmax , triangle outmode and only one motor connect. So I tried to instal 2 resistor 10A each but the situation not change a lot. the PSU shutting off over 28A and 103 PWMmax and the same mode.
    The videos show the limit. over thes value PSU shutting off
    sighsigh


  8. DOFreality

    DOFreality Member

    Joined:
    Oct 30, 2016
    Messages:
    84
    Location:
    Montreal
    Balance:
    337Coins
    Ratings:
    +44 / 5 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform, 6DOF
    RufusDufus, I am trying to port your Arduino code to Brush-less motors homemade actuator with hole sensors (ticks 9 times per rotation). for 4-6 DOF system Can you share the source of windows SMC3Utils program ?
    My plan bisides brush-less motors support is to 1) make it available for Arduino Mega for more motors.
    2) fix the issue of UNO third motor PWM lock frequency to 30khz only as budget drivers can't go beyond 20. and for third motr i have to use second Uno.
    3) make SMC3Utils program available in monitoring mode - to path through commands revived from SimTools via UDP/TCP port display them on chard and pass via COM to Arduino and display actual motor position on same chart.
  9. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    14,031Coins
    Ratings:
    +965 / 7 / -1
    Sorry the Utils source is not available.

    SMC3Utils already supports this (SMC3Utils UDP port number is setup in the .ini file.) Setup simtools the same as you would for serial except use a Network UDP interface with the same port number as setup in the .ini file.
    • Informative Informative x 1
  10. gigi

    gigi Active Member

    Joined:
    Nov 16, 2013
    Messages:
    440
    Balance:
    1,241Coins
    Ratings:
    +133 / 1 / -0
    My Motion Simulator:
    2DOF, JRK, 4DOF
    I'm only realizing that probably my posts are out of thread. My psu problem has nothing to do with simc3. I apologize to the administrators and other members of the forum
    • Agree Agree x 1
  11. Joao Neto

    Joao Neto Mucilon

    Joined:
    Jan 13, 2017
    Messages:
    61
    Occupation:
    Computer engineer
    Location:
    Salvador - Brasil
    Balance:
    276Coins
    Ratings:
    +36 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    I have a question, if put in manual eh for the motor to rotate independent of the sensor?
  12. gigi

    gigi Active Member

    Joined:
    Nov 16, 2013
    Messages:
    440
    Balance:
    1,241Coins
    Ratings:
    +133 / 1 / -0
    My Motion Simulator:
    2DOF, JRK, 4DOF
    I finally managed to solve the problem of my psu Using a switching psu server with a parallel battery The psu does not go in protection. Now I have another problem. I have configured simtools exactly as indicated in the instructions I set all the parameters but the motor not move. In tuning center all valle are 32767 and I can not reste or modify. i think that motor can not move sa these value are too high but Simtools don't let me change them
    How fix?
  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    15,765
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    115,167Coins
    Ratings:
    +9,207 / 46 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    That is likely a configuration issue so you should start a separate thread and post pictures of all of your settings to it.
    • Agree Agree x 1
  14. gigi

    gigi Active Member

    Joined:
    Nov 16, 2013
    Messages:
    440
    Balance:
    1,241Coins
    Ratings:
    +133 / 1 / -0
    My Motion Simulator:
    2DOF, JRK, 4DOF
  15. evolaco

    evolaco Member

    Joined:
    Sep 27, 2015
    Messages:
    241
    Location:
    Spain
    Balance:
    1,193Coins
    Ratings:
    +24 / 0 / -0
    My Motion Simulator:
    2DOF
    @RufusDufus I have a very strange problem, by accident a sensor hall was shorted and the pc started beeping, the sensor was burned, now with only one sensor I move the three outputs of the motor and does not recognize the new sensor in the motor 2, I tried Another usb and another arduino and does the same thing, what can be happening?

    edit. For now it has been solved only ...
    Last edited: Jul 18, 2017
  16. Joao Neto

    Joao Neto Mucilon

    Joined:
    Jan 13, 2017
    Messages:
    61
    Occupation:
    Computer engineer
    Location:
    Salvador - Brasil
    Balance:
    276Coins
    Ratings:
    +36 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    I went through these days. Are you using IBT_2? Did you put MODE 2 in the arduino code? In my case it was that.
  17. Joao Neto

    Joao Neto Mucilon

    Joined:
    Jan 13, 2017
    Messages:
    61
    Occupation:
    Computer engineer
    Location:
    Salvador - Brasil
    Balance:
    276Coins
    Ratings:
    +36 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    I am not understanding max limit, would be in% in relation to what? 0 to 512 and 512 to 1023?

    I have another question too, what is the ideal difference between max limit and the input clip?
    Last edited by a moderator: Jul 21, 2017
  18. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    14,031Coins
    Ratings:
    +965 / 7 / -1
    The data sent to the SMC3 is 10 bits, so positions 0 to 1023. Setting a max limit of 85 (for example) means you are going to shut down the motors if they go past this "band" at either end of the range. So the motors will shut down if the position (feedback signal) goes lower than 85 or above 1023-85.

    It works the same way for the clip limits except the motors are put in reverse (hard braking) in this range instead of shutting down.

    The easiest way to understand is just look at the chart on SMC3Utils. The red lines are the max limits and the orange lines are the clip limits - easy.

    The ideal settings depend on:- the motors, psu, mass of rig, simtools settings, pid settings, your acceptance of risk of damage, the POT ranges used, as well as other things... In other words there is no one ideal setting for all systems and can even be ignored completely if that is your preference (set them to zero).

    For me, the aim was to set them as small as possible *but* so that if the SMC3 is sent commands to rapidly move to the maximum extremes the clip limits are large enough to brake the motion with someone sitting in the rig before it reaches the max limits and the motors shut down. If this is the case then the max limits can essentially be 1 or other small value. If the clip limits become too large to achieve this without limitting range of motion then you might increase max limits some more at the expense of possibly having the motors shut down more often.

    If you hardware can't get damaged under these circumstances then you can set them to zero. If you have a low "care factor" you could set them to zero and just see what happens. If you are an extremely cautious person then use larger values.
    • Informative Informative x 2
    • Useful Useful x 1
  19. franccac

    franccac New Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    21
    Location:
    Barcelona
    Balance:
    49Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    Hi, I'm haveing a lot of problems configuring my 2dof, I starts with 400Kp and grow PWMmax to 70 and motors moves like Blue Sline, but if I sit down in the seat the motors don't have enougth force to move it, when I step up the PWMmax, the motors move the seat but the motors start to hit. If the seat is empty and there're less weight in the motors it's more violent and it can't stop. When I could upload links I could show you in video.
    I use 24v wiper motors and Hbridges.

    Attached Files:

  20. Joao Neto

    Joao Neto Mucilon

    Joined:
    Jan 13, 2017
    Messages:
    61
    Occupation:
    Computer engineer
    Location:
    Salvador - Brasil
    Balance:
    276Coins
    Ratings:
    +36 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    I still do not understand, I'll put an example here.

    I put Max Limit at 255, does that mean my axis goes from 255 to 512 okay? So in the simtools when I put that axis is 100% it goes from 255 to 768 (1023-255)?


    So if I set max input at 150 and clip input at 200, if I get a value between 200 and 250 it makes the reverse force to n let off if possibly pass 150?
    Last edited: Jul 31, 2017