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 here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.
  4. All new posts and threads should be written in English. Please do not create dual posts in other languages. If you are not a master of the English language you can use an external service to create a translation of your words, for instance, Google translate or DeepL.
    Due to low activity, we've also closed the french section.
    Dismiss Notice

2DOF with wheelchair motors

Discussion in 'DIY Motion Simulator Projects' started by Bernd Manger, Jan 8, 2016.

  1. Bernd Manger

    Bernd Manger Active Member

    Joined:
    Oct 6, 2015
    Messages:
    156
    Occupation:
    Measurement and control mechanic
    Location:
    Germany
    Balance:
    1,006Coins
    Ratings:
    +256 / 12 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks, @speedy
    I will soon take videos of the sim and shifter.
    • Like Like x 2
  2. auryza

    auryza Active Member

    Joined:
    Jun 12, 2013
    Messages:
    109
    Location:
    Lithuania
    Balance:
    4,189Coins
    Ratings:
    +73 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, Arduino
    Do not be so modest ! What we see you are great programer !
  3. Bernd Manger

    Bernd Manger Active Member

    Joined:
    Oct 6, 2015
    Messages:
    156
    Occupation:
    Measurement and control mechanic
    Location:
    Germany
    Balance:
    1,006Coins
    Ratings:
    +256 / 12 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I was asked to post the Arduino and Processing3 files from my post:
    https://www.xsimulator.net/community/threads/2dof-with-wheelchair-motors.7905/page-2#post-125188

    Meant just for the sake of interest.

    At this moment these codes are NOT meant for members without Arduino- and Processing- programing skills.
    They are written to meet my hardware requirements. (2 motors with quadrature encoders, bluetooth interface, Sabertooth 2x32)

    About SMC3 and Quadrature encoders:
    In my opinion it's not possible without big changes. The SMC3-code reads the analog inputs(feedback pots) and calculates PIDs about 4000 times per second. So it's too busy to do deal also with encoders. But this high rate is not necessary. The values from SimTools come only 100 times per second(every 10msec).
    So i've decided to do PID calculations(now with floating point numbers for a better resolution) 125 times per second(every 8 msec). So there is enough time for the encoders and serial transmissions.
    Quadrature encoding needs a lot of Ard. performance. (max frequency is about 100kHz)
    For example:
    A motor with 3600 rpm and encoders(with 500 pulses per turn) mounted on the motor shaft = 30kHz count frequency.

    Because i needed other adjustment possibilities, but having no access to the SCM3Utilities-code, i've decided to write my own GUI with Processing3.

    Here is an overview:
    SMC_S.png
    Processing is used to set the PID parameters and watch the movements of the sim.
    But it is unhandy to work with an extra PC to do this.
    The good news:
    Because Processing is based on Java, it has an Android mode to write Apps.
    My goal is to transfer the Processing sketch to an App running on a tablet.

    For those members who do not know Processing:
    It is a sister project to Arduino and meant for all kinds of visualsations.
    It's also open source, has a simular gui, almost the same syntax and as many libraries available as Arduino.
    But it's based on Java, in contrast to the arduino code, based on C++.
    Arduino and Processing are a perfect combination.

    Attached Files:

    • Like Like x 3
    • Informative Informative x 1
    • Friendly Friendly x 1
  4. auryza

    auryza Active Member

    Joined:
    Jun 12, 2013
    Messages:
    109
    Location:
    Lithuania
    Balance:
    4,189Coins
    Ratings:
    +73 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, Arduino
    Hi @Bernd Manger @
    I have everything what i need, except rotary encoders, i'm still waiting for them to arrive. Definitely will try this kind of setup. But what i see above in this thread , gonna be a lot of questions. ;)
  5. Bernd Manger

    Bernd Manger Active Member

    Joined:
    Oct 6, 2015
    Messages:
    156
    Occupation:
    Measurement and control mechanic
    Location:
    Germany
    Balance:
    1,006Coins
    Ratings:
    +256 / 12 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Here are 3 videos about Arduino & quadrature encoding:



    • Informative Informative x 4
  6. bergstein

    bergstein New Member

    Joined:
    Feb 20, 2017
    Messages:
    4
    Location:
    CHINA
    Balance:
    153Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino
    Thanks for sharing the experience
  7. Tomsix

    Tomsix Member Gold Contributor

    Joined:
    Dec 6, 2016
    Messages:
    64
    Location:
    Németország
    Balance:
    192Coins
    Ratings:
    +18 / 0 / -0
    My Motion Simulator:
    Arduino

    Hi

    Hi, i work on my own sim 2dof with Wheelchair motors. I have no motor brakes on it and have a big problem with the backdrive. How do you avoid the backdrive effect if the motors are not powered.
    Any ideas welcome
  8. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    14,714
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    108,765Coins
    Ratings:
    +8,890 / 43 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The easiest approach is to make some locking chocks for when the rig is un-powered, and pivot them out of the way when you want to use it.
  9. Che Franklin

    Che Franklin im alot brighter than i look.. Gold Contributor

    Joined:
    Oct 25, 2019
    Messages:
    36
    Location:
    Cape Cod Ma USA
    Balance:
    594Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    HI and WOW great work.. how would i add 2 more of the exact same motors? Copy Paste and reassign? thx
  10. Che Franklin

    Che Franklin im alot brighter than i look.. Gold Contributor

    Joined:
    Oct 25, 2019
    Messages:
    36
    Location:
    Cape Cod Ma USA
    Balance:
    594Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    hi and thx for your great work..

    I have tried to copy what u have done to the letter, I have a few questions if you could.
    1- are the resistors on the encoders necessary?
    2- 1 limit switch per motor?
    3- im using 4 motors 2 12/32 2 uno's i can simply change the pins that differ in the sketch?

    THX im almost done soldering and wiring this week super excited THX
  11. Che Franklin

    Che Franklin im alot brighter than i look.. Gold Contributor

    Joined:
    Oct 25, 2019
    Messages:
    36
    Location:
    Cape Cod Ma USA
    Balance:
    594Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    hello i have some programing skill ive played with both programs
    im having a hard time complying your sketch right from download ive watched the vids u posted i have not used the bluetooth or the extra leds this is all i have X2
    look forward to ur reply and thx for all your work ive been trying im just lost
    any chance you could delete the nonrelative data?
    thx Che´

    Attached Files: