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.
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.
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.
1) Syma s107g Helicopter
2) Sparkfun IR transmitter Breakout
3) Sparkfun Accelerometer MMA8452 Breakout
4) Sparkfun EMG Kit Breakout
Note: The EMG Kit runs off of the 18 volt differential, not the mbed's Vout.
5) 2 9V batteries
|Mbed||Accelerometer||IR Transmitter||EMG Kit|
Please log in to post comments.