I've mention this project a couple times and finally, here it is.
What: This is an ardupilot board that has been modified as per the picture above. The modifications allow reading the position of 4 channels from your receiver and driving 4 output servos. The firmware has been altered to remove support for gps and instead use the one ATMega328 serial port to write out the receiver channel data and read in servo position commands from an external computer.
Why: I am working on a gumstix based autopilot. The gumstix runs all the "smarts" but I need a simple way to decode receiver channels and drive servos, and I need a manual override safety switch. The ardupilot provides both of these.
I'm no master solder expert, but I managed to avoid soldering my fingers to the board and everything works, so I'm happy.
I am attaching my firmware mods (based on the Ardupilot-2.2.3 firmware with lots of hacking and chopping.) My current incantation only does servos, but I tried to leave the door open to attaching other analog sensors which could then also be reported to the host computer ... this could include pressure sensors, voltage sensors, etc.
I ran into problems using pulseIn() to read the receiver pulses (which made sense after I looked at what pulseIn() is actually doing) so I wrote my own routine that watches all 4 channels at once and times the pulse. I haven't convinced myself that I have the overall board timing locked down exactly the way I want it, but for now it seems to work pretty well. I can read 4 channels of data off my receiver (+ the selection channel state) and I can drive 4 servos from the host computer (tested with a simple sine wave function.)
On the subject of hardware in the loop testing, a board mod like the one described here could be used to read the servo outputs of a standard ardupilot, and feed them to a simulator to be translated into control surface commands there. Some additional software/communication work would be required, but it should be a reasonably straight forward project.
Comments
It's good to know that Mega will have 8 channels available. All my aircraft are currently setup with each aileron on a different channel, so even 4 channels is not really enough for basic flight control. Seperating the aileron channels makes it much easier to program the surfaces, as well it allows differential ailerons. I also like to avoid using Y-harnesses since it is a single point of failure.
Tom
What's the status/availability of the ardupilot mega? Can I buy boards right now? I don't see anything showing at sparkfun or diydrones store yet. Will the 8 channel support be built right into the default firmware?
Thanks,
Curt.
There are four inputs (plus mode) on the board, but you need to do some special wiring to enable to fourth as we're using those Atmega pins for other functions in the current code. Ardupilot certainly can handle four or more channels (the same architecture powers our 4 channel PPM encoder), but there was very little demand for the fourth channel so we used that for other purposes in the base code.
If you want more channels, you'll be delighted with ArduPilot Mega, which will support eight channels right out of the box.
The wiki manual only says that "Output 4 is not currently used". Are there reasons why this hasn't been implemented yet? Doug implies that 4 channels is too much for the Ardupilot.
I *think* I've read the whole manual, but maybe I've missed something?
Thanks for the help,
Tom
http://code.google.com/p/ardunxt/
I hope to post pictures of the prototype hardware and use in an NXT robot some time over the Easter vacation.
2.5 and the PPM encoder use much more elegant solutions.
Rock solid and sure to work!
Greg