-->
Page 1 of 1

How do I connect an external water pump and external power?

PostPosted: Mon Aug 21, 2017 3:20 pm
by GurkanG
I'm currently running a moisture sensor and a DHT22 (humidity+temp) with my NodeMCU.

I want to add a water pump that runs on 4.5V-6V along with an external battery.

Since there is no 5V pin on the NodeMCU I'm wondering how I can power and control the water pump?

I've got a normal relay that I thought might be of help? Like the one in the image attached to this post.


So my concern right now is one, how do I power everything when connected to the PC and programming/testing.
And how do I power everything with an external power supply?

I've got a 5V 2.1A DC external power supply that has a micro USB connection that I thought I could connect directly to the NodeMCU, but I don't think this will work right? Since it only runs 3.3V.

Any and all help is greatly appreciated!

Re: How do I connect an external water pump and external pow

PostPosted: Tue Aug 22, 2017 4:00 pm
by QuickFix
A relay not only need a higher voltage, but it also draws more current than an ESP-pin can deliver, so you'll have to use a transitor to up the amps, so the say.
Something like this:
Image

Re: How do I connect an external water pump and external pow

PostPosted: Wed Aug 23, 2017 1:00 am
by schufti
the additional transistor is not necessary as it is allready on the module (that is the intention behind this modules), the rest is not realy an answer to the TOs questions ...

You can power the nodemcu via the micro-usb and should get the 5V for supplying the relay-module and pump from the nodemcus "raw" pin. But bear in mind that switching relay or a running e-motor can induce a lot of interference to the supply upsetting the nodemcu, so think of decouplig the 5V rail to the module and pump (small inductance and capacitor).

Re: How do I connect an external water pump and external pow

PostPosted: Wed Aug 23, 2017 2:11 am
by GurkanG
Thanks for the input guys.


This is where I am today with my setup but it's unfortunately not working.


I believe that the problem might be my mosfet which is an IRF520. I think I might not be able to power it with the vin. Is getting another transistor/mosfet the solution that may help me finish this part of the project?

And if so, what kind of transistor. a 30V 100mA one?