wifi or not wifi

Having built my temperature/wifi module, (esp8266 access point - Networking, Protocols, and Devices - Arduino Forum) which works OKish, I'm disappointed in its range. I've had a look at the nRF 24L01 , and have a few to play with. I'm thinking that I can decrease the transmission rate, and increase the range significantly. https://lastminuteengineers.com/nrf24l01-arduino-wireless-communication/ Although the figures quoted are generally ood, line of sight, I think It may give better results for ood to in-doors, cf. the esp8266/wifi. Also, I've a bit more experience with earlier wireless units (from lprs) and the pic micro (am I allowed to mention pic here?) and had fun bit banging. The question, I suppose, is will I get better range, e.g for temp sensor in greenhouse, maybe 25 meters from pc/wifi hub, using the wireless modules, compared to using the wifi modules? I'm thinking the final hop could be by wifi if needed to get data by something other than my desktop PC.

It depends. I tried this with wifi at my Dad's house and was stymied by the number of brick walls between his greenhouse and his router. At my wood and sheetrock house, it works just fine. Then too, at his place, you can detect ten or more neighbour's wireless routers. I usually see two or three.

I tried regular x-bee and then x-bee pros. Even then I was going to have to put a couple of x-bee router nodes in the mix to get data to his server and x-bee is expensive.

LoRa seems to be a popular choice these days, though over a distance of 25m, it's probably overkill.

You don't need rapid or frequent transmission of that kind of data, so I'd drop the baud rate way down and experiment with your radios.

Thanks for your encouraging reply. I think I'll make up a couple of units, based on the nano and crib the sketches from the lastminuteengineers article. afaik, the nano can provide enough 3.3V power for the nRF chip. I can then take the transmitter out to the location, test the reception, before going into more detailed programming.

Nano could provide 150mA at 3.3V, may not be enough for the nRf chip. I would bet not as many folks add a big cap to the nrf chip to provide the boost of current the chip needs at turn on, or start of transmission.

From several other Threads on the Forum it seems that a nano cannot power an nRF24 from its 3.3v pin. You can test this by powering the nRF24 with a pair of AA alkaline cells (3v) with the battery GND connected to the Arduino GND.

nRF24s use the same 2.4GHz frequency as WiFi so it seems unlikely that they would be significantly better than WiFi in the same location.

Lower frequency wireless penetrates obstacles better. There have been several Threads recounting good experience with HC12 433MHz modules

...R

What about some FSK module, like RFM69? Less range than LoRa, but higher data rate.

Thanks for your replies. My thoughts are now, since apparently, the nRFL01 has maximum current requirement of 13.5mA that if the Nano can't supply that, then it will be easy to get the 3V from the 4.5V AA battery pack that I use to power the Nano (however that will not be a long term solution, since it will lead to the cells discharging at different rates, and that is wasteful). I'll let you know how it goes. I've also got some little pcb's that do the voltage step-down/interfacing, but hoping they aren't needed.

I'm awaiting delivery today of another Uno, which I prefer for prototyping since easy to connect jumper leads, so hopefully in a day or two, I'll have some answers wrt range.

raymw:
then it will be easy to get the 3V from the 4.5V AA battery pack that I use to power the Nano (however that will not be a long term solution, since it will lead to the cells discharging at different rates, and that is wasteful).

Three longer term options suggest themselves.

  • Use a separate pack with 2 x AA cells to power the nRF24
  • Use an LD1117 / LD33 voltage regulator to drop from 4.5v to 3.3v
  • Use an 8MHz Arduino that can run from 3v so both it and the nRF24 can work directly off the same battery.

...R

The second UNO arrived, and I built both the rx and tx examples to test the range (example from https://lastminuteengineers.com/nrf24l01-arduino-wireless-communication). It seemed about the same as the wifi units. I then built Robins example (had to change the wiring a bit, or the code) - Simple nRF24L01+ 2.4GHz transceiver demo - Exhibition / Gallery - Arduino Forum, since the code was more useful (I was stuck before on chars/strings, etc.) and there is the option of adding tx's. It almost has the range that I need as is, but can I increase the power? I think there are some settings, to set it to 0dBm, but where? I never seem to find the documentation I want.

The Uno and nRF24 takes about 0.04A at 5V so it appears AA cells will do for a while, and I will derive the 3.3V from the Nano.

I've also added in radio.setPALevel(RF24_PA_MAX) but it has made little difference. I'll try it with separate power supply. Also added radio.setChannel(108); // 2.508 Ghz but still the range is not sufficient. I added an LED to the transmitter, to flash when acknowledge received, so I can walk around to find the limits. Probably need more powerful units with external aerials.

If you want better range for WIFI, choose a WIFI channel that is least used, and preferably nearer the middle of the band. There are WIFI scanners apps that tell you signal strength and channel for an android phone. (You mentioned many other SSIDs were observed. Other WIFI systems appear like noise to your WIFI system if they are on the same or adjacent channels). Secondly, use 2.4 GHz rather than 5 GHz if your WIFI shield and router have both. It penetrates building materials better.

You can also use high gain antennas on both ends, assuming you know how to connect to your devices. 11 element YAGI antennas can be found on eBay. You don’t need to increase the power, which might be illegal and impact neighbors. See this URL for maximum effective radiated power allowed by the F.C.C. In the U.S. FCC Rules and Regulations | AIR802 | 2.4 & 5 GHz Bands .

raymw:
The question, I suppose, is will I get better range, e.g for temp sensor in greenhouse, maybe 25 meters from pc/wifi hub, using the wireless modules, compared to using the wifi modules? I'm thinking the final hop could be by wifi if needed to get data by something other than my desktop PC.

Probably.

And there in lies a problem with predicting distances for RF comms, especially at higher frequencies.

The environment in and around buildings, the RF opacity of walls, size and location of windows etc can all have a significant effect.

As a general guide, if a device quotes a line of sight range, then the range you might expect in a urban style environment would be around 1/1000th the line of sight distance.

The only way you will really find out is to try it.

raymw:
I've also added in radio.setPALevel(RF24_PA_MAX) but it has made little difference.

I think PA_MAX is the default.

The orientation of the antennas (including the PCB antenna) relative to each other will have an effect.

...R

wildbill:
LoRa seems to be a popular choice these days, though over a distance of 25m, it's probably overkill.

LoRa is indeed capable of distances far longer than those sugegsted by the OP and whilst thjat might be considered overkill you can almost guarantee it would work, and at very low power levels that are battery friendly.

Thanks for the extra suggestions. I've been making a pcb to take the Nano, nRF module, caps, temp sensor, led, caps, etc. I find that is more reliable than walking around with a patchboard with cheap ebay connecting leads, which have sockets that are too tight to fit on the pins, and pins that are too small for the Uno sockets.
The nRF24L01 is the sort of price I'm happy with, and the breadboarded version seems to work reliably in most locations indoors, and close to the house when outside. I've reluctantly paid a few pounds more and bought a couple of versions like this 'MakerHawk 2pcs nRF24L01P+PA+LNA RF Wireless Transmission Module 2.4GHz ML01DP5 22dBm 100mW 2300M Measured Distance SPI Interface with Antenna' Just to see if I can get signals from the greenhouse.
If this fails, then I have a plan B (and a few more)

raymw:
MakerHawk 2pcs nRF24L01P+PA+LNA RF Wireless Transmission Module 2.4GHz ML01DP5 22dBm 100mW 2300M Measured Distance SPI Interface with Antenna' Just to see if I can get signals from the greenhouse.
If this fails, then I have a plan B (and a few more)

Do check the legality, in your part of the World, of using a 22dBm (which is 158mW) transmitter power. You may be limited to 10mW and excess power can interfere with others using the spectrum, WiFi users for instance.

This is one of the reasons LoRa is so popular, it can be used at very low powers, and thus legally, yet still cover many kilometres.

I live pretty much out in the sticks. I'm not too concerned with it operating neighbour's garage doors whatever. I'm more concerned about it triggering the USAF defences on their jets, that use my place as a way-point on the way to their practice bombing runs.

At my second attempt,I've managed to produce a few pcb's to connect the battery pack, Nano, nRF24L01, and a few inputs for sensors. The first batch I'd completely messed up the connections to the nRF modules - mistaking top view with bottom view, wire colours and everything else. Anyway, a few dry soldered joints later it works fine. I've tried running the nRF from a separate 3V battery supply, but I've not noticed any improvement compared to running it from the Nano 3.3V supply - I've put in a 10uF electrolitic cap near the nRF power pins, and I've not noticed a problem with that. Fwiw, for quick and dirty test, I've found that the Arduino plated through holes are good enough contact when pushed down on the to fit on the square pins without soldering, (pins soldered to pcb, enough sideways 'spring' to make contact with Arduino through holes) but obviously only for checking.