I'm building a device, which can water my plant after certain input. The whole problem I've got is connecting a water pump to RSPI - I more or less understand that I need a relay, but is it possible to power up the whole kit from a batteries ? Or using just one wire?

I'm thinking about using aquarium pump, just like guy in this tutorial, but all aquarium pumps don't have specifications, so

I read this tutorial, and It was very helpful, but still don't know how to pick right relay & pump, and the whole problem of powering this setup without plug - is this even possible?

I'll be very helpful for some guidelines & tips.

Have a nice day

  • Please tell us more about the water pump. Is it a 127V/220V alternatig current one (that you plug into a power outlet), or a battery-operated?
    – Marco Poli
    Jul 8, 2014 at 14:48
  • I don't have any pump, just thinking about buying one, probably 220V for a fish aquarium, but maybe you've got better ideas. Jul 8, 2014 at 14:54

4 Answers 4


It's totally possible to do this.

You'll need something to convert whatever voltage the batteries are to something the Pi can use. Something like this: Link to a kick-starter - just a link I had handy

Then the pump can be run off the same batteries, if you match the pump/battery voltages, using a relay controlled by the Pi.

In terms of picking the relay, most will be massively overkill for the project - you'll be working with 6-10 volts, maybe an amp - anything will do. Just pick one with 5v logic on the control side.

The right pump? I've been itching to use something from these

  • the guy from tutorial above, uses pump with this specification tomaquarium.com/prod_details.php?cat=29&p=58 , but the relay has 5V/1A, so how this can work? can I buy 5V with higher amperage ? Jul 8, 2014 at 14:56
  • Relays will have figures for the maximum AC and DC voltages and current they can switch, voltage needed to hold the relays closed, and if a relay board, the logic voltage required to operate the contacts. Make sure any relays/relay boards you buy can be operated from the Pi's 3.3V logic.
    – joan
    Jul 8, 2014 at 16:24
  • I didn't add a link to tutorial I mentioned instructables.com/id/Self-Watering-Plant Jul 9, 2014 at 11:13
  • could you post me an example pump, because I think your message is incomplete Jul 9, 2014 at 13:05

Most aquarium pumps are AC. You'd need a DC pump if you're going to power it from batteries. It's probably easier to use an AC pump with something like this: http://www.raspberrypi.org/controlling-electrical-sockets-with-energenie-pi-mote/ With a device like this, you can use any mains powered pump, and you don't need to use a relay.


The PiFace interface has 2 built-in relays http://www.piface.org.uk/products/piface_digital/

The PiFace relay contacts are rated for 20V 5A, so if you found a 12V pump, you would be set, simply use one of the relays to switch one side of the pumps power supply.

If the pump is 110/220v then you could use one of the PiFace relays with a 12v power supply to power a larger relay. The coil voltage of that relay would be 12v, the contacts of that relay would need to be rated equla or greater than the pumps consumption for both volts and amps.

EDIT TO ADD: although the piFace website in the text states the relays are rated for 20V 5A the picture clearly shows relays that are rated for 277V 10amp. (the lower rating most likely comes because the relays are connected to their terminals via circuit board traces and those would probably burn before 10amps@277v).


Not sure if this existed back when the question was formulated, but I recently learned of Opensprinklerpi, which I guess provides hardware as well.

  • 1
    Welcome to Raspberry Pi! Please take the tour and visit the helpcenter to see how things work here. Stackexchange is not a discussion forum which means that answers should not pose follow-up questions. If you have a new question feel free to post it as such (but be aware that "what are your experiences" will be considered too subjective). If you want to extent the answer with respect to opensprinklerpi please do so but remove the additional questions.
    – Ghanima
    Jun 23, 2016 at 14:52
  • Done. Thx Ghanima.
    – murph_sof
    Jun 23, 2016 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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