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

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    Monstermoto and/or motor. Try larger PWMmax (up to 255).
    Last edited: Dec 15, 2018
  2. CBC_North

    CBC_North Member

    Joined:
    Jun 29, 2018
    Messages:
    40
    Occupation:
    Computer Engineer
    Location:
    Ottawa, Canada
    Balance:
    333Coins
    Ratings:
    +34 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    @BlazinH
    Tried PWMMax up to 255 and still having the issue. There's definitely something fishy going on as it's only happening after the motor is left idle for a while, more than say 20 seconds. I did some more testing with PWMmax set to 180 below (I did the same with 255 but the screenshots are from my 180 test).

    This is the "motion" setting with me sitting in the chair. It had plenty of power and ran flawlessly for over 5 minutes:
    smc3_working_load.png

    After this, I performed some testing in manual mode where I made it take large steps at a time. I didn't let it stay idle before trying this and it worked just fine:
    smc3_steps_working.png

    I then let it sit for about 20 seconds and tried some more steps and it very quickly became unresponsive:
    smc3_step_out_of_sync.png

    So the trigger to this seems to be letting it sit idle and then trying to make it step a large distance.
  3. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    Likely its the monstermoto as they have a high failure rate. If its a necessity to use a cheap h-bridge instead of a sabertooth you're better off with the ibt-2.
  4. CBC_North

    CBC_North Member

    Joined:
    Jun 29, 2018
    Messages:
    40
    Occupation:
    Computer Engineer
    Location:
    Ottawa, Canada
    Balance:
    333Coins
    Ratings:
    +34 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    It's definitely possible there's something wrong with it. After more testing it is just this one driver (before I thought it was both). It seems to be tripping one of it's internal protections as far as I can tell. The "reset" for the protection seems to be a double swap of the direction (to the opposite polarity and back). Dropping the PWM to zero and back does not reset it.

    It's only on large step inputs and only after sitting idle for an extended period of time. It can run the square wave test forever once it starts. From a practical standpoint I'm not sure I'll ever see this condition during normal use and even if I do it will fix itself quickly after a direction swap. I think I'm just going to keep using it for now and cross the "replacement" bridge if/when I get to it. I would likely replace it with a sabertooth since it would be months to get another monster moto shipped. However, any money saved here is more money I can put into my other hobbies...

    On another note, would there be any reason NOT to put PWMmax to 255? It doesn't seem to be causing any issues now and makes the motion in the seat pretty snappy. I have pretty heavy cooling on the drivers (heatsink + 120 mm fan) if heat is a concern.
  5. heliomenezes

    heliomenezes Member

    Joined:
    Nov 1, 2018
    Messages:
    39
    Balance:
    233Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF

    Attached Files:

  6. spyderwash

    spyderwash genesy sim

    Joined:
    Dec 3, 2013
    Messages:
    106
    Location:
    italy varese
    Balance:
    - 149Coins
    Ratings:
    +58 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, Arduino
    I have already read but I ask for new confirmation, is it possible to have a clip input of more than 255?
    is it possible to have an asymmetric run? or can I adjust an offset for the lever of each engine if not with smc3 via game engine?
    thank you
  7. Trigen

    Trigen Active Member

    Joined:
    Nov 25, 2018
    Messages:
    472
    Balance:
    2,826Coins
    Ratings:
    +176 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Any chance you could give me a tip on using this. Ive tried the chinese H bridge and mode 2 and the wiring should be correct. I can get it to spin just one way. im assuming it should alternate with the square wave and so on

    I have noticed that the green line mentioned in the tutorial only moves when i move the pot. Guessing this just work with the pot or? It wont move if i increase PWMmax. Also moving the pot top or bottom will turn off the motor and i need to put it back mid to turn the motor on

    https://www.ebay.co.uk/itm/50A-Dual-Channel-Motor-Drive-Module-Arduino-Compatible/252324215869?ssPageName=STRK:MEBIDX:IT&_trksid=p2057872.m2749.l2649

    Basically the control is very easy.

    * Rotate forward: EN = HIGH, RPWM = PWM, LPWM = HIGH, DIS = vacant

    * Rotate reverse: EN = HIGH, RPWM = HIGH, LPWM = PWM, DIS = vacant

    * Stop and brake: EN = HIGH, RPWM = HIGH, LPWM = HIGH, DIS = vacant

    * Stop but not brake: EN = 0, RPWM = HIGH, LPWM = HIGH, DIS = vacant

    * Prohibit : EN = X, RPWM = X, LPWM = X, DIS = HIGH

    https://www.xsimulator.net/community/threads/arduino-code-for-g-seat-h-bridge.12874/
    Last edited: Jan 6, 2019
  8. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,906Coins
    Ratings:
    +5,027 / 16 / -0
    Sounds like you have a bad HBridge.
    I would try another one buddy.
    Take care,
    yobuddy
  9. Trigen

    Trigen Active Member

    Joined:
    Nov 25, 2018
    Messages:
    472
    Balance:
    2,826Coins
    Ratings:
    +176 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Looks like it could be the case yeh

    Now that ive learned a bit more these were DOA one dont work at all and the other only has one channel working right. China trash for 15 dollar... didnt know better at the time.. Will finish the build while waiting for new drivers.
    Last edited: Jan 7, 2019
  10. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,906Coins
    Ratings:
    +5,027 / 16 / -0
  11. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,906Coins
    Ratings:
    +5,027 / 16 / -0
    If you have a microfine glass, you may be able to look the PCB over and find a bad solder joint or two.
  12. Trigen

    Trigen Active Member

    Joined:
    Nov 25, 2018
    Messages:
    472
    Balance:
    2,826Coins
    Ratings:
    +176 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Thanks. They area bit on the expensive side for now. Ive asked for a refund anyhow and gone for the moto shield.

    Cant really see anything wrong with them on the surface

    From there it should all be plug and play
  13. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    Sorry but another bad choice. You may get lucky though and get one that works. Ibt-2 is a better choice although out of four I bought to experiment with I had to return one of those too due to being dead on arrival.
  14. Trigen

    Trigen Active Member

    Joined:
    Nov 25, 2018
    Messages:
    472
    Balance:
    2,826Coins
    Ratings:
    +176 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Ok ill see if i can cancel them and look into that. If not the project is on hold for the next 6 months. i may order one directly from sparkfun

    Thank you for the help!

    Feel free to put any future replies into https://www.xsimulator.net/community/threads/arduino-code-for-g-seat-h-bridge.12874/ so we can keep this thread clean
    Last edited: Jan 8, 2019
  15. Pramuuditha Kumara

    Pramuuditha Kumara Member

    Joined:
    Jan 6, 2019
    Messages:
    51
    Balance:
    81Coins
    Ratings:
    +4 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino

    HI Thank you for amazing work.....
    Im planing to these steps for my project...

    I hope it will work perfectly..
    I don't understand why we are using SMC3 Windows Utilities,

    if some of can explain about, it will be really great ...
    Still new to sim tools, but i'm really interesting learn about sim tools more.

    I already build and test my sim tools with RC motors and it works perfectly, so my next step to build my simulator.

    thank you very much all information...
  16. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    Its used to set the pid and other perimeters that work best with your simulator. After setup its not needed anymore unless you run into issues down the road.
    • Like Like x 1
  17. Pramuuditha Kumara

    Pramuuditha Kumara Member

    Joined:
    Jan 6, 2019
    Messages:
    51
    Balance:
    81Coins
    Ratings:
    +4 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    thank you for your explanation,
    is there any code to upload to test check SMC3 Windows Utilities ??
  18. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    SMC3 sketches are at the bottom of this threads first post.
    • Like Like x 1
  19. Pramuuditha Kumara

    Pramuuditha Kumara Member

    Joined:
    Jan 6, 2019
    Messages:
    51
    Balance:
    81Coins
    Ratings:
    +4 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    upload_2019-1-12_10-33-34.png
    what i have to do this, those codes are for what,
    really i don't know yet function of this,
    i like know and i want those all before my start my project.
    because i don't want get any issue during my project.
    please don't mine if i'm asking anything wrong

    thank you very much...
  20. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    You're worrying about things that aren't important. Just follow the setup instructions for now. All you need to concern yourself about the sketch is changing the default mode if it needs changing.

    Btw, when you make settings changes with smc3 utilities they are also saved on the arduinos eeprom at the same time so the sketch can use them.
    • Like Like x 1
    • Agree Agree x 1