PPM2USB - RC PPM to USB-Adapter

PPM2USB is a simple circuit which decodes a PPM-Signal from a R/C (Radio Control) transmitter and emulates a USB-Joystick.

# Diese Seite auf Deutsch #

The USB side of the adapter behaves like a standard USB joystick (HID-Device). Therefore you don't need a driver for Windows or Linux (tested with Windows XP, Windows 7 and Ubuntu 9.10). In Mac OS it should work well too, but this is not yet tested. The adapter is ideal for use with a model aircraft simulator on the PC.

remote control joystick adapter

PPM

Most R/C remote controls provides a so-called PPM-signal. It consists of a pulse train with about 0.4 ms long pulses. The time interval tn between the pulses corresponds to the stick-position of each channel. A time of 1.5 ms corresponds to the center position, 1ms is the minimum and 2ms is the maximum position. A pulse train consists of n+1 pulses - for 5 channels thus 6 pulses. The pulse train is repeated every 20ms (50Hz).

The PPM signal of a remote control with 5 channels

Bild 2: The PPM signal of a remote control with 5 channels

On my R/C transmitter, the PPM signal can be found at the trainer port. The pinout of the 4-pin. Mini-DIN connector is shown in Bild 3.

pinout of the trainer port on the Esky Remote

Bild 3: pinout of the trainer port on the Esky Remote

An overview of the pin connection for the trainer jacks of other manufacturers (including Graupner, Robbe, Futaba, Multiplex, Hitec) can be found here: Externer LinkPinouts of various R/C transmitters

Hardware

The schematics of the PPM2USB adapter

Bild 4: The schematics of the PPM2USB adapter

The circuit is quite simple and can be build on a breadboard or on a perfboard. The resistors and Zenerdiodes provide the USB-required voltage levels. The PPM signal is connected directly to the ICP-pin of the ATmega8. This works with signal levels from 1.5-5V. For the right timing an external 12MHz crystal is used.

Note: The ISP circuitry for programming the controller was left in the schematic way.

PPM2USB with USBASP-Hardware

It is also possible to modify an USBASP-Dongle: USBASP to PPM2USB-Modification.

Software

The software was developed with the AVR-GCC tool chain and consists of three parts:

PPM decoder

The PPM decoder is completely interrupt driven. To measure the time, a 16 bit timer is used which is directly connected to the CPU clock (12MHz).

USB stack

The ATmega8 has actually no USB interface. However, it is possible to implement such in software. For this purpose the free USB stack called V-USB is used.

Main program

In the main program V-USB is initialized. Then the controller goes into a infinite loop and transfers new joystick positions to the PC. It will only transfer data when the stick positions have changed. This is indicated by brief flashes of the LED.

Download

Flying-Model-Simulator FMS

For simulating model airplanes you can use the Free Flight Model Simulator (FMS).

Video 1: FMS test flight with A380 and Quadropcopter using the PPM2USB-adapter

Tags: usb rc simulator interface ppm cable cable pinout pinout adapter joystick trainer model making v-sub pcm RC USB Atmel AVR Mikrocontroller Projekte Projekt uC diy selbstbau tutorial µC selbstgebaut schaltung schaltplan schema bauplan bauanleitung schematic programmierung elektronik controller embedded Atmega8 Atmega32 arduino bascom avr-gcc avr studio atmega microcontroller isp
eXTReMe Tracker