DiY Motion simulator

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Message
Author
Hellmut1956
Posts: 1
Joined: Thu Jan 25, 2024 12:35 am

DiY Motion simulator

#1 Post by Hellmut1956 »

Hi, I am just starting to investigate the air manager so please excuse me for my ignorance.

I have been viewing Youtube Videos about Air Manager and let me put it in simple terms what I grasped:

Air Manager is a tool that interfaces to the data made available bei the Sim, i.e. MSFS2020, bidirectional. It further allows to connect and drive i.e. DiY panel elements. It also allows to control stepper motors in a way that mimics what the flight simulator does.

A DiY motion simulator does require inputs from the flight simulator and drive a stepper motor. A motion simulator is a device that rotates a mechanical platform so that the user sitting on a seat mounted to that motion simulator actually feels a rotation by having the motion simulator rotate as instructed by interpreting messages from the flight simulator.

Has anyone done something like this in the community?

I would take strong stepper motors that would execute what a code instructs it to do based on messages from the flight simulator. Stepper motors are not expensive and by using 2 of them where required that should be possible. I have studied and experimented with stepper motors in my hobby of building model sailboat where I used stepper motors and LPCExpresso 1769 boards and stepdrivers as made available for 3D printers and use the quadrant encoder to have it work in a close loop.

Best regards
Hellmut

User avatar
Ralph
Posts: 7930
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: DiY Motion simulator

#2 Post by Ralph »

Driving the steppers and such is the easy part. It is not like a bank in the simulator translates to a physical banking motion. You won't be able to get a 1:1 bank angle, and it might also come down to the rapidness of the motion. Also important is slowly making it return to zero physical bank angle. There might be documentation for this on the internet somewhere. But I think it'll be quite a big challange.

User avatar
jph
Posts: 2857
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: DiY Motion simulator

#3 Post by jph »

Incredibly complex programming needed here and as Ralph says it is not a 1:1 correlation in any way or shape.
Joe. CISSP, MSc.

JackZ
Posts: 2267
Joined: Mon Feb 22, 2016 1:02 pm

Re: DiY Motion simulator

#4 Post by JackZ »

Sometimes reinventing the wheel is not the best solutions.
There is open source motion platform software available on the Internet, tested and proved, which is the most important part. High speed and powerful actuators can hurt people really bad if not properly setup and used, never forget that.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
jph
Posts: 2857
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: DiY Motion simulator

#5 Post by jph »

https://nextlevelracing.com/motion-platforms/

Check out the seat as well. ! really neat. :D
Joe. CISSP, MSc.

Glattnos
Posts: 3
Joined: Sat Mar 09, 2024 5:45 am

Re: DiY Motion simulator

#6 Post by Glattnos »

I am building a 2DOF motion simulator :) I use Air Manager to get G-force vertical and sideways out of XPlane via PWM into a separate Arduino(not connected to Air Manager) that controls stepper motors for the motion platform.
The platform is just moving vertically and rolling sideways. The seatbelts are attached so that they get tighter when the platform rises, simulating negative G-force. The roll-movement is basically just to simulate sideways G-force and not actual roll-movement in the simulator. Thats because it simulates if the plane is flying clean or gliding sideways.
It works really well but I am working on a problem with the PWM that sends signals from the ArduinoMEGA running Air Manager to my motion platforms ArduinoUNO that control the stepper motors.
It seems like the G-data from XPlane is very stable(I was writing a script that was not detecting any false signals). If I set up a set/defined HM PWM in Air Manager I get a perfectly clean PWM-signal. But when I translate the G-data and send on the PWM I get small "jumps" in the PWM every 5-30 sec. I first thought it was air turbulence when flying because the platform movements are very smooth except those small "jumps". So I was investigating it and find out that it was actually the PWM-signal that make those little jumps. Even when parked on the ground and the simulator report 1G vertical there are jumps indicating 5-20G for a few milliseconds.
Investigations goes on :geek:

User avatar
jph
Posts: 2857
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: DiY Motion simulator

#7 Post by jph »

note - PWM is NOT HW-PWM !

Use HW-PWM

Joe
Joe. CISSP, MSc.

Glattnos
Posts: 3
Joined: Sat Mar 09, 2024 5:45 am

Re: DiY Motion simulator

#8 Post by Glattnos »

I use:

Code: Select all

vertG = hw_output_pwm_add("ARDUINO_MEGA2560_A_D11", 200, 0.5)
sideG = hw_output_pwm_add("ARDUINO_MEGA2560_A_D12", 200, 0.5)
Those pins(D11 and D12) should be connected to the ATMega2560 hardware Timer1 for hardware PWM. But I am not sure exactly how AirManager set the prescaler and CounterTop and if they are manipulated "on the fly" when the duty cycle is altered to maintain frequency or something strange. I tried 50, 200 and 1000Hz but still see those little "jumps" on the PWM-signal(with oscilloscope).
Note that if I dont change the duty cycle the PWM is stable, so there is ofc a risk that it's me doing something wrong. Investigating further :geek:

User avatar
jph
Posts: 2857
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: DiY Motion simulator

#9 Post by jph »

If needed mate, you can always use messageport and program the arduino (preferably a pico) yourself with the hwpwm. I am not sure how a change in output is handled as it is closed code in the AM image. Have fun experimenting and good lick with it. It sounds like a fun project. :)
Joe
Joe. CISSP, MSc.

Glattnos
Posts: 3
Joined: Sat Mar 09, 2024 5:45 am

Re: DiY Motion simulator

#10 Post by Glattnos »

Thanks a lot! :D
You made me think a little bit different. Instead of continue my already 2-day long investigation about the PWM I did as you said and started to look at the MessagePort instead. After reading about how it works I was using the MessagePort on another ArduinoUNO and was sending the Gforce-data to it and used the HW PWM there instead. The PWM was now perfectly steady and my MotionPlatform was super smooth :mrgreen:
I was dealing so much with this problem, made filters to filter out bad PWM-signals and to dampen the motions and jitter. Now when the PWM was solid I could basically take away most of the filtering without problems. So really thanks for pointing me into the right direction, I needed to realise that the PWM from the MEGA could be the problem. Because it seams like there is no possibility to setup the PWM exactly as you want in AirManager it's hard to have perfect control over it. But its amazing that they also have MessagePort that solves those problems :D

Right now all works fine, but I will start to rewrite the software for my motion platform and implement MessagePort directly into it so I dont even need PWM. AirManager can just send all data(G-forces and angular data) via MessagePort directly to my Arduino UNO that controls the motion platform :D Very convenient and much better than sending any PWM-signals. The only drawback as I can see is that AirManager need to be closed before the ArduinoIDE can use the USB(for flashing and for serial communication during testing), but thats not a big problem :)

Once again, Thanks a lot :D

Post Reply