Autopilot - Auto Thrust

Hi Everyone,

My project is basically a flying craft. It will have 2 modes automatic and manual, toggled with a switch from the transmitter controlled by the user. There will be 3 inputs and 1 output to the motor. The inputs will be 1. The thrust information in the form of PWM, 2. The switch position in PWM form, 3. A IR distance sensor. When the switch is in off position (manual mode), the thrust information input will be flowing through the output. When the switch is in on position (automatic mode) the distance will be sensed from the IR distance sensor and PWM signals will be sent to the output according to the distance measured.

Now the problem which I am facing is, how do I make the UNO board understand, the changes in switch position that are in the form of PWM?

Any other approach to this Auto thrust concept will also be appreciated, but only requirement is at any time I should be able to switch back and forth between the manual and automatic mode. :D


The Arduino core has a function called pulseIn() to measure the length of a pulse in microseconds. You can use this to measure PWM inputs for your switch and throttle.

You could also filter (low pass filter) the PWM signal with a .01uF cap and a 20K resistor and then read it as an analog voltage.

Look at my topic, I have been dealing with the same situation, having an auto/manual dual mode operation. Good information is within.,63393.0.html