I want to implement an analog PID system (link) for a new autopilot on one of my arduino RC planes.
I know I could probably use the on-board Arduino as a DAC and then feed it to the PID circuit, but I'd rather skip the excess processing overhead, and just use an analog IMU.
Does anyone know of a good 3 or 6 DOF analog IMU? Thanks!
If you already have Arduino on-board why you don't use it for PID in software? Probably saving weight and complexity. Also I would be afraid an interference in the analog processing may lead to a disaster.
I want the flight software to be as quick and nimble as possible. This means if I can get away with accomplishing a task in electronics and not have to use as much processing, I'm for it.
Another reason for using analog circuitry is for the learning aspect. Right now I'm taking a continuous and discrete systems course here in college and love it. Within the past month we learned opamp system realization from transfer functions and the thought occurred to me: why not do PID with opamps? That's when I did some research, found that it is quite feasible, and thought it would be a good opportunity to apply what I've learned in the classroom to a real project (instead of using a random .h library online and reverse engineering their demos). I'm also thinking about using this project for independent study or a capstone project if I can persuade one of the professors here in the ECE department.
As for weight, complexity, and interference: I'm not very concerned with weight since adding 5-7 opamps, resistors, and a couple caps won't add that much weight compared to my 7lb plane. As for complexity, I actually find it less complex to work in the analog domain than using a pid library in code. When it comes to interference, I guess I can use some shielding techniques plus twisted pair wiring to mitigate EMI.
6DOF analog? Then you're looking at a computer the size of one avionics rack in a B52 bomber. Can't be done on a quadcopter.
How are the motors driven? I bet it's an ESC with a digital interface. There's no speed advantage to do some of the processing in analog if it eventually has to be converted to digital to command the ESC. If you must have analog in your inner control loop, then it has to be analog all the way.
MorganS:
6DOF analog? Then you're looking at a computer the size of one avionics rack in a B52 bomber. Can't be done on a quadcopter.
How are the motors driven? I bet it's an ESC with a digital interface. There's no speed advantage to do some of the processing in analog if it eventually has to be converted to digital to command the ESC. If you must have analog in your inner control loop, then it has to be analog all the way.
No, no, no. It's a plane (5ft wingspan), not a quadcopter.
Although the PID loop does controls servos, I found this cool little circuit to convert an analog signal to a PWM signal that can control a servo. The nifty trick is to condition the PID output to be properly fed into the AN to PWM circuit (which I have a good idea on how to do).
I am no EE but my impression is that digital anything is much easier to work with than analog. If you write your program well it will work consistently at "all" circumstances. Analog computing changes it's behavior witch changes with temperature, ageing etc. Also any change needs you to change the hardware which is much more difficult (for me) than uploading program with slightly different constants.
If you are afraid the PID will burden the Arduino too much you can use another (standalone) chip dedicated for reading the sensor and driving servos. You can also log the data much more easily this way so you will know what went wrong.
For me analog solutions are much more beautiful - using MCU is "brute force". But I guess you want the IMU and servos to control the plane. When the analog solution (you are experimenting, not familiar with!) fails what will happen?
Smajdalf:
When the analog solution (you are experimenting, not familiar with!) fails what will happen?
Experimentation is one of the best ways to become familiar with a concept.
This autopilot will only be a portion of the avionics. I will obviously have an on board Arduino that I can communicate with to switch between manual and autopilot, so I'm not relying completely on the analog system. If something fails, I quickly switch to manual, land it, figure out what went wrong, attempt a fix, and repeat the process until it works as expected.
What use is an accelerometer (only) on a plane? All it will tell you is that the wings are lifting but you get no information on which direction they are lifting you to.
How do you switch to manual with a hardwired analog system? A big fat relay?
MorganS:
What use is an accelerometer (only) on a plane?
Good point. I'd like to also use an analog output gyro, but I can't find one. If you (or anyone else) knows of one, I'd appreciate the name! After all, different analog IMU options was my original question.
MorganS:
How do you switch to manual with a hardwired analog system? A big fat relay?
Yes. A SPDT with manual being NC, autopilot being NO (for safety reasons), and the pole connected to the servo signal wire.
ADXL330?
The ADXL330 is a small, thin, low power, complete three axis accelerometer with signal conditioned voltage outputs, all on a single monolithic IC. The product measures acceleration with a minimum full-scale range of ±3 g. It can measure the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion, shock, or vibration.
ADXL377?
The ADXL377 is a small, thin, low power, complete 3-axis accelerometer with signal conditioned voltage outputs. The ADXL377 measures acceleration resulting from motion, shock, or vibration with a typical full-scale range of ±200 g.
You can possibly use one accelerometer on each tip of wings and one on tail of the plane. If they are sensitive enough you can get information about speed of rotation (but not direction) from difference in measured acceleration. That means long wires and increased risk for catching noise.
I was afraid of that. Thank you for the suggestions, though!
Smajdalf:
You can possibly use one accelerometer on each tip of wings and one on tail of the plane. If they are sensitive enough you can get information about speed of rotation (but not direction) from difference in measured acceleration. That means long wires and increased risk for catching noise.
Hmmm, not sure that would be worth it; I think I'll stick to a single accelerometer in the fuselage.
For anyone interested, I have attached a VERY ROUGH circuit schematic. Many of the resistor and cap values have yet to be tested (i.e. finding the correct PID coefficients, etc), but the general idea is there.
Please let me know if you have questions or possible improvements!