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

    Carl New Member Gold Contributor

    Joined:
    Oct 29, 2023
    Messages:
    23
    Location:
    Paris 75018
    Balance:
    79Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Lol the translator fr doesn't work well I want to pat it
    Thermal paste
  2. Carl

    Carl New Member Gold Contributor

    Joined:
    Oct 29, 2023
    Messages:
    23
    Location:
    Paris 75018
    Balance:
    79Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    • Informative Informative x 1
    Last edited: Nov 4, 2023
  3. ordanssela

    ordanssela New Member

    Joined:
    Jul 17, 2023
    Messages:
    4
    Balance:
    - 58Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, SimforceGT, Motion platform
    Can someone help me? motor 1 works and then off, I'm using Arduino UNO SMD
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,094
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,246Coins
    Ratings:
    +10,892 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Can you please post picture of all of your settings.

    Have you used a multi-meter to test the hardware?
  5. Matthew Bangerter

    Matthew Bangerter Member Gold Contributor

    Joined:
    Jun 27, 2014
    Messages:
    35
    Occupation:
    Mechanical Engineer
    Location:
    Mesa, AZ
    Balance:
    48Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    REASSIGNED PINS FOR STACKED MOTOR MONSTER SHIELD, MOTORS NOT MOVING :(

    So I have had my setup running on the racingmat code for years now and wanted to try out the SMC3 code to do some more fine tuning. I built a whole setup around using the MotoMonster shield stacked on the arduino so I really would like to keep the stacked configuration, however the pinouts are different so I attempted to change the pin assignments in the code to match the stacked configuration. I did try wiring everything up per the tutorial first and was able to get it working correctly, however when I re-assigned pins the motors no longer work. Essentially I just followed the wires on the diagram from @eaorobbie took all of the MotoMonster side pin numbers and assigned to those same ones in the Arduino Code since they are the same once stacked, giving me this (I am not using motor 3, so I just reassigned those numbers to un-used pins since the code still looks for those variables.)

    upload_2023-11-23_13-45-36.png

    I am able to connect with the SMC3 utility just fine and I am able to see the green line move around when I manually move the encoders (I am using the BI 6127V1A180L.5FS hall effect position sensor), so that input seems to be working just fine, however when I follow the "Initial Setup" Section in the tutorial, the motors don't move at all :(.

    green line below is from manually moving encoder. increasing PWM max does nothing
    upload_2023-11-23_14-12-10.png
    Anything obvious that I am doing wrong? Is there anything else in the code that needs to change besides these pin assignments at the top?

    ORIGINAL PIN ASSIGNMENTS
    upload_2023-11-23_13-47-30.png
    MODIFIED PIN ASSIGNMENTS
    upload_2023-11-23_13-46-57.png

    upload_2023-11-23_14-1-30.png

    upload_2023-11-23_14-1-57.png

    upload_2023-11-23_14-2-15.png

    upload_2023-11-23_14-2-47.png

    Attached Files:

    Last edited: Nov 23, 2023
  6. deeph46

    deeph46 Member

    Joined:
    Mar 17, 2023
    Messages:
    109
    Balance:
    612Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF
    Have a question, when Square waves running in SM3 app. Does the motor should move exactly squared signal? ie. when signal from below and move to above, it's a vertical signal. Should the motor allign with it or can it be an angle (Green line)? I got my green signal when moves like these at angled about 10deg from vertical (90deg).

    Attached Files:

  7. deeph46

    deeph46 Member

    Joined:
    Mar 17, 2023
    Messages:
    109
    Balance:
    612Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF
    Trying to help from my experienced, it looks like you have a zero PWMmin, have you try to bump up the value?

    Hope it helps.

    deeph
  8. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,094
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,246Coins
    Ratings:
    +10,892 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  9. deeph46

    deeph46 Member

    Joined:
    Mar 17, 2023
    Messages:
    109
    Balance:
    612Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF
    Even the PWMmin zeroed it will move the motor? I only tried DC motor for my motion, from my experienced if PWMmin zero value, my rig don't move at all. My motor rated for 24V 40W.

    My rig when running, if only some bump or curb it react great. But when I rallying and a high jump in game, when landing, my rig moves left behind. Attached is when doing Squared and Sine waves.

    Edit:
    Does Spring setup in WRC really affecting the motion details? If I setup Slow rebound low enough, does my rig also extend slow? If it so, my rig running like it should, maybe.

    Attached Files:

  10. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,094
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,246Coins
    Ratings:
    +10,892 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Initially PWMmin is set zero value as part of the SMC3 configuration, until raising the value of PWMmax to move the motors is determined. After that all values are refined, including PWMmin, which sets the duty cycle.

    What do you mean by your query "Spring setup in WRC really affecting the motion details", do you mean the spring setup of the vehicle, or something else? If an in-game setting affects the telemetry the game output then it will have an impact on motion setting, but only if the setting affects telemetry output.
  11. deeph46

    deeph46 Member

    Joined:
    Mar 17, 2023
    Messages:
    109
    Balance:
    612Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF
    Seems I have different interpretation. I just tried PWMmin at zero, it is move. I don't know why at firstly built my rig not moving at zero before.
    Does DC motor with potensiometer with high PWMmin values will buzz/like they were always adjusting their position?

    Yes, spring setup of the vehicle. I see, I will give another tests with higher slow rebound (extend faster).
    So, what do you think of my graphs? Do my motors not enogh rotation?
    Motor is 2000rpm with 1:3 gearbox, so it reduced into 666rpm with 1605 ballscrew.
  12. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,094
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,246Coins
    Ratings:
    +10,892 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Your tracking is pretty good, but lags a little in fast changes.

    In my view the accuracy of motor movement is way more important than the range of motor movement.

    While written with another control board in mind, the key points of this gentle introduction to PID still apply, in terms of what you see compared to what you may be aiming for: https://www.xsimulator.net/community/faq/a-laymans-analogy-guide-to-pids-pid-tuning.219/
  13. deeph46

    deeph46 Member

    Joined:
    Mar 17, 2023
    Messages:
    109
    Balance:
    612Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF
    Yes, I did your suggestion before that I have after the accuracy of the movement. But I feel like for my rig, the range not enough. It has only 2cm up and 2cm down. Then I change my design with range 5cm up and 5cm down, now I can feel the whole rig move a lot better. I still have both the accuracy (low and mid, long travel still need more tuning like you see in graphs) and a lot of range.

    Now I'm trying to mount my motor without gearbox and get way more faster. I can reach the vertical wave lined up. Way too much speed I think, need tuning in SMC3.
    I actually quite familiar with PID but I will try to read the link you mentioned. Might be different in motion rig use.
  14. Matthew Bangerter

    Matthew Bangerter Member Gold Contributor

    Joined:
    Jun 27, 2014
    Messages:
    35
    Occupation:
    Mechanical Engineer
    Location:
    Mesa, AZ
    Balance:
    48Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks, I tried bumping up the value and does nothing for me. I have the motor working fine with the standard pinouts, I am just trying to see if anyone has successfully changed the pinouts per the below?

    [​IMG]
    And if nobody has, is there any reason it can't be done?
  15. deeph46

    deeph46 Member

    Joined:
    Mar 17, 2023
    Messages:
    109
    Balance:
    612Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF
    BTW, Are you using Simhub? Or other apps that are using UNO port?
    Last edited: Dec 3, 2023
  16. Yeti86

    Yeti86 New Member

    Joined:
    Nov 24, 2023
    Messages:
    21
    Balance:
    132Coins
    Ratings:
    +6 / 0 / -0
    i'm sorry if its obvious, but how do i center the shaft over software in SMC3 utility?
    i'm not referring to go to center position, but to feed in the controller a center position other than native, like, editing the real shaft. i got a spline and it needs to be in a proper orientation, and i can't move the poti any further to accommodate without re drilling the thing

    can that only be done physical by moving the encoder?

    thanks
  17. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,094
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,246Coins
    Ratings:
    +10,892 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The pot provides the positional feedback and hence it can be rotated to center the motor.
  18. Matthew Bangerter

    Matthew Bangerter Member Gold Contributor

    Joined:
    Jun 27, 2014
    Messages:
    35
    Occupation:
    Mechanical Engineer
    Location:
    Mesa, AZ
    Balance:
    48Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I do have simhub, however everything seems to work fine with the original pinout, so it doesnt seem like that is causing any interference
  19. Luis Pinho

    Luis Pinho Member

    Joined:
    Sep 11, 2015
    Messages:
    61
    Location:
    Portugal
    Balance:
    637Coins
    Ratings:
    +26 / 0 / -0
    Hi all, running my final tests before mounting the motors to the rig.
    I'm able to run the sine for minutes without any problem whatsoever.
    And it seems to be a very follow up from the motor.
    upload_2023-12-29_23-21-3.png
    But, if I start a motion, in seconds or minutes (depending on the generated wave), it seems that after an abrupt movement (up or down), it stops trying.

    upload_2023-12-29_23-23-7.png

    I already tried to set the Kp to 1000 to try to fix this, although it seems to handle the abrupt changes a bit better it eventually stops trying.

    Any clues on what I'm doing wrong? (I have to stop the SMC3 Utils and start it again to get the tracking going again).

    Thanks for all your help

    Thanks for you help,
    LP
  20. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,094
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,246Coins
    Ratings:
    +10,892 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Looks like you have not yet set Max Limits and Clip Input, you may also need to tweak PWMmax and PWMrev.