As requested, here is the schematic for the motor controller section.
-Paul
As requested, here is the schematic for the motor controller section.
-Paul
I can't help but think your solution is overly complecated...
if i got you right you've got POT's setup (6 i believe?) to measure some sort of angles () and feed these into a comparator which i'm assuming has some sort of reference pot so that you can tune it to the angle you want.
Your then reading the output from your comparators from your pic and controlling a set of motors...
Far too complecated...
if i may, can i surgest a more acurite way...
Something like a pic16F877A has 8 analogue ports that can read a POT directly...
So, use 10K or 100K pots, connect one end of pot to +5V the other to ground and the middle pin goes to your ADC port (acts as a voltage devider)...
In the program you read the ADC, if it's anything other than 2.5volts (50% of the ADC max value) then it's off center and you can take action directly with the pic...
You will find this method much more precise as it will measure less than 1 deg off center...
Also, if you are measuring say pitch and roll, you therefor only need two pots and 4 outputs (2 per motor)...
I'f i've got what your trying to do completely wrong then tell me...
:edit
Actually, the pic your using has 4 analogue lines...
Last edited by comwarrior; - 25th September 2009 at 23:01.
paulcox82, comwarrior beat me to the final suggestion.. Why not use the internal A/D and just read the pot position directly. This way you can eliminate all of the comparators and hystorisis involved with them. That way you can place different limits on the position of the actuator and possibly in the future make the output PWM controlled with a PID closed loop. The bang,bang approch must account time wise for the braking and acceleration of the motor and also different loads on the actuator. This can be solved with the use of a PID control loop and PWM control of the actuator.. There are quite a few examples here on the forum. Type in the keywords Motor PWM and PID....
Dave Purola,
N8NTA
Bookmarks