Reply to topic  [ 30 posts ]  Go to page Previous  1, 2, 3
nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004) 
Author Message

Joined: Tue Jun 25, 2013 10:41 pm
Posts: 12
Post Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)
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?


Tue Dec 10, 2013 5:36 pm
Profile

Joined: Tue Jun 25, 2013 10:41 pm
Posts: 12
Post Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)
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...


Wed Dec 11, 2013 11:06 am
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 708
Post Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)
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.


Wed Dec 11, 2013 11:58 am
Profile

Joined: Tue Jun 25, 2013 10:41 pm
Posts: 12
Post Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)
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!


Wed Dec 11, 2013 12:10 pm
Profile

Joined: Tue Jun 25, 2013 10:41 pm
Posts: 12
Post Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)
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!


Wed Dec 11, 2013 11:57 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 708
Post Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)
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.


Thu Dec 12, 2013 7:17 pm
Profile

Joined: Fri Feb 28, 2014 12:53 am
Posts: 1
Post Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)
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??


Fri Feb 28, 2014 12:56 am
Profile

Joined: Tue Mar 03, 2015 11:04 pm
Posts: 2
Post Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)
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.


Tue Mar 03, 2015 11:13 pm
Profile
Site Admin

Joined: Sun Aug 05, 2012 4:15 pm
Posts: 708
Post Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)
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.


Wed Mar 04, 2015 8:47 am
Profile

Joined: Tue Mar 03, 2015 11:04 pm
Posts: 2
Post Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)
That looks very promising, thank you!


Wed Mar 04, 2015 2:36 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 30 posts ]  Go to page Previous  1, 2, 3

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Thank you to phpBB.com & phpBB.ro.
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD