It’s been very interesting for me to watch the progression of the autopilot for RV-6 project. First we were just going to make an electronic trim system, then we started adding features so that we could use the electronic trim for control of the airplane for an autopilot, and now we’re writing code for control loops for the RV. I’m very much under the impression that scope creep is unstoppable and we’ll probably always be working on the RV-6 autopilot or some idea that sprouted from it.
Since I last posted to the blog, we've made quite some progress:
Since I last posted to the blog, we've made quite some progress:
- We have interfaced the Atmel to a USB-1408FS Measurement Computing DAQ
- We have interfaced the DAQ to a computer running Matlab (without the data acquisition toolbox)
- We have installed an electronic barometric pressure sensor in the RV-6 so that we can measure altitude with the microcontroller.
- We have written Matlab code to run a control loop aimed at keeping the barometric pressure constant (ie altitude hold.)
We connected the servo to the Atmel. To the horn of the servo, we glued a piece of balsa wood to act as a wing. We connected an analog input to the DAQ to the wiper of the potentiometer (which is simulating the output of our analog barometric pressure sensor). The servo was in turn glued to the potentiometer knob such that the wing was perpendicular to the rotational axis of the potentiometer. Then we placed the wing in wind and varied the servo to try to keep it at the same spot, which we read in based on the potential of the wiper of the potentiometer. As the angle of attack of the wing was increased it raised the wing, rotating the potentiometer and causing the Matlab program to think that our altitude had increased. Matlab then commanded the servo to a different output by sending an analog signal through the measurement computing DAQ’s analog output to an analog input on the Atmel which we convert to a pulse width for servo control.
Long story short it’s awesome. Check the video below.
Long story short it’s awesome. Check the video below.