Page 1 of 1

### How Many Sensors/Motors Can a Raspberry Pi 3 Handle at Once?

Posted: Mon Sep 16, 2019 10:58 pm
I'm building a robot with the Raspberry Pi 3 and I have 2 small 3-6v DC motors with wheels hooked up to an H Bridge Motor Drive Controller (powered separately with a 9 volt battery) and I also want to be able to have the robot see around itself as its driving with the motors, whether this is with 3 separate range sensors or one range sensor on a micro servo motor. I've done some research but I haven,t been able to come up with a definite answer, so are either of these options available? Which would be better / more efficient? I'm pretty new to circuits like these so thanks for all the help!

Here are the parts I'm using -

H Bridge - https://www.amazon.com/gp/product/B01M2 ... UTF8&psc=1

Range Sensor - https://www.amazon.com/IIVVERR-Ultrason ... =hi&sr=1-5

Servo motor - https://www.amazon.com/Muluo-10PCS-Heli ... =hi&sr=1-3

Motors (only using 2) - https://www.amazon.com/gp/product/B07DQ ... UTF8&psc=1

Thanks for all the help!

### Re: How Many Sensors/Motors Can a Raspberry Pi 3 Handle at Once?

Posted: Tue Sep 17, 2019 7:38 am
Hi.

You can work this out for yourself,

The pi has 26 possible gpio pins for use ,

you just need to add up how many gpio pins you need for each device

H-bridge = 6
range sensor = 2 for 3 sensors = 6
servo = 1

total 13

so you still have 13 gpio left

its as simple as that.

### Re: How Many Sensors/Motors Can a Raspberry Pi 3 Handle at Once?

Posted: Tue Sep 17, 2019 12:57 pm
pcmanbob wrote:
Tue Sep 17, 2019 7:38 am
Hi.

You can work this out for yourself,

The pi has 26 possible gpio pins for use ,

you just need to add up how many gpio pins you need for each device

H-bridge = 6
range sensor = 2 for 3 sensors = 6
servo = 1

total 13

so you still have 13 gpio left

its as simple as that.
Ok that makes sense, but is the Raspberry Pi actually able to power all that at once? If not how much can it power?

### Re: How Many Sensors/Motors Can a Raspberry Pi 3 Handle at Once?

Posted: Tue Sep 17, 2019 1:51 pm
You are only taking about sending high or low signals to the H-bridge so a mA or 2 at most per gpio pin,
same goes for the servo pwm signal for control ,

you should be able to power a small servo like the SG90, from the 5v gpio pin , probably 200mA max,

range sensor assuming HC-SR04 15mA per sensor.

So if you total all this up approx 250mA, you should have no problem powering it all from the pi gpio.

### Re: How Many Sensors/Motors Can a Raspberry Pi 3 Handle at Once?

Posted: Tue Sep 17, 2019 3:32 pm
pcmanbob wrote:
Tue Sep 17, 2019 1:51 pm
power a small servo like the SG90, from the 5v gpio pin , probably 200mA max,
(Corrected)

"GPIO 5v pin" means one of the two 5v pins on the GPIO connector.

The SG90 can draw 600-700 mA stall and instantaneous which can sag the 5v supply in some cases. It would be advisable to add a small 5v switching supply connected to your 9v motor battery for any servo power.

(If I center both of my SG90s from their limits simultaneously, my RPi sets the voltage throttled flag. )

### Re: How Many Sensors/Motors Can a Raspberry Pi 3 Handle at Once?

Posted: Tue Sep 17, 2019 3:35 pm
I have powered multiple small 9g servos from the Pi's 5V pins.

The logic supply required from the 3V3 GPIO to position a servo is insignificant.

### Re: How Many Sensors/Motors Can a Raspberry Pi 3 Handle at Once?

Posted: Tue Sep 17, 2019 3:44 pm
pcmanbob wrote:
Tue Sep 17, 2019 1:51 pm
You are only taking about sending high or low signals to the H-bridge so a mA or 2 at most per gpio pin,
same goes for the servo pwm signal for control ,

you should be able to power a small servo like the SG90, from the 5v gpio pin , probably 200mA max,

range sensor assuming HC-SR04 15mA per sensor.

So if you total all this up approx 250mA, you should have no problem powering it all from the pi gpio.
Ok thanks so much for all the help!