1

This question already has an answer here:

I would like your opinion on the raspberry pi 3's GPIO, 5V pin. I am interfacing a motor controller board to the Raspberry Pi 3. The voltage requirement for the motor controller is 5V and the peak output current for the 2 channel is 2A respectively.

I am using the motor controller for a mobile robot. The motor controller is L298N and i will be connecting two gearmotors with encoders to it. The gear motors requires a power supply of 12V. The motor needs a current specification of 0.3A each. The raspberry pi is powered by a Lithium battery of 11V(regulated to 5v)

I am also connecting a Gyroscope and Accerometer to the 3.3V GPIO pins of the Raspberry Pi.

I have concerned that the pin that supply 5V (found in the 40-pin extended GPIO) may not be supplying what it promise. Would you recommend me to use the 5V pin found in the 40-pin extended GPIO to supply voltage to my motor controller or a independent voltage supply to power the motor controller? Is my worries unnecessary?

Edit: added more details

marked as duplicate by Milliways, Ghanima Aug 3 '17 at 18:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You may have added more detail to your vague question, but nothing that would indicate what you are expecting the 5V pin on the expansion header (which is NOT a GPIO) to supply. – Milliways Jul 30 '17 at 10:20
  • Hi Milliways i had rephrased the way i describe the 5v pin. I would only like to know is it all right to use the 5v from the expansion header directly to power my motor controller (will i always get 5v out of the pin or will the voltage flactuate?),or should i use a external power supply to provide 5v to my motor controller? – J.Bryan Jul 30 '17 at 11:02
  • The power capabilities of the Pi are described in Raspberry Pi Power Limitations – Milliways Jul 30 '17 at 11:07
  • This question cannot be seriously answered without knowing if the motor is just being turned on / off via controller or its speed is also controlled. – Jan Hus Jul 30 '17 at 13:48
2

I think that you should consider it a rather poor design decision to route the power to the motor drivers through the Pi. Go for a separate wiring of the motor controller.

Milliways' answer has sorted out the first important issue:

The Pi will only draw as much current as it requires and can not use more then 2.5A (Pi3) or 2A (Pi2/B+) as this is limited by a fuse, so there is no benefit in a higher rated supply. (Earlier models had a smaller polyfuse - probably 1.1A.)

So even if we assume that the Pi operates on roughly 0.5 to 0.8 A (see Current draw for +/2/0 models) that leaves just 1.7 A in the worst case. That's already short of the expected 2 A for the motor driver. It'll be worse if more basic peripherals such as WiFi/keyboard/mouse/HDMI are used or further USB gadgets are connected. Not to mention the potential trouble of conducted EMI. Ideally you would properly decouple the power supply of the power part (motor controller) and the logic part (Pi).

It is furthermore noteworthy that the Pi is not regulating the 5V rail on the GPIO header. All it does is feeding it through the protective circuit with the aforementioned polyfuse. So the quality of the voltage is depending on the power supply either way. There is nothing to be gained from routing it through the Pi instead of direct wiring.


For higher currents than the mentioned 2 A the approach is even more prohibitive:

  • 1
    People using the Pi as a micro controller probably don't have keyboard / mouse / HDMI connected. I'm afraid that part might cause people to miss the point. For anyone like that coming along (including maybe the OP?), I want to emphasize that this is the "right" answer even if you think you can just slip under the current rating. There is some convenience to running from the header since the 5 V pins are there and easy to access, which might be ok for light, initial prototyping. For anything beyond that with a motor, it's better to do as suggested here and wire separately. – Brick Jul 30 '17 at 16:17
  • @brick, good point! – Ghanima Jul 30 '17 at 16:33
1

To directly answer the question, the 5V pins on the Raspberry Pi are directly connected to the micro USB power input, passing through a polyfuse, then passing through polarity protection. So, the "consistency" of the power from the 5V pins are directly dependent on your power supply, plus whatever else in your circuit that adds electrical noise.

The maximum current you can pull from all of the 5V pins combined is (Polyfuse rating minus RPi power requirements) plus or minus a few percent.

In the case of the Raspberry Pi 3:

                                                                   +------------+
                                                      +----------> |Raspberry Pi|
                                                      |            +------------+
                                                      |
+--------------------+     +---------+     +----------+--------+
|MicroUSB Power Input+---> |2.5A Fuse+---> |Polarity Protection|
+--------------------+     +---------+     +----------+--------+
                                                      |
                                                      |            +------------+
                                                      +----------> |Peripherals |
                                                                   +------------+

You have to share with the Raspberry Pi. Total current should not exceed 2.5 Amperes.

Source: https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/Raspberry-Pi-3B-V1.2-Schematics.pdf

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