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

Question Crazy and nervious motors Sabertooth SCM3 code

Discussion in 'SimTools Pro & Entertainment Version' started by Manes, Aug 17, 2021.

  1. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
    Hi people. I am using Arduino with Sabertooth 2x60 with SCM3 codewith 2 motors of 24 v. I am configuring the sim but I have problems. Whith the Sway force generate some retroalimentation. I test some posibilities and the only way I find is in the tunning center, but if i down the movement in the tuning center of Sway force, i have only a bit of movement. I check some posibilities but I need help now D)
  2. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
    I check some posibilities but i dont Found the solution. When the motors are crazy, i need restart SCM3

    Attached Files:

  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  4. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
    Yes, i am using @BlazinH code. The test of smc works good in manual, triangle.... If only works the sway axis, i have the same problem. Only can have a bit of movement in tunning center before the motor are crazy
  5. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
    Sometimes this IS the problem. Other times the motors start to be nervious and I need restart scm3
  6. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
  7. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    You need to set your Clip and Max limits, then likely refine you settings in SMC3: https://www.xsimulator.net/communit...driver-and-windows-utilities.4957/#post-48121

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

    [​IMG]
  8. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
    I find the solution but don find a good movement of the sim. And I dont understand what is better when the motors tremble. I dont know if is needs up the limits, down the limits, up the clip input or down up the PWMmin, up the rev PWM or.....
    I try many posibilities but dont found....
  9. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    First follow the initial SMC3 setup steps:

    1. Set the Kp, Ki, Kd, PWMmin, PWMmax, PWMrev to 0 for ALL motors (This will make sure the motors don’t move)
    2. 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)
    3. Turn on the power to your motors – nothing should move at this stage!
    4. Set Kp to about 400
    5. 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.
    6. Do the above for each motor

    Then carefully read through the subsequent post of the link previously provided, which explains each of the tuning options: https://www.xsimulator.net/communit...driver-and-windows-utilities.4957/#post-48121

    Here is a lay guide to PID: https://www.xsimulator.net/community/faq/a-laymans-analogy-guide-to-pids-pid-tuning.219/

    Once SMC3 if properly configured you can move on to SimTools, first download the SimTools manual and keep it handy for reference: https://www.xsimulator.net/community/faq/rtfm-start-with-the-official-simtools-documentation.117/

    See the motion profile tuning tips here: https://www.xsimulator.net/community/faq/steps-to-create-a-motion-profile.228/
  10. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
    ok boss. My SMC3 works correctly. I think all its ok but i drive 2 or 3 laps and start theproblem. Restart SMC3, touch in limits, clips, PWM depends the ocasion, go to drive and the problem starts before, or later... depends.... it´s difficult, I touch many things but dont found the solution. I have the manual in paper, I read many opinions about configurate the movement but its difficult....
  11. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  12. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
    I knows work with SMC3 and SimTools but i dont understand why after play a few minutes the motors are crazy

  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    If your configuration is not adequate the motors can likely be pushed outside the control bounds, likely triggered by some spike event like hitting something or a crash.
  14. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
    In this situation, it is posible I need regulate PWMmin, max, rev, and clip input and Limits? how can I know what i need change?
  15. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
    How can I do in this situation?

    Last edited by a moderator: Aug 19, 2021
  16. Manes

    Manes Member Gold Contributor

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    189Coins
    Ratings:
    +12 / 0 / -0
    @noorbeast if I use SMC3 in a second computer can I see what os the problem?
  17. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The SMC3 settings provide the control parameters, the settings can't be so aggressive that inputs can push past the limits set, see my previous post about understanding the SMC3 settings parameters and also the basics of PID: https://www.xsimulator.net/communit...otors-sabertooth-scm3-code.16430/#post-220078

    Your SimTools setting could well be exacerbating the lack of control via SMC3 settings. It is not a proper fix, but if the trigger is as it seems to be, spikes caused by a hit or crash, then lowering the Intensity Level in Profile Manager of Game Manager will likely lesson the likelihood of exceeding the SMC3 controls, as it effectively acts as a sort of global smoothing. But that is just masking the real issue, that your SMC3 plus SimTools settings need further refinement.