This project arose from the need to control various "crowd pleasers" on a Ju52 that I was building for public shows. Specifically, I needed something that could:
1. Open a cargo door, then independently jettison the cargo
2. Open a parachutists door, then independently jettison the parachutists in a controlled manner
3. Open the crew door, then independently jettison the crew.
4. Open the top Cargo Hatch
5. Control the position of the rear gun.
All this had to be done using only 2 channels.
I used one channel to select the ancillary, then the second to select the action that I wanted. E.g. For the Cargo, crew and parachute jettison, action one would be doors closed, action two would be doors open and action 3 would be doors open and jettison motor on to eject contents via a ram. These rams would move until they encountered a microswitch which would kill the motors.
There were 5 PIC inputs: Channel 1, Channel 2, Microswitch 1 and Microswitch 2 and a trimpot.
There were 7 PIC Outputs: Cargo Door Servo, Cargo Motor, Parachutist Door Servo, Parachutist Motor, Crew Door Servo, Top Hatch Servo, Gun position Servo. Servos generally had 2 pre-set positions that were controlled via PWM outputs. Motors were controlled via MOSFETs, (Cargo on/off, Parachutists via PWM set by a trimpot). Servo Preset positions were programmed via the trimpot during a set-up routine then stored in EEPROM.
Although I initially tried to use 2 sequential channels on the receiver I discovered that the second receiver pulse immediately follows the first which does not give the PIC sufficient time to restart the timer. Channels 7&9 were then used which worked well.