Author Options:

Running several servos off an Picaxe 18m2. Answered

Hi there. 
I recently got a Picaxe 18m2 project board and I want to run up to eight servos off it, if thats even possible. Would I need a separate servo driver/controller for that number of servos or perhaps a different microcontroller?
Any examples of code for operating more than one servo at a time would be appreciated also. 
By the way, apart from reading 'Robot builders bonanza', my technical experience consists of operating 'Bigtrak' when I was about 12 and changing the odd plug. Cheers.


The forums are retiring in 2021 and are now closed for new topics and comments.

8 years ago

I believe that project board does have 8 outputs, so yes, you should be able to drive all of your servos with it. Running all of those servos will dominate the chips internal clock and, depending on what you want your servos to do, you may need another picaxe to send control signals to the one that actually runs the servos. This page has some good information on the whole deal http://picaxe.hobbizine.com/servo.html

You will also most definitely want to read up on the "servo" and "servopos" commands in the PICAXE Manual 2 http://www.picaxe.com/Getting-Started/PICAXE-Manuals/

The code that you would end up using would look a bit like this:

servo 1, 75 ; initialize servo on output1
servo 2,75 ; initialize servo on output 2
main: servopos 1,75 ; move servo 1
           servopos 2, 75 ; move servo 2

If you don't mind me asking, what do you want to do with the servos? Sounds like a hexapod? http://www.pololu.com/docs/0J42/all#1


Reply 7 years ago

Thanks for that tomdf. I'm only planning to build a robotic arm thats all. To be honest I haven't even touched the picaxe since I got it, been busy becoming a dad for the first time. Anyway, the project board wasn't as ready to go as I imagined, I've had to order terminal blocks and pin headers etc, plus I need a soldering iron and stuff. Looking forward to experimenting though.