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

Arduino Codes For 6 DOF

Discussion in 'DIY Motion Simulator Projects' started by SuperDon, Oct 29, 2015.

  1. SuperDon

    SuperDon New Member

    Joined:
    Oct 28, 2015
    Messages:
    2
    Balance:
    147Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino, Motion platform, 6DOF
    Hi All,

    I'm currently stuck on finding codes to help control my stewart platform. Is there any links to 6DOF Arduino codes that i may mind here? I would prefer one that has comments to help me understand the reason for that specific line of code.

    I'm very new to this type of stuff.

    Thanks in advance.
  2. momoclic

    momoclic Active Member

    Joined:
    Sep 23, 2014
    Messages:
    215
    Occupation:
    Retraité
    Location:
    Nantes - France
    Balance:
    2,761Coins
    Ratings:
    +115 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
  3. Marc Wannenmacher

    Marc Wannenmacher New Member Gold Contributor

    Joined:
    Oct 26, 2014
    Messages:
    5
    Balance:
    - 310Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino, Motion platform, 6DOF
    I am currently working on the arduino code for my 6DOF hydraulic platform. It still needs work, but i will let you know once I have sorted (as I am also new to this)
    It has lots of bugs and I am trying to sort them out.
  4. SuperDon

    SuperDon New Member

    Joined:
    Oct 28, 2015
    Messages:
    2
    Balance:
    147Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino, Motion platform, 6DOF
    Thanks Marc Wannenmacher, just a question, how do you know where should i place the servo at? Is there any formula/guide that i can follow to know where should i place my 6 servos?
  5. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,575Coins
    Ratings:
    +1,831 / 32 / -1
    Hi! The main reason you are stuck locating 6dof arduino code here is because it is not necessary with simtools (unless you are planning on doing 6dof maths on your arduino too). Simtools has 6 interfaces so you can connect up to 6 arduinos at the same time. Therefore, you can use three arduinos running 2dof code, two arduinos running 3dof code, or 6 arduinos using running only one dof each without the need for one arduino doing all 6 dof.

    Since, for the most part, any good motion code will implement PID type motor control (where the faster is executes the better), it is generally better to use multiple arduinos anyway and split the work required for a 6dof between them.

    With that said, I suggest you take a look at RufusDufus SMC3 sketch, which is extensively commented.
    • Agree Agree x 1
    • Informative Informative x 1
    • Useful Useful x 1
  6. Marc Wannenmacher

    Marc Wannenmacher New Member Gold Contributor

    Joined:
    Oct 26, 2014
    Messages:
    5
    Balance:
    - 310Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino, Motion platform, 6DOF
    Hi SuperDon, sorry for the late reply. I had to focus on my final exams for uni, I am not too sure on the servo placement as i have a hydraulic stewart platform and it is huge. lol. It will lift 3.5 ton. and I'm hoping to one day put a half cut of a car on it. I can take some pics if you like and get the measurements if you like
  7. telfel

    telfel Active Member

    Joined:
    Feb 16, 2011
    Messages:
    170
    Balance:
    4,735Coins
    Ratings:
    +118 / 3 / -0
    Hi @SuperDon

    Have a look at Platform Geometry Settings, might help with you actuator lenght, platform size, seat position.

    regards Terry
  8. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,234
    Location:
    Marseille - FRANCE
    Balance:
    20,895Coins
    Ratings:
    +2,084 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    you can have a look in the FAQ
    http://www.xsimulator.net/community/faq/6dof.22/category

    you'll find many projects (finished or in progress)
    and a dedicated beta-app for simtools

    but indeed no arduino code available

    @Marc Wannenmacher @SuperDon : please post some pictures of your stewart plateform :) to share with us and inspire us
    • Informative Informative x 1
  9. Runner

    Runner New Member

    Joined:
    Dec 22, 2015
    Messages:
    5
    Location:
    Denmark
    Balance:
    257Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    Arduino
    It's all getting clearer now :D

    So let's say that One Arduino controls 1Dof - let's say the roll. That Arduino will be connected to at least 4 actuators/servos to make roll on a classic Steward platform...... or is it all 6 ????

    Then let's take the heave, on one Arduino as well , that must surely control all 6 motors, right ??

    Does simtools do all the math for me at that point? I mean one Arduino tells servo No 1 to move 40% for the roll, and another Arduino tells the same servo to move 40% (more) for the heave ?

    Am I even close to getting it ? :nerd

    Thanks
  10. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,575Coins
    Ratings:
    +1,831 / 32 / -1
    No, it’s the other way around. You mix the dof’s together for each actuator. Then you use one arduino on each motor or you can put two, three or more motors (actuators) on one arduino if the sketch used on the arduino allows for them.

    Simtools mixes the dof’s and outputs the motion data for each motor/actuator to the arduino which does the math to control the motors.

    Hope that’s helpful! :)
    • Agree Agree x 1
    • Informative Informative x 1
    • Useful Useful x 1
    Last edited: Jan 6, 2016
  11. Runner

    Runner New Member

    Joined:
    Dec 22, 2015
    Messages:
    5
    Location:
    Denmark
    Balance:
    257Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    Arduino
    Thank you sir, that is very useful !
  12. Marc Wannenmacher

    Marc Wannenmacher New Member Gold Contributor

    Joined:
    Oct 26, 2014
    Messages:
    5
    Balance:
    - 310Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino, Motion platform, 6DOF
    Hey guys I have added some pics of my simulator as it is starting to move along very nicely. I will get some pics of the cockpit attached to the motion frame shortly.
    image.jpeg image.jpeg image.jpeg
  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,549
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,112Coins
    Ratings:
    +10,778 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  14. Marc Wannenmacher

    Marc Wannenmacher New Member Gold Contributor

    Joined:
    Oct 26, 2014
    Messages:
    5
    Balance:
    - 310Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino, Motion platform, 6DOF