nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Wireless and wired modules including Bluetooth, Ethernet, and IR kits.
richard-at-home
Posts: 12
Joined: Tue Jun 25, 2013 10:41 pm

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by richard-at-home » Tue Dec 10, 2013 5:36 pm

A further question for you.

I have been testing a pair of radio modules for a while and found that I get lost comms after a while, probably something like 12-18 hours.

In my set up I have an arduino pro mini with a pir attached. I put the processor and radio into power down mode and wake on interrupt with the PIR signal.

This all appears to work fine and the receiver gets data packets every time the PIR wakes the transmitter.

If leave the pair running overnight, by morning no data is received. The transmitter is still waking and sending but the receiver doesn't hear it.

If I power reset the transmitter, it all begins working fine for another day.

I am guessing that there is some drift going on somewhere?

The code is the same for a power up reset as for a wake up so both call Mirf.init(); etc so I'm not sure what else I can do.

To sleep the radio I set the config register to 0x08.

Any ideas?

richard-at-home
Posts: 12
Joined: Tue Jun 25, 2013 10:41 pm

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by richard-at-home » Wed Dec 11, 2013 11:06 am

Actually I have found that the link is not dropping over time, it's the receiver being switched off at night!

For some reason, if the receiver is turned off and then back on, it does not synchronise with the transmitter (which has remained on).

I will do some digging in the datasheet to see how the radios get re-synchronised...

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by andrew » Wed Dec 11, 2013 11:58 am

Ok, I was just about to answer you last question with some suggestions but it looks like you have narrowed down the problem. Nothing immediately comes to mind as to why it wouldn't sync up. I assume that when receiver's power is being cycled it is getting reinitialised by the Arduino? Also is the power is being cleanly cycled and its not a brown-out?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

richard-at-home
Posts: 12
Joined: Tue Jun 25, 2013 10:41 pm

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by richard-at-home » Wed Dec 11, 2013 12:10 pm

Yes, the transmiter is going through sleep-wake cycles with power on all the time and the receiver works fine from power up.

If I power off the receiver and then back on, no packets received until I physically power cycle the transmitter.

I assume the protocol between the radios means both ends need to know which packet they are on. Probably just something I need to initialise in the transmitter on wake up, other than the call to init....

I'm sure I'll sort it shortly!

richard-at-home
Posts: 12
Joined: Tue Jun 25, 2013 10:41 pm

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by richard-at-home » Wed Dec 11, 2013 11:57 pm

Well can't really say why, but adding a 2ms delay between setting the address of the receiver and setting the payload fixed it!

/* Set the receiving address of this module. This must be a 5 byte
* character string */
Mirf.setRADDR((byte *)"SENS1");

//without this transmissions fail with status 46 when rx unit is not there to ack.
delay(2);

/* Set the payload length to size unsigned int (size of data from
* the analogue input A0) */
Mirf.payload = sizeof(uiData);


Very odd.

Without that delay transmission fail if the receiver is off line for a couple of packets or more and then powered back up. No packets will ever be received until you power reset the transmitter.

I was getting a status of 46 at the transmitter when it gets into this mode which is also odd as the chip manual says that a TX Data Sent status flag and I would expect it to be a Max Re Try flag due to the receiver being off....

Anyway I will test for a few days now!

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by andrew » Thu Dec 12, 2013 7:17 pm

I guess somehow the module isn't getting configured correctly without the small delay. Although no idea why it would not happen all the time. We haven't tested it or the library in this way so this is useful information. Please let us know is it has indeed fixed it.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

beardy
Posts: 1
Joined: Fri Feb 28, 2014 12:53 am

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by beardy » Fri Feb 28, 2014 12:56 am

I recently picked up a dozen of these modules. We got them working without losing too much hair but as we came to test the rest of the modules we found that only two of them would receive whilst they all transmit.

Has anybody else had this kind of issue or are we looking at dodgy modules??

Magic Matt
Posts: 2
Joined: Tue Mar 03, 2015 11:04 pm

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by Magic Matt » Tue Mar 03, 2015 11:13 pm

Has anyone managed to get this working with PIC? I'd like to use it with a PIC16F - I purchased three modules to use (one as data transmitter, two data receivers) but I don't have a clue what I'm doing with them.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by andrew » Wed Mar 04, 2015 8:47 am

This tutorial may have what you are looking for:

http://wordpress.codewrite.co.uk/pic/20 ... rf24l01sw/
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Magic Matt
Posts: 2
Joined: Tue Mar 03, 2015 11:04 pm

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by Magic Matt » Wed Mar 04, 2015 2:36 pm

That looks very promising, thank you!

Post Reply

Return to “Wireless / Wired”