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

3DOF Arduino Sabertooth 4 x 24v wheelchair motors

Discussion in 'DIY Motion Simulator Projects' started by BartS, Sep 10, 2011.

  1. BartS

    BartS Member

    Joined:
    Oct 10, 2010
    Messages:
    156
    Balance:
    417Coins
    Ratings:
    +5 / 1 / -0
    Photo0302.jpg Hi Sim Fans and awesome X-sim knowledgable people,
    I'm now ready to start building my simulator, I've been here nearly every day for a year and after reading so much and buying in parts then reading and learning some more then eventually finding out the parts are useless for my intended needs and coming accross new parts that offered more accurate solutions for the accuracy I aim to acheive. I have finally decided on the components I will use to run the hardware of my simulator. My research has been very exhaustive and I wanted to start building as soon as possible but couldn' commit until I was positive each component was correct so I could start seeing something for my efforts, after many dead ends I have finally settled on a very mature configuration and this is it now, I'm finally here and ready, I want my piece of motion sim action.
    I am start to build a simulator that will be cost effective, offer sufficient and substantial power, control and accuracte movements. Better still this simulator will be modify to 6 DoF further down the line.

    My Components :
    1 x Arduino Mega 2560 with an Uno in standby for dashboard related stuff eventually
    2 x Sabertooth 2x25 V2s plenty of driving power
    4 x 24v pride mobility motors which I anticipate to be around 300 watts each, any way I can test them? theres no manufacture details other than 4-4.5mph available but they look stronger and are bigger than some other fracmo 24v 11 amp units which are rated at 276watts.
    Power supply will be batteries 2x12v at 24v for each sabertooth unless I find a better solution.

    Due to the 4 motor configuration I intend to make I will have to program some sort of spider pluging to position each motor, they will be driven by a sophisticated PID algorythm tuned for my simulators needs and adjustable to riders weight.

    Because of the complexity of this project I have built a model simulator to perfect my development on before building the actual simulator.

    So here is my mounted Top Gear Stig skid car simulator model and my intended configuration development platform.

    Photo0282.jpg Photo0287.jpg Photo0286.jpg Photo0285.jpg Photo0284.jpg Photo0283.jpg Photo0288.jpg

    I have no questions yet as I am still putting a few things together like feeback pots on the model and working on some device communication code.
    I Hope you all find my project intresting and assist me in my development as I have enjoyed following others altho I my not of been able to help much I certainly did try anyway I could :thbup: .
    • Like Like x 1
  2. juniou

    juniou New Member

    Joined:
    Jan 8, 2011
    Messages:
    12
    Location:
    Brazil
    Balance:
    271Coins
    Ratings:
    +0 / 0 / -0
    thank you for this post.
    arduino + sabertooth seens very interesting... :)
    great job
  3. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Yeah...looking good, please post a video of it in action if you do so.
  4. BartS

    BartS Member

    Joined:
    Oct 10, 2010
    Messages:
    156
    Balance:
    417Coins
    Ratings:
    +5 / 1 / -0
    Videos to come soon, first I want to get my pots mounted in position and reading the feedback and relaying the position on my LCD.

    As I intend this thread to be a documentation of my work, I will post my research, findings and progress step by step so everybody can learn from my experiences. In my next post I will feature some possiblities for sending information from X-Sim via USO to Arduino and reading the data in on the Arduino using the C language and storing it in variables in the correct format ready for use. I have no idea what the right thing to send is yet as it all depends on my research whether it is simple x , y , z's or pre definded actuator positions we will have to wait and see where I end up.
  5. riton

    riton Active Member

    Joined:
    Jul 6, 2007
    Messages:
    600
    Location:
    France
    Balance:
    1,006Coins
    Ratings:
    +103 / 3 / -0
    very interesting project, I will follow your project!
    good luck
  6. BartS

    BartS Member

    Joined:
    Oct 10, 2010
    Messages:
    156
    Balance:
    417Coins
    Ratings:
    +5 / 1 / -0
    Ok so i've got all my pots mounted, they are all hard wired and reading values from low to high in conjunction with the correct direction of motor travel no programming manipulation needed I just inverted the ground and VCC. I currently have the 270deg pots operating in a planned 90deg range the rest is unused and treated as a fail safe incase I loose control of the motors and I can quickly stop them and not break my pots.
    I am reading the pot values on the LCD they are all correct but I noticed a couple of high spikes every now and then also on random pots but then returns to the correct reading. Does anybody know what this is ? Could it be insufficent power from usb or are they dud pots or something else.

    More pics to come in a few hours of the complete board and a small video perhaps of the motors bouncing on the range limits.

    Photo0297.jpg
    Photo0298.jpg
    Photo0299.jpg
    Photo0300.jpg
    Photo0301.jpg
  7. el_txus

    el_txus Member

    Joined:
    Jul 22, 2007
    Messages:
    123
    Location:
    Las Palmas de Gran Canaria - España
    Balance:
    421Coins
    Ratings:
    +1 / 0 / -0
    Hi

    Realy Good work, Can you put a scheme of wire conecction?, and can you tell us, how configure the arduinos code to implement the screen?

    Thanks
  8. BartS

    BartS Member

    Joined:
    Oct 10, 2010
    Messages:
    156
    Balance:
    417Coins
    Ratings:
    +5 / 1 / -0
    @ Riton : I really like your simulator and only hope to achieve as good a power as you have. Did you ever implement PID and how is your baby sim project going?

    @ el_txus : I will reveal all my work in good time, just right now I am too busy working out the basics, controlling motors reading input in from x-sim, calibiration and stuff like that. When I am sure my information is accurate and best solution I will post. I hav 2 choices for driving the motors from the arduino, simplified serial and also packetized serial and that all hangs on wiring too.
  9. riton

    riton Active Member

    Joined:
    Jul 6, 2007
    Messages:
    600
    Location:
    France
    Balance:
    1,006Coins
    Ratings:
    +103 / 3 / -0
    Thank you!
    I always work on Baby MSXR! thank you for your interest!
    I make a new support base, supports several motors: AC gear motor, MEG, and SCN5, DBOX.....

    I also produced a new cockpit for the baby MSX,
    the top of the simulator is also different, lighter, adjustable ...
    for this project I will use the card Pollollu JRK 12V12 with PID.

    I also changed the potentiometer 360 ° without stops


    for my actual MSXR Simulator , I will also use the cards Pololu JRK 12V12 with PID !
    it's a important modification!
    i have some problem with a lot of speed!

    But I must say that your project interests me a lot, unfortunately I do not program! Is difficult for me to do equivalent work.
  10. BartS

    BartS Member

    Joined:
    Oct 10, 2010
    Messages:
    156
    Balance:
    417Coins
    Ratings:
    +5 / 1 / -0
    Just a quick update : I've been working really hard on programming side of the arduino and again I have to praise Arduino, damn this is a powerful little controller.
    My looptime for collecting data from x-sim 6 Axis of information, the motor sensors, creating setpoints for a 3DOF system and relaying the output to the motor controllers is all within 12milliseconds which is looking good for atleast 80 updates per second to the motorcontrollers.
    Much of the code is in place now and future proofs a 6DOF system. Still to do I have to get my head round and implent the PID, which may slow the loop down somewhat but the results will still be too fast to notice. Then I have to rewrite my sabertooth controls and optimise my code.
    We are looking good for a target deadline of getting the electronics sorted by the weekend and I should have a HD video of my model simulator running just to show you guys.
    Its all set up to just run on sliders right now so I will be building profiles next week, another thing I got to get my head round.
    • Friendly Friendly x 1
  11. kevinket

    kevinket New Member

    Joined:
    Jul 24, 2009
    Messages:
    26
    Location:
    Springfield, Oregon
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Bart,
    Where did you get your gears from? I have only been able to find them for around $2.50 - $3.50 US each. Maybe you have a better source :)

    Thanks,
    Kevin
  12. BartS

    BartS Member

    Joined:
    Oct 10, 2010
    Messages:
    156
    Balance:
    417Coins
    Ratings:
    +5 / 1 / -0
    Hi,
    I bought each motor with an interchangable gearing system from UK electronics store Maplin http://www.maplin.co.uk. The motors are MFA Como Drill and can be found here http://mfacomodrills.com/. Gearbox multiratio Part No : 920D/AME.
    Hope I've helped Bart.
  13. kevinket

    kevinket New Member

    Joined:
    Jul 24, 2009
    Messages:
    26
    Location:
    Springfield, Oregon
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    OK thanks.

    I really like where you are going with your mo-sim :)
  14. riton

    riton Active Member

    Joined:
    Jul 6, 2007
    Messages:
    600
    Location:
    France
    Balance:
    1,006Coins
    Ratings:
    +103 / 3 / -0
    News ?? :hi:
  15. BartS

    BartS Member

    Joined:
    Oct 10, 2010
    Messages:
    156
    Balance:
    417Coins
    Ratings:
    +5 / 1 / -0
    No news yet I'm affraid, The PID is a little more complicated than I thirst thought but shouldn't be too long to sort out, I'm working on it night and day outside of my real job. I also have a problem initializing my sabertooths on startup and it is too hit and miss for my liking. I am going to be developing a kind of arduino LCD interactive initialization program together with options for PID tuning, sensor input limit settings and motion readouts.
    I will try not to be too long with it but as always with programing I am never as close to finishing as I think.

    thanks for your intrest Bart.
  16. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,390Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    need help mate.
    Mine delay because of house purchase and the move.
    Finished Dashboard with Rpm, Gear Ind, Shift, Speedo.
  17. Ursine

    Ursine New Member

    Joined:
    Jul 14, 2011
    Messages:
    23
    Balance:
    10Coins
    Ratings:
    +2 / 0 / -0
  18. BartS

    BartS Member

    Joined:
    Oct 10, 2010
    Messages:
    156
    Balance:
    417Coins
    Ratings:
    +5 / 1 / -0
    This is the PID library I am working with thanks for the heads up. There isn't enough information yet about that PID and I need to know a little more, the problem is the sampletime. I'm not sure wether I need to rebuild the library slightly for my needs as the sampletime variable from what I know gets overwritten this wouldnt be a problem if I was using a single PID however as there will be 4 in my program the sampletime being overwitten may confuse all the motors. I guess I will have to test it some before I know. No sorry I'm wrong its not the sampletime on its own its the lastTime variable thats the problem. Thinking about it it should be ok if its a private variable in the class altho I am still not sure.
    Photo0308.jpg
  19. jyrki.j.koivisto

    jyrki.j.koivisto New Member

    Joined:
    Aug 30, 2010
    Messages:
    85
    Location:
    Finland
    Balance:
    314Coins
    Ratings:
    +3 / 0 / -0
    What you need to do is first read all the inputs to variables input1, input2, input3 and input4 then alter the compute function to work with them and let it put the results in output1, output2, output3 and output 4. Don't forget to also alter the initialization code also. Some optimizations could also be done.
  20. BartS

    BartS Member

    Joined:
    Oct 10, 2010
    Messages:
    156
    Balance:
    417Coins
    Ratings:
    +5 / 1 / -0
    OK im having a nightmare with the PID, just like I thought there is a conflict somewhere possibly with the sampleTime and lastTime var and its affecting my setpoints they just arnt updating like they did while they where integar before I built in the PID what a headache I'm so close.
    I may have to convert this PID to integar based rather than double to see if it is that or modify the PID class to accept independant sampleTime and lastTime variables.
    • Old Old x 1