GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsThe nRF24L01 is a cheap 2.4 GHz radio for short links between microcontrollers. One Nano reads a potentiometer and sends the value about ten times a second; the other receives it and sets an LED's brightness. The same pattern carries any small sensor reading.
The nRF24L01 is a 3.3 V part; 5 V on VCC destroys it.
Tick anything you already have and the total updates.
Long-range version: needs its own 3.3 V regulator
Follow the colours: red is power, dark grey is ground, blue is a signal.
nrf24_link.inoVerify & upload in Electrolark#include <SPI.h>
#include <RF24.h>
#define ROLE 1 // 1 = transmitter (knob), 0 = receiver (LED)
RF24 radio(9, 10); // CE, CSN
const byte ADDR[6] = "GEEK1";
void setup() {
Serial.begin(115200);
if (!radio.begin()) { Serial.println("Radio not found: check wiring"); while (1); }
radio.setPALevel(RF24_PA_LOW);
radio.setChannel(108); // above most Wi-Fi channels
if (ROLE) radio.openWritingPipe(ADDR);
else { radio.openReadingPipe(1, ADDR); radio.startListening(); pinMode(5, OUTPUT); }
}
void loop() {
if (ROLE) {
int v = analogRead(A0);
bool ok = radio.write(&v, sizeof(v));
Serial.println(ok ? v : -1);
delay(100);
} else if (radio.available()) {
int v;
radio.read(&v, sizeof(v));
analogWrite(5, v / 4);
Serial.println(v);
}
}
The sketch above runs here on a simulated Arduino Nano. Move the sliders for the sensors and buttons it reads, and watch the Serial monitor, display and outputs change.
Check CE/CSN and the SPI pins, and that the module gets 3.3 V, not 5 V.
Add the 10 µF capacitor, use RF24_PA_LOW to start, and keep the antenna clear of metal.
No acknowledgement: the receiver is off, on another channel or another address.
Tens of metres indoors with the basic module; the PA+LNA version goes much further outdoors.
Yes, the receiver can listen on up to six pipes.
Pick a channel above Wi-Fi, such as 100 to 125.
9 parts: 2 × Nano CH340 Development Board (Soldered), 2 × NRF24L01 2.4GHz Wireless Transceiver Module, 16mm Rotary Potentiometer (Linear), Through-Hole LED Pack (Pack of 10), Resistor Assortment Kit (30 Values), 2 × Electrolytic Capacitor, NRF24L01+PA+LNA 2.4GHz RF Transceiver Module w/ SMA Antenna, Solderless Breadboard and Dupont Jumper Wires (40 pcs). 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 4 steps.
No. This page has the complete, tested code (nrf24_link.ino).
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 ₹821 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
SPI radios and the RF24 library; Addresses, channels and acknowledgements; Why the radio needs a capacitor on its 3.3 V supply.
The nRF24L01 is a 3.3 V part; 5 V on VCC destroys it.
Ideas that reuse this build: 433 MHz remote control. 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.
513 512 513 513 512 512 512 512 512
A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.