Arduino microcontroller and nRF24L01+ transceivers

7,514 views
6,845 views

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
7,514
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
133
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Arduino microcontroller and nRF24L01+ transceivers

  1. 1. Arduino microcontroller and nRF24L01+ transceivers Pavlos Kallis Supervisor : prof. Leandros Tassiulas University of Thessaly Network implementation testbed laboratory (NITLAB)
  2. 2. Purpose Deployment of a wireless sensor network using arduino microcontrollers and nRF24L01+ transceivers
  3. 3. Wireless sensor network ● Nodes receive measurements through sensors ● Nodes forward measurements to a central node
  4. 4. Arduino Leonardo
  5. 5. NRF24L01+ Transceiver
  6. 6. ΝRF24L01+ Transceiver Low Cost Alternative to Xbee
  7. 7. NRF24L01+ Transceiver Data Rates: 250 kbps, 1 Mbps, 2 Mbps
  8. 8. NRF24L01+ Transceiver Frequency: 2400-2525 MHz
  9. 9. NRF24L01+ Transceiver Channels : 126
  10. 10. NRF24L01+ Transceiver Modulation: GSFK
  11. 11. NRF24L01+ Transceiver Line-of-sight range : ~40m
  12. 12. NRF24L01+ Transceiver Channel sensing
  13. 13. NRF24L01+ TX/RX ● Auto packet assembly ● Auto ACKs and retransmissions – Configurable # of retries – Configurable delay between retries
  14. 14. NRF24L01+ Packet structure
  15. 15. NRF24L01+ pipes Receiver Transmitter Pipe Write 0x01 Read 0x01
  16. 16. 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
  17. 17. RF24 library ● ● Software for Point-to-point communication between nRF24L01+ transceivers Abstracts low-level communication between the microcontroller and the transceiver
  18. 18. RF24 library configuration ● Channel ● Payload size ● Data rate ● ACKs or no ● Retry delay ● Number of retries ● CRC length
  19. 19. Schematic to connect arduino leonardo with nRF24L01+ transceivers
  20. 20. 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
  21. 21. RF24 Library transmission mechanism ● When two transmitters send a packet simultaneously
  22. 22. RF24 Library transmission mechanism ● When two transmitters send a packet simultaneously – A collision occurs RX TX TX
  23. 23. RF24 Library transmission mechanism ● When two transmitters send a packet simultaneously – A collision occurs – Receiver cannot decode the message RX TX TX
  24. 24. 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
  25. 25. Proposed mechanism ● If a transmitter fails to transmit a packet(no ack received) – It will wait for a random period, then retransmit
  26. 26. 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
  27. 27. 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
  28. 28. Proposed mechanism : Implementation ● ● Disabled the retransmission mechanism by calling setRetries(0, 0) Built on top of write(buf, len)
  29. 29. 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
  30. 30. RF24Network Library ● Network layer software library for nRF24L01+ transceivers ● Built on top of RF24 library ● Handles transmissions in network layer
  31. 31. RF24Network Library ● Tree topology – Max no. of children = 5
  32. 32. WSN Addressing
  33. 33. WSN Setup Base Node Relay Node Leaf Node
  34. 34. Thank you

×