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 » Thu Nov 21, 2013 4:33 pm

Any tips for getting these radios going?

I am using Mega2560 boards.

With the demo examples, I get some comms, but only across very short distances (less than a meter) and maybe only 30% of the time.

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

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by andrew » Fri Nov 22, 2013 11:34 am

You should definitely be getting a much better range than this. I'm going to add some tips to the first post now. The most important thing to check is how you are powering the modules. If you are powering them from the 5V supply of your Arduino board this can cause problems as the 5V supply on these boards isn't always quite up to supplying the peak (the short amount of time when the board is transmitting) power requirements. If you are powering them in this way then try adding a 10uF capacitor across the supply of the module.

Edit: This should read 3.3V not 5V !
Last edited by andrew on Sat Nov 23, 2013 10:30 am, edited 1 time in total.
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 » Fri Nov 22, 2013 4:36 pm

Hi Andrew,

They are connected to the Arduino 3.3V pin and I checked to see if there was any sag with a scope on transmit, seemed ok, but I tried a 10uf cap in parallel too.

Not much joy.

The setup registers read 00001111 on both boards.

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 » Fri Nov 22, 2013 5:01 pm

At the moment I'm not getting any received packets.

I did try reducing the data rate to 1mb but that made things worse and since trying that, no received data at all.

I have tried swapping boards over but no difference.

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 » Fri Nov 22, 2013 5:34 pm

I have tried reading out some of the registers:

Both read as:

RF setup : 00001111
Config: 00001011
Rf channel:90 (tried 6 and 50)
Status: 00001110
fio status:1


The client shows Lost tx packets incrementing to 15 and the retransmitted counter stays on 3.

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

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by andrew » Sat Nov 23, 2013 10:59 am

I checked to see if there was any sag with a scope on transmit, seemed ok, but I tried a 10uf cap in parallel too.
Depending on the model of your oscilloscope it may not have enough bandwidth or sensitivity to see any fluctuations in the supply. Although I have not run extensive tests on this module, I have seen on similar types of device where just a tiny amount of supply fluctuation (millivolts) can kick the VCO and cause it to momentarily be knocked off frequency. If possible it is worth trying to power these modules from a source other than the 3.3V supply from your arduino board. We have seen ourselves that this can cause complete packet loss when powered from an Arduino 3.3V supply.
I did try reducing the data rate to 1mb but that made things worse and since trying that, no received data at all.
This is very odd, as you were originally seeing some packets I would expect reducing the data rate would have improved packet error rate.
I have tried swapping boards over but no difference.
This was the thing I was going to ask you to try next as it may have pointed to a problem with one of the modules but as it has made no difference it could still be a problem with either one.
I have tried reading out some of the registers
I don't see anything wrong with those register settings. Are you using a prewritten library or is this your own code?
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 » Sat Nov 23, 2013 5:16 pm

I've copied an pasted the demo here and used the same library: Mirf library by Nathan Isburgh. The mirf.cpp file was last updated 11/3/2011

I'm not sure if there is some issue with the Plus version of the chip, as the library mentions nRF24L01+.

It is odd that I was getting some packets across but now there are none.

I have a wireless keyboard and mouse which are on 2.4Ghz and probably several other devices around but with these radios literally next to each other, I'd expect to see some packets.

I have tried some different channels too.

My radio scanner only goes to 1.3Ghz, but maybe there's a wifi scanner that might see the transmissions?

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

Re: nRF24L01 2.4GHz Wireless Transceiver Module (HCMODU0004)

Post by andrew » Sun Nov 24, 2013 11:17 am

I've copied an pasted the demo here and used the same library: Mirf library by Nathan Isburgh. The mirf.cpp file was last updated 11/3/2011
I'm not seeing your code. The library you have should be the same one we posted here and used to test our modules. Have you tried the example sketches in the first post of this forum? I will help rule out any software issues.
It is odd that I was getting some packets across but now there are none.
Yes its unlikely that this is an interference problem but it wouldn't hurt to try and relocate the modules just in case.
My radio scanner only goes to 1.3Ghz, but maybe there's a wifi scanner that might see the transmissions?
I believe that you can use the RPD register as a very basic RF energy detector. You can use this as scanner but it would also tell you if there is a problem in the receive chain of the modules. I will have a search for some example code.
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 » Sun Nov 24, 2013 12:10 pm

I meant that I copied the code example from here and added some register reads, that's all.

I made some progress by monitoring Carrier Detect and the receiver is certainly seeing the Client transmissions.

It will detect carrier on the same channel and a couple of channels either side too.

I'm not sure if there are any registers that I can read to see receive errors.

I will try dropping the receiver sensitivity a bit...

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 » Sun Nov 24, 2013 12:27 pm

Got it going now, I put the 10uf caps on BOTH boards! (previously only on the tx board!)

Range is pretty good, works over most of the house (big house with lots of brick walls). Antenna direction becomes sensitive at extreme edges of range as expected.

I'll get some more as I want to do some home automation projects.

Thanks for your help Andrew!

Post Reply

Return to “Wireless / Wired”