Remote Pump Control Using 2x Heltec LoRa 32 Modules (ESP32 LoRa Boards)

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

ComponentFunction
2x Heltec LoRa 32 V2Transmitter + Receiver
Relay module (5V)Controls pump contactor
12V battery + buck regPower for the node
Float switch / ButtonTrigger input
Enclosure + antennaWeatherproof & 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 of delay() 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.

Comments

Leave a Reply

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