Let's Make Robots! | RobotShop

Arduino 20 Servos, 4 Pins, Variable Refresh Rate

More Servos, Less Pins, Less Cost

Some time ago I posted a library for running ten servos from an Arduino using just 2 pins. I have extended it to 20 Servos from 4 pins.

The library has a variable refresh rate determined by the number of servos, servos can be split across two banks for higher refresh rates.

Original 10 Servo library with all the background here -


New version with support for split banks for higher refresh or just more servos here -


Duane B


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks Duane for sharing this. I know I've seen a number of people discussing here making a servo controller from a micro and will find this information useful.
I don't think I've seen you mention it here about your gig over at microcontroller central but I've enjoyed reading your posts over there. Sorry for spoiling your anonymity if that was your intention.
But we are a bit micro centric here anyway.

It's always great to learn more about the people behind their acronyms - especially if they have such a massive background like Duane.

Hi, I had to look up microcontroller central and then search for a Duane. While I am Duane B, I am not Duane Benson.

Duane B

Sorry about the confusion there. I'm not sure how I came to that assumption now other than similar names I thought I'd seen Duane Benson talking about a project similar to what you'd been working on. An rc beetle I think it was. But I've got my wires crossed, please excuse me for the error.
It doesn't take away from the usefulness of what you've posted however.

I Guess I should be flattered to be taken for someone with a lot more background than I have.



Others may think you're wasting your time re-inventing the wheel on this, but I think it's truly AWESOME. These ICs cost nothing and are available in shops locally anywhere. Even here (Cordoba, Argentina) where it's hard to get anything and what little you can get usually comes at a ludicrous price. Furthermore having stuff shipped here is about as pleasant an experience as getting kicked in the nuts.

Sooo... I'm sold. I wanna try this out right away. At first glance it does seem a bit complicated/messy, so I was wondering, since this thread is rather old, if you (Duane) are still around for giving a bit of advice should it be needed? For starters I'd like to ask if there are any problems/inconveniences you've become aware of in the meantime?

Anyway thanks for sharing this...