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

[in progress] 6DOF compact and small footprint

Discussion in 'DIY Motion Simulator Projects' started by Rens, Sep 5, 2020.

  1. Rens

    Rens Member

    Joined:
    Aug 21, 2020
    Messages:
    78
    Balance:
    478Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    6DOF
    Below you can find a couple of photos of how the rig looks with motors attached :grin

    Below some information on what problems I encountered:
    Last weekend I put the top frame on the lower frame (motors).
    I did some tests and I noticed a couple of things.
    I had these dampers/rubbery feet. And they were totally not a good idea.
    The reason being that on movements it would kind of move the whole motors. It would roll the metal plate with the motors on top left/right (just a little bit, but it translate to quite some movement on the rig itself). Especially on down movements it would be quite Jerky. :p

    There are a couple of things I can do to improve the lower part to make it more stable.
    Which is first of all remove those rubbery feet, which I did already and it improved quite a lot.
    However there is still some jerkiness with down movements, and it's not acceptable.

    The other thing to do is add gas springs to help with smoothing things out.
    I already was in contact with gas spring company and I should receive a quote for 3x 500N gas springs, which have a vent to make the pressure less if needed. But I think ~50kg times 3 (150kg) force would be perfect starting point. Will see how this helps with the jerkiness.

    The gas springs will probably solve another problem that I am having right now, which is motor noise.
    I added some code which stops providing any power to the motor (individually per motor) when the Setpoint didn't change over a given period of time. However this code doesn't seem to work when being in game. The reason being is that the game feedback simply always changes. I could maybe improve this code to do a check over a period of time and see if the Setpoint of the motor changed significantly during this period, and if not then simply do not provide power, but this is quite a tricky thing I guess. And probably also highly depends on the game. I am not sure if the Simtools game manager > Record max/min values would also help with this type of issue. Haven't tried this yet.

    That the game gives feedback that is different each time isn't such a big problem, because if the values differ just slightly it wouldn't give to much power to the motor so you shouldn't hear anything. But as of now (without gas springs) the load is just to much, so I have to ramp up the Kp value to get some movement. This results in the motors becoming a little noisy. Even while you are driving on the straight so to speak.
    The motors can handle the load fine, and the current isn't that high either, the motor drivers aren't becoming hot at all, they are just slightly warm to the touch, so I am quite happy with the motors so far. I am not doing any more testing because I don't want to stress the gearbox to much with the jerky down movements. I am afraid to make the backlash worse (I might have increased it a little bit already, not sure because I didn't really test how much there was on all motors when I received them).

    Regarding the code, I solved a couple of other mistakes that I made, which was that at first I was just reading out the feedback from the game as provided, and constrained the "Setpoints" to the min/max values for my sensors. This would mean that when the min/max was reached any feedback outside this range wouldn't do anything (obviously). So for instance if Simtools provides me A1000 as feedback, then my Setpoint would be changed to 612 (this was my max for motor A for instance). So a quite stupid mistake, but didn't notice this until I was actually driving in LFS. At first I thought I configured something wrong in Simtools, or loaded some old profile or something... lol. Anyway, that thing is fixed now :D

    During analyzing the motion of the platform with my own eyes/visually I could see clearly how much jerkiness there is in the platform just by looking at the end of where the pedals are mounted (this is obvious because it's the longest part, any small movements in the motion platform translate to relatively significant movement at the pedals end). Now my idea was to maybe extend the lower frame so that I could maybe attach another gas spring to the bar of the pedals and then to the lower frame (one that only helps with smoothening things out, no need to help with load here). I think it could work great because here here is the most movement, so it would smooth things out quite a lot I believe, but this is something I keep in mind, and add if the 3 gas springs are not enough to cancel out any jerkiness. If needed I will have to dismount everything get back to the drawing table (I hope not haha).

    Obviously this is my first build, so there is a ton of improvements I could do :) But honestly so far I am quite happy with the result so far. I have played a little bit with the Roll and Pitch settings just to test things out a little in LFS. Even though I am using Simtools in between right now the responsiveness seems quite good.
    I am planning on writing custom code that reads the raw data directly from specific games (haven't done research on this, but I guess it wouldn't be to complicated, at least not for me as a programmer I hope!). But I am sure that the latency could even be much better when I do this.

    I haven't recorded the movement as of right now yet, also didn't record when I had the rubbery feet under it, but you can trust me that it was just too jerky. I did some code improvements that reduced the jerkiness a little bit, due to the fact that some motors require a little higher Kp value to move, otherwise they would be lacking behind just so slightly. This has to do with the balance obviously, but my top frame currently has a little bit more load to the right side, which is due to the shifter, handbrake being there, and some metal framing. The left side doesn't have this and that's also the side where you step into the rig. :)

    IMG_20201122_212019.jpg IMG_20201124_171335.jpg IMG_20201124_171343.jpg IMG_20201124_171354.jpg IMG_20201124_171413.jpg
    Last edited: Nov 24, 2020
  2. adgun

    adgun Active Member

    Joined:
    Jan 28, 2008
    Messages:
    432
    Occupation:
    mechanic
    Location:
    Netherlands
    Balance:
    5,129Coins
    Ratings:
    +102 / 3 / -0
    You have fast and slow gas springs but neither are made for dynamic movement.
    They will not last long and certainly the slow works against.
    Last edited by a moderator: Nov 24, 2020
  3. Rens

    Rens Member

    Joined:
    Aug 21, 2020
    Messages:
    78
    Balance:
    478Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    6DOF
    Ok, they are fast gas springs, I had extensive phone contact and shared all of my platform. They provide me with custom high quality gas springs. They are not cheap. But they will work nicely with dynamic motions like this. We will see how it goes.

    ps. I guess you have some experience with gas springs? If yes can you share your experience? Thanks! :)
    Last edited by a moderator: Nov 24, 2020
  4. adgun

    adgun Active Member

    Joined:
    Jan 28, 2008
    Messages:
    432
    Occupation:
    mechanic
    Location:
    Netherlands
    Balance:
    5,129Coins
    Ratings:
    +102 / 3 / -0
    I worked often with them for doors from airport crashcars and pump demping
  5. Rens

    Rens Member

    Joined:
    Aug 21, 2020
    Messages:
    78
    Balance:
    478Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    6DOF
    Little update, and sharing my experience regarding code/feedback/telemetry:

    I made great progress code wise. I am picky I guess, but Simtools just caused to much latency. It worked though, and it's easy to configure everything but latency was just slightly to slow. Maybe it was related to LFS, because that's the game I used to test with Simtools. But the latency annoyed me. Maybe it was something in my code somewhere, I can't tell. If I can get a iRaving plugin/patch then I can try it out to get to a conclusion.

    Last weeks I developed a Golang script specifically for iRacing telemetry. It's still early code and need to do much optimization but probably not even necessary. The code currently works with Surge, Sway, Pitch, Roll. Today I have been playing around with Heave, and also tried to test with so called "Wheel shock". So that each wheel individually provides feedback and translates to the motors individually.

    All works great. The Heave when going over a jump also worked quite well. And currently the arm positioning is lowest possible, but there is a lot of movement already.

    I have also tried different cars and it's nice to be able to fine tune all these parameters in the code, I have just more freedom now.

    I also have a function to smoothen out any feedback from the game for each data variable individually. It just stores history of feedback gotten for X amount (can be 1 or higher, 1 means no history), and grabs the average of it.

    I also play with velocity per parameter to fine tune some things. And I added an extra Power varianle for each parameter. It's far from perfect how it is right now but it works actually realy well.

    All of these options do require a lot of testing and fine tuning but it works so good.

    The latency is just instant (well obviously not instant, that would be impossible, but yeah I'd call it instant, and I am picky trust me). I didn't expect it to be so fast. I tried many different versions on both Arduino side and Golang side to get there. (The Arduino code is more or less the same after I switched from Simtools). And I know the code isn't even perfect. I am still messing around quickly just to get a basis. When I drive over a bumb in the road with Skip barber car you can tell how fast the feedback is by looking at the wheel suspension. And motor movement is completely in sync. I am really happy. Now I am waiting for gas springs to arrive so I can improve the base itself, and to upgrade movements and to decrease motor noise (which is't an issue already after so much finetuning but I know there is room for improvement).

    One thing to note here would be that I am calculatimg the Setpoint in Golang. And passing it to Arduino. Arduino does not have to do any calculations other than PID. I just send it the final value and all it has to do is read the Input (pot value) and calculate each PID

    The motor movement isn't much now, they only move 200 points so to speak (100 up and 100 down) for instance center of motor is 512, then it can be min 412 and max 612. I will increase this in the future. Plus larger lever position. So more movement, more accurate and smoother.

    I created this code because I wanted to do an experiment. I had no idea if it would decrease latency this much. I will have to test with Simtools and a proper iRacing patch (any recommendations are welcome). Because I can't blame Simtools right now. It could be a problem with LFS telemetry or feedback speed or even my Arduino code (doubt it?) . What do you guys think? One thing I noticed was that when I wanted to apply smoothening in Simtools the latency would increase a lot. I wonder how they created this "Smoothening" function. I do hope to use Simtools for other games, because it's just so easy to configure things. Will see. Right now I might just try and do all in Golang.... for each game individually and each car! :eek: I might try to create something that reads pedal, brake, wheel movements/positions so you could have some sort of movement in games that do not have/allow telemetry data. :)
  6. RaguTom

    RaguTom Cool Guy, Chronic Long-Winded Poster Gold Contributor

    Joined:
    Jul 15, 2016
    Messages:
    51
    Occupation:
    Electronics Engineering/Technician
    Location:
    Harrisburg, PA, USA
    Balance:
    387Coins
    Ratings:
    +98 / 1 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    @Rens Dropped by to look at your design! Lots of good ideas here!

    Saw your post about VR...Onward is such a great game. I heard they did some damage to it recently getting it ported to the Quest.... but still fun!

    Tom
  7. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    16,275
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    118,603Coins
    Ratings:
    +9,453 / 46 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Nothing wrong with going down your own path, as that is where innovation comes from :thumbs

    But just an observation, as SimTools can respond above your perception threshold your issue was more likely configuration. SimTools has its own limitations, as does most software. Alternatives like FlyPT would for example offer more fine tuning in configuration.
  8. Rens

    Rens Member

    Joined:
    Aug 21, 2020
    Messages:
    78
    Balance:
    478Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    6DOF
    @RaguTom I saw your post about you picking up your build, glad to hear that you finally got some time to continue. I haven't done much on mine lately. But when I have more time again I will pick up where I left. Basically my status is that I received the gas-springs and installed them. They help with carrying the load for sure. But the motion is different, it feels actually less nice. I am not sure what I am going to do, but I will try a couple of things before I continue with the code.

    @noorbeast I am planning on giving SimTools another shot at one day. And perhaps alternatives to it. Just to do a proper comparison between the option that I now have. But before I do I first have to do some simple tests in regards to the platform motion itself. Not exactly sure where to go from here. Once I did more testing I will be back with the results :) Stay safe all!
  9. Mike Melga

    Mike Melga Member

    Joined:
    Jun 22, 2020
    Messages:
    74
    Occupation:
    IT
    Location:
    Portugal
    Balance:
    572Coins
    Ratings:
    +21 / 1 / -0
    @Rens,

    Great to see that your build is almost up and running.
    Mine is a bit delayed. I had trouble getting someone to help me with the welding part.
    But I am slowly building it and if I keep this pace, will have it fully functional in 1 or 2 months.

    Regards