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

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Obviously you are using insufficient hardware or not sufficient motor driver. Please upload more details about your system.
  2. franccac

    franccac New Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    21
    Location:
    Barcelona
    Balance:
    32Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    Hi Pit, I'm using Arduino Uno R3, 2 Arduino IBT2, sensors Hall, 24V 400W 15A power supply and 2 wiper motors of 24V 70W (50rpm aprox). Where do you think is the problem? I'm using this system with Xsim some months and it works. Thank you.
  3. Joao Neto

    Joao Neto Mucilon

    Joined:
    Jan 13, 2017
    Messages:
    61
    Occupation:
    Computer engineer
    Location:
    Salvador - Brasil
    Balance:
    310Coins
    Ratings:
    +36 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    @franccac Have you tried with PWMmax at 200 or more? Underneath that I think you really can not handle it.
  4. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,952Coins
    Ratings:
    +1,016 / 10 / -1
    Think of Simtools and SMC3 as two separate things until you get your head around it.

    SMC3 simply takes any value from its serial input - valid values are 0 to 1023. It has no idea what is sending the data just getting values from 0-1023. If you set a "clip limit" of say 85 it will "clip" 85 off each end of that range. So any values less than 85 or greater than 1023-85 will be limitted to that range. If the motors still move past these limits from momentum then the feedback signals (also 0-1023 because its a 10bit ADC) will tell the software that and SMC3 will attempt to brake the motors by putting them in reverse while ever the "feedback" is less than 85 or greater than 1023-85.

    Now the SMC3 "max limits" work in a similar way but only on the feedback signal. So say the "max limits" are set at 20 and the feedback signals go less than 20 or greater than 1023-20 then the motors will be shut-off for safety. But remember if the clip limits are setup and working well then hopefully the motors will be stopped and reversed back into the working range before they get to the "max limits" and get shut down.

    All the above happens independently of simtools - remember I said SMC3 doesn't know what simtools is doing or what game is running or your axis settings are, its just getting position values that can be between 0 and 1023.

    So Simtools then is responsible for sending values which by default are limitted to 0-1023 because you have setup the interface to 10bits for SMC3. Whether the output values actually range from 0-1023 will then depend on the axis setup and game output along with the tuning center setup etc.
    • Useful Useful x 2
  5. Joao Neto

    Joao Neto Mucilon

    Joined:
    Jan 13, 2017
    Messages:
    61
    Occupation:
    Computer engineer
    Location:
    Salvador - Brasil
    Balance:
    310Coins
    Ratings:
    +36 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    @RufusDufus

    So my question was the following the Simtools sends from 0 to 1023 that ok.

    Already in the Arduino if I set my Clip to 100, then it does a

    newvalue = Map (value, 0,1023,100,1023-100); would it be this?

    My question was if this happened in the clip or max input, for your explanation I came to the conclusion is in the clip, I am sure?

    EDIT:

    I went searching the SMC code, I killed my doubts. Now I understand what you said about cutting the value.

    if (Target1>InputClipMax1) { Target1=InputClipMax1; }
    else if (Target1<InputClipMin1) { Target1=InputClipMin1; }

    Now talking about adjusting the simtools, let's say that if I set the axis of the simtools to 100% it goes from 0 to 1023 so for example if I set a value for the clip of 200. and the simtools to send 100 I lose 100 steps ok? Is this a problem I can lose accuracy?

    Should I work on the axis values so it does not exceed the maximum and minimum values defined in the SMC?
    Last edited: Jul 31, 2017
  6. franccac

    franccac New Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    21
    Location:
    Barcelona
    Balance:
    32Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    Yes I've try it, but it goes crazy, if you search in youtube "SMC3 2DOF wiper motor problem" from franccac23 user (yes it's me jaja) you could see an example (I still can not put links sorry). This night I will look again.
  7. Joao Neto

    Joao Neto Mucilon

    Joined:
    Jan 13, 2017
    Messages:
    61
    Occupation:
    Computer engineer
    Location:
    Salvador - Brasil
    Balance:
    310Coins
    Ratings:
    +36 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    @franccac
    I just saw the video, high chances of being a problem in the potentiometer, I think it is not well fixed or this problem, because when the potentiometer keeps changing without any reading stopped, the engine does not stop because it moves according to the value Of the potentiometer. Try increasing the deadzone value in the SMC program.

    To see clearly in the video that when you hit the potentiometer varies and can not fix the value again by itself.
    Last edited: Jul 31, 2017
  8. franccac

    franccac New Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    21
    Location:
    Barcelona
    Balance:
    32Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    I have modified to this parameters (image) and moves okay, but only if I put some weight on the seat.

    I think that the motors have some movement of the axle and the hall sensor detect this movement. I will try with LFS later, and if it works okay with me in the seat I will reforce the axle of the motors.

    Thanks both, I will come with the result.

    Attached Files:

  9. Joao Neto

    Joao Neto Mucilon

    Joined:
    Jan 13, 2017
    Messages:
    61
    Occupation:
    Computer engineer
    Location:
    Salvador - Brasil
    Balance:
    310Coins
    Ratings:
    +36 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    @franccac

    "Deadzone This creates a hysteresis zone for the motor feedback If you need values greater than 1, you probably have too much “slack” in your mechanical setup."

    I think you have to review the support of the motor and the sensors, deadzone 5 is enough, you will lose a lot of precision.

    If you compare your old graphic with the current one you will notice how much noise you have in the green graphic potentiometer, ideally it will be noise-free with 0 or 1 deadzone.
  10. franccac

    franccac New Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    21
    Location:
    Barcelona
    Balance:
    32Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    @Joao Neto

    I have tried growing deadzone, I put it to the maxim (20) and I do not see any diference, the motors moves out the axle to hall sensor... Is an internal problem of the motors. Also have some noise in the motors in standby, I will look this when solve first problem.
  11. franccac

    franccac New Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    21
    Location:
    Barcelona
    Balance:
    32Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    • Winner Winner x 2
  12. BrassEm

    BrassEm G-Seat + SFX100 Builder Gold Contributor

    Joined:
    Apr 15, 2015
    Messages:
    130
    Location:
    NE of YMML
    Balance:
    1,066Coins
    Ratings:
    +49 / 0 / -0
    My Motion Simulator:
    DC motor, AC motor, 4DOF
    G'day Rufus,

    Would you be kind enough to mention in your documentation if it gets updated, that you use Pin 8 on the Arduino for internal mechanisms of your software and is unavailable. I was trying to piggy-back my ACS70028DH boards straight onto the Arduinos but not to be.


    void TogglePin()
    {
    static int PinOut=0;
    PinOut=1-PinOut;
    digitalWrite(8, PinOut);
    }

    Cheers,
  13. wangdaokun

    wangdaokun New Member

    Joined:
    Jun 24, 2017
    Messages:
    13
    Location:
    2 AVENUE FRANKLIN D ROOSEVELT 21000 DIJON
    Balance:
    148Coins
    Ratings:
    +5 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hello, my simulation platform in LFS simulator auto shift when the vibration is very large, AC simulator is normal. The simulator is my problem set or two of G force simulation is not the same? (LFS simulator effect has a tuning is very low, "sway" 27%)
  14. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,146
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,571Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Can you please post this on your build thread and include pictures of all of your settings.

    A video showing the problem would also assist troubleshooting.
    • Agree Agree x 1
  15. Andrea 1968

    Andrea 1968 Member

    Joined:
    Jul 1, 2015
    Messages:
    65
    Location:
    italia
    Balance:
    193Coins
    Ratings:
    +40 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks rufus work great. Following tutorials worked everything to perfection at the first attempts. Great sensitivity seems like a steep motor, perfect on all 3 channels.moster motion in configuration of 30 A, my video at the following link
    Thanks rufus work great. Following tutorials worked everything to perfection at the first attempts. Great sensitivity seems like a steep motor, perfect on all 3 channels.moster motion in configuration of 30 A, my video at the following link
  16. Schopfer

    Schopfer Member

    Joined:
    Jul 20, 2017
    Messages:
    48
    Location:
    Thailand
    Balance:
    86Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    It's can use with Chinese Uno SMD board? My 1 boad can use SMC3 but Motor and pot not working.

    Attached Files:

    • Winner Winner x 1
    Last edited: Aug 13, 2017
  17. Andrea 1968

    Andrea 1968 Member

    Joined:
    Jul 1, 2015
    Messages:
    65
    Location:
    italia
    Balance:
    193Coins
    Ratings:
    +40 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    My 2dof simulator works with a chinese arduino with SMC3 and goes great
    This is the link I used
    arduino + MM SMC3 2dof (FILEminimizer).jpg
  18. Schopfer

    Schopfer Member

    Joined:
    Jul 20, 2017
    Messages:
    48
    Location:
    Thailand
    Balance:
    86Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    My old chinese board can run but new not run.
  19. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,936
    Location:
    London
    Balance:
    11,844Coins
    Ratings:
    +474 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    i have a question regarding limits

    every now and then one of my motors stops working and a reset gets the sim working again

    i am assuming the limit has been exceeded

    my sim is designed so full rotation is possible without damaging the rig

    is it possible to increase the limits or turn them off - so the motor does not stop working ?
  20. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,146
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,571Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Do you have a build thread link and can you please post pictures of all of your settings on it, as your question belongs on your own thread, not here.