1

schematic

simulate this circuit – Schematic created using CircuitLab

So I am working on a project that will require both a servo motor plus a small water pump. Both run on 3.7 -6v and I am going to use them with my Pi zero. I am a total electronic rookie and have been doing as much homework as possible to figure this out, but some guidance would be greatly appreciated.

I have seen videos of people running a small servo directly from the pi, but I have also read the servo can suck all the power and end up killing the pi. So that plus the need to run a pump made me think about using a relay board.

But here is my confusion.

The servo has 3 wires. live, ground and data. But the pump has only 2 wires live and ground plus I may also run a couple of leds

But if a relay board is connected to the pi by a few of the gpio will the signal for the servo motor be able to 'get through' properly without being disrupted by other connected devices, (the pump)

Also is it better to connect the pump, the leds and the servo, each to their own relay. Or better to just use the relay ports for the more electrically thirsty devices (servo) and just wire leds directly to gpio

Like I say, I am new to this and find it pretty confusing.

and as an extra kicker, I would love to run the whole thing from a single power unit, i know alot of things say power the servo independently, but the project only works if everything works together, so no point powering servo if pump is dead - maybe this is possible with a relay board connected???

I know this seems a bit waffly, but i hope it is clear what I mean! Thanks for your help!

  • Not sure I'm following you completely. Could you try to draw a schematic (here's how) to illustrate how you think this is going to be wired? You can use an empty block for those things you're unsure about. – Seamus May 1 at 3:28
1

You can power a small servo from the Pi provided there is spare power. You don't have to power it from the Pi. If you power it separately then you need to connect the servo's power supply ground and a Pi ground. Just connect the control line directly to a Pi GPIO.

In summary for the servo

+ pin connected to power supply +
- pin connected to power supply - and Pi's ground
control pin connected to Pi GPIO

For the pump you could use a relay module or a motor driver board module. Note I say relay module, not relay. You should not directly connect a Pi GPIO to a relay (or any inductive load like a pump or motor).

LEDs may be directly powered from the Pi GPIO, but remember they need a current limiting resistor in series to prevent the LEDs from burning out.

| improve this answer | |
  • Thanks for your help. So if I connected the servo to the pi and it turned out it was drawing too much power and turning off the pi, I would get a separate power supply for the servo, and presumably the pump could cause the same issue, but maybe i could use the same power supply for servo for pump too, and run the pi on its own power supply – Smellegg Apr 30 at 18:10
  • @Smellegg Yes, that is correct. – joan Apr 30 at 18:59

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.