NRF24L01 Enhanced Shockburst and PID

Discussion about wireless devices

NRF24L01 Enhanced Shockburst and PID

Postby Roys29 » Thu Jun 09, 2016 2:07 pm

I'm working on building a leak detector that uses NRF24L01 transceiver modules to send a signal if a leak is detected to another NRF24L01 configured as a receiver to shut off the water to my house. I wanted to enable the auto ack (Enhanced Shockburst) but discovered a problem. Reading the latest product spec sheet for the NRF24L01, in the packet sent to the receiver is a 2-bit packet ID. If the PID of the packet is the same as the previous packet the packet is ignored. When my transmitter detected a leak I powered it off until the leak was fixed. When I powered it back on again and tried to send another packet, since it had the same packet ID as the first packet it was ignored by the receiver. :evil: Auto ack works if you don't power down the transmitter. So if you find your particular project only receives 1 packet it's because of auto ack and the PID. To get my units to work I had to turn off auto ack. :roll: This was not a problem for me since my transmission distances are only inside my house.

I'm also going to try to send two separate bytes of data with auto ack set. The first byte will be a dummy byte and the second byte will be the transmitter number. Hopefully the PID will be different after receiving the 2nd byte so when the transmitter is powered off, then back on again, the first dummy byte will have a different PID than the second byte sent previously so the receiver will accept that byte and the second byte with the transmitter number.
Posts: 2
Joined: Sat May 21, 2016 8:19 pm

Re: NRF24L01 Enhanced Shockburst and PID

Postby brennen » Fri Jun 10, 2016 6:09 pm

I almost never use auto ack in projects. It's fairly trivial to add a little more code to handle acknowledgement in your application. Plus you can make the ack more flexible that way. Just my $0.02. :-)
Site Admin
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Return to Wireless

Who is online

Users browsing this forum: No registered users and 1 guest