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

My 3 DOF with heave

Discussion in 'DIY Motion Simulator Projects' started by Sebastian2, Jan 18, 2024.

  1. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    52
    Balance:
    138Coins
    Ratings:
    +35 / 0 / -0
    I have switched the motor wires and played a little more with the PID and PWM settings in SMC3util. All 3 motors where following the set points SMC3util commanded just fine.

    Suddenly I smelled smoke and heard a crackling sound. I've hit the emergency shutoff switch and took a closer look. Turns out the shunt of Motor 3 burnt up. This was the motor that was moving back and forth when it all went sideways.

    I wonder why motor 1 and 2 didn't kill their shunts. They were active for about the same ammount of time with the same settings doing the same movements.

    Looking at SMC3util i see that motor 3 has a PWM frequency thats different from motor 1 and 2. I also noticed that in the SMC3 arduino code motor 1 and 2 are controlled by basically the same code, while motor 3 had a slightly different code.

    Do you guys know if there is any connection between the fact that the arduino treats motor 3 a little differently and the seemingly higher regenerative currents motor 3 produces in my setup?
  2. Attyla.pl

    Attyla.pl Member

    Joined:
    Oct 1, 2023
    Messages:
    76
    Location:
    Polska
    Balance:
    306Coins
    Ratings:
    +20 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    • Useful Useful x 1
  3. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    52
    Balance:
    138Coins
    Ratings:
    +35 / 0 / -0
    Thanks for the advice!

    I really am confused why motor 3 killed his shunt regulator.

    I just ran motor 1 and 2 for about 3 times as long as motor 3 ran earlier today and their shunts didnt even get warm. I used 100 PWMmax and the "motion" signal from SMC3util.
    If I doubled their PWMmax values and run the rectangular signal I manged to get the shunts warm. So the shunts of motor 1 and 2 do work and the motors also generate regenerative currents, but nowhere near as much as what motor 3 managed to generate. For whatever reason.

    I'll replace the burnt shunt regulator with another one of the same type (Pololu 26,4V 2,8 Ohm 15 W).
    To prevent things burning up again, i will also add a 0,5 Ohm 100 W high load resistor to each shunt regulator. They act in parallel to the resistors that are integrated in the shunt regulator.

    Why 0,5 Ohm? Good question. I'm not really sure if this is even correct but i found no sources on this topic, so i scraped together all that i remebered about calculations of electric circuits. Basically it went like:

    15 W / 100 W = X / 2,8 Ohm
    X = 0,42 Ohm which is roughly 0,5 Ohm

    By making the external resistor a lot lower than the internal, most of the current will flow through the external resistor. This makes sense, as the external resistor can withstand a much higher load.
    I double checked the initial formula by calculating the overall current as well as the currents in both parallel paths and they confirm that the external resistor will dissipate Y times more electrical power than the internal resistor, with Y being equal to the ratio of their ability to dissipate power (100 W / 15 W).

    Please, feel welcome to correct my about this or share your thoughts.

    Hope this will work out.

    Until the new parts arrive I guess I will play around with the remaining 2 motors as well as the demo version of Simtools and LFS. Still waiting on that Simtools DIY license.
    • Like Like x 2
    Last edited: Mar 27, 2024
  4. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    52
    Balance:
    138Coins
    Ratings:
    +35 / 0 / -0
    I replaced the burnt shunt regulator with added 100 W 0,5 Ohm resistance and did a few tests. While doing so, I burnt up two more shunts :D

    I felt like I was in Top Gun in the back seat - "I see smoke in the air!"

    The last two shunt regulators that died on me had 125 and 200 PWMmax applied to them before they went up in smoke. I'm not 100% sure anymore about the setting when the first shunt died, but I guess i'll stick to 100 PWMmax for now. With this setting the shunts dont even get warm, even after several Minutes of "Motion" or "Square" setting in SMC3utils. With 125 PWMmax the shunt died in seconds. Odd.

    I also made a posting in the Pololu forum asking about which combination of shunt regulator and external resistor would make sense in my situation. It seems like the shunt regulators that I used are not the optimal choice when using external resistors. I'll see where this road takes me.

    I have now completed the tutorial that can be found here

    https://www.xsimulator.net/communit...3dof-motor-driver-and-windows-utilities.4957/

    But i still need more knowledge to get my rig up and running.

    1. Are there any resources that teach me how to optimize the settings in SMC3Utils? Also: do I loose maximum available motor torque if i use PWMmax less than 255?

    2. Are there any resources that teach me what comes after making the very basic SimTools settings mentioned at the end of the tutorial listed above? I think i mangaged to patch LFS (drove a couple of meters in first person view first) but i don't know what to do in SimTools Game Engine. Output Testing does nothing at the moment. I guess i have to create a motion profile first? But how... any links would be greatly appreciated.
  5. Attyla.pl

    Attyla.pl Member

    Joined:
    Oct 1, 2023
    Messages:
    76
    Location:
    Polska
    Balance:
    306Coins
    Ratings:
    +20 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    In my case, 220 is sufficient in 2DOF, but 100 will be rather too little for meaningful motion sim work.
    As for simtools, unfortunately I can't help you I use FlyPTmover.
    But I have another question in the manual for Simtools there are only three types of motion sim GENERIC 2DOF , LINEAR 3DOF, ROTATING 3DOF and looking at the drawings in the manual it is a completely different motor layout than you are building. The question is whether Simtools supports the selected motor layout ? or you can define yourself what type of motion sim you are building ?

    I found this post
    https://www.xsimulator.net/community/threads/my-3dof-motion-simulator.15994/
    Last edited: Mar 29, 2024
  6. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,673
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,900Coins
    Ratings:
    +10,805 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  7. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    52
    Balance:
    138Coins
    Ratings:
    +35 / 0 / -0
    Thanks to your support, it rally started working. I've taken a look into the simtools documentation, put together a simple motion profile with roll, pitch and heave and tested it under "output testing".

    That itself had some kind of magic as it was the first time i saw more than one motor move at the same time.

    Then i was unsure what to do. I started LSF, not sure what i was expecting. And when i swerved around on the track, THE RIG MOVED!!!

    Then I crashed the car, which caused the motors to shake quite violently, which burnt another shunt regulator. All with PWMmax 100. I really have to look into that. But i will find a way!

    @noorbeast do you think i qualify for a Simtools DIY license now?
    • Like Like x 1
  8. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,673
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,900Coins
    Ratings:
    +10,805 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    If you update your thread to show your rig is complete and ready for testing, as per the criteria, you would be eligible.
  9. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    52
    Balance:
    138Coins
    Ratings:
    +35 / 0 / -0
    I did my first ride on the rig in LFS! It was very exciting and felt like a huge mile stone in this project.

    Attached you find pictures of my rig and screenshots of the rudimentary motion profile that i used.

    As you can see from the motion profile pictures, I made sure that the DOFs for each axis add up to 100. This results in the individual DOF being relatively small, which is probably not optimal. Also, there is no filtering or profile tuning whatsoever, yet.
    I'll read more about motion profiles and experiment some.

    There is an issue i can't get my head around, I hope you all can help me with that: How does SimTools know how far it can move the motor levers?
    In SMC3utils I set the clipping values so that in the phyiscal world clipping will happen at +/-40 degree. I did so by variying the clipping value and physically measuring motor lever angle using the IMU in my phone.
    But the pot sensor data as well as the clipping value is not sent from the Arduino to SimTools, right? So where does the "translation" happen of SimTools saying "move axis 1 to +80% of its maximum" to "new set point for pot sensor 1 value is 122" in arduino? Or in other words: how do I make sure 100% Axis value in SimTools actually uses the full available angular range on the motor?

    I haven't really solved the issue with my shunts burning up. Still working on that. For my first ride I used 90 PWMmax (so about 35% of the power of my 500w motors) and before I crash into a wall, I hit the emergency shut off switch. This worked and the motors didn't feel weak at all when I went over the grass with the car.

    After the ride I noticed that a lot of components on my rig, that used to be 90 degree to each other, were tilted now.
    The screws that mount the motor levers to the D-cut motor shafts were not tight enough. As a result the pair of levers connected to one motor wasn't parallel anymore. But I'm afraid to tighten them significantly more, because the lenght of the threads in the aluminium levers is relatively short and might get damaged. I've read that M8 screws (class 8.8) can be tightened up to 23 Nm, but in aluminium the thread lenght should be at least twice the screw's nominal diameter, so 16 mm. I didn't think about that when I designed the levers so I only have 10 mm thread lenght (I literally screwed that up :D). That's why I only used 10 Nm on the screws, which evidently is not enough. I'm going to make new levers with 20 mm thread lenght so that I can use the full 23 Nm. That's a lot of work but it seems necessary.

    Before I sat down in the rig, I noticed that the top platform had some lateral flex. The least stiff element in the flow of force seems to be the aluminium sheets holding the motors to the lower frame. They are currently 6 mm thick. I will replace them by 12 mm thick sheets and see how that goes.

    Attached Files:

    • Winner Winner x 2
  10. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,673
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,900Coins
    Ratings:
    +10,805 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Great job so far, it is always a relief and sense of achievement on the first test run :thumbs

    You can grab a copy of the v2 SimTools manual here, keep it handy for reference: https://www.xsimulator.net/community/faq/rtfm-start-with-the-official-simtools-documentation.117/

    Then see the tuning tips in the FAQs: https://www.xsimulator.net/community/faq/steps-to-create-a-motion-profile.228/

    To answer your question, whatever range you set in SMC3 is considered to be 100% of available axis range in SimTools, and you are assigning portions of that when setting each of the Axis Assignments. You can cheat a little in axis allocation in race profiles, and a bit more in flight profiles by allocating more than a total of 100 in Axis Assignments, as all the axis are unlikely to be at their limit at the same time except in a crash.
  11. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    52
    Balance:
    138Coins
    Ratings:
    +35 / 0 / -0
    Today i had a breakthrough regarding my burning shunt regulators. Most of the time the shunt regulator of motor 3 died. I wonderd why. Today I found out.

    The arduino only supports 31 and 4 kHz PWM frequncy for motor 3, with 31 kHz being the default value. My Cytron MD30C motor drivers only support up to 25 kHz. So i was running the drivers out of spec. For some reason this worked, by witch I mean the motor moved like it should. Up to PWMmax 100 that is. At PWMmax 105 the shunt regulator FET suddenly burns up.
    The story changes entirely if I reduce the PWM frequency to be within the specified limits of the driver. Unfortunately, for motor 3 this means going down to 4 kHz, which creates audible noise. But I guess I won't hear it over the fans of the PSUs. With PWM frequency 4 kHz I can increase PWMmax up to 140. Then the over voltage protection of the PSU kicks in if I run the square profile in SMC3utils.

    I still have to experiment with the resistance value of the load resistors of the shunt regulators. Currently I'm using 6 ohms, which is quite high and thus reduces the regulators capability to prevent the voltage from rising too high (thats why the ober voltage protection kicks in). But if the resistance is too low, the thermal load on the shunt regulator FET is increased and I've seen too many of them burn. However, I'm not sure how many of them died because of the 31 kHz issue. I'm gonna reduce the resistance and see if i can find a value where i can increase PWMmax to something like 220 without over voltage protection kicking in or the shunt regulator FET burning up.
  12. luu trung

    luu trung Member

    Joined:
    Apr 4, 2022
    Messages:
    71
    Balance:
    156Coins
    Ratings:
    +7 / 0 / -0
    My Motion Simulator:
    3DOF
    The meanwell source is a high-end source designed to block such currents. I also use 3 meanwell 24v 350w for 3 250w motors in "heave" mode without fuses and anti-reverse current diodes for 2 years without any What's the problem
  13. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    52
    Balance:
    138Coins
    Ratings:
    +35 / 0 / -0
    Interesting. I am using Meanwell RSP-1000-24 PSU (1000 W) from a reputable seller in germany with 500 W motors (1 motor per PSU), so the PSUs are quite oversized.

    If I dont use shunt regulators in parallel to the PSUs, they turn off if I apply the square motion in SMC3utils. They also turn off if I use load resistors with a resistance thats too high, thus limiting the shunt regulators ability to prevent the voltage from rising.

    As far as I understand the topic it's not that the power supply "blocks" the regenerative currents from the motors. I'm not sure if this is even possible. If the mechanical energy of the motors has no way to be turned into thermal energy it will cause the voltage to sharply rise (the mechanical energy is converted to potential energy). Then the over voltage protection of the PSU kicks in and shuts the PSU down. Maybe a cheaply made PSU without over voltage protection could stand this, but a well made one should turn off.

    My guess on the topic is that my 500 W motors are relativley powerful which enables them to put out more regenerative energy than 250 W motors. Something along the lines of having a heavier rotor that stores more energy.

    @luu trung
    What PWMmax are you using? Some people use quite low settings to go easy on their drivers. If I use really low PWMmax values I can also go without the shunt regulators. Also having very relaxed PID parameters should reduce the need for dealing with regenerative energy. I'm just looking for explanations why I need additional measures to deal with regenerative energy and you do not.

    I think i found the "optimal" parameters for my hardware. I am using modded Pololu shunt regulators type #3778.

    In order to decrease the thermal load on the board, I removed one of the SMD resistors mounted on the board (see attached picture). This also disables the remaining 3 SMD resistors (no current will go through them). I'm not sure if this is absolutely nessccary, but after seeing a couple of regulators burn up, I wanted to make sure.

    Then I added a 4 Ohm 100 W resistor to the regulator (there are special points on the board to connect the external resistor to).

    I also needed to add a 200k trim potentiometer to manually set the voltage where the shunt regulator starts sinking current to 26,4 V. The Pololu support suggested temporarily using a 500 Ohm current limiting resistor for this procedure, which I did.

    All this enables me to use PWMmax 190 without adverse side effects. The FET on the regulator stays cool to the touch while the resistor gets a little to hot to be comfortable to touch for extended periods of time. I'll put a fan over the load resistors of the shunt regulators and I guess it will work out.
    At PWMmax 200 the over voltage protection kicks in when using the square motion profile in SMC3utils.
    If I use 5 Ohm I can only go up to PWMmax 160. At 170 the OVP kicks in if I use square motion profile.
    And if I use 3 Ohm the FET on the regulator gets way too hot to touch very fast. I don't remember the PWMmax i used but it was way below 190.
    So 4 Ohm seems to be the optimum for my setup.

    A part of me doesn't like the idea to use significantly less than PWMmax 255. I paid good money for 500 W motors and 1000 W PSUs and now I settle with only using 190/255=75% of that power, meaning about 370 W? What a disgrace.

    On the other hand, during my first test drive, I wasn't under the impression the rig was lacking power. And back then I used PWMmax 90, so about 35%, or 180 W.
    PWMmax 190 shall be okay for now. If I ever feel I need more power, I will have to find a different approach for dealing with the regenerative current.

    If I could give any advice to myself from 6 months ago, I would suggest using 350 W motors or, if 500 W are a must, I should be using sabertooth drivers.

    Attached Files:

    Last edited: Apr 14, 2024
  14. Attyla.pl

    Attyla.pl Member

    Joined:
    Oct 1, 2023
    Messages:
    76
    Location:
    Polska
    Balance:
    306Coins
    Ratings:
    +20 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    From my experience , do not use square profile in SMC3Utils it generates too much load for regulators and power supplies. In real use of motion sim this type of load does not occur. In SMC3Utils I burned 3 regulators myself , since then I use it only to set the parameters of the arduino and possibly the sunusoid to check if the motor is moving.
    Since the arduino for the 3rd motor uses a different code, maybe Simtools allows you to connect a second arduino as a controller for the third motor?

    Translated with DeepL.com (free version)
  15. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    52
    Balance:
    138Coins
    Ratings:
    +35 / 0 / -0
    Yeah, the square signal is a worst case scenario. But I don't want my PSUs to shut down or my regulators to burn up if I crash the virtual car. That actually happened to me once. Virtual Car and real rig where broken. Virtual fire, real smoke. Very realistic experience. 10/10 would play again.
    I hope that the square signal is a good test for those scenarios.

    @Attyla.pl
    Lets say you use PWMmax and PID settings that would cause your shunt regulators to burn or your PSUs to shut down if the square signal was applied. Can you crash your virtual car (or plane) without issues?

    I guess the smoothing filter in Simtools could be used to protect the shunt regulators in case of crash.
    But that would be just using software to fix an hardware issue. It can be done that way, but it comes with a price. In this case: high frequency input will be damped, even if its low amplitude and would cause no problems to the shunt regulators.
    Last edited: Apr 14, 2024
  16. Attyla.pl

    Attyla.pl Member

    Joined:
    Oct 1, 2023
    Messages:
    76
    Location:
    Polska
    Balance:
    306Coins
    Ratings:
    +20 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    I think you should use collision detection in Simtools to avoid motion sim movements that are too violent when a car crashes in a virtual race.
    My experience in motion sim is not very comparable because in my 2DOF I use 250W motors and the maximum current they draw is 10-11A (measured Voltcraft VC-523), and the fact that I use FlyPTmover software to control the motion sim, yes in case of crashing/shooting down a plane I have quite a ride on the motion sim but so far nothing has been damaged.
    • Agree Agree x 1
  17. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    52
    Balance:
    138Coins
    Ratings:
    +35 / 0 / -0
    Hm, collision detection could work. It seems to be a feature of Simtools v3 beta. Being new to this whole motion simulator thing, I hesitated to use a beta version and went with SimTools v2.

    I finished strenghtening the parts of the rig that were not stiff enough before and did another test today. It was the first time I tried Microsoft Flight Simulator 2020. I used the axis assignment posted in the attached picture "axis_assignment_1". It worked in principle, but roll and pitch were inverted.

    I closed MSFS and inverted the axis assignments, so that it looked like in the attached picture "axis_assignment_2". I hit the save button and started MSFS again. But roll and pitch were still inverted. I dont get it.

    As MSFS takes quite a long time to load, I wanted to experiment with output testing. But I don't get which game's axis assignment is used for that. The "default" one? Is it possible to change that?

    Could it be that my MSFS is using my "default" axis assingments? That would explain why it doesn't react to me inverting roll and pitch axis assignments. I also attached a Game Manager screenshot, which shows the "default" profile is selected. But there are no other profiles I could choose.
    I have a feeling that this "default" profile in Game Manager is something different from the "default" game axis assignment in Game Engine. This is a confusing naming pattern i must say.

    Could somebody help me invert roll and pitch for MSFS? I'd also like to understand why it didn't work the way i tried. It seems like i have some fundamental misunderstanding.

    Attached Files:

  18. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,673
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,900Coins
    Ratings:
    +10,805 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Just so you know SimTools v3 Beta is edging towards release and you can install v2 and v3 on the same PC, with the same license, so don't be afraid to try v3.

    In either case first grab a copy of the SimTools manual and keep it handy for reference -

    v2: https://www.xsimulator.net/community/faq/rtfm-start-with-the-official-simtools-documentation.117/

    v3: https://simtools.us/wp-content/uploads/2024/02/SimTools-v3.pdf

    Then see the motion profile tuning tips in the FAQs: https://www.xsimulator.net/community/faq/steps-to-create-a-motion-profile.228/

    Make sure the axis move as expected, doing one axis at a time: https://www.xsimulator.net/community/faq/which-way-to-set-simtool-axis-movements.230/

    The Dir being checked orange or not determines which way each axis moves.

    The Profiles in Game Manager are different from Axis Assignments. The Axis Assignments provide global axis allocations for a particular game, the TC provides a base tuning as to how the rig responds in that game, while the Game Manage Profile lets you tune variations of the for a particular car or track.
  19. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    52
    Balance:
    138Coins
    Ratings:
    +35 / 0 / -0
    Thanks for the information.

    Do you have any advice on this one?

  20. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,673
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,900Coins
    Ratings:
    +10,805 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Slow loading is a fact of life with MSFS :(

    As I mentioned the 'Default' profile in Game Manager is different from the Default profile in Axis Assignments.

    The Axis Assignments 'Default' is what is used by Ouput Testing, while the Default in Game Manager provides the global axis allocations for a particular game, the TC provides a base tuning as to how the rig responds in that game, while the Game Manage Profile lets you tune variations of the for a particular car or track.