Progress

I managed to get a few more useful electronics bits working, which means the end is in sight for the initial electronics phase of the UAV project. I got the Atmega16 talking to a DS1820 temperature sensor over the i2c bus, which tells me that my computer cupboard is at 22 degrees C. I also figured out how to use the various modes of the inbuilt 16-bit timer, which allowed me to do PWM control of an LED (ie. the world’s most complicated light dimmer). Now I need to chop the cable of my one-and-only servo to hook it up and control its position using PWM. This will also let me use the other end of the cable to plug the RC receiver unit into my circuit as a PWM input, and experiment with sampling that. Eventually, the Atmega is going to sit inside in RC aeroplane, listening to my “suggestions” sent to it over the RC link, and deciding what actual control output to send to the servos.

So I’m getting pretty close to doing some UAV stuff rather than electronics dabbling. The main Flightgear developer has an interesting article about autopilots, although I’m still interested in finding more references. I was in Maplin today, and they sell IR thermopiles which will probably do for horizon-detecting (and therefore, attitude determination).

I’m still pondering what kind of software system to run on the plane. It’s going to have plenty of work to do – sampling RC PWM inputs, using the ADCs to measure attitude, talking to GPS over serial line, data logging, and producing PWM output for servos. It’s lots of stuff to juggle, and having some form of realtime task scheduler layer is starting to look attractive. I’ve seen other UAV systems use multiple microcontroller rather than trying to make one do everything. Kinda like communicating sequential processess …