nRF24L01 PA LNA Library for Proteus V1.1: two Arduino UNOs with nRF24L01+PA+LNA boards, the Advance pop-up Radio page at -44 dBm and the TEP Serial Monitor in its Simple interface

nRF24L01 PA LNA Library for Proteus V1.1 + Arduino Demo

2.5K Views
40
700
60
25
60
PCBWay

Hello friends, I hope you all are doing great. Today, I am going to share the new nRF24L01+PA+LNA Library for Proteus V1.1. The nRF24L01+PA+LNA is the long-range version of the popular nRF24L01: the same Nordic 2.4 GHz chip, plus a power amplifier, a low-noise amplifier and a rubber-duck antenna on an SMA connector. With this nRF24L01 PA LNA Library for Proteus, two Arduino boards exchange packets with the unmodified RF24 library, and one click moves the radios from 1 m to 2 km apart, so you can see where the link works, where it breaks and why.

Version 1.1 replaces the first version of this post. You now get two devices: nRF24L01+PA+LNA Simple, with its control panel on the schematic, and nRF24L01+PA+LNA Advance, with a pop-up window and four measured RF test tools. The board is redrawn as the long black module with a glowing rubber duck, and the new two-UNO demo talks 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 model is a complete nRF24L01+ that runs the unmodified RF24 library, plus the link budget of the PA, the LNA and the antenna. 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+PA+LNA 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+PA+LNA Library for Proteus:

nRF24L01 PA LNA Library for Proteus V1.1: two Arduino UNOs with nRF24L01+PA+LNA boards, the Advance pop-up Radio page at -44 dBm and the TEP Serial Monitor in its Simple interface
Figure: The PA+LNA demo in Proteus 8.5: NODE 1 (Simple) sends, NODE 2 (Advance) receives at -44 dBm, Serial Monitor U4 in the Simple interface.

What is the nRF24L01+PA+LNA Module?

The nRF24L01+PA+LNA is a 2.4 GHz transceiver (one radio that both sends and receives) built for long links. Its heart is Nordic Semiconductor's nRF24L01+, the chip of the small module with the zig-zag PCB antenna, so it talks SPI (the 4-wire bus SCK, MOSI, MISO, CSN) and uses the same Arduino library, RF24. For the chip itself, read our Introduction to NRF24L01. The long-range module adds three parts:

  • PA (power amplifier): 20 dB more transmit power, +20 dBm instead of 0 dBm.
  • LNA (low-noise amplifier): 12 dB of gain for the weak received signal, before it reaches the chip.
  • SMA connector and rubber duck: a screw-on antenna (2 dBi in our model) instead of the copper trace.

Both amplifiers sit in one front-end chip, the RFX2401C type on common modules. It switches between sending and receiving on the board itself, so the module keeps the eight pins of the plain nRF24L01.

What the Power Amplifier and the Low-Noise Amplifier Add

First, dBm, the unit of most numbers here: a power compared to 1 mW. 0 dBm is 1 mW, +20 dBm is 100 mW, and every 10 dB is ten times the power; received signals are tiny, so they are negative. In our model:

Plain nRF24L01 vs nRF24L01+PA+LNA in our model
PropertyPlain nRF24L01nRF24L01+PA+LNA
Highest TX power (RF24_PA_MAX)0 dBm+20 dBm (0 dBm + 20 dB PA)
AntennaPCB trace, 0 dBiRubber duck on SMA, 2 dBi
Sensitivity at 250 kbps / 1 Mbps / 2 Mbps-94 / -85 / -82 dBm-102 / -93 / -90 dBm (8 dB better)
Strongest signal it can take0 dBm-20 dBm at the antenna (above = OVERLOAD)
Two equal modules, 250 kbps, PA_MAXOK up to the 50 m buttonOK up to 1 km (reach about 1.1 km)

Why only 8 dB better with a 12 dB LNA? Because it amplifies the noise too. Together, the PA, the two 2 dBi antennas and the LNA give a pair of PA+LNA modules 32 dB more than a pair of plain ones: more than ten times the distance. The price is in the fourth row: a PA+LNA receiver can be too close.

nRF24L01, PA+LNA, HC-12, LoRa or CC1101: Which Library Do You Need?

Our RF libraries for Proteus
Your radioWhat it isOur library
nRF24L01 (PCB antenna)2.4 GHz, SPI, short range; the same chipnRF24L01 Library for Proteus
nRF24L01+PA+LNA2.4 GHz, SPI, PA + LNA + SMA antenna, long rangeThis article
HC-12433 MHz wireless serial module (UART)HC-12 Library for Proteus
SX1278 (Ra-02)433 MHz LoRa, SPI, kilometres at low data ratesSX1278 LoRa Library for Proteus
CC1101315 / 433 / 868 / 915 MHz, SPI, packets and 433 MHz remotesCC1101 Library for Proteus

The plain nRF24L01 and the PA+LNA share one model, so they talk to each other in one design; the other radios never hear an nRF24.

Radio Terms You Will See in This Article

Radio terms
TermMeaning
dBm, dBA power compared to 1 mW; dB is the difference between two levels (a gain, a loss or a margin)
dBiAntenna gain compared to an ideal antenna that radiates equally in every direction
SensitivityThe weakest signal the receiver still decodes; it depends on the data rate
Path lossHow much weaker the signal gets on its way; it grows with the distance
Link budget, marginTX power + antenna gains - path loss = the level at the receiver; the margin is how far that is above the sensitivity
OverloadA signal so strong that the LNA saturates and the packet is lost
ACK, ARC, MAX_RTThe receiver's automatic "got it" answer; the retry count of the last packet; the flag set when 15 retries failed
RPDReceived Power Detector: one bit in the chip, 1 when the signal at the chip is above -64 dBm
Channel0 - 125; the frequency is 2400 MHz + the channel, so channel 108 is 2508 MHz

What's New in nRF24L01+PA+LNA Library for Proteus V1.1

If you used version 1.0, here is what has changed:

  • Two devices in TEPNRF24PALNA.LIB: Simple (NRF24PALNATEP, the v1.0 device, so old designs keep working) and Advance (NRF24PALNAADVTEP) with a pop-up window.
  • A redrawn board: long and black like the real module, the SMA connector and rubber duck centred on the top end (v1.0: on a corner of a wide board), the RFX2401C, the nRF24L01+ and the real 2 x 4 header at the bottom. The eight Proteus pins stay put, so v1.0 wiring fits.
  • A glowing duck and LEDs: a ring LED and a tip lamp, orange sending and green receiving, plus PWR, TX and RX LEDs (a TEP addition; the real module has none).
  • Close and reopen: a red X on the Simple panel and a PANEL button; OPEN PANEL on the Advance.
  • Four measured test tools: Link test, Throughput, Channel scan and Registers.
  • One model for both libraries: TEPNRF24L01.DLL is the same file in our nRF24L01 package, so plain and PA+LNA modules talk to each other. Every packet and ACK now reaches the RPD of each radio listening on its channel; the link budget is unchanged.
  • Range in numbers: about 1.1 km at 250 kbps, 540 m at 1 Mbps and 420 m at 2 Mbps (v1.0 listed the last DISTANCE button that still works: 500 m and 250 m).
  • A two-UNO demo with the TEP Serial Monitor instead of Virtual Terminals; the v1.1 sketches keep every v1.0 line and add SEND, PING, STATUS, CH, RATE, PA, AUTO and HELP, plus a link line every 10 s.
  • Lighter package: about 1.7 MB, without the C++ source code (v1.0: about 8.3 MB).
nRF24L01+PA+LNA v1.0 symbol in an old design: the wide black board with the rubber duck on its corner and the v1.0 control panel showing POWER DOWN
Figure: A v1.0 design after the update: the old wide board, no LEDs; re-pick the part for the new one (PC render).

nRF24L01+PA+LNA Simple vs Advance

Both devices run the same model and link budget; only the panel differs:

nRF24L01+PA+LNA Simple vs Advance
FeatureSimpleAdvance
Full nRF24L01+ model (SPI, registers, FIFOs, auto-ACK, RPD) with the PA / LNA link budget✔✔
Long black board, glowing rubber duck, PWR / TX / RX LEDs✔✔
DISTANCE buttons 1 m - 2 km and the link-budget verdict✔✔
Control panel drawn on the schematic✔✘
Radio page in a pop-up window you can move, resize and minimise✘✔
"These settings reach about ..." line✘✔
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 panel beside your circuit, Advance for a full sheet or hard numbers. The demo has one of each.

Download nRF24L01 PA LNA Library for Proteus

Click the button below to download NRF24L01-PA-LNA-RF-Library-for-Proteus-v1.1.zip (about 1.7 MB, without the C++ source code):

nRF24L01 PA LNA Library for Proteus V1.1
  • README.txt: a detailed guide to the files, the wiring, the link budget and the test tools.
  • Proteus Library Files: TEPNRF24PALNA.LIB (both devices), TEPSERIALMON.LIB and our Arduino UNO library ArduinoV3TEP.LIB / ArduinoV3TEP.IDX.
  • Proteus Model Files: TEPNRF24L01.DLL (the nRF24 model, shared with our nRF24L01 library) and TEPSERIALMON.DLL.
  • Proteus Simulation: NRF24PALNA-ArduinoUnoV3.pdsprj, PALNA_Transmitter.hex, PALNA_Receiver.hex and copies of both DLLs.
  • Arduino Code: PALNA_Transmitter.ino, PALNA_Receiver.ino and the RF24 library 1.6.2 (TMRh20, 2bndy5 and the nRF24 organisation), unmodified, under the GPL-2.0 with its LICENSE file.

If you don't have 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+PA+LNA Library for Proteus

  1. Close Proteus and extract the whole zip file.
  2. 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 PCs C:\ProgramData\Labcenter Electronics\Proteus 8 Professional\LIBRARY).
  3. Copy TEPNRF24L01.DLL and TEPSERIALMON.DLL into the MODELS folder. Already installed our nRF24L01 library? Its TEPNRF24L01.DLL is the same file, so overwriting it is safe.
  4. Start Proteus, press P and search for PA+LNA (or nRF24). You get the Simple and the Advance device (category Peripherals > Wireless).

Updating from v1.0? Replace TEPNRF24PALNA.LIB and TEPNRF24L01.DLL, and delete TEPNRF24PALNA.IDX if there is one in LIBRARY. A v1.0 design keeps its old symbol and panel and runs with the new model; re-pick the part to get the v1.1 board. Tested in Proteus 8.5; Proteus 7 is not supported.

The nRF24L01+PA+LNA Board in Proteus

We designed the module as a clean TEP board shaped like the real one: long and black, with the gold SMA connector and the rubber duck centred on the top end. A 50 ohm trace with a fence of vias runs down to the RFX2401C, next to the nRF24L01+ and its 16.000 MHz crystal, and the 2 x 4 header sits at the bottom. Here is U1, the Simple device, just after a packet:

nRF24L01+PA+LNA Simple board in Proteus while sending: orange rubber duck and waves, PWR, TX and RX LEDs lit and the control panel at 10 m, -44 dBm, OK
Figure: U1 (Simple) sending: the duck glows orange, PWR, TX and RX are lit, the panel beside it.

The duck's ring, its tip lamp and the waves are orange: U1 is sending. PWR is lit by VCC, TX by the packet and RX by the ACK that came straight back. Yet the banner says RX - LISTENING: the v1.1 transmitter listens for node 2 between its packets, and each packet is only a short burst. 14 sent, 0 failed.

Pinout

The eight Proteus pins keep their v1.0 order and places:

nRF24L01+PA+LNA pins in Proteus (VCC GND SCK MISO MOSI CSN CE IRQ)
PinFunctionDemo connection
VCCPower (3.3 V on a real module)Supply terminal
GNDGroundGND
SCKSPI clock from the ArduinoArduino D13
MISOSPI data from the moduleArduino D12
MOSISPI data to the moduleArduino D11
CSNSPI chip select, active LOWArduino D10
CEChip enable: starts a transmission or keeps the receiver listeningArduino D9
IRQInterrupt output, active LOWNot connected

The real module's header, drawn on our board, has two rows of four: GND VCC / CE CSN / SCK MOSI / MISO IRQ, with GND on the square pad. On real hardware, always wire by the names, never by the position.

The Glowing Rubber Duck and the LEDs

Board animations (the same on both devices)
IndicatorWhat 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
Ring LED and tip lamp on the duckOrange while the module transmits, green while it receives
Waves above the antennaRipple out while sending, in while receiving
PANEL / OPEN PANEL, SIMPLE / ADVANCEThe panel button and the device badge beside the LEDs

Each blink is held 0.3 - 0.4 s, so you can see it. The LEDs are a TEP addition (the real module has none), because otherwise a radio is invisible. Without VCC, they stay dark:

nRF24L01+PA+LNA Advance board without power: PWR, TX and RX LEDs dark and grey waves above the rubber duck
Figure: U2 without VCC: the PWR, TX and RX LEDs are dark (PC render).

There are no properties to edit: your sketch sets everything over SPI, and the DISTANCE buttons set the distance (10 m at every Run).

How Far Does It Reach? The PA+LNA Link Budget

A packet arrives when the receiver listens with the same channel, data rate, CRC and address, and the signal is strong enough but not too strong. That is the link budget, in four steps:

  1. TX power: the chip's setPALevel() level (MIN -18, LOW -12, HIGH -6, MAX 0 dBm) plus 20 dB of PA.
  2. Antennas: plus 2 dBi per rubber duck.
  3. Path loss: free space up to 1 m (40 dB at 2508 MHz), then an exponent of 2.8: 68 dB at 10 m, 96 dB at 100 m.
  4. Compare: above the sensitivity (-102 dBm at 250 kbps, -93 at 1 Mbps, -90 at 2 Mbps), below the LNA's -20 dBm overload limit.

The demo at 10 m: 0 dBm + 20 dB + 2 dBi + 2 dBi - 68 dB = -44 dBm, 58 dB above the -102 dBm needed. The exponent 2.8 (free space: 2.0) stands for an outdoor link with some obstacles. The Advance's Link test measures exactly this:

nRF24L01 PA LNA link test in Proteus at 10 m: 10 of 10 packets ACKed at once at -44.4 dBm with a +57.6 dB margin
Figure: Link test at 10 m in Proteus 8.5: 10 / 10 ACKed at once, 0 retries, -44.4 dBm, +57.6 dB.

Why 250 kbps and PA_MAX Reach the Furthest

A slower data rate gives the receiver more time for every bit, so it can pick a weaker signal out of the noise. PA_MAX simply starts 6 dB higher than PA_HIGH. Two PA+LNA modules at PA_MAX reach:

Sensitivity and reach per data rate
Data rateChip sensitivityWith the LNAReach (two PA+LNA, PA_MAX)
250 kbps-94 dBm-102 dBmabout 1.1 km
1 Mbps-85 dBm-93 dBmabout 540 m
2 Mbps-82 dBm-90 dBmabout 420 m

Why not always 250 kbps? It is the slowest: 535 packets per second against 2132 at 2 Mbps. Take 250 kbps for distance and 1 or 2 Mbps for speed, the same on both sides. Here is the Link test live in Proteus, 500 m apart:

nRF24L01 PA LNA link test in Proteus at 500 m: 6 of 6 packets ACKed at -92.0 dBm with a +10.0 dB margin, and the link budget table of plain nRF24L01 vs PA+LNA modules at 250 kbps
Figure: U2's Link test at 500 m in Proteus 8.5: 6 / 6 ACKed at -92.0 dBm (+10.0 dB); below it, the link budget of both modules.

Six packets so far, all ACKed with 0 retries at -92.0 dBm, 10.0 dB above the -102 dBm needed. The table compares two pairs at 250 kbps and PA_MAX: the plain nRF24L01 pair is OK only up to 50 m (+6 dB), the PA+LNA pair all the way to 1 km (+2 dB) and too weak at 2 km (-109 dBm). But look at the top row: at 1 m, the PA+LNA says OVERLOAD.

Too Close: Receiver Overload at 1 m

Two PA+LNA modules 1 m apart at PA_MAX put -16 dBm into each other's LNA, 4 dB above its -20 dBm limit. The amplifier saturates and the sender prints "FAILED, no ACK". Many beginners meet exactly this on their desk. The cure is less power:

Two PA+LNA modules 1 m apart
Level in the sketchChipModule outputAt the other module, 1 m away
RF24_PA_MIN-18 dBm+2 dBm-34 dBm, OK
RF24_PA_LOW-12 dBm+8 dBm-28 dBm, OK
RF24_PA_HIGH-6 dBm+14 dBm-22 dBm, OK
RF24_PA_MAX0 dBm+20 dBm-16 dBm, OVERLOAD

In the demo, set BOTH radios to 1 m and type PA LOW on both monitors (the ACKs travel back too): the link works again. PA_LOW for the desk, PA_MAX at the final distance.

The RPD: "signal > -64 dBm" or "weak signal"?

The nRF24L01+ cannot measure dBm. It has one bit, the RPD: 1 when the signal at the chip is above -64 dBm, read with radio.testRPD(). On the PA+LNA it sits behind the 12 dB LNA, so it trips at -76 dBm at the antenna: at 10 m (-44 dBm) and 100 m (-72 dBm) the receiver prints "(signal > -64 dBm)", from 250 m (-84 dBm) on "(weak signal)". Our panels show dBm as a help; a real module gives only that bit.

Mixing a PA+LNA Module and a Plain nRF24L01

The two modules talk to each other, but the link is lopsided. At 250 m and 250 kbps, the plain module receives the PA+LNA packet at -86 dBm (it needs -94), but its ACK, sent without a PA, arrives at -106 dBm: too weak. The sender retries 15 times and reports a failure, while the receiver stores the packet once and drops the copies. For two-way range, use PA+LNA at both ends.

nRF24L01+PA+LNA Simple: The Control Panel on the Sheet

The Simple device draws the nRF24L01+PA+LNA CONTROLS panel next to the board: the v1.0 panel, now with a red X. You saw it beside U1 above:

The nRF24L01+PA+LNA Simple panel
PartWhat it shows
Header and red XThe red X closes the panel
BannerThe mode, for example POWER DOWN, STANDBY-I, RX - LISTENING (green), TX - SENDING (orange) or NO POWER - CHECK VCC / GND (red)
Settings lineRead from the chip's registers: CH 108 = 2508 MHz, 250 KBPS, CRC 16, +20 dBm
TX / RXThe address this radio sends to, and the one it listens on
SENT, FAILED, RECEIVEDPackets ACKed, packets given up after 15 retries, packets received (repeats counted once)
TOO WEAK, OVERLOADPackets heard below the sensitivity, or above -20 dBm
LAST PACKETThe last packet received, with its level
DISTANCE TO THE OTHER RADIOSEight buttons: 1 m, 10 m, 50 m, 100 m, 250 m, 500 m, 1 km and 2 km
Verdict lineFor example AT 10 m: -44 dBm, 250 KBPS NEEDS -102 dBm -> OK (or TOO WEAK, OVERLOAD)

A link always uses the larger of the two radios' DISTANCE settings: one click on either panel moves them apart, but bringing them back needs a short distance on both. So if a verdict says OK while packets fail, check the other radio.

Closing the Panel

Need room? Click the red X: the button turns into PANEL: CLOSED, and the radio keeps working; here U1 is caught sending. Click the button to bring the panel back.

nRF24L01+PA+LNA Simple board in Proteus with the panel closed: PANEL: CLOSED, orange rubber duck and waves, PWR, TX and RX LEDs lit, SIMPLE badge
Figure: U1 with its panel closed, still sending: orange duck and waves, PWR, TX and RX lit.

nRF24L01+PA+LNA Advance: The Pop-Up Radio Page

The Advance device keeps only the board on the schematic, with an OPEN PANEL button. Here is U2 receiving: the duck and the waves are green, PWR and RX are lit, TX stays dark:

nRF24L01+PA+LNA Advance board in Proteus while receiving: green rubber duck tip, ring and waves, PWR and RX LEDs lit, OPEN PANEL button
Figure: U2 (Advance) receiving: the duck glows green, PWR and RX are lit.

At Run, a TEP pop-up opens with the look of our TEP Serial Monitor and no Windows title bar: move it by its header, resize or minimise it, reopen it with OPEN PANEL. The header holds the state (U2 · RX), the Radio and Test tabs and the theme, Settings and Help icons.

nRF24L01+PA+LNA Advance Radio page in Proteus: RX - LISTENING, channel 108 = 2508 MHz, +20 dBm (PA_MAX 0 dBm + 20 dB PA), -102 dBm at 250 kbps, 13 packets received at -44 dBm
Figure: The Radio page: 13 packets received at -44 dBm, OK (+57.6 dB), reach about 1.1 km.
  • RADIO: what the sketch set: TX power "+20 dBm (PA_MAX 0 dBm + 20 dB PA)", sensitivity "-102 dBm at 250 kbps", CRC 16 and auto-ACK with 15 retries, 1500 µs apart.
  • ADDRESSES AND PAYLOAD: pipe 0 listens on 00001 for 32-byte packets; E7 E7 E7 E7 E7 and C2 C2 C2 C2 C2 are the chip's reset values, because node 2 has not sent anything yet.
  • TRAFFIC: 13 received, no duplicates, nothing weak or overloaded, last level -44 dBm with RPD 1.
  • DISTANCE: the verdict "OK (+57.6 dB)" and my favourite line, "These settings reach about 1.1 km": change the data rate or PA level, and it shows the new reach.

The Test Page: Four Measured nRF24 Test Tools

Every number on the Test tab is measured on the running model with your own sketch.

1. Link Test: How Far, and How Many Retries?

The Link test records the next 10, 20 or 50 packets this radio sends or hears, your sketch's real traffic: the retries (ARC), ACKed or lost (MAX_RT), the level and what the receiver did (stored, too weak, overloaded or a duplicate). Its DISTANCE buttons move the radios while it runs. You saw 500 m above; now click 2 km mid-test, then 1 km:

nRF24L01 PA LNA link test in Proteus with lost packets: 7 of 10 ACKed, 3 lost after 15 retries each because they were too weak at 2 km
Figure: Test 2 in Proteus 8.5: four packets at 10 m, three lost at 2 km, three at 1 km.

Four packets at 10 m were ACKed at once. The three at 2 km are red: each was sent 16 times (the "15" counts the retries) and lost as "too weak". The last three, at 1 km, were ACKed again, as short bars near -100 dBm, just above the "needs -102 dBm" line. Totals: 7 / 10 ACKed, 45 retries, 3 lost. Good for: seeing how far your link reaches.

2. Throughput: How Fast Is Each Data Rate?

Two model radios in a private test air (your design never hears them), at this radio's distance and PA level, stream 100 packets like RF24's writeFast(). Choose the data rate, the payload and auto-ACK:

nRF24L01+PA+LNA throughput test in Proteus: 535 packets per second, 17.1 kB/s and 1868 us per packet at 250 kbps, and a table of all three data rates
Figure: Test 6 in Proteus 8.5: 100 x 32 B at 250 kbps, auto-ACK on, 10 m apart, in 186.8 ms.

The 100 packets took 186.8 ms: 535 packets/s (17.1 kB/s), 0 lost. Each 1868 µs are 130 µs of settling, 1316 µs on air and 422 µs for the ACK. The table adds 1 Mbps (1511 packets/s) and 2 Mbps (2132) with ACK. The PA and LNA change only the reach, not the speed. The demo uses 0.19 % of what 250 kbps can carry; a real UNO adds its SPI time.

3. Channel Scan: Which Channels Are Busy?

The scan listens on all 126 channels for 1, 5 or 10 s: every packet and ACK of the TEP radios in your design, the strongest level and the RPD count. Wi-Fi channels 1, 6 and 11 are drawn for reference (there is no Wi-Fi in the simulation):

nRF24 channel scan in Proteus: one bar on channel 108 at -44 dBm above the RPD -64 dBm line, RPD 5 of 5 from U1, Wi-Fi channels 1, 6 and 11 drawn for reference
Figure: Scan 1 in Proteus 8.5: 5 s, 5 transmissions, all on channel 108.

One bar, on channel 108: 5 packets from U1 at -44 dBm, above the RPD line 5 of 5 times, and "0 other channels in use". Channels 74 - 125 lie above Wi-Fi 1, 6 and 11, which is why the demo uses 108 (for real hardware, read the legal note below). Good for: finding a free channel.

4. Registers: What Did Your Sketch Write?

The last tool reads the registers live, as R_REGISTER would, lists the Arduino's last SPI commands and checks the other radios:

nRF24L01 registers read live in the PA+LNA Advance in Proteus: RF_CH 6C = 2508 MHz, RF_SETUP 27 = 250 kbps PA_MAX, the last SPI commands and U1 as the partner
Figure: U2's registers in Proteus 8.5, its SPI log and U1 marked PARTNER (IT -> THIS).
  • Registers: CONFIG 7F (powered up, receiver, CRC 16), RF_CH 6C = 2508 MHz and RF_SETUP 27 = "250 kbps, PA_MAX (+0 dBm)". The chip only knows its own 0 dBm; the PA's 20 dB are outside it, so no register shows them.
  • SPI log: 21,796 transactions per second. The newest row, R_REGISTER FIFO_STATUS, is folded x 17317: RF24's available() polls it all the time. Below it: R_RX_PAYLOAD 48 65 6C 6C 6F 20 ... ("Hello " in ASCII) and R_REGISTER RPD -> 01, the sketch's testRPD().
  • The other radios: U1 on CH 108, 250 kbps, CRC 16, TX 00001, -44 dBm here: PARTNER (IT -> THIS).

Good for: when a "FAILED, no ACK" makes no sense, this list shows which setting does not match.

Settings and Help

The gear opens Settings: theme (TEP Dark or Light), text size, open the panel at Run and window size, saved for your Windows user.

Settings page of the nRF24L01+PA+LNA Advance pop-up: theme, text size, open the panel at Run and window size
Figure: Settings, saved under HKCU\Software\TheEngineeringProjects\TEP nRF24L01+PA+LNA Advance.

The Light theme, after the Link tests: Weak / overload 48 / 0 comes from the three 2 km packets, sent 16 times each.

nRF24L01+PA+LNA Advance Radio page in the Light theme in Proteus: RX - LISTENING, 84 received, weak / overload 48 / 0, last packet Hello TEP #87 at -44 dBm
Figure: The Light theme in Proteus 8.5: last packet "Hello TEP #87", OK (+57.6 dB), reach about 1.1 km.

The ? icon opens Help & Support: eight cards (bug report, feature request, article, user guide, updates, donate, website, forum) and Copy diagnostics for a bug report; a links.ini next to the DLL can change the links.

Help and Support page of the nRF24L01+PA+LNA Advance with eight cards and the Copy diagnostics button
Figure: Help & Support: TEP nRF24L01+PA+LNA Advance v1.1, build 2026-10-06.

nRF24L01+PA+LNA with Arduino in Proteus

Open NRF24PALNA-ArduinoUnoV3.pdsprj from the Proteus Simulation folder, with the .hex files and DLLs beside it. It has two Arduino UNOs from our Arduino Library for Proteus V3.0 (the first image shows the circuit):

  • NODE 1 - TRANSMITTER: UNO 1 (ARD1) runs PALNA_Transmitter.hex with the nRF24L01+PA+LNA Simple (U1) and Serial Monitor U3.
  • NODE 2 - RECEIVER: UNO 2 (ARD2) runs PALNA_Receiver.hex with the nRF24L01+PA+LNA Advance (U2) and Serial Monitor U4.

Node 1 sends to address 00001 and listens on 00002; node 2 does the opposite.

Wiring

Demo wiring (the same on both UNOs, as in v1.0)
FromToWhy
Module VCC / GNDSupply / groundPower (+5 V in the simulation; a real module needs 3.3 V)
Module SCKArduino D13SPI clock
Module MISOArduino D12Data from the radio
Module MOSIArduino D11Data to the radio
Module CSNArduino D10Chip select
Module CEArduino D9Chip enable
Module IRQOpenNot used by the sketches
Serial Monitor RXD / TXD / GNDArduino D1 / D0 / groundShows what the Arduino prints, sends what you type

D11 - D13 are the UNO's hardware SPI pins; CE and CSN can be any pins (see our Introduction to Arduino UNO). No wire joins the nodes: every TEP nRF24 in a design shares one simulated 2.4 GHz air.

The Arduino Code

Both sketches use the unmodified RF24 library 1.6.2. The transmitter starts with its pins and 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

In setup(), the first three lines decide the range. RF24 knows nothing about the PA: it sets the chip's level, and the module adds its 20 dB:

  radio.setPALevel(RF24_PA_MAX);      // +20 dBm with the module's PA
  radio.setDataRate(RF24_250KBPS);    // best sensitivity = longest range
  radio.setChannel(108);              // 2508 MHz, above most Wi-Fi channels
  radio.openWritingPipe(address);
  radio.openReadingPipe(1, myAddress);  // v1.1: messages from the receiver
  radio.startListening();               // listen between the packets

startListening() is new in v1.1: node 1 listens between its packets, so node 2 can PING or SEND to it. Each packet goes out like this:

  radio.stopListening();                // transmitter mode
  bool ok = radio.write(message, sizeof message);
  byte arc = radio.getARC();            // retries this packet needed
  lastArc = arc;
  radio.startListening();

write() is true only when the ACK came back; getARC() counts the retries. The receiver's PA level matters too, because its ACKs travel back at that level:

  radio.setPALevel(RF24_PA_MAX);      // the ACKs go back at +20 dBm too
  radio.setDataRate(RF24_250KBPS);    // must match the transmitter
  radio.setChannel(108);
  radio.openReadingPipe(0, address);
  radio.startListening();             // receiver mode

For every packet, it reads the RPD first, then the payload, and prints one of two remarks:

    bool strong = radio.testRPD();    // received power above -64 dBm?
    char message[32] = "";
    radio.read(message, sizeof message);
    Serial.println(strong ? F("  (signal > -64 dBm)") : F("  (weak signal)"));

The PA command tries the overload cure without a new HEX file:

    if (strcmp(arg, "MIN") == 0) radio.setPALevel(RF24_PA_MIN);
    else if (strcmp(arg, "LOW") == 0) radio.setPALevel(RF24_PA_LOW);
    else if (strcmp(arg, "HIGH") == 0) radio.setPALevel(RF24_PA_HIGH);
    else if (strcmp(arg, "MAX") == 0) radio.setPALevel(RF24_PA_MAX);

A node that gets a PING answers first and prints afterwards, so the round trip is the radio's time, not the Serial time at 9600 baud:

    bool ping = strcmp(message, "PING") == 0, pong = false;
    if (ping) pong = transmit("PONG");  // answer first (the round trip), print afterwards

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

Commands of the demo sketches (monitor quick buttons: PING, STATUS, SEND Hello from node 1 / 2, HELP)
CommandWhat it does
SEND <text>A message to the other node now (up to 31 characters)
PINGThe other node answers PONG; prints the round trip
STATUSChannel, frequency, data rate, PA level, CRC, chip OK, addresses, counters
CH <0-125>The radio channel (type it on both monitors)
RATE <250K|1M|2M>The data rate (both)
PA <MIN|LOW|HIGH|MAX>The transmit power (PA LOW when the modules are close)
AUTO <ON|OFF>Node 1 only: the Hello TEP message every second
HELPThe command list

How to Run the Demo

  1. Press Run. Both Serial Monitors (9600 baud) and U2's pop-up open.
  2. Type PING, STATUS or SEND Hello on either monitor.
  3. Click 1 km, then 2 km, on U1's panel or U2's Radio page, and back to 10 m. Then set BOTH radios to 1 m and type PA LOW on both monitors.
  4. In U2's pop-up, open the Test tab and run the four tools.

nRF24L01+PA+LNA Proteus Simulation Results

The Serial Monitor in Its Simple Interface

Both monitors run in the Simple interface of our TEP Serial Monitor, and every monitor screenshot here shows it. It keeps only the log, the send box and one slim toolbar row (baud rate, follow, pause, search, clear); the header, quick buttons and status bar are hidden, so the window stays small beside 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.

Type commands such as PING or STATUS 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 this module has none, because it talks SPI. Read all about the monitor in TEP Serial Monitor Advance for Proteus.

Node 2: Every Packet Above -64 dBm

Here is U4 in my Proteus run, with both radios at 10 m:

nRF24L01 PA LNA receiver output in the TEP Serial Monitor Simple interface: Received Hello TEP #1 to #12 with signal > -64 dBm and the link line 10 received
Figure: U4 in the Simple interface: every packet with the RPD set, and the 10-second link line.
TEP nRF24L01+PA+LNA Receiver Demo v1.1
Listening: channel 108, 250 kbps, address 00001
Type HELP in the Serial Monitor for the commands
Received #1: Hello TEP #1  (signal > -64 dBm)
Received #2: Hello TEP #2  (signal > -64 dBm)
Received #3: Hello TEP #3  (signal > -64 dBm)
Received #4: Hello TEP #4  (signal > -64 dBm)
Received #5: Hello TEP #5  (signal > -64 dBm)
Received #6: Hello TEP #6  (signal > -64 dBm)
Received #7: Hello TEP #7  (signal > -64 dBm)
Received #8: Hello TEP #8  (signal > -64 dBm)
Received #9: Hello TEP #9  (signal > -64 dBm)
Received #10: Hello TEP #10  (signal > -64 dBm)
Link (10 s): 10 received (10 above -64 dBm), 0 sent
Received #11: Hello TEP #11  (signal > -64 dBm)
Received #12: Hello TEP #12  (signal > -64 dBm)

Every packet arrived with the RPD set: -44 dBm at the antenna is about -32 dBm at the chip after the LNA. Line 14 is the new link line: 10 packets in 10 s, all above -64 dBm, nothing sent.

Node 1: ACKs, Retries and PING

For U3, here is the expected output from the README (the PC test of the real sketches), with a PING from U3 and a message sent from U4:

TEP nRF24L01+PA+LNA Transmitter Demo v1.1
Radio ready: channel 108, 250 kbps, PA MAX, address 00001
Type HELP in the Serial Monitor for the commands
Sent: Hello TEP #1  -> ACK received, retries: 0
Sent: Hello TEP #2  -> ACK received, retries: 0
PING: PONG from node 2 after 3.7 ms
Received from node 2: Over and out

"retries: 0" is getARC(): the ACK came back at the first try. The PING round trip took 3.7 ms at 250 kbps.

Range Experiments: 1 km, 2 km and 1 m

Now click through the DISTANCE buttons. We ran the first four rows in Proteus 8.5 with the v1.0 demo, and the PC tests run all five with the v1.1 sketches:

The demo at different distances (250 kbps, PA_MAX unless noted)
Distance (both radios)LevelU3 (node 1)U4 (node 2)
10 m-44 dBmACK received, retries: 0(signal > -64 dBm)
1 km-100 dBm (needs -102)ACK received(weak signal)
2 km-109 dBm, too weakFAILED, no ACKNothing
1 m-16 dBm, OVERLOADFAILED, no ACKNothing
1 m, PA LOW on both-28 dBmACK received(signal > -64 dBm)

Back at 10 m, the link recovers at once.

Troubleshooting

  • "nRF24L01 not responding - check the SPI wiring and power": check the SPI wires, VCC / GND (PWR lit) and TEPNRF24L01.DLL in MODELS and beside the project.
  • "FAILED, no ACK" with the radios close: OVERLOAD; use PA LOW or more distance.
  • Always "FAILED, no ACK": both nodes need the same channel, data rate and address (CH or RATE typed on one monitor only breaks the link); the Registers tool shows what does not match.
  • No panel, pop-up or monitor: a DLL is missing; click OPEN PANEL or OPEN MONITOR.
  • No red X / the old wide board: replace TEPNRF24PALNA.LIB, delete TEPNRF24PALNA.IDX and re-pick the part.

Things to Know Before Using a Real nRF24L01+PA+LNA

The sketches use only RF24, so they run on real UNOs too, but a PA+LNA module is fussier than the plain one:

  • 3.3 V only: 1.9 - 3.6 V, never 5 V on VCC (the simulation uses +5 V; the model only checks power). The SPI inputs are 5 V tolerant.
  • A real 3.3 V regulator: at PA_MAX, the module draws up to about 115 mA while sending, more than the UNO's 3.3 V pin gives. Use a separate regulator, for example an nRF24 adapter board with an AMS1117, with a common GND.
  • A capacitor: 10 - 100 µF across VCC and GND, right at the module; without it, the PA's current peaks make many modules fail with "no ACK" or reset.
  • Shielding: an unshielded PA can couple back into the chip and oscillate. Use a module with a metal shield, or cover the PA / LNA area with insulating tape and then grounded foil, away from the UNO.
  • Antenna first: never transmit without the rubber duck screwed on; the PA can be damaged.
  • Desk tests: two modules on one desk at PA_MAX overload each other; use RF24_PA_LOW or MIN.
  • Legal limits: +20 dBm is 100 mW, plus the antenna gain. Licence-free 2.4 GHz radios have a power limit and must stay inside the band, which ends at 2483.5 MHz in most countries. Channel 108 (2508 MHz) suits the simulation but lies outside that band: on real hardware, check your local rules and pick a permitted channel and power level.

Limitations of the Simulation

  • Not modelled: collisions, random loss near the sensitivity limit (a link is OK or too weak), fading, multipath, Wi-Fi interference, supply current and voltage, the PA / LNA control pins of some modules, the constant-carrier test mode and SPI timing violations.
  • The range is a teaching model, one path-loss rule for an outdoor link with some obstacles; real range depends on your antennas, their height and the surroundings.
  • The model is our own implementation, written from Nordic's nRF24L01+ Product Specification and published PA / LNA module figures; it contains no RF24 code.
  • Tested in Proteus 8.5 on 6 Oct 2026 (the demo and the 15 screenshots here) and with 1,417 automatic PC checks, all passed, 69 of them with the unmodified RF24 library and 57 with the real v1.1 sketches. The two images marked "PC render" were drawn by the model's own code. Proteus 7 is not supported.

Want the small module with the PCB antenna? See our nRF24L01 Library for Proteus. For 433 MHz, try our HC-12 Library for Proteus or CC1101 Library for Proteus, and for kilometres at low data rates, our SX1278 LoRa Library for Proteus.

So, that was all about the nRF24L01+PA+LNA Library for Proteus V1.1. I hope the DISTANCE buttons and the four test tools make the range of a 2.4 GHz link easy to understand. If you use the nRF24L01 PA LNA Library for Proteus in a project, please share your feedback, 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

Join the conversation