An autopilot system using an android phone. The PPM signal goes to the microphone input on the phone and and a modified PPM signal comes out of the audio jack to drive the servos.
The android phone stabilizes the plane using the built-in gyroscopes and GPS functionality is also going to be implemented, with the RTH (return to home) function upon signal loss.
PPM (Pulse Position Modulation) Is used by RC transmitters and recievers to transmit data for the Rc channels. Old FM recievers (The one I have) use this type of signal. I hacked the FM reciever and located the PPM output, then I used an arduino based serial oscilloscope to check the signal.
How does an autopilot system that uses an Android phone for plane stabilization—which includes GPS capabilities, servo control, PPM signal processing, and RTH (return to home) in the event of a signal loss—be improved by the Mod apk
at Thomas: you are wrong, the sampling frequency is enough. 48 steps is more than what you have on your radio control throttle stick. consider there is software like smartpropplus for windows that uses audio sampling.
at Pedro: i created a discussion to create a PPM encoder library:
Hi!
I had a similar idea once but using Bluetooth instead.
Have you been able to sample the PPM using the microphone? For me this seems to be the most critical part. Have you thought about replacing the microphone by some logic to directly pass the data?
My ideas was to read the PPM (or single PWMs) with a µC and send the values via BT to android. Android then should also be able to send new values back to the controller which is then generating the PWMs going to the peripherals. The ideas behind was to have some kind of fail save if the phone crashes for any reason.
Thank you!
I was able to sample the PPM signals with an android oscilloscope, via the audio jack.
Now I need to code an app that decodes the signal and then encodes a new signal which is sent to a µC which decodes it into individual PWM signals for the servos.
Ok
but please think of the following:
Do you know at what frequency your phone is sampling the input?
Usually its something like 48kHz.
PPM signals have their information content in the Pulse Width which can be from 1 to 2 ms. Therefore the information you want to get is stored within 1ms.
if you sample at 48kHz you get 48 000 signals/s if you are looking at a 1ms second this would mean that you would quantize that 1ms by 48 :(
A resolution of 48 steps is not very accurate in my eyes.
My suggestion:
check the sampling rate of the phone and if its too low then get a 10$ BT module to communicate with the phone.
How does an autopilot system that uses an Android phone for plane stabilization—which includes GPS capabilities, servo control, PPM signal processing, and RTH (return to home) in the event of a signal loss—be improved by the Mod apk