Motion Controlled Helicopter

The Syma s107g Helicopter is a cheap, reliable RC helicopter. This project consists of reproducing the IR protocol of the Syma with an Mbed and then implementing control of the helicopter through hand orientation and muscle movements. An accelerometer placed on a glove is used to control the pitch and yaw of the helicopter, while the elevation is controlled via the flexing and un-flexing a muscle.

Team Members:

Weston Smallwood

Louae Tyoan

http://i.imgur.com/E50SWZj.jpg?2

http://i.imgur.com/pzcByEN.jpg?1

IR Protocol

The s107g does not use a standard commercial IR protocol. To gain an understand of the protocol one must examine it closer through an oscilloscope. The figure below is a random IR command from the helicopter controller. The carrier frequency can be determined by very closely examining a random burst. Our particular carrier frequency was 38kHz. There are 4 major parts to the command: a header, a footer, a one and a zero. The header is the first long burst followed by a long silence. The footer is the last short burst at the end followed by a very long silence and then the full command is repeated after the silence. The zero is defined as a short burst followed by a short stent of silence. The one is defined as a short burst followed by a longer silence. The length of each burst and silence need to be manually measured. The values in the code below may vary depending on the helicopter used. Excluding the header and footer, the command is made of 4 bytes of information. Byte 1 is yaw, byte 2 is pitch, byte 3 is the throttle and byte 4 is the trim.

http://i.imgur.com/jZ1lEG1.jpg?1

The mbed is capable of recreating the command using PWM. The pulses can be made by turning on and off the PWM in the pattern above. Below is a sample output from the mbed's pwm pin.

http://i.imgur.com/UYMrbFt.jpg?1

Parts:

1) Syma s107g Helicopter

http://i.imgur.com/1lOiu1J.jpg?1

2) Sparkfun IR transmitter Breakout

http://i.imgur.com/m8UBki7.jpg?1

3) Sparkfun Accelerometer MMA8452 Breakout

http://i.imgur.com/heJbRK0.jpg?1

4) Sparkfun EMG Kit Breakout

http://i.imgur.com/oORMEmJ.jpg?1

Note: The EMG Kit runs off of the 18 volt differential, not the mbed's Vout.

5) 2 9V batteries

PinOut

MbedAccelerometerIR TransmitterEMG Kit
Vout(3.3V)3.3VVCC
GNDGNDGNDGND
p9SDA
p10SCL
p16SIG
p21CTL

Code

http://developer.mbed.org/users/wsmallwood3/code/IR_Helicopter_Controller/

Import programIR_Helicopter_Controller

Syma s107g Helicopter controller

Short Demo


Please log in to post comments.