Alternatives for nRF24L01+ ?
-
So after a month or two of fiddling I've had enough of the unstable nRF24L01+.
Been trying all sorts of tricks to try and these things working - the range is useless and everything I try doesn't seem to help.Tried nRF24L01+, nRF24L01+ PA, capacitor, making sure its a stable 3.3V, extending antenna on nRF24L01+, used tin foil to stop noise, change channel numbers, transfer speed, nothing seems to help. Trued multiple devices - no go.
They only seem to work right next to each other. Going through 2 rooms is impossible. Sometimes it works, then it loses comms for 30 mins.
Today I tried replacing gateway and sensor with PA - range is even worseThinking of tossing them all out and going XBee. Expensive but its bound to be rock stable.
Read through so many posts on how to extend the range and am wondering if I'm the only one having headaches.
-
@gmccarthy you do now that MySensors also supports RFM69 right? I runs on a lower frequency. And if I remember it correctly from high school, a lower frequency has a longer range. But there are people here that have more knowledge of that.
Much cheaper and more versatile than Xbee.
Besides. If it isn't a hardware problem. You might end up with the same problems when you use Xbee. Just a thought though.
-
@TheoL Thanks. Will have a look into those.
In the meantime I've gone back to basics and have used the pingpong sketch from https://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo#lib and to my amazement its been running for an hour already with no errors. (And going through 2 floors!) Same hardware, power supply etc.
Might be too early to jump for joy so will leave it running for a few days and see if it falls over.
-
@gmccarthy There can be many reasons why hardware sometimes doesn't work. But it's good to hear, that you are getting closer.
-
@TheoL
Really having some strange problems - if I use the script from the link above its successful in sending and receiving data.I've now tried the pingpong script from mysensors and its failing. If I go back to the script above it works again.
Node1:
Ying NodeReady.
Init complete, id=200, parent=255, distance=255
T received - starting test...
Sending Ping to Yang Node
find parent
send: 200-200-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:Node2:
Yang NodeReady.
Init complete, id=201, parent=255, distance=255
-
@gmccarthy that my friend is something @Hek might be able to help you.
-
"find parent" means your node hasn't got any id and tries to fetch one from the controller.
So either set a static id or hook up the gateway to a controller which can hand out an id to it.
-
Hi!
I'm new to mysensors and trying to set up my first nodes.My test units are a UNO and a NANO, both with nRF24L01+ and 10uF caps. I'm getting a similiar outcome as @gmccarthy is getting:
-"pingpair" and "pingpair_dyn" (RF24 library) sketches runs OK, tested up to 30ft apart.
-Similar output when running mysensor's 1.5.4 "PingPongSensor", except for the "Init complete, id=20x, parent=255, distance=255" part, which is not displaying. As follows:Sender node:
Ying NodeReady.
T received - starting test...
Sending Ping to Yang Node
find parent
send: 200-200-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:Receiver node:
Yang NodeReady.What I'm supposed to see on screen when running this sketch?
Thanks for your help!
-
@gmccarthy said in Alternatives for nRF24L01+ ?:
So after a month or two of fiddling I've had enough of the unstable nRF24L01+.
Been trying all sorts of tricks to try and these things working - the range is useless and everything I try doesn't seem to help.
Tried nRF24L01+, nRF24L01+ PA, capacitor, making sure its a stable 3.3V, extending antenna on nRF24L01+, used tin foil to stop noise, change channel numbers, transfer speed, nothing seems to help. Trued multiple devices - no go.
They only seem to work right next to each other. Going through 2 rooms is impossible. Sometimes it works, then it loses comms for 30 mins.
Today I tried replacing gateway and sensor with PA - range is even worse
Thinking of tossing them all out and going XBee. Expensive but its bound to be rock stable.
Read through so many posts on how to extend the range and am wondering if I'm the only one having headaches.I have absolutely the same experience with my temperature sensors!
I use the DHT22 and the HTU21 sensors. Sometimes they are running for weeks and then stop working for a day or so and then start working again.Has somebody the same experience?
-
@ripperle I gave up with them and used a nodemcu with a esp8266 wifi module. Have been running without a hitch for months now.
-
@ripperle said in Alternatives for nRF24L01+ ?:
Sometimes they are running for weeks and then stop working for a day or so and then start working again.
Has somebody the same experience?
This is a radio link quality problem.
Replace your gateway radio with this PA/LNA module from CDEbyte, make sure script is compiled with #define MY_RF24_PA_LEVEL RF24_PA_MAX and it should solve your problems, it has worked for anyone else who tried.
https://www.aliexpress.com/item/E01-ML01DP5-Ebyte-2-4GHz-20dBm-2100m-nRF24L01-SPI-Wireless-transceiver-module/32638720689.html
-
Agreed, I have the same from CDEBYTE on my RPI3 and it has been working flawlessly for over a month. I personally like the RFM69 better because you have more options to work with, but NRF24 from cdebyte are working ok, at least for me.
-
Those CDEbyte modules work great for me too. So it becomes:
- short distance (or feeling lucky) : use the cheap nRF24L01+ clones
- long distance and you can use mains: use a nodemcu or equivalent
- long distance and you need battery powered: use the CDEbyte modules
Or, scrap it all, and use an NRF5 module for everything. I'm still hesitant to jump in - but that may be the future of mysensors. There is a huge forum on that.
-
I would agree that the range on regular nRF24L01+ modules tends to be... less than stellar. The ones with the PA+LNA though seem OK.
The existing nRF5's have better range than regular nRF24L01's, and those with PA+LNA have good range. The nRF52840, which should soon be available,supposedly has fantastic range at not much Tx power.
RFM69 has good range, especially at high Tx power.
LoRa currently has the best range, and the Ra-01 modules are very cheap. LoRa's range comes at a price though: lower bitrates.
-
@gmccarthy said in Alternatives for nRF24L01+ ?:
@ripperle I gave up with them and used a nodemcu with a esp8266 wifi module. Have been running without a hitch for months now.
My sensors are battery powered (I also did many test with stable power supplys and had the same connection problems after a few days or weeks...)
@Nca78 said in Alternatives for nRF24L01+ ?:
@ripperle said in Alternatives for nRF24L01+ ?:
Sometimes they are running for weeks and then stop working for a day or so and then start working again.
Has somebody the same experience?
This is a radio link quality problem.
Replace your gateway radio with this PA/LNA module from CDEbyte, make sure script is compiled with #define MY_RF24_PA_LEVEL RF24_PA_MAX and it should solve your problems, it has worked for anyone else who tried.
https://www.aliexpress.com/item/E01-ML01DP5-Ebyte-2-4GHz-20dBm-2100m-nRF24L01-SPI-Wireless-transceiver-module/32638720689.htmlI already upgraded the gateway with a PA/LNA
But not with the MY_RF24_PA_LEVEL RF24_PA_MAX option... Although I ordered 2 PA/LNA transmitter from CDEByte... Let see if it works...By the way, my bathroom sensor (staple power supply, no battery 1 room away from gateway) stopped working a few days ago after many weeks without any problems... Yesterday it come back to life by itself and works... SOOOOOO STRANGE...
I dont understand, why a sensor works for weeks or months without problems and then stop working for a day or 2...
Thanks for your advises...
-
It may also a be something else, why are you blaming only radio module? Have you tried changing to a very different channel than you are currently using?
-
Maybe try a watchdog?
-
@ripperle said in Alternatives for nRF24L01+ ?:
I dont understand, why a sensor works for weeks or months without problems and then stop working for a day or 2...
Thanks for your advises...
After x failed attempts to send messages MySensors will consider the radio link broken. Then when you will want to send a message it will need time to re-establish this link, and if your connection is not of good quality it takes some time, more than the time allowed in the settings to do that job. Then your node is invisible to the gateway.
-
@Nca78 I am about to order a few of the suggested modules (PA/LNA module from CDEbyte) from aliexpress. My first deal ever on aliexpress. What about antenna? Will I have to order it separately?
-
@arraWX Which modules specifically?
-
@NeverDie This one: https://www.aliexpress.com/item/E01-ML01DP5-Ebyte-2-4GHz-20dBm-2100m-nRF24L01-SPI-Wireless-transceiver-module/32638720689.html
-
@arraWX My purchase for that didn't come with an antenna, whereas @Nca78 's did. So, don't count on it. I'm pretty sure they mean to charge extra for it.
-
@NeverDie Thank you!
To me it seems as if it is not an option to order an antenna from CDEbyte through aliexpress.
Can I use any 2.4 GHz SMA antenna? Anything to be particularly aware of? Any suggestions?
-
@arraWX This will fit it:
https://www.aliexpress.com/item/Free-Shipping-ESP8266-serial-WIFI-wireless-transceiver-module-MT7681-3DBI-gain-antenna/32223853645.html?spm=a2g0s.9042311.0.0.3qUb1AIt's already cheap, but maybe you can find it even cheaper without the cabling adapter part of it.
That said, I'm not at all sure the CDEbyte is any better than the cheaper alternative, which includes an antenna: https://www.aliexpress.com/item/5pcs-Free-Shipping-Special-promotions-1100-meter-long-distance-NRF24L01-PA-LNA-wireless-modules-1100meters-with/1037554818.html?spm=a2g0s.9042311.0.0.3qUb1A
-
@ripperle in your sensor node, do you give time for link recovery in the case of link fail ?
-
I went through a lot of problems when trying to build my network using the nrf24 modules. I jept using more and more powerful modules but never really managed to get a robust connection at all nodes.
The nrf24L01 do not provide signal level reporting capabilities, so it's not easy to imagine what's oging on when communication fails.
I finally understood by using the connection quality meter here. BY using I found that:
- Increasing the power is sometimes a problem instead of a solution, since the nrf24L01 tend to overload at some point.
- In my home there where "shadow" areas where the 2.4GHz simply didn't reach at a good enough level. I then checked the 2.4GHz signal from my router and found that it was also weak (not as weak as the nrf24L01, of course, but you could see the decrease).
- Isolating the nrf24L01 by wrapping them on a plastic film foil and then another later of tin foil helped a litlle.
From the results of my investigation I decided to move to using rfm69 modules, which have a better penetration power. They are working quite well, and certainly much better than the nrf24's.
Maybe in your case it might be worth using a similar tool to understand what is going on.
-
@NeverDie said in Alternatives for nRF24L01+ ?:
That said, I'm not at all sure the CDEbyte is any better than the cheaper alternative, which includes an antenna: https://www.aliexpress.com/item/5pcs-Free-Shipping-Special-promotions-1100-meter-long-distance-NRF24L01-PA-LNA-wireless-modules-1100meters-with/1037554818.html?spm=a2g0s.9042311.0.0.3qUb1A
I never got good resuts with similar pa/lna modules. Some work, some don't, some do only after tinkering.
With the one from CDEByte it just gave instant coverage to all my nodes, no tinkering necessary and nothing like what @manutremo is describing above. My nodes which had problem to report from the other side of my appartment became 100% reliable.
-
-
@Nca78 So you are using nrf52 ebyte with antenna and you enable the pa/lna in the project ? Can you guide me to the code for this please ?
Thanks.
-
@ahmedadelhosni said in Alternatives for nRF24L01+ ?:
@Nca78 So you are using nrf52 ebyte with antenna and you enable the pa/lna in the project ? Can you guide me to the code for this please ?
Thanks.
Hello, to use pa/lna at maximum power in your, you need to put this line :
#define MY_RF24_PA_LEVEL (RF24_PA_MAX)
-
@nca78 Thanks.
so the same define for nrf24 works for nrf52 ?
-
@ahmedadelhosni said in Alternatives for nRF24L01+ ?:
@nca78 Thanks.
so the same define for nrf24 works for nrf52 ?
No, NRF24 is for NRF24. For NRF5 there are MY_NRF5_... defines.
/** * @def MY_NRF5_ESB_PA_LEVEL * @brief Default nRF5 PA level. Override in sketch if needed. * * - NRF5_PA_MIN = -40dBm * - NRF5_PA_LOW = -16dBm * - NRF5_PA_HIGH = 0dBm * - NRF5_PA_MAX = 4dBm */ #ifndef MY_NRF5_ESB_PA_LEVEL #define MY_NRF5_ESB_PA_LEVEL (NRF5_PA_MAX) #endif
-
@nca78 Yeah, it took me two days to realize that I forget to set this option ... Without this option the signal couldn't pass trough two walls, with it there is no problem
-
@manutremo said in Alternatives for nRF24L01+ ?:
I went through a lot of problems when trying to build my network using the nrf24 modules. I jept using more and more powerful modules but never really managed to get a robust connection at all nodes.
The nrf24L01 do not provide signal level reporting capabilities, so it's not easy to imagine what's oging on when communication fails.
I finally understood by using the connection quality meter here. BY using I found that:
- Increasing the power is sometimes a problem instead of a solution, since the nrf24L01 tend to overload at some point.
- In my home there where "shadow" areas where the 2.4GHz simply didn't reach at a good enough level. I then checked the 2.4GHz signal from my router and found that it was also weak (not as weak as the nrf24L01, of course, but you could see the decrease).
- Isolating the nrf24L01 by wrapping them on a plastic film foil and then another later of tin foil helped a litlle.
From the results of my investigation I decided to move to using rfm69 modules, which have a better penetration power. They are working quite well, and certainly much better than the nrf24's.
Maybe in your case it might be worth using a similar tool to understand what is going on.
So I tested the new radio modules from Cde and of course the high power define in the code... I still have no stable network on all. Sensors! Sometimes a temperature sensor fail, sometimes a window sensor fail... Really annoying in winter when the heating control loop don't work...
I will buy the rfm69 modules and try this ones...
-
That is quite odd... those modules should have plenty of range to spare indoor, especially with that huge antenna. When you say the sensor fails, are you sure it is the radio failing and not the MCU hanging for whatever reason?
-
@nca78 said in Alternatives for nRF24L01+ ?:
CDEbyte
and can't tell the difference between them and them:
https://pl.aliexpress.com/item/10Pcs-x-NRF24L01-Wireless-Module-2-4G-Wireless-Communication-Module-Upgrade-Module/1289649564.html?spm=a2g17.search0104.3.26.Sy7dfX&ws_ab_test=searchweb0_0,searchweb201602_5_10152_10151_10065_10344_10068_10342_10343_10059_10340_10314_10341_10534_100031_10084_10604_10083_10103_10304_10307_10301_10142,searchweb201603_36,ppcSwitch_2&algo_expid=78bb5c8a-4b4d-43ce-b792-8f45a6dbaac8-7&algo_pvid=78bb5c8a-4b4d-43ce-b792-8f45a6dbaac8&priceBeautifyAB=0Both types works ALMOST all the time in my 67m2 apartment (which has steel walls :D), the worst is in most distant room where even the wifi has troubles to reach - so I guess it is quite good result.
I want also to try rfm69 because 2.4GHz has just no chances with concrete wals.
-
@rozpruwacz what do you use for your gateway ? You need a good PA/LNA module in the gateway to solve the problem, that's what did the trick for me (with a module from CDEByte), now all my nodes run fine including the clones from AliExpress or my local shop.
(I have a 120m2 apartment and no "steel" walls but it's a high rise so walls are 30cm thick concrete with plenty of rebar, and I have no more dead spots)
-
@nca78 said in Alternatives for nRF24L01+ ?:
I have no m
I'm uing those https://pl.aliexpress.com/store/product/E01-ML01DP5-Ebyte-2-4GHz-20dBm-2100m-nRF24L01-SPI-Wireless-transceiver-module/2077046_32638720689.html?spm=a2g17.12010615.0.0.13003418ZX8uEO
for a gateway. Gateway is raspberry pi and the nrf module is connected to 5v trough 3.3v voltage regulator. So I guess I did all I could that is possible to do without a network analyzer
-
If you're sure you've compiled with NRF24_PA_MAX then yes it seems.