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

6DOF platform with small DC motors

Discussion in 'DIY Motion Simulator Projects' started by hooshang, Jul 15, 2014.

  1. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,612Coins
    Ratings:
    +1,835 / 32 / -1
    Okay, your sway is correct after all. I was focusing on the motion at about 55 seconds in on the video and with your aggressive roll setting and slow driving speed I first thought the sway was backwards. I haven’t given much time at looking at the motion a 6dof setup should give though. The roll setting may be a little aggressive but it’s all about what feels right to you really. Of course, you can’t actually feel the feedback with a miniature model.

    On my suggestion on how to handle the yaw issue, I can’t promise that you will get it to work satisfactorily for you. I have tried something similar with roll and pitch because they will flip over also in a 360-degree roll or loop. I was using PC software (vb6) to do the calculations but I had a problem with getting the timing the stay consistent. So I would get little fluctuations in the output that bothered me and I was not satisfied with the results I got even after averaging a few values.

    Maybe doing the math on a micro controller instead will give better timing results though. The math is simple when not flipping over, just take the current_yaw_reading minus the previous_yaw_reading to get a rate of change of yaw (or you could do it the other way around too if needed). But you must test each time to see if a flip has occurred first. To do this you would do something like this in code (in vb at least): If current_yaw_reading – previous_yaw_reading < -100 then adjust_for_flip_forward. So for example, if your current yaw reading is 10, and your last reading was 355, a flip, then the result of the formula would be 10-355 = -345. That value is less than -100 (< stands for less than and > stands for greater than) so the code would then run the subroutine called adjust_for_flip_forward. This subroutine would be something like this: (360 – previous_yaw_reading) + current_yaw_reading = actual rate of change after a flip forward. So 360 – 355 = 5 then add 10 = 15 actual rate of change. To test for a flip in the other direction you would use something like: If current_yaw_reading – previous_yaw_reading > 100 then adjust_for_flip_backward. So if the current_yaw_reading is 355 and the previous was 10, then 355-10 = 345. Since that is greater than 100 it will then run the subroutine adjust_for_flip_backward. That subroutine would be: ((360 – current_yaw_reading) + previous_yaw_reading) * -1. So 360-355 = 5 + 10 = 15. Invert that (multiply by –1) = -15 actual rate of change. You can use a number other than 100 if you wish for your test as long as you don’t incur a rate of change larger or smaller than it during a non flipping condition. This insures that when the test is positive for a flip, it is not caused by a non flipping condition.

    That was a little difficult for me to attempt to explain so I hope it’s coherent enough to be helpful!

    Ps The examples use values in degrees for simplicity and the rate of change used is larger than what you would actually experience when you take 30 or more samples per second. The actual output from simtools will be different and depend on what output resolution you use.
    • Winner Winner x 1
    • Informative Informative x 1
    Last edited: Jul 19, 2014
  2. kermit76

    kermit76 New Member

    Joined:
    Mar 22, 2012
    Messages:
    19
    Location:
    The Netherlands (Zwolle)
    Balance:
    357Coins
    Ratings:
    +1 / 1 / -0
    Thanks for the replay.
    I'm working on a 2 Dof with servo's.
    I got the motors turning but not like I want.
    When i got i workin I will post my project.
    Good luke with your project
    • Optimistic Optimistic x 1
  3. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    273
    Balance:
    285Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    @BlazinH
    thank you for the comprehensive calculations,for all of this I think we all should ask @value1 and @yobuddy to add proper washout for mathing this for Yaw in simtools,
    besides please pay attention this:
    cause I concerning Yaw's value for my 6dof platform, there is a point that I donno
    if it has been notified before or not?.imagine after all mathing you mention above, your airplane goes toward somewhere
    more than 300,all of your motors arm are near at their end limit movements.at this situation your motors
    cant have the enough place for movement of other dof for sure.for example if your platform at normal situation
    can have 20 degrees of roll to the left or right ,with nearly full range of Yaw it limits to arround 10.
    I just think for best performance is putting a 6dof sim without Yaw on another platform which separately provide full 360 range of Yaw.

    regards

    Hooshang
    • Agree Agree x 1
    Last edited: Jul 20, 2014
  4. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,612Coins
    Ratings:
    +1,835 / 32 / -1
    On a stewart 6dof you would use only the yaw acceleration value for yaw and use a washout as it is returning to center. On a continuous 360 you would use the actual yaw value and no washout is required. But in either case you must deal with the flip over of the yaw value. And with a 100% continuous rotation yaw, you must also deal with the flip over of the feedback device not to mention use of a slip ring. You could use a multi turn pot with stops and omit the slip ring to some extent but that will likely “wind up” at some point also and therefore is not truly continuous.

    But, as I stated, this can be done on a micro controller. Preferably the same one that you use to control your motors. In fact, the code I posted, with a few minor changes, can be used on the simaxe (picaxe basic). The reason I suggested doing it on a microcontroller instead of a PC is because it’s timing is more predictable. A PC is tasked with running multiple programs at the same time and this can cause timing issues because you don’t know when another programs will want some of your processor time. But a microcontroller running only one program usually has predictable and consistent timing if you write the code properly. This is my thinking anyway.

    Edit: It just dawned on me that the picaxe won't do negative numbers so a little more modifying of the code would be required than I initially was thinking.
    • Useful Useful x 1
    Last edited: Jul 21, 2014
  5. 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,431Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Arduino would be more suited as it can use negatives and floating point maths too. IMO
  6. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,612Coins
    Ratings:
    +1,835 / 32 / -1
    It would likely run faster too. But I’m unable to post the equivalent code for it without doing some researching so maybe you or someone else can help out with that if it is requested.
    • Like Like x 1
  7. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    273
    Balance:
    285Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    @eaorobbie
    here is another problem for testing my 6dof axis movement.at the moment
    for axes testing I have to use mouse to get slider to the left or right
    in Simtools ! is there any possibility of somhow doing this automatic?
    thank you
    regards
    Hooshang
    • Agree Agree x 1
  8. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0


    It possible but its not implemented.
  9. 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,431Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    We could write a little custom little app to do this , from memory @RufusDufus added this option for his apps but not sure if it will drive 6 at once, my idea would be to create an app that feeds a custom plugin that will do the simular to the above, this app not needed here.
  10. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    273
    Balance:
    285Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    is it possible to have something like this here.
    • Like Like x 2
  11. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    273
    Balance:
    285Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    @telfel
    hi friend
    please watch the video I put in the first post of this thread ,whats your idea about sway and surge in my 6dof rig ? as you know iam using Simtools and no other additional
    app or special plugins or inverse kinematic software
    regards
    Hooshag
  12. telfel

    telfel Active Member

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

    Nice model I think the problem with 6 dof without the maths, shows up more as you scale up to full size.

    In you model if you take roll for example roll right motors 1,2 & 3 down 4,5 & 6 up, but motors 1,2 & 5,6 are further from the roll center so have to move further than motors 3 & 4, If they all move the same amount then there must be some interaction with pitch, this is not so obvious on a small model, with sway, surge, heave & yaw the platform should stay level.

    My idea for a full size 6 dof is to have the push rods pairs on the top platform going to a common axle, so only 3 attachment points on the top platform, that will give 4 dof without the interaction between dof's, not using sway and surge. That's why they use inverse kinematics to calculate the top platform position.
    That's how I intend to get around the problem for racing sims until the maths is sorted, for fsx & x-plane I will be using Ian's BFF software.

    regards Terry
    • Like Like x 1
    • Agree Agree x 1
  13. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    273
    Balance:
    285Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    @telfel
    thank you Terry for replay
    ok,thats right ,but let say we have 0 to 100 % options for every each dof and axis separately in Simtools(iam not for any special software but now iam using Simtools and much respect this community) and base on
    own 6dof setup and parameters, you can simply math how far each axis should go,
    that's what I have done for my 6dof model,eventhough its not a very clean and tidy design so it can be much better
    with an good calculating and better engineering.
    but still I donno what inverse kinematics can be done more for this special platforms for simulating the motions
    thank you freind
    regards
    Hooshang
    Last edited: Jul 27, 2014
  14. telfel

    telfel Active Member

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

    Not to put a downer on your effort, but as I understand it the % mixing is for limiting each dof to a %,
    You can use this to limit the travel of specific actuators, but if you set it for say 10 deg roll, when you go to 20 deg then the limited actuator would still be limited to the 10 deg value.
    If you have a small spirit level on the platform, then run each dof separately the bubble should stay level for
    heave, yaw, surge & sway

    To get the movement & the c.o.g correct, requires a 6 dof plugin, @yobuddy did say he would have a look into it, various members have in the past 6 dof setups, but the code is scarce.

    regards Terry
    • Agree Agree x 1
  15. 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,431Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    • Like Like x 2
    • Useful Useful x 1
    • Optimistic Optimistic x 1
  16. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    273
    Balance:
    285Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    so Mr @yobuddy, several 6dof rig in community are waiting and also at service Simtools 6dof plugin:cheers :thumbs
    • Funny Funny x 1
    Last edited: Jul 28, 2014
  17. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    273
    Balance:
    285Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    @eaorobbie thank you Rob for the link ,you have always a solution in your sleeves,
    but I mean that nice software in the video ,
    thank you brother
    regards
    Hooshang
    • Like Like x 1
  18. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,612Coins
    Ratings:
    +1,835 / 32 / -1
    If you provide formulas necessary to calculate the positions @hooshang , a plugin could be made for you in short order! If you wish to wait for the "programmer" to do it all for you though, you may have a while longer to wait!
    • Agree Agree x 1
  19. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    273
    Balance:
    285Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    @BlazinH
    I actualy donno still what formula we should make?because of so many parameters,
    I don't know if a special formula can cover all these even when you change all dimentions,...
    rods, motor lever arms,layout of the motors,height...
    but what I know and have are 6 motors that I can adjust their travels individualy,
    if you know where we should start, here is a rig ready to go... and a hard worker ready to give hand...:cheers
    regards
    Hooshang
  20. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,612Coins
    Ratings:
    +1,835 / 32 / -1
    That’s the problem. Making the plugin itself is relatively easy. It’s the math involved that’s the hard part. And yes, changing any of the rigs perimeters will change variables in the math. But I haven’t researched a Stewart type 6dof myself yet so I can’t help with formulas atm.