Main Content

In this Instructable, we will learn how to make a wireless water level controller by using an ESP32 and ESP8266 microcontroller. This controller has voltage and current protection to protect the motor. And it uses ESP-NOW protocol to transmit data.

features
- Wireless
- High and Low voltage protection
- Overload and Dry run protection
- Inbuild buttons for settings
- Store settings in flash memory
- 1.8inch TFT display
- Shows voltage, current, power and power factor.
- Mode selection switch
- Top up button.

Why a water level controller?

For me the main purpose of this controller is to fill up the water tank when it is 50%. This is the version 2 of my water level controller, I have earlier made a controller which uses waterproof ultrasonic sensor to measure the water level. I used that controller for about a year. The main problem about that controller is building up water droplets on the surface of ultrasonic transducer which causes false reading. It usually happens in rainy seasons. And my water tank is sitting on a hard to reach area. So it’s really painful to climb up and clean the ultrasonic sensor on that rainy weather. What I need is reliable and long lasting solution. I like to try throw in type pressure sensor to measure water level but it’s kinda expensive and I can’t find a one to buy in my country. And as I mentioned earlier the main thing I need is to fill the tank when the water level reaches 50%. so I am sticking to the standard float switch. In the previous one I used CAT 6 cable to connect ultrasonic sensor to the controller, which is messy and its about 50 meters long. In this controller I used ESP-NOW to transmit data. I am using ESP 32U for the receiver and ESP07S for the transmitter. In the test I got almost 450 meters range (line of sight) by placing the transmitter on the top of the building, Which is really good considering the fact that we’re not using any external wireless modules. The other main feature of this controller is protection from high and low voltage, overload and dry run.

The overload and dry run protection work by measuring the current draw of the motor. When the motor is running dry the current draw of the motor will decrease Significantly. I am using Emonlib library to measure voltage and current.

Components for transmitter

- ESP 07S microcontroller
- Antenna for ESP
- LM2950G-3.3 LDO
- SMD tactile switches - 2
- 2200uf electrolytic capacitor
- 0805 10k resistor - 3
- 0805 100k
- 0805 330k
- 0805 22k
- PCB screw terminal
- RMC connector
- 18650 battery
- Tp4056 charging module
- Float switch
- Float switch - P43(For top up function)
- Waterproof enclosure
- Solar panel 5v
- PCB

Components for receiver

- ESP32U microcontroller
- Antenna for ESP
- AMS1117-3.3
- AO3400 MOSFET
- SMD tactile switches - 2
- 1.8 inch TFT display Driver IC: ST7735
- 3 position Rocker switch
- 2 position Rocker switch
- Push button switch with Led
- 5v 40a T relay
- 20a CT sensor (1:2500)
- ZMPT101B voltage transformer
- RMC connectors
- PCB terminal
- M7 (1N4007) diode
- 10uf electrolytic capacitor - 3
- 0805 100nf
- 1206 4.7uf - 2
- 82k 1W resistor - 2
- 0805 10k - 9
- 0805 1k
- 0805 470ohms
- 0805 220ohms
- Enclosure
- M3 bolts
- PCB

Components for Button breakout board

- Tactile switch - 3
- 0805 10k resistor
- 0805 4.7k
- 0805 20k
- PCB

Link to article