Flight stabilization and More!

MagicBox is an accessory designed for the model airplane enthusiast. MagicBox connects between the aircraft receiver and the control servos as shown in figure 1. This device provides a number of functions that the pilot can select from a ten-position mode switch. Each function has adjustable parameters and options that are custom designed for the specific mode. The mode function allows the pilot to configure the MagicBox to his specific aircraft and needs. This device combines several functions into one package, you would need to buy 5 or 6 different modules to collect all of the functions available in the MagicBox. Each mode and a brief description are given below:


Mode Description


0 Position, servo position control using pots (jumper D removed)

0* 2 axis platform stabilization, this mode is enabled by installing jumper D

1 Cycle, servo A cycling

2 Isolate, allows isolation and reversal of 4 servo channels

3 Match, allows servo output doubling with gain and offset adjustments

4 Stable, uses accelerometers to stabilize flight path

5 Vtail, supports rudder and elevator mixing

6 Flaperon, supports dual aileron, flaps, and differential

7 Dualrate, allows three channels of dual rates

8 Glitch, this is a fail safe and glitch buster function

9 Mixer, allows two channel mixing


MagicBox monitors the battery voltage on power up and will indicate, using a buzzer, if the voltage is low. The input signals are validated in every mode, if a signal is detected out of the valid range, it will be ignored. The servo outputs are opto-isolated, allowing you to use separate batteries for your servos. Jumpers internal to the MagicBox allow you to use the same battery if you wish.

One of the unique features of the MagicBox is the use of accelerometers for flight stabilization. The accelerometers are monitoring the attitude of the aircraft and will control the aileron and elevator servo positions to keep the aircraft on a straight and level flight path. This is a wonderful aid for the new pilot; if he gets in trouble, just let go of the controls and MagicBox will return the aircraft to level flight, like magic!

A block diagram of MagicBox is shown in figure 2. This is a very simple design with the Cypress PSoC microcontroller at the core. Servo signals from the receiver are sent into the microcontroller along with signals from a 2 axis accelerometer. Servo output signals are generated in the microcontroller and buffered through opto-isolators. This allows the servo’s load to be isolated from the receiver and the MagicBox.

Servo positions are controlled with a digital pulse. These pulses is nominally 1.5 mS in duration when the servo is in its center position. The servo extremes are 1.0 mS to 2.0 mS. The pulse rate expected by the servos is 40 Hz, or a pulse every 25 mS. The signal from the accelerometer is a pulse-width modulated signal that has been adjusted for a pulse rate of 1 KHz. The PSoC microcontroller is well suited to deal with the array of pulses that must be detected and generated. All 8 of the digital logic blocks and 4 of the analog blocks are used in the design of the MagicBox.




This project was inspired by a Circuit Cellar design contest. This device was my entry in the event. You will find all the technical data including source code on the download page. At this time I do not plan on marketing this device unless I get a lot of interest.