Van's Air Force

The definitive Van's Aircraft support community! Buying, building or flying an RV? Join our exclusive family of mentors and enthusiasts!

I managed to make a cheap GPS receiver work with Trio EZ Pilot

moandor

Member
Background: I posted this thread, trying to figure out how to make a dumb GPS receiver work with Trio EZ Pilot. With help from Trio, I managed to do it!

In short, the problem was the lack of magnetic variation. My solution is to inject a magnetic variation into the GPS output. Basically I put a microcontroller in the middle of the data flow. It takes the GPS output, adds a magnetic variation to it, then sends the modified GPS data to the autopilot.

This method needs these items:
  • An NMEA GPS receiver using RS232 with 4800 baud. They are usually around $20. Example.
  • An RS232 to TTL converter like this.
  • A microcontroller. I use ESP32 for a quick start. But any microcontroller with the ability to process UART should work.
I published the source code here. Right now it's a hard coded with a variation of 4 degrees west, because it's just where I live. Later I'll update the code to calculate it based on latitude and longitude.

I programmed the ESP32 dev board with the source code and wired it like this diagram. Then it just works! It's able to keep flying in a perfect straight line. Finally I don't have to keep holding the stick for once! I'm so happy with it!

Since ESP32 also has WiFi and bluetooth support, I think there is potential for even more. Maybe I'll be able to upload a flight plan from an iPad and make it fly some waypoints.
 
Last edited:
Background: I posted this thread, trying to figure out how to make a dumb GPS receiver work with Trio EZ Pilot. With help from Trio, I managed to do it!

In short, the problem was the lack of magnetic variation. My solution is to inject a magnetic variation into the GPS output. Basically I put a microcontroller in the middle of the data flow. It takes the GPS output, adds a magnetic variation to it, then sends the modified GPS data to the autopilot.

This method needs these items:
  • A NMEA GPS receiver using RS232 with 4800 baud. They are usually around $20. Example.
  • An RS232 to TTL converter like this.
  • A microcontroller. I use ESP32 for a quick start. But any microcontroller with the ability to process UART should work.
I published the source code here. Right now it's a hard coded with a variation of 4 degrees west, because it's just where I live. Later I'll update the code to calculate it based on latitude and longitude.

I programmed the ESP32 dev board with the source code and wired it like this diagram. Then it just works! It's able to keep flying in a perfect straight line. Finally I don't have to keep holding the stick for once! I'm so happy with it!

Since ESP32 also has WiFi and bluetooth support, I think there is potential for even more. Maybe I'll be able to upload a flight plan from an iPad and make it fly some waypoints.
Awesome. Great job! I did something similar with converting my existing EDM engine monitor to emulate a GRT engine monitor output to feed two GRT screens. Super rewarding to be able to wire and program a solution like this. Thanks for posting your code and wiring. Very cool!
 
Nicely done! Does the RS232 to TTL converter just lower the voltage of the signal, or does it also alter the format?
 
Back
Top