
nRF24L01 Library for Proteus V1.1 (2.4 GHz RF + Arduino)

Hello friends, I hope you all are doing great. Today, I am going to share the new nRF24L01 Library for Proteus V1.1. The nRF24L01 is Nordic Semiconductor's small 2.4 GHz radio, and the black board with the zig-zag antenna is one of the most popular ways to send data from one Arduino to another without a wire. With this nRF24L01 Library for Proteus, two modules in one design talk over a simulated 2.4 GHz air, and your Arduino drives them over SPI with the same RF24 library you use on real hardware.
Version 1.1 replaces the first version of this post. You now get two devices: nRF24L01 Simple, with its control panel on the schematic, and nRF24L01 Advance, with a pop-up window and four measured RF test tools. The v1.0 range switch is gone: you now choose the distance, and the model works out the signal level. The new nRF24L01 Arduino Proteus demo has two Arduino UNOs that PING each other and talk to our TEP Serial Monitor, shown in its compact Simple interface. Have you read version 1.0? Then jump to "What's New" below.
NOTICE: This library is very special to our team. Our nRF24L01 model has the chip's registers, FIFOs and timing, sends real Enhanced ShockBurst packets with ACKs and retries, and now works out the signal level at every distance. It took our team a lot of hard work, many test runs and many design changes. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the nRF24L01 Library board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the nRF24L01 Library for Proteus:
What is the nRF24L01 2.4 GHz RF Module?
The nRF24L01 is a radio transceiver (it sends and receives) made by Nordic Semiconductor for the licence-free 2.4 GHz band, the band of Wi-Fi and Bluetooth. Common modules carry the improved nRF24L01+, and that is the chip our library models. The Arduino talks to it over SPI, a 4-wire bus: clock, data in, data out and chip select.
People use it for remote controls, wireless sensors, robot links and home automation. For the hardware background, read our Introduction to NRF24L01 and NRF24L01 Arduino Interfacing tutorials.
The nRF24L01+ at a Glance
| Feature | Value |
|---|---|
| Frequency band | 2.4 GHz, 126 channels from 2400 to 2525 MHz (frequency = 2400 + channel) |
| Air data rates | 250 kbps, 1 Mbps and 2 Mbps |
| Payload | Up to 32 bytes per packet |
| Buffers | A 3-packet TX FIFO and a 3-packet RX FIFO |
| Receive addresses | 6 data pipes at the same time |
| TX power (RF24 names) | RF24_PA_MIN -18 dBm, PA_LOW -12 dBm, PA_HIGH -6 dBm, PA_MAX 0 dBm |
| Sensitivity | -94 dBm at 250 kbps, -85 dBm at 1 Mbps, -82 dBm at 2 Mbps |
| Supply | 1.9 - 3.6 V; the signal pins are 5 V tolerant |
| Interface | SPI plus the CE and IRQ pins |
nRF24L01, PA+LNA, HC-12 or LoRa: Which Library Do You Need?
| Your module | What it does | Our library |
|---|---|---|
| nRF24L01+ (black board, PCB antenna) | 2.4 GHz, short range, SPI | This article |
| nRF24L01+PA+LNA (SMA antenna) | 2.4 GHz with a power amplifier and an LNA, longer range, SPI | nRF24L01+PA+LNA Library for Proteus |
| HC-12 | 433 MHz, serial (UART) | HC-12 Library for Proteus |
| SX1278 / Ra-02 | 433 MHz LoRa, long range, SPI | SX1278 LoRa Library for Proteus |
| CC1101 | 315 / 433 / 868 / 915 MHz, SPI | CC1101 Library for Proteus |
Plain and PA+LNA modules share one model and talk to each other in one design.
Radio Terms You Will See in This Article
| Term | Meaning |
|---|---|
| Channel | The frequency of the link, 2400 + channel MHz; both radios must use the same one |
| Data rate | Bits per second on the air; both radios must use the same one |
| dBm | Power in decibels relative to 1 mW: 0 dBm = 1 mW, and every 10 dB is a factor of 10 |
| PA level | The transmit power the sketch chooses with setPALevel() |
| Sensitivity | The weakest signal the receiver can still decode at its data rate |
| Margin | The signal at the receiver minus the sensitivity; above 0 dB the link works |
| Enhanced ShockBurst | Nordic's packet protocol inside the chip: address, payload, CRC, ACK and retries |
| ACK, MAX_RT | The receiver's short "got it" answer; the flag set when all retries failed |
| ARD, ARC | Auto Retransmit Delay and Count: how long the chip waits for an ACK, and how often it retries |
| Pipe | One receive address; a receiver listens on up to six |
| RPD | Received Power Detector: a bit that says "something above -64 dBm is on this channel" |
| CE, CSN | Chip Enable (starts sending or listening) and the SPI chip select (active LOW) |
How Two nRF24L01 Radios Talk: Enhanced ShockBurst
The chip does the radio work by itself; your sketch only hands it a payload and reads the result. One packet, step by step:
- The sketch writes up to 32 bytes into the TX FIFO and pulses CE (RF24's
write()does both). - The chip settles for 130 us, then sends the preamble, the address, a 9-bit control field, the payload and the CRC, a check value that reveals damaged packets.
- A receiver on the same channel, data rate and address checks the CRC, stores the payload and sends an ACK back.
- No ACK? The chip waits ARD (RF24 default 1500 us) and sends again, up to ARC times (default 15).
- After the last retry, it sets MAX_RT and
write()returns false, about 29 ms after the start.
Addresses and Pipes
Every packet carries an address, 5 bytes in RF24's default set-up, and a receiver accepts it only if one of its open pipes has that address. In our demo, node 1 sends to "00001", and node 2 listens there on pipe 0.
The surprise for beginners: a transmitter receives, too. The ACK comes back to its own TX address, so RF24's openWritingPipe() writes that address into TX_ADDR and into pipe 0. That is why the v1.1 transmitter uses pipe 1 for the messages of node 2.
PA Level, Sensitivity and Why 250 kbps Reaches Further
How far does a link reach? The level at the receiver is the transmit power minus the path loss, the signal lost on the way. While it stays above the receiver's sensitivity, the link works. Our model uses free-space loss up to 1 m and a path-loss exponent of 2.8 beyond it: 68 dB at 10 m, 96 dB at 100 m. With the demo's PA_LOW (-12 dBm):
- 10 m: -12 - 68 = -80 dBm. 1 Mbps needs -85 dBm, so the link is OK with a margin of +4.7 dB (the exact level is -80.3 dBm).
- 100 m: -12 - 96 = -108 dBm, 23 dB too weak. Every packet fails.
Why does 250 kbps reach further? Each bit lasts 4 us instead of 1 us, so the receiver collects more energy per bit and decodes a weaker signal: -94 dBm instead of -85 dBm. More power helps the same way: PA_MAX (0 dBm) is 12 dB above PA_LOW. With both, the demo link reaches about 80 m instead of about 15 m. The price: every packet stays on the air four times longer.
What's New in nRF24L01 Library for Proteus V1.1
If you used version 1.0, here is what has changed:
- Two devices in
TEPNRF24L01.LIB: nRF24L01 Simple (NRF24L01TEP, the v1.0 device, so old designs keep working) and nRF24L01 Advance (NRF24L01ADVTEP) with a pop-up window. - A redrawn board: instead of v1.0's wide green board, a tall black one like the real module: the zig-zag PCB antenna on the top end, the 2 x 4 header at the bottom. The 8 Proteus pins stay where they were.
- A live antenna and three LEDs: the antenna glows orange while sending and green while receiving. PWR, TX and RX are a TEP addition: the real module has no LEDs.
- DISTANCE instead of the range switch: buttons from 1 m to 2 km and a link budget, so setPALevel() and setDataRate() now change the range (v1.0: IN RANGE / OUT OF RANGE; the PA level did nothing).
- Model changes: the ACK must make it back, too; a repeat after a lost ACK is stored only once, like on the real chip; and every packet reaches the RPD of every radio listening on that channel, so the RF24 scanner example works.
- Close and reopen: a red X on the Simple panel, PANEL / OPEN PANEL on the board.
- Four measured test tools (Advance): Link test, Throughput, Channel scan and Registers.
- A two-UNO demo with the TEP Serial Monitor instead of Virtual Terminals. The sketches keep every v1.0 line and add commands (HELP, STATUS, SEND, PING, CH, RATE, PA, AUTO) and a link line every 10 s.
- Lighter package: about 1.7 MB, without the C++ source code (v1.0: about 7.6 MB).
A v1.0 design keeps its old symbol: new model and DISTANCE buttons, but no LEDs and no red X. Here its panel still shows the chip's reset values:
nRF24L01 Library for Proteus: Simple vs Advance
Both devices run the same model; only the panel differs:
| Feature | Simple | Advance |
|---|---|---|
| Full nRF24L01+ model (SPI, registers, FIFOs, auto-ACK, six pipes, IRQ pin, timing) | ✔ | ✔ |
| Tall black board, glowing PCB antenna, waves and PWR / TX / RX LEDs | ✔ | ✔ |
| Control panel on the schematic (state, settings, counters, DISTANCE) | ✔ | ✘ |
| Pop-up window you can move, resize and minimise | ✘ | ✔ |
| Radio page: what the sketch set, addresses, traffic, DISTANCE | ✘ | ✔ |
| Link test, Throughput, Channel scan and Registers | ✘ | ✔ |
| TEP Dark / Light theme, text size, Help page with Copy diagnostics | ✘ | ✔ |
| Same device name as v1.0 (old designs keep working) | ✔ | ✘ |
Choose Simple to keep the radio's state beside your circuit, and Advance for hard numbers about your link. The demo has one of each.
Download nRF24L01 Library for Proteus
Click the button below to download NRF24L01-RF-Library-for-Proteus-v1.1.zip (about 1.7 MB, without the C++ source code):
nRF24L01 Library for Proteus V1.1- README.txt: a detailed guide to the files, the wiring, the model and the test tools.
- Proteus Library Files:
TEPNRF24L01.LIB(both devices),TEPSERIALMON.LIBand our Arduino UNO libraryArduinoV3TEP.LIB/ArduinoV3TEP.IDX. - Proteus Model Files:
TEPNRF24L01.DLLandTEPSERIALMON.DLL. - Proteus Simulation:
NRF24L01-ArduinoUnoV3.pdsprj,NRF24_Transmitter.hex,NRF24_Receiver.hexand copies of both DLLs. - Arduino Code:
NRF24_Transmitter.ino,NRF24_Receiver.inoand the RF24 Arduino library 1.6.2 (TMRh20, 2bndy5 and the nRF24 organisation), unmodified, with its GPL-2.0 licence file.
TEPNRF24L01.DLL is also the model of our nRF24L01+PA+LNA Library for Proteus: both packages ship the identical file, so installing both is safe. No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.
How to Install nRF24L01 Library for Proteus
- Close Proteus and extract the whole zip file.
- Copy the four files from Proteus Library Files into the LIBRARY folder, usually
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY(on some PCsC:\ProgramData\Labcenter Electronics\Proteus 8 Professional\LIBRARY). - Copy
TEPNRF24L01.DLLandTEPSERIALMON.DLLinto the MODELS folder. - Start Proteus, press P and search for nRF24L01. You get the Simple and the Advance device (category Peripherals > Wireless).
Updating from v1.0? Replace TEPNRF24L01.LIB and TEPNRF24L01.DLL, and delete TEPNRF24L01.IDX if there is one in LIBRARY. A v1.0 design runs with the new model and its v1.0 panel, now with DISTANCE buttons; re-pick the part to get the v1.1 board. Tested in Proteus 8.5; Proteus 7 is not supported.
The nRF24L01 Board in Proteus
We designed the module as a clean TEP board shaped like the real one: black, tall and narrow. The gold zig-zag PCB antenna runs across the top end, fed from the nRF24L01+ chip beside the 16.000 MHz crystal. Below sit the board button, the LEDs, a SIMPLE or ADVANCE badge and the 2 x 4 header. Here is the Advance board while it receives:
Pinout
The eight Proteus pins keep the v1.0 order. The real module's 2 x 4 header pairs them as GND VCC / CE CSN / SCK MOSI / MISO IRQ, and our board draws it, too. Always wire by the names:
| Pin | Function | Demo connection |
|---|---|---|
| VCC | Power (3.3 V on a real module) | Supply terminal |
| GND | Ground | GND |
| SCK | SPI clock from the Arduino | Arduino D13 |
| MISO | SPI data from the radio | Arduino D12 |
| MOSI | SPI data to the radio | Arduino D11 |
| CSN | SPI chip select, active LOW | Arduino D10 |
| CE | Chip Enable: HIGH = listen, a pulse = send | Arduino D9 |
| IRQ | Interrupt output, active LOW | Not connected |
Antenna, LEDs and Waves
| Indicator | What it shows |
|---|---|
| PWR LED (red) | Lit while VCC and GND are connected |
| TX LED (orange) | Blinks for every packet sent |
| RX LED (green) | Blinks for every packet or ACK received |
| PCB antenna | Gold at rest, orange while sending, green while receiving |
| Waves above the antenna | Ripple out while sending, in while receiving |
Each blink is held 0.3 - 0.4 s, so you see it. On the transmitter, TX and RX blink together: TX for the packet, RX for its ACK. The board button is PANEL on the Simple (green dot = SHOWN, grey dot = CLOSED) and OPEN PANEL on the Advance.
There are no properties to edit: your sketch sets the channel, data rate, power and addresses over SPI, as on the real chip, and you choose the DISTANCE on the panel (10 m at every Run).
nRF24L01 Simple: The Control Panel on the Sheet
Beside the Simple board, the nRF24L01+ CONTROLS panel shows what the radio is doing, without one debug line in your sketch. Here is U1, the transmitter, right after a packet:
| Part | What it shows |
|---|---|
| Header, red X | nRF24L01+ CONTROLS; the X closes the panel |
| State bar | For example NO POWER, POWER DOWN, STANDBY-I, RX - LISTENING or TX - SENDING |
| Settings line | CH 76 = 2476 MHz, 1 MBPS, CRC 16, -12 dBm: what the sketch wrote |
| TX, RX | TX: 00001 (where it sends), RX: 00002 (where it listens) |
| Counters | SENT, FAILED, RECEIVED, TOO WEAK, OVERLOAD |
| LAST PACKET | The last payload this radio received |
| DISTANCE TO THE OTHER RADIOS | 1 m, 10 m, 50 m, 100 m, 250 m, 500 m, 1 km, 2 km |
| Verdict | AT 10 m: -80 dBm, 1 MBPS NEEDS -85 dBm -> OK |
Why the Transmitter Says RX - LISTENING
In v1.0, the transmitter's panel showed STANDBY-I between packets. Now it says RX - LISTENING, and that is correct: the v1.1 transmitter listens on 00002 between its packets, so node 2 can PING it or SEND it a message. Each send is a short burst (stop listening, packet, ACK, listen again) of less than a millisecond, so the panel rarely catches TX - SENDING, but the TX LED and the orange antenna show every one.
DISTANCE: 10 m Works, 100 m Is TOO WEAK
At Run, the radios stand 10 m apart: -80 dBm, OK. Click 100 m on U1's panel. The verdict turns to -108 dBm, TOO WEAK, and U3 prints "-> FAILED, no ACK" for every packet, after 16 attempts (once plus 15 retries). Click 10 m, and the next packet gets its ACK at once. I did this in Proteus; the failed and too-weak counts in later screenshots come from it.
The link uses the larger of the two radios' DISTANCE settings, and the ACK must make the trip back, too. And the hint "250 KBPS REACHES FURTHER"? Type RATE 250K on both monitors and PA MAX: the link reaches about 80 m.
Closing the Panel
Need room on the sheet? Click the red X. The board button says PANEL: CLOSED with a grey dot, while the radio and the sketch keep running. Click PANEL to bring it back.
nRF24L01 Advance: The Pop-Up Window
The Advance device keeps only the board on the schematic. At Run, a TEP pop-up opens with the look of our Serial Monitor and no Windows title bar: move it by its header, resize or minimise it, and reopen it with OPEN PANEL. The header shows the state (U2 · RX) and the Radio and Test tabs.
The Radio Page
- RADIO: what the sketch set, read from the chip's registers: 76 = 2476 MHz, PA_LOW, CRC 16, 1 Mbps, sensitivity -85 dBm, auto-ACK with 15 x 1500 us retries.
- ADDRESSES AND PAYLOAD: TX address 00002 (node 2 sent its PONG there), RX pipe 0 00001, 32 bytes.
- TRAFFIC: 87 received, 0 duplicates, 0 lost, the last level -80 dBm (RPD 0) and the last packet "Hello TEP #94".
- DISTANCE: the verdict "OK (+4.7 dB)" and "These settings reach about 15 m".
Look at Weak / overload: 128 / 0 in orange. That is my 100 m test: 8 packets failed, and U2 heard each of them 16 times, too weak to decode: 8 x 16 = 128. RPD 0 is right, too: -80 dBm is below the -64 dBm threshold.
The Test Page: Four Measured nRF24 Test Tools
Every number on the Test tab is measured on the running model, and each tool says what it is good for.
1. Link Test: How Far Does Your Link Reach?
Choose 10, 20 or 50 packets and click Run test. The tool records your sketch's next real packets through this radio: retries (ARC), ACKed or lost, and the level. The DISTANCE buttons sit on the tool, so you can move the radios while it runs. Halfway through 10 packets at 10 m:
U2, the receiver, heard 5 packets, all ACKed at once at -80.3 dBm, 4.7 dB above the -85 dBm line. Below, the link budget at 1 Mbps and PA_LOW compares a pair of plain modules with a pair of PA+LNA modules:
| Distance | nRF24L01 (PCB antenna) | nRF24L01+PA+LNA |
|---|---|---|
| 1 m | -52 dBm, OK +33 dB | -28 dBm, OK +65 dB |
| 10 m | -80 dBm, OK +5 dB | -56 dBm, OK +37 dB |
| 50 m | -100 dBm, TOO WEAK | -76 dBm, OK +17 dB |
| 100 m | -108 dBm, TOO WEAK | -84 dBm, OK +9 dB |
| 250 m | -119 dBm, TOO WEAK | -95 dBm, TOO WEAK |
| 500 m | -128 dBm, TOO WEAK | -104 dBm, TOO WEAK |
| 1 km | -136 dBm, TOO WEAK | -112 dBm, TOO WEAK |
| 2 km | -145 dBm, TOO WEAK | -121 dBm, TOO WEAK |
The PA+LNA module adds a +20 dB amplifier, a low-noise amplifier and a 2 dBi antenna, so it still works at 100 m. Click a longer distance during a test, and the bars turn red:
Good for: seeing how far your link reaches and how many retries it needs at each distance.
2. Throughput: How Many Packets per Second?
This tool does not use your sketch. Two model radios in a private test air (your design never hears them) stream 100 packets like RF24's writeFast(), at this radio's distance and PA level:
100 packets took 66.2 ms: 1511 packets/s, 48.3 kB/s of payload. The bar splits the 662 us per packet: 130 us TX settling, 329 us on the air (329 bits at 1 Mbps) and 203 us for the receiver to settle (130 us) and send its 73-bit ACK. Without auto-ACK, only 130 + 329 = 459 us remain: 2179 packets/s.
| Data rate | Auto-ACK on | Auto-ACK off |
|---|---|---|
| 250 kbps | 535 /s, 17.1 kB/s | 692 /s, 22.1 kB/s |
| 1 Mbps | 1511 /s, 48.3 kB/s | 2179 /s, 69.7 kB/s |
| 2 Mbps | 2132 /s, 68.2 kB/s | 3350 /s, 107.2 kB/s |
Even without ACKs, 1 Mbps carries only 56 % of its raw 125 kB/s. The demo's one 32-byte packet a second is 0.07 % of what these settings can carry. A real UNO adds its SPI time. Good for: choosing the data rate, payload and auto-ACK for your project.
3. Channel Scan: Which Channels Are Busy?
Choose 1, 5 or 10 s. The tool listens on all 126 channels for every packet and ACK of the TEP radios in the design, with the strongest level and the RPD count per channel. Five seconds:
One bar: 5 packets from U1 on channel 76 at -80 dBm, so RPD 0 of 5 (U2's own ACKs are not counted). The blue bands are Wi-Fi channels 1, 6 and 11, drawn for reference only; there is no Wi-Fi in the simulation, and channels 74 - 125 lie above them. Good for: finding a free channel and seeing which radios share one.
4. Registers: What Did Your Sketch Write?
The last tool reads the registers live, as R_REGISTER would, and lists the Arduino's last SPI commands:
- CONFIG 7F: powered up, receiver (PRX), CRC 16, interrupts masked (the demo doesn't use IRQ).
- SETUP_RETR 5F, RF_CH 4C, RF_SETUP 03: 1500 us x 15 retries, 76 = 2476 MHz, 1 Mbps with PA_LOW.
- TX_ADDR E7 E7 E7 E7 E7: the reset value, because node 2 had not sent anything yet.
The SPI log is a lesson in itself. Between two packets, RF24's available() read FIFO_STATUS 21937 times (11 = RX empty), folded into one line. Then came 10 (a packet waits), R_RX_PAYLOAD with 48 65 6C 6C 6F 20, "Hello " in ASCII, and W_REGISTER STATUS = 40 to clear the "data ready" flag. At the bottom, U1 is marked PARTNER (IT -> THIS); a mismatch would be red. Good for: checking what your sketch really wrote.
Settings and Help
The gear opens Settings: theme (TEP Dark or Light), text size, open the panel at Run and the window size, saved for your Windows user.
The ? icon opens Help & Support: eight cards and Copy diagnostics for a bug report. Cards without a published link say "Link coming soon"; a links.ini next to the DLL can change them.
nRF24L01 Wireless Link with Arduino in Proteus
Open NRF24L01-ArduinoUnoV3.pdsprj from the Proteus Simulation folder. It has two Arduino UNOs from our Arduino Library for Proteus V3.0 (the first image shows the whole circuit):
- NODE 1 - TRANSMITTER: UNO 1 (ARD1) with
NRF24_Transmitter.hex, the nRF24L01 Simple (U1) and Serial Monitor U3. - NODE 2 - RECEIVER: UNO 2 (ARD2) with
NRF24_Receiver.hex, the nRF24L01 Advance (U2) and Serial Monitor U4.
Wiring
| From | To | Why |
|---|---|---|
| nRF24L01 VCC / GND | Supply / ground | Power (a real module needs 3.3 V) |
| nRF24L01 SCK | Arduino D13 | SPI clock |
| nRF24L01 MISO | Arduino D12 | Data from the radio |
| nRF24L01 MOSI | Arduino D11 | Data to the radio |
| nRF24L01 CSN | Arduino D10 | Chip select |
| nRF24L01 CE | Arduino D9 | Chip Enable |
| nRF24L01 IRQ | Open | Not used by the sketches |
| Serial Monitor RXD / TXD / GND | Arduino D1 / D0 / ground | Shows what the Arduino prints, sends what you type |
D11, D12 and D13 are the UNO's hardware SPI pins, so the sketch doesn't name them; CE and CSN can be any pins (see our Introduction to Arduino UNO).
The Arduino Code
Both sketches use the unmodified RF24 Arduino library. The transmitter starts with the pins and its two addresses:
RF24 radio(9, 10); // CE, CSN
const byte address[6] = "00001"; // the receiver listens here
const byte myAddress[6] = "00002"; // v1.1: this node listens here between its packets
Each array is 6 bytes because a C string ends with a zero; the radio uses the first five. In setup(), radio.begin() leaves RF24's defaults (channel 76, 1 Mbps, CRC 16, 32-byte payloads), and the sketch adds:
radio.setPALevel(RF24_PA_LOW);
radio.openWritingPipe(address);
radio.openReadingPipe(1, myAddress); // v1.1: messages from the receiver
radio.startListening(); // listen between the packets
Every packet goes through transmit():
radio.stopListening(); // transmitter mode
bool ok = radio.write(message, sizeof message);
byte arc = radio.getARC(); // retries this packet needed
radio.startListening();
write() returns true when the ACK arrived, false after MAX_RT. While AUTO is ON, the loop sends the v1.0 message once a second, always 32 bytes (zeros after the text):
if (autoSend && millis() - lastSend >= 1000) {
lastSend = millis();
char message[32] = "";
snprintf(message, sizeof message, "Hello TEP #%lu", ++counter);
send(message);
}
The receiver opens pipe 0 and listens:
radio.setPALevel(RF24_PA_LOW);
radio.openReadingPipe(0, address);
radio.startListening(); // receiver mode
Both sketches answer a PING before they print, so the round trip measures the radios, not the 9600-baud Serial port:
bool ping = strcmp(message, "PING") == 0, pong = false;
if (ping) pong = transmit("PONG"); // answer first (the round trip), print afterwards
To answer, the receiver points its writing pipe at node 1, then listens again:
radio.stopListening();
radio.openWritingPipe(otherAddress);
bool ok = radio.write(message, sizeof message);
radio.startListening(); // RF24 puts 00001 back on pipe 0
If you change a sketch, load the new HEX file into its UNO; see How to get the HEX file from Arduino. New to Arduino? Start with our Arduino Tutorial for Beginners.
Serial Monitor Commands
| Command | What it does |
|---|---|
| HELP | The command list |
| STATUS | Channel, frequency, data rate, PA level, CRC, chip check, addresses and counters |
| SEND <text> | A message to the other node now (up to 31 characters) |
| PING | The other node answers PONG; prints the round trip time |
| CH <0-125> | Radio channel (type it on both monitors) |
| RATE <250K|1M|2M> | Data rate (both monitors) |
| PA <MIN|LOW|HIGH|MAX> | Transmit power |
| AUTO <ON|OFF> | The Hello TEP message every second (transmitter only) |
How to Run the Demo
- Open the project, with both .hex files and both DLLs beside it, and press Run. Both Serial Monitors and U2's pop-up open.
- U3 prints "Sent: Hello TEP #n -> ACK received" every second, U4 "Received #n: Hello TEP #n".
- Type PING and STATUS in U3's send box.
- Click 100 m on U1's panel: every packet fails. Click 10 m again.
- In U2's pop-up, run the four test tools.
nRF24L01 Proteus Simulation Results
The Serial Monitor in Its Simple Interface
Both monitors in this demo run in the Simple interface of our TEP Serial Monitor, and every monitor screenshot in this article shows them that way. Only the log, the send box and one slim toolbar row stay visible (baud rate, follow, pause, search and clear). The header, the quick buttons and the status bar are hidden, so the window stays small next to your schematic.
- Switch to it: right-click the log and choose Simple interface, or press Ctrl+Shift+U.
- Back to the full view: click the corner button (the expand arrows at the top right), press Esc or Ctrl+Shift+U, or right-click and choose Full interface.
- Your choice is remembered.
In the Simple interface, type PING, STATUS or SEND Hello in the send box and press Enter; the quick buttons come back with the full view. RXD2, the monitor's second input, is not used: it watches a serial line, and the nRF24L01 has none, because it talks SPI. Read all about the monitor in TEP Serial Monitor Advance for Proteus.
Start-Up: Hello TEP Arrives
After Run, U4 prints its banner, and the packets arrive one per second:
TEP nRF24L01 Receiver Demo v1.1
Listening: channel 76, 1 Mbps, address 00001
Type HELP in the Serial Monitor for the commands
Received #1: Hello TEP #1
Received #2: Hello TEP #2
Received #3: Hello TEP #3
"Received #n" is the receiver's own counter and "Hello TEP #n" the transmitter's, so they match until a packet is lost.
Typing Commands: PING and STATUS
Now U3, the transmitter. I typed PING, pressed Enter, then STATUS. Lines you send carry a blue TX tag, the Arduino's lines a green RX tag:
Link (10 s): 10 sent, 10 ACK, 0 failed, 0 retries
Sent: Hello TEP #91 -> ACK received
PING
PING: PONG from node 2 after 2.1 ms
Sent: Hello TEP #92 -> ACK received
STATUS
Status: channel 76 (2476 MHz), 1 Mbps, PA LOW, CRC 16, radio OK
sends to 00001, listens on 00002, auto-send ON (every 1 s)
sent 93, ACK 85, failed 8, retries 0, received 1
PONG came back after 2.1 ms: two packets with their ACKs, about 0.66 ms each, plus the SPI time of both UNOs. At 250 kbps it takes longer (3.7 ms in our PC test). On U4, the PING shows up as a received message, followed by "-> PONG sent back".
STATUS reads the settings back from the chip ("radio OK" comes from RF24's isChipConnected()). The counters tell my whole run: 93 sent, 85 ACKed, 8 failed in the 100 m test, and 1 received, the PONG.
Troubleshooting
- "nRF24L01 not responding - check the SPI wiring and power": check the five SPI wires, VCC / GND, and TEPNRF24L01.DLL in MODELS and beside the project.
- Always "FAILED, no ACK": the receiver must show RX - LISTENING on the same channel, data rate and address, and both DISTANCE settings count (PA_LOW at 1 Mbps reaches about 15 m). The Registers tool shows what does not match.
- No monitor window: TEPSERIALMON.DLL is missing, or click OPEN MONITOR on the monitor part.
- No Advance pop-up: click OPEN PANEL on the board, or turn "Open the panel at Run" back on.
- No red X / the old green board: replace the LIB, delete TEPNRF24L01.IDX and re-pick the part.
Things to Know Before Using a Real nRF24L01
The demo sketches use only the standard RF24 library, so they run on two real UNOs and modules, too. Keep in mind:
- 3.3 V only: the supply range is 1.9 - 3.6 V, so feed VCC from 3.3 V, never from 5 V. In the simulation, VCC goes to the +5 V terminal, because the model only checks that it is powered. The signal pins are 5 V tolerant, so the UNO's SPI pins can be wired directly.
- Add a capacitor: 10 uF (10 - 100 uF) across VCC and GND, right at the module. Without it, many modules fail with "no ACK" or reset while transmitting. The UNO's 3.3 V pin is weak; an adapter board with its own 3.3 V regulator helps.
- Antenna: keep the PCB antenna clear of metal and away from the UNO.
- Channels: 2.4 GHz Wi-Fi uses nRF channels 1 - 73; channels above 100 are often quieter.
Limitations of the Simulation
- Not modelled: collisions of transmitters that send at the same moment, random packet loss near the sensitivity limit (a link is OK or too weak, so retries only come from a receiver that is busy or not listening), fading, multipath and Wi-Fi interference, the constant-carrier test mode, the old nRF24L01 (non-plus) ACTIVATE command, SPI timing violations and the supply voltage.
- The model is our own implementation, written from Nordic's nRF24L01+ Product Specification; it contains no RF24 code (RF24 was only used to test it).
- Tested in Proteus 8.5 on 6 Oct 2026 (the demo and every Proteus screenshot here) and with 1,417 automatic checks on the PC, all passed, 69 of them with the unmodified RF24 library driving two chip models bit by bit over SPI. The images marked "PC render" were drawn by the model's own code. Proteus 7 is not supported.
Need more range? See our nRF24L01+PA+LNA Library for Proteus. For 433 MHz, try our HC-12 Library for Proteus, SX1278 LoRa Library for Proteus or CC1101 Library for Proteus, and to add a card reader to your wireless node, our MFRC522 RFID Library for Proteus.
So, that was all about the nRF24L01 Library for Proteus V1.1. I hope the DISTANCE buttons, the glowing antenna and the four test tools make 2.4 GHz radio much easier to understand, so your wireless project works the first time you wire two real modules. If you use the nRF24L01 Library for Proteus in a project, please share your feedback in the comments or in our forum, and if you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!
























Comments
0