So a question came to my mind today.
We know the most used wifi frequency nowadays is 2.4 up to 2.5Ghz as
well we know the nRF23L01 works at the same frequency levels / channels.
I want to install some devices in my house that use nRF to transmit data and they use
Power Amplifier using the regular 2db antenna which the router use the same antenna
to transmit the wifi/Internet so... because I live in a area where there is lots of ppl
who use wifi around like over 15+ wifi connections only in my building will the
nRF affect the wifi speed ?
What I mean exactly If I use my wifi and put the nRF's on the same channels
as the wifi will they act as huge noise ?
This question came because I want to make my house automated and I want to use only nRF
wireless connection because it's secure and no one can hack it but again I don't want to cause
trouble for others jamming/ slowing the speed of mine or other ppl internet connection.
The nRF24 can operate anywhere from 2.4-2.525GHz, with a channel spacing of 1 MHz.
With the tmrh20 RF24 library you can call setChannel(108) to work at 2.508GHZ for example which is above most wifi traffic.
You can use the example here to see how much noise there is on each wifi channel so you can avoid it: https://arduino-info.wikispaces.com/Nrf24L01-Poor+Man's+2.4+GHz+Scanner
Some info about nRF24L01 Channels (Not the same as WiFi) here: This is about the parameters to use on nRF24L01 to set the channel:
radio.setChannel(108);
Which RF channel to communicate on, 0-124 Can operate on frequencies from 2.400GHz to 2.524GHz.
Programming resolution of channel frequency is 1Mhz
This is the same unlicensed band WiFi operates in (WiFi uses 2.400 to 2.500 gHz). Usually frequencies above channel 100 are best.
NOTE: In most countries the allowed frequencies are from 2.400GHz to 2.483.5GHz which you must not exceed. In USA it's best to use channels from 70 to 80.
You can scan the channels in your environment to find a channel that is clear... See this Scanner sketch.
Some info about nRF24L01 Channels (Not the same as WiFi)
But even if the nRF doesn't work the same as wifi it uses the same frequency
it could create a noise and slow down internet speed.
I know about :
radio.setChannel(108);
because I've been working with nRF's but I never done > :
Question:
It's possible to put a DIP switch and use as variable in the "" radio.setChannel(variable); ""
and use the DIP switch to switch to the channel I need ??
I know it's probably possible but never done that, is the radio.setChannel() allowing to put variables
instead of direct numbers ?
Yes, it's possible. Usually unnecessary though, load the scanner sketch and see where the wifi traffic is and avoid it. It won't noticeably affect your wifi.
It's possible to put a DIP switch and use as variable in the "" radio.setChannel(variable); ""
and use the DIP switch to switch to the channel I need ??
The nRF24L01 is complex and hundreds of bits are buried in internal registers. They do not come out to pins on the chip.
BUT you could do as you suggest if the Arduino reads the Dip switch and you write code to map that to the channel you want.
Then you can change the Dip switch and push reset on the Arduino to reinitialize the nRF24L01.