Interfacing a PICAXE with an RC Servo
| Attachment | Size |
|---|---|
| test code 1.0 | 48 bytes |
| test code 2.0 | 330 bytes |
Update 26/04/2009
I have added a video to show the picaxe modifying the servo signal based on the output from a Maxbotix EZ0 (EZ1 version here at LMR). The following image is also from that setup. The new code is attached (test code 2.0).

Summary
A small, cheap and light-weight PICAX-08M can be used to interface/interfere with the signals sent from an RC receiver to a Servo, allowing for all sorts of autopilot-style projects with your existing RC toys/new projects.
The fiddly-bits
I have been wanting to play around with some sort of flying and semi-autonomous robot for quite a while. The only problem for me has been the weight of the microcontroller(s) and sensor(s) to facilitate this on a reasonably small flying platform (small RC Helicopter etc).
I had used PICAXE-08M's in previous projects, and loved the simplicity (and the lack of weight) of their packaging (8-pin DIL). The thing that worried me was the processing speed/accuracy of the chip in an environment as physically "harsh" as an RC Helicopter being flown by yours-truly :)
So, a test was in order. I cobbled together the following circuit on a piece of vero-board (see main pic), downloaded a simple program (attached at top) to the 08M, fired up my RC Helicopter and...

...it worked!!!
The 08M was perfectly capable of reading the servo-control pulses, and repeating them. It did this in a completely transparent way, with no change to the handling of the helicopter (see video). As an added bonus, the Servos on my particular helicopter (LAMA V4) require a 5 volt supply, hence the simplicity of the above circuit because I can directly connect the 08M inline.
Now, it is up to you. Turn this into something really interesting (RC autopilot...).
If you are interested, there is a bit more information on this and some of my other projects over at my blog.




@ Wed, 2009-04-08 22:18
I2C
Could you make an I2C slave device which, when queried, would return the position of the control stick on the transmitter?
Could you make an device which would be an I2C interface to a servo?
This would be the start of something pretty cool. A bunch of I2C devices hanging off a bus controlled by an I2C master...
@ Sun, 2009-04-26 07:24
Open Servo
Sounds like the open servo project:
http://openservo.org/
@ Thu, 2009-04-09 10:40
re i2c
I haven't played with i2c, but I am sure it would be easy to do. The picaxe I used doesn't support it, but the 18X does, I think. It would be easy to encode the pulse size from the servo, and transmit it via i2c. If sending/recieving is as easy with i2c as it is with rs232/485 (which I have played with), it should be doable in a small number lines of code. It would be very cool to connect servos to controllers using i2c! I will look into the i2c when I get a bigger picaxe chip, soon.
@ Wed, 2009-04-08 20:20
cool! might be a good way to
@ Mon, 2009-04-20 12:10
Follow up
@ Sat, 2009-04-25 17:37
I made a PCB layout that
@ Sat, 2009-04-25 23:52
Sounds cool, see if you can
@ Sun, 2009-04-26 00:56
I'm new to this so hope this
I'm new to this so hope this works!
@ Sun, 2009-04-26 18:13
Looks good, have you tried
@ Sun, 2009-04-26 19:11
not yet, i dont have the