Driving servos from GPIO

The next challenge is to drive a servo from the RouterStation board.  This servo will eventually turn the box around a pole.

I understand that there are lots of serial and usb servo control options for servos. But I also understand that one can use a GPIO pin to directly signal a single servo, which is all I need.  Save some dollars :)

Looks like I can use the linux kernal module gpio-pwm through OpenWRT.  From the looks of things it does what's needed, use the CPU's timer to generate PWM output on GPIO pins.  Any comments about that would be much appreciated. I suppose the thing needed is to generate the appropriate width signals to move the servo based on signal strength indication and then figure out the gearing so that the servo positions accord to positions in the rotation around the pole.

As for power and ground, here's the spec on the pins available on the board.  There are multiple gnds available, either through the UART, JTAG or USB pins (ideally I'd like to save the USB for eventual addition of 3G wireless modem). Power is more of a problem.  Looks like we have 3.3v from the UART or JTAG pins or 5VDC from the USB (checked with a multimeter).  Is it wrong to think about using these voltage sources? Can they put out the needed amps?  I was thinking of something like the Hitec 311 seems like it doesnt draw more than 200mA. Would it screw with regular USB if the servo was also driven off the 5VDC?

Should I be thinking about pulling 12-18VDC off the PoE before it enters the device and stepping it down somehow? Conversely is it possible to step the 3.3VDC up to the 4.8 that the servo needs, to avoid messing with the USB?

My guess would say

that you should pull the power you need from PoE. I would think that the Hitec servo you mentioned would still get power hungry if it stalled and that, I would guess, would easily overwhelm the power abilities of USB. The 3.3V line probably doesn’t supply much current either. I believe that the current trend to drop voltage is an attempt to save power overall, which includes dropping the amperage that is supplied to the chips as well.

The above is just my penny’s worth. I don’t even think it is worth 2 cents. :slight_smile: