Timmahw
Posts: 3
Joined: Mon Nov 17, 2014 7:04 pm

Servo control board

Mon Nov 17, 2014 8:19 pm

Hello! Long time listener, first time caller.

Nutshell question: Do servo and/or servo controllers pose a danger to RPi when GPIO is used only for PWM?

Backstory: Just getting started with RPi, robotics and .. electronics, really. I have a good grasp on the key circuit principles, I think. Anywho, I am moving on from controlling my little KNEX car with L293D, and into servo controls. My ultimate goal is to drive a KK2 Flight Controller via RPi, which accepts PWM via typical 3-pin servo connector. Link. My Google-fu and forum searching produced several servo control boards, but I am insisting on making my own for the sake of education and practice:

Image

Goals:
  • Produce several 3-pin male headers for use with servo connectors.
  • The pins should be Gnd, V+, and Signal.
  • The signal pins should be attached to GPIO pins.
  • The V+ pins should be switchable; 5v from RPi or AUX supply.
  • Each GPIO channel should have a status LED.
  • LEDs should fade with PWM, for program testing.
  • LEDs should operate even without servo connection, for program testing.
Notes:
  • Not in diagram: hookup wire is run from the GPIO pin (yellow line) to the left resistor terminal.
  • Not in diagram: 0.1 jumper is used to switch from 5v to AUX. Thought it would be safer than a switch.
  • Probably would never need/want to run 9 servos; I can still use the GPIO pins for other stuff and still take advantage of the LED status! (I think.)
  • Since I plan to use this with a *copter, I left the right half blank for any future sensors etc.
Current (ha!) concern:
  • 3.3v from GPIO is enough to feed PWM signal, but is there a danger to the RPi without resistors?
I've been "that guy" at the local electronics store recently. I'm operating without any real tutelage, so I would appreciate any and all forms of criticism and words of wisdom from the based RPi gods. :D

Thanks
Last edited by Timmahw on Mon Nov 17, 2014 8:58 pm, edited 1 time in total.

User avatar
joan
Posts: 14959
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Servo control board

Mon Nov 17, 2014 8:51 pm

Not quite sure what question you are asking.

The Pi's gpios are 3V3. Not sure what you mean when you say 5V gpio.

Timmahw
Posts: 3
Joined: Mon Nov 17, 2014 7:04 pm

Re: Servo control board

Mon Nov 17, 2014 8:58 pm

Joan,

My concern is indeed with the 3.3v GPIO pins being used for PWM, not the RPi's 5v pin. I mistakenly called it a '5v GPIO pin', which I see now is way off.

Thanks

User avatar
joan
Posts: 14959
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Servo control board

Mon Nov 17, 2014 9:10 pm

Timmahw wrote:Joan,

My concern is indeed with the 3.3v GPIO pins being used for PWM, not the RPi's 5v pin. I mistakenly called it a '5v GPIO pin', which I see now is way off.

Thanks
I'm not aware of any problems with using PWM from the Pi's gpios. Lots of posters have used it (through a resistor) to change the brightness of LEDs.

Similarly lots of posts about using PWM to control DC motor speeds (via motor driver boards) and to provide servo pulses.

I tend to connect the gpio direct to the servo control wire or motor driver board. It may be safer to have an in series resistor.

Timmahw
Posts: 3
Joined: Mon Nov 17, 2014 7:04 pm

Re: Servo control board

Mon Nov 17, 2014 9:58 pm

Joan,

Thanks very much for the quick response. Going to hold off on the resistors. :)

Tim

User avatar
thagrol
Posts: 3178
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Servo control board

Mon Nov 17, 2014 10:12 pm

I've had no problems so far using the pi's gpio for the servo pwm pulses in a couple of projects.

Power can be an issue though. I've been able to run a couple of sub-micro servos directly from the pi's 5v pins but standard size ones need a seperate supply to the pi to avoid brownouts and reboots. Just remember to connect the grounds (-) of both supplies but keep the + sides seperate.
Arguing with strangers on the internet since 1993.

Return to “Automation, sensing and robotics”