7

I've been researching how to use a servo on my Raspberry Pi but the tutorials concerning this seem very complicated. This surprised me, since the Raspberry Pi has GPIO built right in.

Despite the Pi appearing to be servo-ready, most of the sources I have looked at have a setup that looks something like this:

Raspberry Pi connected to a servo

They involve a breakout board and an extra power supply, which is not space efficient, nor does it seem like it should be the case, given hardware the Raspberry Pi has.

To my understanding this is caused by a voltage difference problem. The board itself takes in 5 volts and outputs around 3.5 volts to the GPIO pins. Most servo motors require 5 volts.

This raises some questions:

  1. Is this correct? Do I, in fact, need a breakout board to use a servo on my Pi? This example I found doesn't appear to require a breakout board, but it still contains an extra power supply.
  2. Why did the makers of the Raspberry Pi do this? It seems like poor decision making to me.
  3. I tried to look online for a servo motor that takes 3.5 volts, but I wasn't able to find anything. Has anyone been able to circumvent this problem?

I'm interested in a very basic servo implementation on the Pi that does not take up a lot of extra space nor demand extra hardware / power.

Thank you so much for any guidance you could provide on this matter.

  • Do you have an application? If so ask about that. Running a servo seems pointless without some kind of sensors/feedback. No need for a breadboard, just design your application and make a PC board. – Milliways Jan 2 '15 at 4:45
  • I do have an application, but my question is targeting a broader issue. Could I just plug in any servo right into the board and expect it to work? – James Taylor Jan 2 '15 at 5:31
  • Rather than asking three questions in one, it would be easier to answer if you ask one concise question per, ehm, question. – Bex Jan 2 '15 at 7:54
6

The Pi is the "command and control centre" and it happens to run at 3.3v logic. That is pretty standard for like MCU's like Arduino. You also get 5v versions. Neither is correct or incorrect. You build high power infrastructure around the MCU/controller.

You don't need the breakout board if you know how to wire up the servos. The fact is that you WILL need extra components to run the servos.

RC servo controllers units for remote control hobby vehicles are specifically designed to work in a plug and use situation. They also provide high current on all pins. So you can drive like 100watt electric engines / servos / RC / etc.

The Pi DOES NOT provide high current GPIO. Connecting things like that direct to them will burn out the channels. You need to treat the GPIO like delicate, highly tuned instruments that instruct bigger, bulkier things what to do , via logic/level shifters.

The Pi is all about prototyping and breakout boards will help every step of the way until you ready to create your own circuit or spider everything together.

  • 1
    Okay that makes sense. Thank you so much for clarifying this up, it helps a lot. – James Taylor Jan 3 '15 at 3:22
2

Your questions:

  1. Is this correct? Do I, in fact, need a breakout board to use a servo on my Pi? This example I found doesn't appear to require a breakout board, but it still contains an extra power supply.
  2. Why did the makers of the Raspberry Pi do this? It seems like poor decision making to me.
  3. I tried to look online for a servo motor that takes 3.5 volts, but I wasn't able to find anything. Has anyone been able to circumvent this problem?

    1. No you don't need a breadboard.
    2. I'm fairly sure they'd disagree.
    3. The motors of hobby motors are usually driven from 5 or 6 volts. The control wire (connected to a Pi gpio) will quite happily work at 3.3V

Servos use quite a lot of power when acting against a force. You may be able to power one of the sort of servo you picture through the microUSB. The Pi may crash if it draws too much power.

old video

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.