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

    Thomase123 New Member Gold Contributor

    Joined:
    Dec 17, 2022
    Messages:
    7
    Balance:
    - 41Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    3DOF
    I got a few 10k ohm, from diffrent brands. I got the + and - connected to the + and - from IBT and the to the UNO board 5v and gnd and then the signal to the first A on the UNO board
  2. Pierre Lalancette

    Pierre Lalancette Sir Lalancelot Gold Contributor

    Joined:
    Dec 11, 2016
    Messages:
    949
    Occupation:
    Tech Artist
    Location:
    Quebec, Canada
    Balance:
    7,719Coins
    Ratings:
    +892 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 6DOF
    You can check it with a multimeter, and check if the olms change as you turn the pot. It it doesn`t, you have found the two external pin. Then the other pin should be the center.
  3. Thomase123

    Thomase123 New Member Gold Contributor

    Joined:
    Dec 17, 2022
    Messages:
    7
    Balance:
    - 41Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    3DOF
    So, its alive, kinda
    Why does it look like this?
    The pots are attached and turning with the shaft now

    Attached Files:

  4. Oldiron

    Oldiron Oldiron Gold Contributor

    Joined:
    Sep 3, 2017
    Messages:
    6
    Location:
    Germany
    Balance:
    61Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Motion platform, 6DOF
    Hi everyone. I hope there are still listeners. We are working on a 3dof rig relying on thanos amc. But this device prooved unreliable, slow and intransparent which makes debugging nearly impossible. So we are looking for an alternative and found this attractive solution. But here comes the trouble: we use 3 AC-motors with vfd´s. These vfds require 0-10 V as directing signal which means that 0-5 V are reverse turning and 5 to 10V is forward turning of the motors. So I got a arduino UNO R3 and 3 dollatek pwm to 0-10 V translators. Would this be compatible to SMC3 since it uses direction signals in it modes. I tried for some time with a poti and without motor (they are mounted in the rig) but no cigar. Feedback is showing up as well as some reaction on pwm in the win software but the multimeter shows no satisfying results. Can someone more experienced comment?
    Thank you for every hint :)
    Stefan
  5. elnino

    elnino Active Member

    Joined:
    Apr 1, 2010
    Messages:
    239
    Occupation:
    Computer Geek
    Location:
    Adelaide, Australia
    Balance:
    1,512Coins
    Ratings:
    +137 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I have done this - I added a 3rd option to the code so that PWM 50% is 0 movement which seems like it should be perfect for your needs. I can't remember the specifics of how the electronics were driven but It was to interface a wheelchair controller.

    There were some bugs when it came to the calibration software (values were halved) but it worked. I have not shared it previously but I wrote it 5 or so years ago. Can share if you like but not really willing to support it since it was from so long ago.
    • Like Like x 2
  6. Oldiron

    Oldiron Oldiron Gold Contributor

    Joined:
    Sep 3, 2017
    Messages:
    6
    Location:
    Germany
    Balance:
    61Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Motion platform, 6DOF
    Hi Elnino.
    Thank you for your reply. Yes, i´d love to try your solution to take a look into your code. Your answer alone is much appreciated support :)
    Btw, have been to adelaide, Barossa Val n took the Ghan back in the 90ies, you live in a nice place.
  7. elnino

    elnino Active Member

    Joined:
    Apr 1, 2010
    Messages:
    239
    Occupation:
    Computer Geek
    Location:
    Adelaide, Australia
    Balance:
    1,512Coins
    Ratings:
    +137 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Here is my version - I had a quick look over the code and I remember now a bit.

    My controller had an 'enable' pin and then a 0-100% PWM signal. 50% being no movement so it should do exactly as you want.

    As I recall though, and as mentioned, when entering values into the tool for configuration it would work odd. You'd have to set it to double the value or something - When you read it back, it would be the actual value though. Just use some caution.

    Also - From memory, the PWM outputs or the enable pins (I only ever used 2) possibly activate the motors on a reboot of the arduino. This can be specifically dangerous because when the serial port is opened by software, it reboots the arduino. I removed a component from the board to prevent auto resets. Please use extra caution!

    Attached Files:

    • Useful Useful x 2
  8. Oldiron

    Oldiron Oldiron Gold Contributor

    Joined:
    Sep 3, 2017
    Messages:
    6
    Location:
    Germany
    Balance:
    61Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Motion platform, 6DOF
    Thank you a lot, i will try to understand your code and try too not to bother you :) We got a separate motor with vfd so we can give it a shot. I will let you know.
    Thx,
    Stefan
  9. elnino

    elnino Active Member

    Joined:
    Apr 1, 2010
    Messages:
    239
    Occupation:
    Computer Geek
    Location:
    Adelaide, Australia
    Balance:
    1,512Coins
    Ratings:
    +137 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    No probs. I'm not opposed to helping you, it's just that I have limited ability to test as I don't have any of that hardware anymore.
  10. Oldiron

    Oldiron Oldiron Gold Contributor

    Joined:
    Sep 3, 2017
    Messages:
    6
    Location:
    Germany
    Balance:
    61Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Motion platform, 6DOF
    Whaat, you quit such a toy :) Ok, I get that it is a huge pile of scrap metal, literally in our case since we got the old motors and vfr´s from a factory after an upgrade there. However, we´ll set up a separate vfr and motor tonight and se what reaction we get. After that i hope to adapt the code to our needs, especially start/stop signals for safety reasons. I keep you updated, thank you a lot again :)
  11. Miwik

    Miwik New Member

    Joined:
    Feb 15, 2023
    Messages:
    10
    Balance:
    37Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino
    I have a question, once settings are made on SMCutilities, should it be open every time you use simtools or can you close it?
    Last edited: Mar 11, 2023
  12. elnino

    elnino Active Member

    Joined:
    Apr 1, 2010
    Messages:
    239
    Occupation:
    Computer Geek
    Location:
    Adelaide, Australia
    Balance:
    1,512Coins
    Ratings:
    +137 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Please re-read forum rules.
    • Agree Agree x 1
  13. Miwik

    Miwik New Member

    Joined:
    Feb 15, 2023
    Messages:
    10
    Balance:
    37Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    3DOF, Arduino
    sorry, my browser is in automatic translation. I edited my post
    • Like Like x 1
  14. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,030
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,878Coins
    Ratings:
    +10,879 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    No, the SMC3 utility is just for configuring your hardware, if you run it at the same time as SimTools it will create a port conflict with that hardware.
    • Like Like x 2
  15. elnino

    elnino Active Member

    Joined:
    Apr 1, 2010
    Messages:
    239
    Occupation:
    Computer Geek
    Location:
    Adelaide, Australia
    Balance:
    1,512Coins
    Ratings:
    +137 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Also be careful with Arduino resets on com port open, it can cause a dangerous situation if motor power is applied before com port is open. I would recommend disabling the reset circuit on the Arduino board.
  16. Don Weatherby

    Don Weatherby New Member Gold Contributor

    Joined:
    Jan 23, 2023
    Messages:
    8
    Balance:
    - 49Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    6DOF
    I have a question regarding my platform. When running smc utils i set the pwmmax to 255 and the motors are strong and lift easily. but when in game they shut off under load. How do i set the pwmmax to 255 for in-game? Do i have to change it in the arduino code?
  17. Pierre Lalancette

    Pierre Lalancette Sir Lalancelot Gold Contributor

    Joined:
    Dec 11, 2016
    Messages:
    949
    Occupation:
    Tech Artist
    Location:
    Quebec, Canada
    Balance:
    7,719Coins
    Ratings:
    +892 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 6DOF
    There should not be a difference between the two.
  18. Don Weatherby

    Don Weatherby New Member Gold Contributor

    Joined:
    Jan 23, 2023
    Messages:
    8
    Balance:
    - 49Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    6DOF
    When I am running Sim utils does that set pwmmax ? I am not sure why motors will handle a huge load in simutils and not ingame then.
  19. Pierre Lalancette

    Pierre Lalancette Sir Lalancelot Gold Contributor

    Joined:
    Dec 11, 2016
    Messages:
    949
    Occupation:
    Tech Artist
    Location:
    Quebec, Canada
    Balance:
    7,719Coins
    Ratings:
    +892 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 6DOF
    If you save the settings, it should reflect in the game.
  20. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,030
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,878Coins
    Ratings:
    +10,879 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The purpose of the SMC3 utility is to tune all parameters specifically for your hardware. I very much doubt pwmmax at 255 is appropriate.

    Can you please post pictures of all of your SMC3 settings.

    And following the SMC3 set up steaps please let us know at what pwmmax value the motor starts to move:
    1. Disconnect the motor power supply
    2. Make sure Simtools is not running – we’re not ready for that yet!
    3. Wire up the Arduino (with SMC3 installed) to your H-Bridges and connect to your computer via USB
    4. Run the Windows SMC3 Utility software and make sure it communicates with the Arduino (There is no need to set baud rates, they are not configurable)
    5. Set the Kp, Ki, Kd, PWMmin, PWMmax, PWMrev to 0 for ALL motors (This will make sure the motors don’t move)
    6. Set Clip to 255 (you need to do this first) and Limit to 255 (This will give you plenty of margin if something goes wrong while setting up)
    7. Turn on the power to your motors – nothing should move at this stage!
    8. Set Kp to about 400
    9. Now slowly, increase PWMmax… at some point the motor should start to move. When it does check the “Green” feedback line is moving toward the “Blue” target position.
      • If it is then that motor and feedback is wired correctly - proceed to test other motors.
      • If it is moving away turn off motor power immediately (or quickly reduce PWMmax again). In this case you need to either reverse the wires to the motor being tested –OR– reverse the +5V and GND wires to your feedback pot for the motor being tested (do not do both). Restart the test from the beginning.
    10. Do the above for each motor