ATmega328 PPM Encoder Board

From PaparazziUAV
Revision as of 20:45, 12 January 2011 by Lina (talk | contribs) (Programming the PPM encoder)

Jump to: navigation, search

Thanks to Chris we have a way to use virtually any RC receiver with Paparazzi without any modifications to the receiver.

This board plugs into the servo output ports on a R/C receiver and encodes them into a single PPM pulse suitable for the paparazzi autopilot. It is also possible to remap channels by changing the connection between the receiver and the encoder. Want Tx ch5 to be output on ch7 of the ppm stream? Just connect the Ch5 signal from the receiver to the Ch7 input on the encoder.

Ppmencv3 sm.jpg

Note: see the ATmega168_PPM_Encoder_Board page for the more recent hardware version. Wiki refactor in progress, these pages will be merged.

Programming the PPM encoder

Programming the board can easily be accomplished using an AVR ISP (in-serial programming) programmer. These are inexpensive and can be found many places online. Once you have the ISP connected to the PPM encoder, simply use avrdude with the following command:

For ATmega168:

avrdude -p atmega168 -P <Insert port here> -c <Insert ISP type here> -U lfuse:w:0b00100010:m -U efuse:w:0b111:m -U flash:w:servo2ppm+bootloader.hex

Fuse settings shown above may give unpredictable results and strange behaviour, depending on device and crystal.

So the better settings are:

avrdude -p atmega168 -P <Insert port here> -c <Insert ISP type here> -U lfuse:w:0b11110111:m -U efuse:w:0b111:m hfuse:w:0b11011001:m -U flash:w:servo2ppm+bootloader.hex

For ATmega328P set the fuse bytes as shown next:

avrdude -p m328p -P <Insert port here> -c <Insert ISP type here> -U lfuse:w:0b11110111:m -U efuse:w:0b111:m hfuse:w:0b11011001:m -U flash:w:ppm_encoder_v4_3+bootloader_16Mhz.hex

If you use 328P and a PonyProg-Cable for COM or a Mikrokopter SerCon, type the following: (replace COM1 with actual COM-port):

avrdude -p m328p -P COM1 -c ponyser -U lfuse:w:0b11110111:m -U efuse:w:0b111:m hfuse:w:0b11011001:m -U flash:w:ppm_encoder_v4_3+bootloader_16Mhz.hex


Source files

Gerber & Drill files