NRF24 writing pipes

Hi everyone,

I've been using the NRF24L01 with great success but I just recently found a minor issue. So far I have been using different channels to differentiate between signals but I haven't bothered to change the writing pipe. Please see below for example of how the channel and pipes are set.

radio.openWritingPipe(0xA8E4F0F0A2BD);

radio.setChannel(12);

So I've been just changing the channel number and I've found no problems until recently I had my project sitting on top of a speaker and I found that the channels started to interfere with each other. For example when it was meant to be listening to channel 15 it was also picking up channel 12. Then as soon as I took the speaker away it stopped happening. After repeated retesting I definitively confirmed that the speaker was causing the issue.

However I found that by changing the writing pipe as well as the channel number, this solved the issue and now my project can sit on top of the same speaker without any such issues.

My question is as follows. Can I just change a single number or letter in the writing pipe to avoid this ambiguity between channels. Like changing "0xA8E4F0F0A2BD" to "0xB8E4F0F0A2BD". Or would it be better to change it up more by replacing more characters. I ask because it will save me a lot of time if I can get away with changing just one character since it's a rather large code.

Mauriciojosearcadio: However I found that by changing the writing pipe as well as the channel number,

What you are changing is the address, not the pipe. There is only one writing pipe.

Changing the channel changes the wireless frequency and may move the transmission away from a frequency that is suffering interference. Perhaps the speakers use Bluetooth which also uses the 2.4GHz frequency band.

The address is 5 bytes - in your example there are 6 bytes A8 E4 F0 F0 A2 BD so I suspect only the first one A8 is being ignored.

I am surprised that you need to change the address to combat the interference - it suggests that the quality of reception is still marginal on the new channel. Try another channel - perhaps in the 70s

If you look at this Simple nRF24L01+ Tutorial you will see that I express the addresses in a much simpler format.

...R

Thanks for that knowledge. I have actually been avoiding channels above 60 because I found that they can't send a long with 10 digits. They can only send 9 digits. Is this normal?

However I've found that all of the channels I've tried that are below 60 work fine sending 10 digits at a time. Note that I'm using the RF24 library by Maniacbug.

I had a look at the tutorial. When you define the address as follows,

const byte slaveAddress[5] = {'R','x','A','A','A'};

Can you use any letter of the alphabet both lower and upper case?

Mauriciojosearcadio:
I had a look at the tutorial. When you define the address as follows,

const byte slaveAddress[5] = {‘R’,‘x’,‘A’,‘A’,‘A’};

Can you use any letter of the alphabet both lower and upper case?

Yes. In fact you can use any byte value from 1 to 254. I believe it does not work so well with 0 and 255 because all the bits are LOW or HIGH.

However I find it much easier to stick to letters of the alphabet.

…R

Okay that's great advice. It's sure to save me lots of time finishing off my project now that I can define the addresses with custom names.

I've got this other issue that maybe you can give me advice on. See I've been long battling an issue with the NRF24 unit where it will stop sending and/or receiving after a few days of operation. Sometimes after a few hours.

After doing some research I found that the most likely problem is a power issue. I followed the advice to solder a 10uF and 0.1uF cap directly to the nrf24 unit and it didn't help at all. After experimenting I found that using a 1000uF capacitor did the trick. Now it runs for months without any issues and I believe it could run for years if I could test it for that long. The project has just been running 8 mains powered devices using solid state relays.

However now that I'm trying to run some 12V peristaltic pumps I'm seeing exactly the same issues again even with the 1000uF capacitor. Note that I'm running the 12V pump motors using an H-bridge motor controller and I ramp the voltage up and down slowly to switch the pumps on and off in order to minimize EMI. I found that without doing this it immediately freezes not only the NRF24 but also the arduino and it can leave the pumps running indefinitely. I also have diodes soldered to each motor to remove back EMF.

I've also tried using the NRF24 base module breakout board instead of the 1000uF capacitor. I've heard this is meant to be the best solution to the power issues but the NRF24 still stops sending/receiving after a few days when running the peristaltic pumps.

Another thing I've had to add is shielding around the motors. I'm just using aluminum foil wrapped in duct tape. This was mainly to protect the arduino since it sits closer to the motors and I found that the arduino would sometimes freeze without the shielding. This same shielding also provides some protection to the NRF24 unit.

My hope is that the system just needs thicker shielding. However I'd love to hear any other possibilities for what could be causing the issue. That way I can throw more at the problem.

Mauriciojosearcadio: However now that I'm trying to run some 12V peristaltic pumps I'm seeing exactly the same issues again

You need to make a simple pencil drawing showing clearly how everything is connected and post a photo of the drawing.

It may be a good idea to power the nRF24 from a dedicated 3.3v power supply - perhaps using an LD1117 voltage regulator.

...R

A simple drawing would be impossible there bud. There's hundreds of wires in total so it would just be a complete mess. I would suggest to look up any diagram of how the Mega connects to an NRF24 and that's how I've connected it. Here's a link. https://www.google.com.au/search?q=nrf24+to+arduino+mega&source=lnms&tbm=isch&sa=X&ved=0ahUKEwj-tbr9hOrXAhWLXbwKHePhD5MQ_AUICigB&biw=1536&bih=759#imgrc=qMuei-TEb-W8YM:

Cheers for the tip on using a separate 3.3V power supply but I've tried that and it didn't work. Although I haven't specifically tried using an L1117 so I'll try that just in case.

Also I should mention I'm powering the Arduino with a 12V 2amp supply plus as mentioned I soldered a 1000uF capacitor directly to the NRF24 unlike in the diagram.

Mauriciojosearcadio: There's hundreds of wires in total so it would just be a complete mess.

I suspect that you have just put your finger on the problem.

[quote[I would suggest to look up any diagram of how the Mega connects to an NRF24 and that's how I've connected it. Here's a link.[/quote] I know how it should be done. I have done it myself. The purpose of my request for the drawing is to see how you have done everything so we can see what might be causing the interference.

Also I should mention I'm powering the Arduino with a 12V 2amp supply plus as mentioned I soldered a 1000uF capacitor directly to the NRF24 unlike in the diagram.

What else is drawing power from that supply. or connected in some way to that power supply? - hence the need for the drawing.

...R