1. 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!
  2. 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
  3. 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. Blame73

    Blame73 Well-Known Member

    Joined:
    Nov 6, 2014
    Messages:
    1,178
    Location:
    Italy
    Balance:
    8,091Coins
    Ratings:
    +1,050 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    Hey @gabe,
    I'm using the same MD30C, I'm using MODE 2 in a SMC3 I modified.
    You can find infos in my thread here

    @p00ky is using my modified version with his MDDS30 and is working fine for him too
    • Like Like x 1
  2. gabe

    gabe New Member

    Joined:
    May 21, 2020
    Messages:
    8
    Balance:
    110Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    @Blame73 ,

    Thank You! This is great and I will give it a go in a few days (I crashed into a pot yesterday in manual mode and am waiting on replacement), but am excited to try it! Thank you for the reply. It's valuable to have such a helpful community like this.
    • Like Like x 1
    • Agree Agree x 1
  3. Djalma Ribeiro

    Djalma Ribeiro Member

    Joined:
    Mar 24, 2020
    Messages:
    40
    Occupation:
    Drone Pilot
    Location:
    Cuiabá, Brazil
    Balance:
    15Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    Why didn't this work for me? Is there currently some kind of different configuration?
    I wish my engines were at maximum height when turning off the game.

    upload_2020-6-1_17-0-6.png
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    16,077
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    117,287Coins
    Ratings:
    +9,376 / 46 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    In Startup and Shutdown basically what you are doing is sending an ASCII char for the value of <x> (where x = 0 through 255), page 45 of the SimTools manual: https://www.xsimulator.net/community/faq/rtfm-start-with-the-official-simtools-documentation.117/

    So with JRKs, which I use, 221 is the on command for Position, 63 tells it where to go and 225 turns it off.
  5. Djalma Ribeiro

    Djalma Ribeiro Member

    Joined:
    Mar 24, 2020
    Messages:
    40
    Occupation:
    Drone Pilot
    Location:
    Cuiabá, Brazil
    Balance:
    15Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    Excuse me. I appreciate the help but I still don't understand anything.

    Give me a practical example please. What is the amount I need to fill so that my engines are in the highest position?

    upload_2020-6-1_19-40-51.png
  6. gabe

    gabe New Member

    Joined:
    May 21, 2020
    Messages:
    8
    Balance:
    110Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    So I downloaded this code to help with my issue where one motor would turn the same direction regardless of which side of the blue target line the pot input was on, but now two motors are having that problem.. Does anyone know what the cause could be? I attached a video of the issue.

    https://www.icloud.com/photos/#0obJ8k_HcZSrAHX0wWI32k6Fg
  7. accelero

    accelero New Member

    Joined:
    Jun 30, 2015
    Messages:
    6
    Location:
    france
    Balance:
    - 6Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    2DOF, AC motor, Arduino
    Hello, not sure to be on right thread.......I can’t figure out what I have to send to smc3 rc model sketch using Processing to send my data
    I know that Format is supposed to be RxxxLxxx~But I can’t translate that in terms of serial.write () instruction in Processing
    Has anyone a suggestion ? should be delighted
  8. Marcos73

    Marcos73 Member

    Joined:
    Feb 14, 2020
    Messages:
    73
    Balance:
    364Coins
    Ratings:
    +49 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hello, please help, I test my engines on the SMC3, start the cycle but stop, it seems that they lose strength, does anyone have an idea of what it could be?
    The engines are weight free in this test.
    Thank you.

    [​IMG]
  9. Bastiuscha

    Bastiuscha Active Member Gold Contributor

    Joined:
    Apr 1, 2017
    Messages:
    221
    Location:
    Germany
    Balance:
    233Coins
    Ratings:
    +132 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Your green line (the pot feedback) is stopping sending information, or i get it wrong?
  10. Bastiuscha

    Bastiuscha Active Member Gold Contributor

    Joined:
    Apr 1, 2017
    Messages:
    221
    Location:
    Germany
    Balance:
    233Coins
    Ratings:
    +132 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    But i also have a question that's been bothering me for some time:
    Can someone explain to me what Fpwm is changing in practice? Unfortunately I have not really understood it until today. My frame moves the same, no matter if 5 or 30khz. Will the engines become less hot on less khz? Would be very nice to know from you guys.
  11. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    16,077
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    117,287Coins
    Ratings:
    +9,376 / 46 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Fpwm The frequency of the selected Motor PWM. Note Motors 1 and 2 are tied together and will always have the same PWM frequency and have more selection options than Motor 3. This is a limitation of the microprocessor used on the Arduino Uno.
  12. Bastiuscha

    Bastiuscha Active Member Gold Contributor

    Joined:
    Apr 1, 2017
    Messages:
    221
    Location:
    Germany
    Balance:
    233Coins
    Ratings:
    +132 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks, but that's not what I meant. What's the difference in practice?
  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    16,077
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    117,287Coins
    Ratings:
    +9,376 / 46 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    • Like Like x 1
  14. Bastiuscha

    Bastiuscha Active Member Gold Contributor

    Joined:
    Apr 1, 2017
    Messages:
    221
    Location:
    Germany
    Balance:
    233Coins
    Ratings:
    +132 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks! In the comments of this link, i found the answer i searched for:

    --------------------------------------------------------------------------------------------
    "A practical motor behaves roughly like a resistor and inductor in series with a real motor. For efficient operation you need should switch between connecting the motor to the supply and shorting it out. While the motor is connected to the supply, the current will become more positive. When shorted, it will become more negative. Efficiency will go downhill markedly if the current switches polarity, because the motor will spend part of each cycle trying to mechanically fight what it's doing in other parts.

    From the standpoint of the motor itself, efficiency will be at its best when the PWM rate is as high as possible. Two factors limit the optimum PWM rate, however:

    Many motors have a capacitor in parallel with them in an effort to minimize electromagnetic interference. Every PWM cycle will need to charge and discharge that cap, wasting a full load of energy. Losses here will be proportional to frequency.

    Many H-bridge switches take a certain amount of time to switch; while they are switching, much of the power going into them will be wasted. As the PWM on and off durations shrink toward the point where the bridge is spending most of its active or inactive time switching, switching losses will increase.

    What's most critical is that the PWM rate be fast enough that the motor doesn't fight itself. Going faster beyond that will improve motor efficiency somewhat, but at the expense of increase the other aforementioned losses. Provided there isn't too much parallel capacitance, there will generally be a fairly big range of frequencies were PWM losses are minimal and motor current polarity remains forward; a frequency somewhere near the middle of that range will probably be best, but anything within that range should be adequate."
  15. Marcos73

    Marcos73 Member

    Joined:
    Feb 14, 2020
    Messages:
    73
    Balance:
    364Coins
    Ratings:
    +49 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hello, I manually activate the potentiometers and the same effect happens, the motors stop.
  16. Bastiuscha

    Bastiuscha Active Member Gold Contributor

    Joined:
    Apr 1, 2017
    Messages:
    221
    Location:
    Germany
    Balance:
    233Coins
    Ratings:
    +132 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Do the switches still stay "on", or they turn into "off"? (like on the picture i created)

    Attached Files:

  17. yondwangmms

    yondwangmms Member

    Joined:
    Feb 14, 2018
    Messages:
    35
    Balance:
    - 190Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Very good introductory tutorial, I believe that under the guidance of this tutorial I will quickly complete my motion simulator platform!
  18. Marcos73

    Marcos73 Member

    Joined:
    Feb 14, 2020
    Messages:
    73
    Balance:
    364Coins
    Ratings:
    +49 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    [QUOTE = "Bastiuscha, post: 200610, membro: 25016"] Os interruptores ainda permanecem "ligados" ou se tornam "desativados"? (como na foto que eu criei) [/ QUOTE]

    Yes, they remain on, and when I operate the pots manually, I cross all limits, but I do not move, it seems that there is not enough energy to move.
    Last edited: Jun 19, 2020
  19. Bastiuscha

    Bastiuscha Active Member Gold Contributor

    Joined:
    Apr 1, 2017
    Messages:
    221
    Location:
    Germany
    Balance:
    233Coins
    Ratings:
    +132 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Then it looks like it's your motor driver. Or really your power supply is the reason. What you use as driver? There is no error led active?
  20. Marcos73

    Marcos73 Member

    Joined:
    Feb 14, 2020
    Messages:
    73
    Balance:
    364Coins
    Ratings:
    +49 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    OK, THE SOURCE IS OK, I WILL OPEN THE BOX AND CHECK THE H BRIDGE (MONSTER SHIELD). THANK YOU.

    FOLLOW VIDEO OF ELECTRONICS

    • Friendly Friendly x 1
    Last edited: Jun 19, 2020