[Request - Answered] nRF24L01+ library

@rlogiacco @wgbartley I finally got some time to sit around at the soldering iron and put these together. I added a 100uF cap on both boards. I’m running the GettingStarted example on both of them.

Problem I’m seeing is one Rx very well, but the other one does not. I’m assuming both of them Tx well, but I can’t be sure because one doesn’t Rx well. Sometimes I’ll see some response from it… but the one radio Rx’s every single Tx of the other one. I swapped the radios between my boards, and the response stays with the radio, so I don’t think there is any difference between the two boards. One is an Arduino Duemilanove, the other is a Freeduino SB. Both have ATMega328P processors.

Any ideas?

http://imgur.com/0YF3Ew3

http://i.imgur.com/TauHDMv

Can you please further elaborate? I'm not sure I understand what you mean.... One radio doesn't pick all the transmissions from the other while you don't see the same to occur the other way around when you invert their roles?

At the distance shown in the picture and in a non extremely polluted (electromagnetically speaking) environment you shouldn't experience any data loss: a cleanand stable ping-pong with a 22ms delay is what I've experienced so far in that conditions and my rig is totally based on breadboards (from which I would expect much more magnetic interferences).

Don’t forget that the wifi on the core and the nRF24L01+ both operate on the same band, so try and keep them as far apart as poss, and be on the lookout for odd things happening on either network. Even if you configure the frequencies to be different, you can get effects like front-end overload because there is a strong signal in the same band - and you can’t filter it out - because it’s the band both devices are designed to work in.

Just something to be aware of if it starts misbehaving when you crank up both interfaces.

@rlogiacco

So I have two transceivers, both capable of transmitting (Tx) and receiving (Rx). Unit 1 seems to Tx well, and Unit 2 seems to Rx well. But Unit 1 because it doesn’t Rx well, is not seeing the ACK from Unit 2, so it shows some errors.

If I reverse the rolls, Unit 2 might Tx, but since Unit 1 doesn’t Rx well, I can’t tell if Unit 2 is really Tx’ing or not. Sometimes the packets get through, but not very often. I guess Unit 2 does Tx.

I’ve separated them by about 1 foot, and also 5 feet with the same response. I just had them that close for the picture.

##Example Response##
###Unit 1 (Tx)###

Now sending 32813...ok...Failed, response timed out.
Now sending 34021...failed.
Failed, response timed out.
Now sending 35296...failed.
Failed, response timed out.
Now sending 36570...ok...Failed, response timed out.
Now sending 37778...failed.
Failed, response timed out.
Now sending 39053...failed.
Failed, response timed out.
Now sending 40328...failed.
Failed, response timed out.
Now sending 41602...failed.
Failed, response timed out.
Now sending 42875...ok...Failed, response timed out.
Now sending 44078...failed.
Failed, response timed out.
Now sending 45351...failed.
Failed, response timed out.
Now sending 46625...ok...Failed, response timed out.
Now sending 47833...failed.
Failed, response timed out.
Now sending 49106...ok...Failed, response timed out.
Now sending 50315...ok...Failed, response timed out.
Now sending 51518...failed.

###Unit 2 (Rx)###

Got payload 32813...Sent response.
Got payload 34021...Sent response.
Got payload 35296...Sent response.
Got payload 36570...Sent response.
Got payload 37778...Sent response.
Got payload 39053...Sent response.
Got payload 40328...Sent response.
Got payload 41602...Sent response.
Got payload 42875...Sent response.
Got payload 44078...Sent response.
Got payload 45351...Sent response.
Got payload 46625...Sent response.
Got payload 47833...Sent response.
Got payload 49106...Sent response.
Got payload 50315...Sent response.
Got payload 51518...Sent response.
Got payload 52793...Sent response.

##Now we Reverse the Roles##


###Unit 2 (Tx)###

Now sending 689070...failed.
Failed, response timed out.
Now sending 690343...failed.
Failed, response timed out.
Now sending 691617...ok...Got response 691617, round-trip delay: 89
Now sending 692708...failed.
Failed, response timed out.
Now sending 693983...failed.
Failed, response timed out.
Now sending 695257...failed.
Failed, response timed out.
Now sending 696530...ok...Got response 696530, round-trip delay: 36
Now sending 697567...failed.
Failed, response timed out.
Now sending 698841...failed.
Failed, response timed out.
Now sending 700114...failed.
Failed, response timed out.
Now sending 701388...failed.
Failed, response timed out.
Now sending 702662...failed.
Failed, response timed out.
Now sending 703936...failed.

###Unit 1 (Rx)###

Got payload 691617...Sent response.
Got payload 696530...Sent response.

Good point Andy! While I knew that, I totally didn't think of it. Reminds me of the days of 2.4GHz cordless phones that would disrupt the Wifi in the office... lol.

Hey Guys. I bought some nRF24L01 boards to go along with the Microduino boards I picked up but couldn’t get 2 of them working with the example code that I tried. The Microduino’s were short on instructions and support so I stopped there. http://hobbycomponents.com/index.php/dvbd/microduino/microduino-nrf24-wireless-transceiver-module-arduino-compatible.html

But I am interested in these cheaper type of 2.4ghz radios.

It seems like alot of the nRF24L01’s are hard to get working based on what I saw when I was looking into them.

Zigbee seems to be popular but expensive. Anybody tried them?

And what do you guys think about these RF Chips? RF Digital

RWB, RF Digital made the RFDuino bluetooth kickstarter campaign and I got a couple. Nice product but support has been a bit weird. The RFDuino is a custom programmed version of their RFD22301 module. I can say however that the RFDuino is solid.

I haven’t had any time to hack in the past few weeks. Too much of that cursed white stuff falling from the sky…

I’m just wondering if there is a good off the shelf RF radio that is reliable and not to much work to get going like the Xbee radios but cheaper than Xbee.

It seems like the Spark Core could be the main net connected hub with a RF receiver and then you could have many other RF radios attached to sensors that would feed data back to the Spark Core kinda like a wireless home security system.

I like the price of the nRF24 radios but who sells the highest quality breakouts that seem to have a happy user base? I don’t mind paying alittle extra for the better stuff if it means less headache or a easier setup process.

RWB, the zigbee uses UART communications and is most likely the most supported wireless module. The basic ones are simple to use. However, the advanced modules, which can do mesh networking, are more complicated to work with. I was seriously thinking of using them but they are NOT cheap.

I bought a bunch of nRF24L01+ modules from China and I expect to use them as low cost, low power sensor nodes using an arduino. So obviously, getting them to work with the Spark would be good but not absolutely necessary as I have a couple of DigiX boards (Arduino Due compatible) that have both nRF24L01+ and WiFi onboard.

Thanks for the info.

If the NRF24 is a good module when build correctly then maybe we can get somebody to make some Spark Core specific breakout boards. I bet there would be quite a few people interested in them. We could build them from the ground up to get superior results. I’m not the man for that job but I am the person who would buy them LOL

I’m interested in wireless range performance of this chip with and without external antennas. If Xbee kicks their ass then I guess thats the brand to go with and the higher cost that comes with them is somewhat justified.

Ok @BDub, I get you. I’m running two arduino micro with those same boards while 10 feet apart in a room where I have a Fonera 2.0 WiFi router (2 antennas, powerful enough to have a weak signal at 100ft behind three concrete walls) placed practically between the two and I get a non totally stable connection, but definitely a lot more stable than what you are experiencing.

The only difference I can see is the capacitor size: I’m using a 1uF electrolytic cap and I never used one of that capacity with these boards, but I don’t see a straightforward reason why the cap you used shouldn’t play nicely. You might want to give a try to a different cap size and, just to exclude the possibility, check the capacitors are not failing.

I’m supposing you are using the maniacbug’s library and the pingpair example as software implementation: would you mind pasting here the output from the printDetails function?

@RWB I suggest to open a new thread in a different category to discuss generic 2.4GHz or generic radio comm :wink:

I’m sitting on one end of my house about 50 ft from the router in the basement. No Spark Cores are currently on when running these nrf24L01+ tests. This end of the house the Wifi is pretty weak, sometimes the Spark Cores don’t like to connect to the WLAN so I just use my Wifi hotspot on my phone, which I just checked was off.

The caps are good. I looked at 3.3V on both units with my scope… and there are NO positive or negative spikes so that cap is holding up the rail nice and strong when the radio transmits.

Both units have the exact same printDetails response:

RF24/examples/GettingStarted/
ROLE: Pong back
*** PRESS 'T' to begin transmitting to the other node
STATUS           = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1     = 0xe7e7e7e7e7 0xf0f0f0f0d2
RX_ADDR_P2-5     = 0xc3 0xc4 0xc5 0xc6
TX_ADDR          = 0xe7e7e7e7e7
RX_PW_P0-6       = 0x00 0x20 0x00 0x00 0x00 0x00
EN_AA            = 0x3f
EN_RXADDR        = 0x03
RF_CH            = 0x4c
RF_SETUP         = 0x07
CONFIG           = 0x0f
DYNPD/FEATURE    = 0x00 0x00
Data Rate        = 1MBPS
Model            = nRF24L01+
CRC Length       = 16 bits
PA Power         = PA_HIGH

I might just have to get some more of these radios and see if that solves the problem.

I'm looking for some of the highest quality NRF24+ boards we can get for best results. If you find something that looks good let me know and ill buy them and have them shipped to ya so you can test it all out.

Something like this nrf24+ with amp

I’ve been looking around, I think SparkFun might be the best but too expensive: https://www.sparkfun.com/products/691 Might as well go with Zigbee at that price.

So I was just inspecting the solder joints on the nordic chip on both of my boards, and one looks great… and the other one I see a lot of gold on the pins still. I figured the GREAT one was Unit 2 (the on that receives well), but it turns out that it was Unit 1… so apparently that was a dead end.

So I had them both running, Unit 2 Rx well, but Unit 1 not Rx’ing well… and I did a hot swap (removed both units from their sockets, and swapped them). When they started talking again, they were both Rx well! I switched their roles and they were still both Rx’ing well!

Maybe just a lose connection or bad solder joint… I’m not willing to touch them at the moment while they are working.

While they are working well I thought I would test what happens by introducing a strong Wifi signal between them! I turned on my cellphone’s Wifi hotspot and a spark core, and put the phone directly between the two radios at various distances. I didn’t see ANY glitches in the ping/pong traffic.

So now the question is, why is it working… before the problem tracked WITH the radios as I swapped them between boards. I checked my wiring and it’s all very good… the sockets for the modules are nice and tight on all pins.

So then I turned off power to Unit 1, and rebooted it… not even touching Unit 2. and it was not working at all, even Unit 2 wouldn’t Rx. So I rebooted them both and it was back to a flaky system (only Unit 2 Rx’ing well). Hot swapping and wiggling the pins this time did nothing. Wifi was back in an OFF state.

I think I’ll try reflowing the pins of Unit 2’s nordic chip just to see what that does. Worst that could happen is I break it! lol.

Imgur

Imgur

Imgur

Imgur

The other Unit 1 has no visible gold/copper color on the pins.

Seems like the nRF24 is pretty unreliable, like ya never know if the boards you get are going to have issues like your having or not. I can see that being pretty frustrating for people who are not near as skilled as your are at all this.

I wonder if the issues have to do with cheap board manufacturing or just the chip not being very good?

I just reflowed and resoldered the Unit 2’s nordic chip. All pins look connected now. Still working but same response as before… Unit 2 receives ok, but does not see to transmit well.

Did the hot swap again, and then after re-initializing each unit by switching it’s role from Tx to Rx to Tx, or Rx. to Tx to Rx… they started talking again very nicely. After this I decided to see what happens when I just turn off power to Unit 2 which was Rx’ing, and reboot it and get it back into Rx mode. After I did this both units were erroring out and would not communicate to each other… no matter how much I switched them back and fourth between Tx and Rx. Once I also rebooted Unit 1 and put it into Tx mode… it was now sending something that Unit 2 was Rx’ing every time… but Unit 1 now does not like to Rx the acknowledgement of Unit 2 every time. Keep in mind I have no physically touched these two units after hotswapping them.

I’m thinking there could be a weird case where they just don’t get initialized properly??? Bah.

I’m going to try some different examples and/or the mirf library.

A few people left feedback and code in the customer reviews on Amazon for this chip that may or may not be helpful: Amazon Reviews

I really don’t see how this is worth someone’s time to sell 2 of these for 99 cents free shipping from China. http://www.ebay.com/itm/2PCS-NRF24L01-SI24R01-2-4G-Antenna-Wireless-Module-Compatible-/371008083562?pt=LH_DefaultDomain_0&hash=item5661ce166a

What about adding another switch: when you press the P char you can get a printDetails output and see what's the nRF24 registers status... Do you have any other MC for quick check and exclude the possibility of any involvment?
Your case is very weird to me: I've been using nRF24 boards for six months now, I can't call myself a total expert, but I haven't seen anything like that before.