Arduino microcontroller and nRF24L01+
transceivers

Pavlos Kallis
Supervisor : prof. Leandros Tassiulas
University of Thessaly
Network implementation testbed laboratory
(NITLAB)
Purpose
Deployment of a wireless sensor network
using arduino microcontrollers and nRF24L01+
transceivers
Wireless sensor network
â—Ź

Nodes receive measurements
through sensors

â—Ź

Nodes forward measurements to
a central node
Arduino Leonardo
NRF24L01+ Transceiver
ÎťRF24L01+ Transceiver
Low Cost
Alternative to Xbee
NRF24L01+ Transceiver
Data Rates: 250 kbps, 1 Mbps, 2
Mbps
NRF24L01+ Transceiver
Frequency: 2400-2525 MHz
NRF24L01+ Transceiver
Channels : 126
NRF24L01+ Transceiver
Modulation: GSFK
NRF24L01+ Transceiver
Line-of-sight range : ~40m
NRF24L01+ Transceiver
Channel sensing
NRF24L01+ TX/RX
â—Ź

Auto packet assembly

â—Ź

Auto ACKs and retransmissions
–

Configurable # of retries

–

Configurable delay between retries
NRF24L01+ Packet structure
NRF24L01+ pipes

Receiver

Transmitter
Pipe
Write
0x01

Read
0x01
NRF24L01+ pipes
Transmitters
Write
0x01

Pipe

Read
0x01

Write
0x02

Pipe

Read
0x02

Write
0x03

Write
0x04
Write
0x05

Pipe

Pipe

Pipe

Read
0x03

Read
0x04
Read
0x05

Receiver
RF24 library
â—Ź

â—Ź

Software for Point-to-point communication
between nRF24L01+ transceivers
Abstracts low-level communication between
the microcontroller and the transceiver
RF24 library
configuration
â—Ź

Channel

â—Ź

Payload size

â—Ź

Data rate

â—Ź

ACKs or no

â—Ź

Retry delay

â—Ź

Number of retries

â—Ź

CRC length
Schematic to connect arduino leonardo with
nRF24L01+ transceivers
RF24 Library example setup

Pong role

2) Pong role
replies with
timestamp

1) Ping role
sends its
timestamp

Ping Role

3) Ping role
calculates
round-trip
time
RF24 Library transmission mechanism
â—Ź

When two transmitters send a packet
simultaneously
RF24 Library transmission mechanism
â—Ź

When two transmitters send a packet
simultaneously
–

A collision occurs
RX

TX

TX
RF24 Library transmission mechanism
â—Ź

When two transmitters send a packet
simultaneously
–

A collision occurs

–

Receiver cannot decode the message
RX

TX

TX
RF24 Library transmission mechanism
â—Ź

When two transmitters send a packet
simultaneously
–

A collision occurs

–

Receiver cannot decode the message

–

The transmitters will retry in the SAME time
slots

–

Until maximum no. of retries reached
Proposed mechanism
â—Ź

If a transmitter fails to transmit a packet(no
ack received)
–

It will wait for a random period, then retransmit
Proposed mechanism
â—Ź

If a transmitter fails to transmit a packet(no
ack received)
–

It will wait for a random period, then retransmit

–

The random period is selected from a
contention window, that is doubled every
time the TX fails to transmit a packet
Proposed mechanism
â—Ź

If a transmitter fails to transmit a packet(no
ack received)
–

It will wait for a random period, then retransmit

–

The random period is selected from a
contention window, that is doubled every
time the TX fails to transmit a packet

–

Until the maximum number of retries is
exceeded
Proposed mechanism : Implementation
â—Ź

â—Ź

Disabled the retransmission mechanism by
calling setRetries(0, 0)
Built on top of write(buf, len)
Proposed mechanism : Implementation
â—Ź

Problem : The function write was
poweringDown() the transmitter after a packet
transmission
–
–

â—Ź

Increased delay to wake ( 1.5 ms)
Our random backoff time was much less than
that

Solution : We disabled the powerDown()
function
RF24Network Library
â—Ź

Network layer software library for nRF24L01+
transceivers

â—Ź

Built on top of RF24 library

â—Ź

Handles transmissions in network layer
RF24Network Library
â—Ź

Tree topology
–

Max no. of children = 5
WSN Addressing
WSN Setup

Base
Node
Relay
Node
Leaf
Node
Thank you

Arduino microcontroller and nRF24L01+ transceivers