There’s nothing quite like a nice, simple hack. This serial servo controller uses a PIC12C671 and a pair of resistors. Leaving out the power supply, that’s the lowest part count I’ve ever seen.
13 thoughts on “Simple Serial Servo Controller”
Leave a Reply
Please be kind and respectful to help make the comments section excellent. (Comment Policy)
“There’s nothing quite like a nice, simple hack. This serial servo controller uses a PIC12C671 and a pair of resistors. Leaving out the power supply, that’s the lowest part count I’ve ever seen.”
..”_this_ servo controller”.. The “_this_” syndrome is almost as bad as the click _here_ syndrome.. Perhaps “This _servo_ _controller_ ..” would be better.. I think I’m just taking the piss though, and also I’ve had too many beers.. I’ll shut up now.
why need the resistor from the pic to servo, look at http://www.epanorama.net/documents/motor/rcservos.html it seems servos take an 5v input control wire.
Does anyone know how to simply control a small 3-5v DC motor through USB? I would like to see that.
crash, just use some atmega8, a transistor as motor driver and some usb->rs232 chip.
I agree, the resistor between the PIC and the Servo is not required. Most Micro Controller manuals are geared toward the beginner, and have the resistor to protect the Micro against a miswire (accidentally hardwired to a power supply rail.)
It should be trivial to write a timed routine in any modern language (C#, Java…) to toggle a pin on the Serial or Parallel port every 20mS. It may have some jitter, but it also has a zero parts count!
I’ve built many serial servo controllers and you don’t need those resistors. All that is required is a PWM output to the control line of the servo. Thats a part count of two: servo and mcu.
12C?
What does the C stand for? I know the F family of microcontrollers is named after the internal flash but I’ve never heard of C family.
hackius: the c means that the micro can only be programmed once. since f and c types are interchangeable, the c types aren’t used much anymore except in mass production.
Here’s a couple of my own simple PIC 12F675 servo controllers.
http://www.ringolake.com/pic_proj/servo/servo_weasel/servo_weasel.html
It is nice having such a low parts count, it really makes stuff compact and easy to build. But you just can’t beat the dedicated servo controller chip…especially if you don’t know how to program pics like me. I know all the syntax for java and perl and stuff, I just don’t have the creativity to make good programs, so having a dedicated part to do a job is still a high priority in my book.
Hackius, the “c” is the non-flash version. You can only burn the code into the chip once, they are just a bit cheaper than the flash rewritable ones.
I must apologize for last nights obviously drunken writings.. Bad Matthew!
The 100 ohm resistor is ACTUALLY a good idea. They shape the pwm rising edge to prevent broadband noise on every rising and falling edge. Ever looked at the frequency spectrum of a pulse? Not pretty. It’s also a good idea to have because the servo can fail with a dead short to gnd which would pull more current through that little PIC pin damaging it. The Resistor limits the current in this situation saving the PIC.