GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsA sensor on the pump foot reads vibration, and a probe on the motor reads temperature. The node reports both every 30 seconds and adds ALERT when the motor passes 70 °C, a sign of running dry or a failing bearing.
Tick anything you already have and the total updates.
Long-range 433 MHz radio that sends small messages a kilometre or more across open fields with very little power.
Six-axis motion sensor: a three-axis accelerometer that feels gravity and bumps, and a three-axis gyro that measures how fast it turns.
Waterproof stainless-steel probe that reads liquid or soil temperature from −55 to +125 °C (±0.5 °C).
Charges the cell, from a small solar panel if you like
Follow the colours: red is power, dark grey is ground, blue is a signal.
Cell to the TP4056 B+ and B−; TP4056 OUT+ to the ESP32-C3 5V pin and OUT− to GND. The board's own regulator makes 3.3 V from the cell, and the LoRa module takes its 3.3 V from the board. Put the node in a sealed box with the antenna outside and upright.
lora_borewell_pump_vibration_node.inoVerify & upload in Electrolark// LoRa pump and motor vibration node
// Geekobot project library · board: ESP32-C3 SuperMini
// Wiring diagram, parts list and build steps: Geekobot project page "lora-borewell-pump-vibration-node"
#include <SPI.h>
#include <LoRa.h>
#include <Wire.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
#include <OneWire.h>
#include <DallasTemperature.h>
// ---- pins ----
const uint8_t LORA_RST = 10;
const uint8_t LORA_DIO0 = 3;
const uint8_t ONEWIRE_PIN = 2;
Adafruit_MPU6050 mpu;
sensors_event_t accEvt, gyrEvt, tmpEvt;
OneWire oneWire(ONEWIRE_PIN);
DallasTemperature probes(&oneWire);
// ---- latest readings ----
float pitchDeg = 0;
float rollDeg = 0;
float shakeG = 0;
float probeC = 0;
const char NODE[] = "PUMP"; // the receiver shows this name
const unsigned long SEND_EVERY_MS = 30000UL;
unsigned long lastSend = 0;
bool wasAlarm = false;
void readImu() { mpu.getEvent(&accEvt, &gyrEvt, &tmpEvt); }
float pitchDegNow() { return atan2(accEvt.acceleration.x, sqrt(accEvt.acceleration.y * accEvt.acceleration.y + accEvt.acceleration.z * accEvt.acceleration.z)) * 57.3f; }
float rollDegNow() { return atan2(accEvt.acceleration.y, accEvt.acceleration.z) * 57.3f; }
float shakeGNow() { float a = sqrt(accEvt.acceleration.x * accEvt.acceleration.x + accEvt.acceleration.y * accEvt.acceleration.y + accEvt.acceleration.z * accEvt.acceleration.z) / 9.81f; return fabs(a - 1.0f); }
float gyroZNow() { return gyrEvt.gyro.z * 57.3f; } // turning speed in degrees per second
float readProbeC() {
probes.requestTemperatures();
return probes.getTempCByIndex(0);
}
void setup() {
Serial.begin(115200);
LoRa.setPins(SS, LORA_RST, LORA_DIO0);
if (!LoRa.begin(433E6)) Serial.println(F("LoRa module not found"));
LoRa.setSpreadingFactor(10); // slower but reaches further
if (!mpu.begin()) Serial.println(F("MPU6050 not found"));
mpu.setAccelerometerRange(MPU6050_RANGE_4_G);
mpu.setGyroRange(MPU6050_RANGE_500_DEG);
mpu.setFilterBandwidth(MPU6050_BAND_21_HZ);
probes.begin();
}
void loop() {
shakeG = shakeGNow();
probeC = readProbeC();
String msg = String(NODE) + ";" + String("shakeG=") + String(shakeG) + ";" + String("probeC=") + String(probeC);
bool alarm = probeC > 70;
if (alarm) msg += ";ALERT";
bool urgent = alarm && !wasAlarm;
wasAlarm = alarm;
if (urgent || millis() - lastSend >= SEND_EVERY_MS || lastSend == 0) {
LoRa.beginPacket(); LoRa.print(msg); LoRa.endPacket();
lastSend = millis();
Serial.print(F("Sent: ")); Serial.println(msg);
}
delay(200);
}
The sketch above runs here on a simulated ESP32-C3. Move the sliders for the sensors and buttons it reads, and watch the Serial monitor, display and outputs change.
Check the four SPI wires and that NSS and RST go to the pins in the sketch.
Mount both antennas high and vertical, clear of metal. Range drops sharply behind buildings.
Check SDA and SCL are not swapped. An I²C scanner should show 0x68 (0x69 if AD0 is tied high).
Keep I²C wires short, add a 100 nF capacitor across VCC and GND, and mount the board away from motor wires.
The 4.7 kΩ pull-up is missing or DATA is on the wrong pin. Check the yellow wire.
Open the Serial Monitor at 115200 baud and check for messages. Make sure you chose the right board and port in the Arduino IDE.
Close other programs using the serial port, try another USB cable (some are charge-only) and press reset just before uploading.
Use a 5 V USB phone charger or a power bank into the board's USB port.
10 parts: ESP32-C3 SuperMini Development Board, SX1278 LoRa Module RA-02 433MHz, GY-521 MPU6050 6-Axis Gyro and Accelerometer Module, DS18B20 Waterproof Temperature Probe – 1m Cable, Resistor Assortment Kit (30 Values), 18650 Battery Holder, 18650 Li-ion Rechargeable Cell 2600mAh, TP4056 1A Li-ion Charger Module with Protection, Solderless Breadboard (830 points) and Dupont Jumper Wires (40 pcs). Tools: Digital Multimeter and Wire Stripper and Cutter. On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 2 hours. The build on this page has 8 steps.
No. This page has the complete, tested code (lora_borewell_pump_vibration_node.ino). Install these libraries first: LoRa, Adafruit MPU6050, Adafruit Unified Sensor, OneWire and DallasTemperature.
Yes. The Run it panel under the code runs this exact sketch on a simulated board. Move the sliders or press the buttons for the sensors it reads, and the Serial monitor, display and outputs react as they will on the real build. It is a simulation, so real readings depend on your parts and wiring.
About ₹1,154 for the parts at the prices on this page, plus tools if you do not have them. Quantity price breaks lower the cost when you build several.
1-Wire bus and pull-up resistors; Accelerometers, gyros and tilt angles; LoRa radio and spreading factor.
Ideas that reuse this build: Receiver with an OLED and Receiver with an alarm. They are listed under Take it further on this page.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Learning project. Check every circuit and the datasheet of each part before you power it up.
Sent: PUMP;shakeG=1.00;probeC=26.00
A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.