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.

James Taylor
  • 289
  • 1
  • 3
  • 13

2 Answers2

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.

Piotr Kula
  • 17,336
  • 6
  • 66
  • 105
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

joan
  • 71,852
  • 5
  • 76
  • 108