Remote Sensing of the Water Tank Level and LoRa Transmission for Remote Pump Control
Intro: Remote Sensing of the Water Tank Level and LoRa Transmission for Remote Pump Control
I have to fill a tank 1.5 km away, so I create a 2-part controller.A server with a relay to manage the pump and a client solar/battery-powered to check the tank’s status and notify the server’s status.
I develop a PCB client and server and the relative software.
STEP 1: Problem
First the problem: I must refill a 1,5Km far water tank, so I need two devices:
- a server that manages a pump: if the remote tank isn’t full the server start the pump with a relay and when the tank is full, stop the pump.
- Start-stop pump;
- Manage the remote message;
- Prevent dangerous action if the remote device is no more active;
- Monitor to select an operation mode and status.
- A client that is in a remote position (tank position) checks the water level and warns the Server if It’s all ok or the tank is full.
- Check the max and min level;
- Warn Server about status;
- Battery and solar-powered;
- Sleep mode if no more need.
STEP 2: Microcontroller and LoRa Communication
As usual, I’m going to use a WeMos D1 mini because is small and powerful, and I’d like to use WiFi (in the next release) to manage the configuration, more information on this tutorial. “ESP8266 tutorial (WeMos D1)“.
You can find the WeMos D1 on AliExpress WeMos D1 mini - AliExpress NodeMCU V2 V2.1 V3 - AliExpress esp01
CommunicationFor communication, I’m going to use 2 Ebyte e32 devices; check the devices in this tutorial, “LoRa e32 devices“.
You can find the LoRa devices here (433MHz 3Km) - (433MHz 8Km) - (868MHz 3Km) - (868MHz 8Km) - (915MHz 3Km) - (915MHz 8Km)
STEP 3: Display
I love i2c devices, and in this project, I’m going to use an SDD1306, more information in this tutorial “OLED SDD1306“.
You can find here I2C SPI SSD1306 0.91 0.96 inch OLED
Remote water tank level pump controller display State detail ENG
Remote water tank level pump controller display Interface status debug ENG
Remote water tank level pump controller displays State ENG
Remote water tank level pump controller display Stop pump ENG
Remote water tank level pump controller display Start pump ENG
Remote water tank level pump controller display Start pump ping ENG
STEP 4: Start Prototyping
To start prototyping, I use a series of shields created for this use, the result seems quite unstable, but It works very well.
WeMos All Shield pcf8574 ssd1036 relay e32 Lora
All this shield is distributed for free, and you can buy the PCB from the PCB producer, the complete PCB of the Server, and the client. It’s also available.
For the Server I use:
LoRa wireless remote water tank and pump controller esp8266 Server PCB
For the client
LoRa wireless remote water tank and pump controller esp8266 Client PCB
STEP 5: Server PCB
LoRa wireless remote water tank and pump controller (esp8266) Server PCB explained.
Then, we must start to assemble the components, the LEDs, switch, display, WeMos D1, and EByte E32.
LoRa wireless remote water tank and pump controller esp8266 Server PCB
You can find the software here and the PCB and the instructions here.
STEP 6: Client PCB
For the client, I use the external module to manage the power supply, so there is no dependency for the people that don’t need to be autonomous with the battery.
Battery and Solar panel circuitYou can find all the components of solar battery recharge on “Emergency power bank homemade“.
LoRa wireless remote water tank and pump controller (esp8266) Client solar battery charge
AssemblyFor assembly, you can refer to the silkscreen of the PCB, and I do It quite verbose.
LoRa wireless remote water tank and pump controller (esp8266) Client PCB up
Then, we must start to assemble the component, the LEDs, switch, display, WeMos D1, and EByte E32.
LoRa wireless remote water tank and pump controller esp8266 Client PCB
You can find the software here and the PCB and the instructions here.
STEP 7: Case for Server and Client
STEP 8: Conclusion
And finally the assembled project.
15 Comments
mhmdhashmwady 11 months ago
xxreef 11 months ago
Bye Renzo
Tinker-Bel 1 year ago
Like your idea of using floaters for detective the levels. Do you have link to those floaters?
Kind regards
Christophe
xxreef 1 year ago
Bye Renzo
Tinker-Bel 1 year ago
I took a second look but I don't seem to find them....
kind regards,
Christophe
xxreef 1 year ago
Here you are https://s.click.aliexpress.com/e/_DDtdnmR .
Bye Renzo
Tinker-Bel 1 year ago
temyra 1 year ago
it's an interesting project. I would like to build it with a little modify, I will try to add a water sensor level something like a washing machine water sensor level .
I will try and thanks for share your projects.
xxreef 1 year ago
It's interesting, let we know yours progress.
Bye Renzo
datoo786 1 year ago
lee78 1 year ago
lebon1089 1 year ago
I like your project. I like it very much!
I have a question. Do you know the HC-12 433 Mhz module?
It communicates with any controller via SoftSerial.
I did about 2.5 kilometers with it. According to the description it can be 3 kilometers far.
It is much cheaper than the LoRa modules. About 6 to 8 euros per piece.
Greetings from Germany
Robert
xxreef 1 year ago
Hehehehe, I'm very stingy, so I grant you that EByte LoRa E32 is the cheapest solution.
https://s.click.aliexpress.com/e/_DETvTtH
about 7 euros for the module but if you buy the SMD version like HC-12, you can buy 5 of that for 5€ each one, if you need an upgrade there is 8Km version.
If you want more performance, you can get the E220 (the library https://github.com/xreef/EByte_LoRa_E220_Series_Library has the same interface, and is fully compatible with the E32 one https://github.com/xreef/LoRa_E32_Series_Library) that raise 5Km or 12Km.
Bye Renzo
Emmanuel2015 1 year ago
Thanks for sharing this interesting project, I have 2 questions.
I can't really see it on your PCB and I didn't check the design files (not familiar with these yet), so here is my first question: do you convert the TX from the E32 to 3.3V ? The Esp8266 is not 5V tolerant and I read about people confirming that it might be a problem.
My other question is about the E32 module, you're using the serial modules that use a proprietary protocol (that was retroengineered). Wouldn't that be better to use plain Lora modules to have a better control of the communications ?
Regards
P.S.: I'm considering Lora for a similar application for a house in a remote village of Italy (thick walls). Funny coincidence!
xxreef 1 year ago
the communication of E32 ( but also E22 or E220) work at 3.3v, but you must power the device with 5v to get the best performance.
In this version I power It with 3.3v but It isn't the best solution if you need to raise the maximum distance.
For me, these devices have a lot of advantages with respect to a plain device:
- first of all, the module has an embedded encryption protocol
- It has an embedded anti-interference system
- a watchdog
- FEC
- You can put the microcontroller in deep-sleep and the LoRa device in sleep mode, and you can Wake On Radio from a remote device
- UART is a standard protocol, and with a simple FTDI, you can connect It to the PC
- The library work with Arduino, ESP32, esp8266, stm32 and other micro.
I think for the price It's one of the best solution.
This device is the simplest, but you can examine E22 and E220. In this forum topic you can check the difference. https://www.mischianti.org/forums/topic/e32-x-e22-...
Bye Renzo