Let's Make Robots!

Interfacing a PICAXE with an RC Servo

test code 1.048 bytes
test code 2.0330 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).



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... 

 Circuit diagram for PICAXE and RC Servo

...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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
This looks like it will be a really fun, interesting project.  One question - have you done any experiments to see how much extra weight the LAMA can lift?
i am not sure about the max weight, but I will be testing that soon. I will pm you when I work it out.
cool! might be a good way to make a fail saif for rc stuff?
Yes, it would. I want to get a decent range ultrasonic distance sensor and hook it up to the picaxe. Then, it could back off the forward tilt as it got close to something. That will be my next step at least. It could just as easily do the same intercepting the speed control to an RC car, stopping crashes etc.
I just bought one of these: http://www.maxbotix.com/downloads.html#Order_EZ0 - the Maxbotix EZ0 sonar range-finder. I will be posting a proper robot post, and a sensor info post, when this gets hooked up and working on the helicopter, as it looks to be a phenomenally awesome sonar range-finder.
I made a PCB layout that should hold a Picaxe 08, connector from receiver and to servo and a connector for an analogue distance sensor. Dont know how to put it up but if somebody wants it just ask.
Sounds cool, see if you can convert it to jpg or pdf and post it. Your program might do that for you.


I'm new to this so hope this works!

Looks good, have you tried it out yet? What kind of robot is it for?
not yet, i dont have the materials to make the PCB so i need to find some way to get it fabricated. It isnt for a robot, it,s for my rc car, I need some security because it keeps crashing...