Hi All.
I'm currently in the process of learning how to use the wireless modules for the Arduino.
I'm using the RF24 library, and have figured out the basics with their classes documentation at http://tmrh20.github.io/RF24/classRF24.html
I'm learning this as part of a long term project to build a remote control sub - the idea being to directly control it while it's on the surface, and to send a series of commands for it to follow while it's underwater. (Sink for 30 seconds, go forward for a minute at full power, rise for 45 seconds, etc)
All that is more or less background information though. What I really need are some recommendations on what settings to use in order to maximize the chances of packets getting through.
Some things are obvious, like setting the amount of retries to the maximum (15), but how about the rest?
Does a longer array make it more likely the packet will fail? (I'm currently sending an array of 10 ints)
Does the PALevel affect it (and also, what does it even do?)
How about the data rate?
Is there anything else I could do to increase reliability?
edit
I won't need it to go beyond 3 meters of water at the most, as I live in a desert, and can only use it in swimming pools or water holes. I imagine I'd mostly be using it for a 'emergency blow / surface' override.
DesertPhoenix: edit
I won't need it to go beyond 3 meters of water at the most, as I live in a desert, and can only use it in swimming pools or water holes. I imagine I'd mostly be using it for a 'emergency blow / surface' override.
If that means that you want to send a wireless signal through water then it won't work at all. 2.4GHz wireless will just heat water - that's how a microwave oven works.
The US Navy used (uses?) ultra low frequency wireless to send signals to submerged submarines. I doubt if that is in any way practical for amateurs.
Separately, if your nRF24 wireless system is using autoAcknowledge and if the Tx gets an acknowledgement you can be sure that the data has been received correctly. If it does not get an ACK then your program can try sending the message again.
In my RC programs I get my Tx to send at regular intervals even if the data has not changed and that way the Rx can tell if there is a comms failure. Obviously, in your case, the Rx should not expect radio signals while submerged.
Over a 30m range I doubt if you will have any comms problems between a pair of low-power nRF24 transceivers (the ones with the PCB antenna) but you could use a high power version (with external antenna) for the Tx for extra reassurance.
A common cause of unreliability is an inadequate 3.3v power supply for the nRF24 - the 3.3v pin on some Arduinos and clones is not adequate. A pair of AA alkaline cells (3v) works well. Make sure the GND for a separate power supply is connected to the Arduino GND.
Radio control enthusiasts report being able to control submarines under a few cm of fresh water, using relatively low frequency (27 to 72 MHz) radios, but don't expect even that with GHz radios like the NRF24.
I added the following commands and tested today. Data rate is self explanatory, but the Power Amplifier Level at max is 0dBm. That doesn't mean much to me, but may be useful to someone.
You may not be surprised to find that after about 5cm deep, it stopped successfully transmitting. Salt water pool, if you're interested.
Tested in a plastic bottle, as the aluminium can I was using blocked most transmissions, even without water.
I'll test how far I can get in a straight line later on - using most reliable and least reliable (most power friendly?) settings, and will post results.
For reference, I'm using a Chinese, off-brand module, with antenna.
Edit
I would mark this as resolved / answered, but I'm not sure how.
Thanks for the advanced trouble-shooting, Robin2. Some of it I was sort of thinking of implementing already, like the ack payload, and others, like a high powered antenna and problems with the power supply, I didn't even know were possible / available.
Apologies for resurrecting a dead thread, but I did say I'd post results after testing the range. My testing wasn't exactly comprehensive though.
Tested at default settings. First started experiencing the occasional transmission failure at approximately 50 metres, and was still going strong when I finally stopped and turned back, at around 200 or 300 metres.
I found having both antenna parallel to each other gave the best reception. Pointing the receiver directly at the sender reduced reliability to about 50%, whereas, even at the maximum distance I tested at, it was otherwise about 95%.
I vaguely recall the ebay add saying they had a range of about a km. had trouble believing it before, but now I wouldn't be surprised if it goes beyond that, under ideal circumstances.
All other things being equal, a 434Mhz radio will cover 6 times the distance of a 2.4Ghz device, due to the lower free space loss.
If the remote control is just simple commands to be sent underwater, then a LoRa device at 434Mhz might be worth a go. If the range of a RF24 of 1km at surprises you, then there are LoRa devices out there (1Watt output when legal) that should cover LOS at around 9,000km at 300bps, which is plenty for simple commands. With that sort of capability, a LoRa device might just go far enough under water to be worth a try.
If you wanted to stick to 2.4Ghz, there are long range LoRa devices too, with quite an impressive performance, given the limited power of 12dBm, see here for some tests;