Pages: [1]   Go Down
Author Topic: Autopilot - Auto Thrust  (Read 555 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-grin

Cheers!!!
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8081
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 30
Posts: 2246
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Ft. Worth, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 591
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://arduino.cc/forum/index.php/topic,63393.0.html
Logged

KF5RVR

Pages: [1]   Go Up
Jump to: