Excerpt:
How I built a low-cost, long-range pump control system using just two Heltec LoRa 32 modules — no internet or GSM required.
Overview
Remote pumps — whether for boreholes, tanks, or irrigation — are often far from Wi-Fi, GSM, or cable runs. Here’s how I used two Heltec LoRa 32 (V2) boards to control and monitor a pump over a distance of more than 2 kilometers with zero cellular or internet coverage.
Why LoRa?
- Ultra-low power
- 2+ km line-of-sight range
- No SIM cards, no subscriptions
- Built-in OLED for diagnostics
- ESP32 onboard = full custom control
Hardware Used
Component | Function |
---|---|
2x Heltec LoRa 32 V2 | Transmitter + Receiver |
Relay module (5V) | Controls pump contactor |
12V battery + buck reg | Power for the node |
Float switch / Button | Trigger input |
Enclosure + antenna | Weatherproof & range boost |
Basic Setup
- Node 1 (Tank site):
- Reads input from a float switch or level sensor
- Sends LoRa message like
{“start”:1}
to Node 2 - Node 2 (Pump site):
- Listens for LoRa packets
- Activates or deactivates a relay based on the command
- Optional OLED feedback (status, signal strength)
Code Highlights (Arduino)
Sender:
“`cpp
LoRa.beginPacket();
LoRa.print(\”START\”);
LoRa.endPacket();
Reciever:
if (LoRa.parsePacket()) {
String cmd = LoRa.readString();
if (cmd == \”START\”) digitalWrite(relayPin, HIGH);
}
Real-World Results
- Tested with stock antennas: ~2.3 km range (line of sight)
- No packet loss in basic tests with float switches
- Installed in 2 plastic junction boxes with desiccant
- Power draw low enough to run off solar trickle charge
Tips for Builders
- Keep antennas vertical and away from metal
- Add watchdog timers to auto-restart if hung
- Use
millis()
instead ofdelay()
for better timing - Always debounce input buttons/switches
Final Thoughts
This setup has saved me from multiple pump overruns and dry tank headaches. It’s cheap, robust, and doesn’t depend on GSM or Wi-Fi — perfect for remote farms and off-grid water systems.
📩 Want the code or wiring diagram? Contact me and I’ll share it.
Leave a Reply