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

Need help with SMC3

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by Tim Herschbach, Jan 12, 2024.

  1. Tim Herschbach

    Tim Herschbach Member Gold Contributor

    Joined:
    Oct 23, 2023
    Messages:
    46
    Balance:
    246Coins
    Ratings:
    +14 / 0 / -0
    I'm trying to get my motors to respond but I don't really understand how to use SMC3. I have 2x 24v PSU's; 2x IBT2's 24v; 2x 75rpm, 24v, 250w motors; ard uno r3. Pots are 360 hall.

    I've followed these steps as best I can For #6, I don't see a "Clip" or a "Limit". I have "Max Limits" and "Clip Input" so I set those to 255.

    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
    My motors do nothing. They were initially "twitching" back and forth when I plugged in the uno but when I loaded up SMC3, they stopped. How do I proceed? Thanks so much.

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      326.1 KB
      Views:
      76
    • 2.jpg
      2.jpg
      File size:
      295.2 KB
      Views:
      74
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,862
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,009Coins
    Ratings:
    +10,845 / 53 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  3. Tim Herschbach

    Tim Herschbach Member Gold Contributor

    Joined:
    Oct 23, 2023
    Messages:
    46
    Balance:
    246Coins
    Ratings:
    +14 / 0 / -0
    Sorry, I set Mode 2 already.

    I've read through those parameters several times, but I'm still not sure how to use them to get the motors to spin. It's not written for someone who isn't experienced in this stuff. For example, what is PID? Are my settings in the above ss correct?
    Last edited: Jan 13, 2024
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,862
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,009Coins
    Ratings:
    +10,845 / 53 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    It takes time and research to learn anything new, and there is a bunch to learn when it comes to DIY motion rigs, which is where the FAQs come in as a handy starting point for any initial questions: https://www.xsimulator.net/community/faq/

    Here is a gentle introduction to PID, written with another controller in mind, but the analogy is a handy way to wrap your head around PID, and you can always dive into deeper technologically more accurate descriptions once you have a basic understanding, if you ever feel the need: https://www.xsimulator.net/community/faq/a-laymans-analogy-guide-to-pids-pid-tuning.219/

    The SMC3 setup steps should be followed first, before getting into the rest of the settings, to make sure it moves as expected. If it does not something is wrong and needs to be fixed.

    Initial Setup
    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
    • Like Like x 1
  5. Tim Herschbach

    Tim Herschbach Member Gold Contributor

    Joined:
    Oct 23, 2023
    Messages:
    46
    Balance:
    246Coins
    Ratings:
    +14 / 0 / -0
    Thanks Noor, I included those initial steps in the OP to indicate I had already done them. I apologize if that wasn't clear.

    On a hunch, I disconnected the pot belts and sure enough, it's responsive now... I can make the green line move around by rotating the pot by hand and the motor goes one way or the other depending on which side of the neutral I'm on. So that's good news. Tomorrow I'll have more time to dive into the above info if needed.
    • Like Like x 1
  6. Tim Herschbach

    Tim Herschbach Member Gold Contributor

    Joined:
    Oct 23, 2023
    Messages:
    46
    Balance:
    246Coins
    Ratings:
    +14 / 0 / -0
    I've got both motors and pots centered and they're responding as expected. I'm assuming SMC3 is writing these parameters to the ard? I can't find anywhere a description of what it actually does other than control the motors. The reason I need to know this is because I don't want the limits I've set to disappear if I'm not running SMC3 and put a hole in my floor and break off the pots.

    So does SMC3 actually make changes to the ard or is it just to make sure the motors are moving correctly before going into SimTools?
  7. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,862
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,009Coins
    Ratings:
    +10,845 / 53 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Yes the SMC3 utility purpose is to set the values in the SMC3 code on the Arduino.

    You can't run SMC3 and SimTools and the same time, as that would create a port conflict.
    • Like Like x 2
  8. Tim Herschbach

    Tim Herschbach Member Gold Contributor

    Joined:
    Oct 23, 2023
    Messages:
    46
    Balance:
    246Coins
    Ratings:
    +14 / 0 / -0
    Thanks, someone before told me SMC3 doesn't change the code which is what caused my confusion. Everything is working now, just doing lots of tweaking.
    • Like Like x 1
  9. Jango

    Jango New Member

    Joined:
    Aug 12, 2024
    Messages:
    15
    Balance:
    61Coins
    Ratings:
    +2 / 0 / -0
    Hi Tim, I am building the same setup as yours.
    I have looked at the tutorials and could not see anyone centering the lever arm (attached to the motor shaft).

    My question is:
    - is there a setting to centre the arm (so it has equal room to move up or down) and then zeroing the potentiometer and finally connecting all mechanical links?

    - or do you disconnect the sensor belt, manually rotate the motor shaft to the centre position, zero the potentiometer and then connect everything?

    My motors (similar to yours) are on their way and I'm not sure whether I can turn the shaft by hand as it has a gearbox.

    Thanks.
  10. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,862
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,009Coins
    Ratings:
    +10,845 / 53 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    You need to disconnect the sensor belt, manually rotate the motor shaft to the centre position, zero the potentiometer and then connect everything.
    • Like Like x 1