Home > Electronics, RC Planes > Showing APM telemetry data on Hitec Aurora’s screen

Showing APM telemetry data on Hitec Aurora’s screen

Every now and then it’s good to pack light and leave the laptop at home and just enjoy flying. Running out of battery at inconvenient time is however a concern of mine. I just recently finished a project to display telemetry data from APM on Aurora’s screen. I’m not particularly proud of the technical side of the implementation, but this seems to work fine.

Aurora showing sensor data

Hitec’s Optima receivers interface with “Sensor station” via I2C, receiver being the master. APM has I2C-bus and it should support multiple masters, but I could never get it working reliably. My solution was to use ATMega88 to receive data via SPI from APM and relay the data to forward by answering queries send by the receiver. I originally considered tapping to xbee wires and decoding mavlink to get the data. This would however meant more work and I’m lazy.

Good things in this approach are that I can more flexibly get internal data from APM (not limited to data provided via mavlink messages) and the device can be used to extend APM (like add digital outputs etc). The downside is, that this requires changes to APM code and soldering couple of wires to oilpan, since it does not have connectors for SPI.

The circuit itself is really simple, just the avr, two resistors and a decoupling capacitor.

Schematic for interface board

The prototype is constructed to stripboard. Atmel ISP-connector is also used to connect the board to APM and the other connector is for the receiver. If there is interest, I can provide these devices constructed to decent pcb, with needed wires and programmed controller.

Prototype board

All the information that the sensor station suppors is emulated from the data from APM, even including fuel meter, which tells how much mAh are remaining from the rated capacity of the battery. The only thing that I haven’t implemented is GPS position and time, since they are not really useful without a map (except maybe when the plane is lost). One nice thing in Aurora is that you can rename temp and rpm labels. I’m using rpm-1 value for mAh’s used and rpm-2 for airspeed. Temp-2 is used to show the current throttle (0-100). Temp-3 and 4 are still left for some other data.

I’m really happy to get this working, since all the important data is available from transmitter screen with one glance and since the APM sends the data via xbee, this is a nice to have backup feature.

Sources are uploaded to gitorious: https://gitorious.org/apm-hss-emulator/apm-hss-emulator

The code probably will have bugs on altitude and speed reporting, I haven’t yet tested it on flight due to bad weather. I’ll try to update it soon.

Read the comments from ReadMe.txt file. The included Makefile probably work only on OS X. I had trouble finding decent Makefile that could compile AVR code on commandline, using libraries from Arduino. There is hex file included ready to be flashed. When programming the controller, remember do disable the fuse that divides internal clock by 8. The code needs to run at 8MHz.

Connecting board to APM

Connections to “OilPan” (picture from APM wiki)

Three wires must be soldered to OilPan shield, marked in the picture above. Power, either 3.3v or 5v can be taken where you want, but one option is to solder I2C pinheader to OilPan shield and take power from those.

Please, drop a comment if you build this device. Patches to improve the code are also welcome!

[Update 10.5.2012] Code now supports APM2 and GPS coordinates. More info here!

About these ads
Categories: Electronics, RC Planes Tags: , , ,
  1. Anonymous
    03/11/2014 at 18:32

    I think your schematic is wrong. there is no way the SDA Signal can reach the Chip. :)

    • 03/11/2014 at 18:34

      Good catch, I’ll update it. Actually noticed this when I had the first batch of pcb’s made..

  1. 05/10/2012 at 19:41

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: