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. Volvox

    Volvox New Member

    Joined:
    Jan 17, 2022
    Messages:
    19
    Location:
    Ukraine
    Balance:
    1Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 4DOF
    As I understand it, no one has the same sound from motors?
  2. Steve B

    Steve B Member

    Joined:
    May 8, 2020
    Messages:
    40
    Balance:
    248Coins
    Ratings:
    +32 / 0 / -0
    My Motion Simulator:
    Arduino
    I have similar sounds from the motors on the rig I'm currently building, I think SMC3 in mode2 is not correctly controlling IBT-2 H-bridges.
    Working on a way to drive IBT-2 using mode1, may be a few days to see if I'm successfull.
  3. Volvox

    Volvox New Member

    Joined:
    Jan 17, 2022
    Messages:
    19
    Location:
    Ukraine
    Balance:
    1Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 4DOF
    Good evening. Let me know when there is a result. And then this sound annoys me a lot, it is louder than my t300.
  4. Martin Dixon

    Martin Dixon Member

    Joined:
    Nov 19, 2021
    Messages:
    49
    Occupation:
    Sgt HM FORCES
    Location:
    Devizes, Wiltshire
    Balance:
    26Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, SimAxe, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    I had this issue was using the elegoo mega too you need an uno r3 fixed it for me.
    • Informative Informative x 1
  5. Steve B

    Steve B Member

    Joined:
    May 8, 2020
    Messages:
    40
    Balance:
    248Coins
    Ratings:
    +32 / 0 / -0
    My Motion Simulator:
    Arduino
    This is how to Connect IBT-2 H-bridges to SMC3 and run in Mode 1.
    For me the motion was more controlled, the motors were quieter and the H-bridges stopped failing.
    (Did this whilst building my first motion sim so it's entirely possible my issues were my own doing)
    Wiring-2-Motors -Optocouplers.jpg
  6. Volvox

    Volvox New Member

    Joined:
    Jan 17, 2022
    Messages:
    19
    Location:
    Ukraine
    Balance:
    1Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 4DOF
    Thanks for the wiring diagram.
    I'm still playing with this sound, h-bridges and motors are almost not heated. And nothing breaks. So for now I will use it like this, and in the future I may use your scheme.
  7. motiondynamics

    motiondynamics Member

    Joined:
    Apr 12, 2019
    Messages:
    177
    Balance:
    1,055Coins
    Ratings:
    +7 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, Motion platform, 6DOF
    Hi everyone,
    I have some gaps on how Simtools works and I need your help to understand how exactly it works.
    My question is: is it essential to install mechanical limit switches in the actuators to allow the movement to reverse if the maximum limit is exceeded?
    I saw that the SMC3 utility allows you to set the maximum limits, but I did not understand if it is still necessary to install the mechanical limit switches to prevent the mechanical parts inside from hitting up and down.
  8. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,006
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,740Coins
    Ratings:
    +10,872 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    You have answered your own question, SMC3, and some other similar software, do not require limit switches.

    There can be other code and circumstances where limit switches may be considered, but that does not relate to SMC3.
  9. motiondynamics

    motiondynamics Member

    Joined:
    Apr 12, 2019
    Messages:
    177
    Balance:
    1,055Coins
    Ratings:
    +7 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, Motion platform, 6DOF
    Hi noorbeast,
    in the meantime, thank you for your quick reply, you have been very kind.
    Ok, then I will not use the mechanical limit switches, this is already good news, because I will have fewer mechanical parts to install.
    I take this opportunity to ask you a few things:
    1) I have experimented with the "SMC3" utility, but I still don't understand how the following parameters work: Clip Input, Max Limits, PWMrev
    2) Can we decide the maximum angular space (rotation of the motor arm) through the SMC3 utility or through Simtools?
    3) For example, if I decide to decrease the maximum angular space (see image) and I want the motor arm not to arrive in position "A", but I want it to arrive in position "B", which parameter should I modify?
    4) I noticed that using the SMC3 utility, if I exceed the maximum limit (Max Limits) the motor stops working and to restart it I must necessarily decrease the "Max Limits" value or turn the potentiometer bringing it to the correct working area. Does this also happen when using Simtools? That is, during the simulation, if the "Max Limits" value is exceeded, do the motors stop working? And then it is necessary to rotate the potentiometers to restore operation?
    I await your valuable answers
    Thank you

    Attached Files:

  10. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,006
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,740Coins
    Ratings:
    +10,872 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The SMC3 parameters are detailed in the second thread post here: https://www.xsimulator.net/communit...driver-and-windows-utilities.4957/#post-48121

    1)
    Clip Input Used to create a band at either limit of the target range beyond which any values sent to the SMC3 are clipped. In addition to this clipping, if the motor feedback does move beyond this range (typically through inertia), the SMC3 will attempt to brake the motors hard by driving them in reverse until they are back out of this limit zone. The value can be anything from 0-255 (however can’t be less than the current limit setting). Reverse braking is applied in the band between the Clip Input and the Max Limit settings. Reverse braking can be disabled - refer to PWMrev.

    Max Limits Used to create a band at either limit of the feedback range beyond which if the motors move (typically through inertia) the SMC3 will automatically shutdown the drivers and keep them disabled until reset. This is essentially a safety mechanism if something goes wrong. The value can be between 0-255 (however can’t be greater than the current clip setting).

    PWMrev This is the PWM duty cycle that is used to drive the motors in reverse (hard brake) if they enter the limit zone. Higher values here will brake the motor harder but will draw more current and heat the H-Bridge more. It may also cause an abrupt jolt in your sim as it tries to change direction. Setting this to a similar value as PWMmax would make sense. If you want to disable the revers braking then simply set this value to 0 and the position will be driven by the normal PID algorithm. Settings are in the range 0-255 which are mapped to the range of 0-100% duty cycle.

    2) Using those parameters you can set the range and behavior to control that range:
    [​IMG]

    4) Cutting power when limits are exceeded is a safety feature.
  11. motiondynamics

    motiondynamics Member

    Joined:
    Apr 12, 2019
    Messages:
    177
    Balance:
    1,055Coins
    Ratings:
    +7 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, Motion platform, 6DOF
    Hi noorbeast, I had already read the parameter instructions, I had already tested the parameters, but some things are not clear to me:
    Currently I have not used Simtools, I have only used the SMC3 utility and I have noticed that when the limits are exceeded the motors switch off and to restart them I have to decrease the "Max Limits" value or remove the potentiometer. I would like to understand if the same thing also happens during the simulation of the game with Simtools.
    Also, what I would like to know is: do I establish the maximum angular limit of the motor arms through the SMC3 utility or through Simtools?
  12. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,006
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,740Coins
    Ratings:
    +10,872 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    If properly configured SMC3 should not be exceeding limits, so you have further work to do, but yes if limits are exceeded power is cut, as a safety feature.

    The range is set via SMC3, that range is then allocated/apportioned to specific axis in SimTools.
  13. Volvox

    Volvox New Member

    Joined:
    Jan 17, 2022
    Messages:
    19
    Location:
    Ukraine
    Balance:
    1Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 4DOF
    I understand correctly, if my motor goes beyond the limits and turns off when the platform is active, do I need to increase the PWMrev parameter?
  14. motiondynamics

    motiondynamics Member

    Joined:
    Apr 12, 2019
    Messages:
    177
    Balance:
    1,055Coins
    Ratings:
    +7 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, Motion platform, 6DOF
    Even during the simulation ???
    That is, if the arms of the motors exceed the maximum limits, are the motors not powered ?? So what needs to be done to restore the power supply to the motors?
  15. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,006
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,740Coins
    Ratings:
    +10,872 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    SMC3 has its settings re managing the range, as outlined.

    But PID settings do the real control work, including making sure there are not constant overshoots.

    This simplistic intro to PID was written with JRKs in mind, but the analogies should help grasp basic PID tuning objectives: https://www.xsimulator.net/community/faq/a-laymans-analogy-guide-to-pids-pid-tuning.219/
  16. Rodeo5150

    Rodeo5150 ROOKIE BUT LEARNING FAST Gold Contributor

    Joined:
    Mar 21, 2019
    Messages:
    222
    Location:
    Antioch, CA, United States
    Balance:
    1,251Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    Where is the smc3.ino download
  17. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,006
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,740Coins
    Ratings:
    +10,872 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    • Winner Winner x 1
  18. Rodeo5150

    Rodeo5150 ROOKIE BUT LEARNING FAST Gold Contributor

    Joined:
    Mar 21, 2019
    Messages:
    222
    Location:
    Antioch, CA, United States
    Balance:
    1,251Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
  19. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,006
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,740Coins
    Ratings:
    +10,872 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Are you signed in to your Xsimulator account?

    SMC3 is here: https://www.xsimulator.net/community/attachments/smc3-v1-0-zip.40556/

    And the latest SMC3 utils, for visual SMC3 configuration, is here: https://www.xsimulator.net/community/attachments/smc3utils-v1-01-zip.24768/
    • Informative Informative x 1
  20. Rodeo5150

    Rodeo5150 ROOKIE BUT LEARNING FAST Gold Contributor

    Joined:
    Mar 21, 2019
    Messages:
    222
    Location:
    Antioch, CA, United States
    Balance:
    1,251Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF