Home / Tutorials / ESP8266 Tutorial / Controlling a Water Pump with WeMos D1 Mini
mini-submersible-water-pump-controlled-by-wemos-d1-mini

Controlling a Water Pump with WeMos D1 Mini

I recently bought a mini Arduino water pump that runs on 3 to 6 V. Since it consumes very little current (130 mA @ 3V according to its specs), it seems perfect to be used for small projects featuring the ESP8266. In this tutorial, I will share how I managed to create a WiFi-controlled mini water pump.

Mini Water Pump Specification

Here's some information about the pump:

  • Operating Current : 130 ~ 220mA
  • Flow Rate : 80 ~ 120 L/H
  • Maximum Lift : 40 ~ 110 mm
  • Continuous Working Life: 500 hours
  • Driving Mode: DC, Magnetic Driving
  • Material: Engineering Plastic
  • Outlet Outside Diameter: 7.5 mm
  • Outlet Inside Diameter : 5 mm

It is a submersible pump and should be used that way. It tends to heat too much that there's a risk of overheating if you turn it on unsubmerged.

Water Pump and WeMos D1 Mini Connection

The first thing I noticed is that it requires a wider tube pipe compared to the ones used by aquarium air pumps so I had to purchase one separately. The operating current also makes it impossible to connect the wires directly to one of the GPIO pins of the ESP8266 (which maxes out at 12 mA). So naturally, I had to design a way to turn on/off the pump with enough power for it.

arduino water pump

Here I have a 2N7000 MOSFET switch triggered by a signal coming from the WeMos D1. With this, the power through the pump is from the external power supply and not from the WeMos D1.

Next, I created a WiFi server application so that I may able to control the pump through my smartphone. Basically, the WeMos D1 Mini broadcasts an access point and then I connect to that access point. I then visit an IP address using a web browser and there an interface is shown for controlling the water pump.

As of now, the only thing I can do is turn on or turn off the water pump. Inside this Arduino water pump is a motor so I may try to control it by using PWM. That would be an update in the days to come.

Full Sketch

Here's the full sketch for the WiFi server:

The interface is just simple HTML but I'm planning more things for it in the future.

water pump controller ui

If you're interested in this project, updates will be made on its repository.

Check Also

Soil moisture sensor to ESP8266

Send Sensor Data to ThingSpeak via ESP8266

In the previous tutorial, we set up a soil moisture sensor and have its data …

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.