Go Down

Topic: Practical uses of nRF24L01 wireless modules? (Read 1 time) previous topic - next topic

Willpatel_Kendmirez

Jan 04, 2019, 09:28 am Last Edit: Jan 04, 2019, 10:07 am by Willpatel_Kendmirez Reason: typo
I just bought a few nRF24L01 modules, although I have no project in mind. I used Library Manager to install the RF24 library of TMRh20 and tested them with the GettingStarted example that came with the library. (For those who've not seen that, all it does is get micros() on ArduinoA, sends it to ArduinoB for an echo back, gets a new micros() on ArduinoA and reports the trip time. Nothing fancy, but proves it works.)

Next step is to add code at each end to (say) generate a random number on ArduinoA (or read a pot) and send that to ArduinoB to be the interval of a blink or speed of a motor, or something. (Random number and blink will be dead easy, don't even need to hook up any gear.)

So I'm curious to know what anyone does with these things in real life? (Talking of, what's a practical distance to work over, both outdoors and indoors with a few brick walls?)


wvmarle

They're used for all kinds of wireless communication.
Possibly most commonly to send sensor data across.
Typical range: about the same as WiFi (same frequency).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Willpatel_Kendmirez

#2
Jan 04, 2019, 09:56 am Last Edit: Jan 04, 2019, 09:59 am by Willpatel_Kendmirez
Possibly most commonly to send sensor data across.
Yeah but I meant what kind of actual data? I could imagine weather sensors out in the fields sending wind speed etc back to the barn...

Typical range: about the same as WiFi (same frequency).
Is it possible to attach some numbers? (Not that it matters since right now they're about 50cm apart; in fact I'm more concerned about them being too close ;) )

Robin2

#3
Jan 04, 2019, 10:12 am Last Edit: Jan 04, 2019, 10:14 am by Robin2
I use them for radio control for model trains. I have made some units for my model railway club that take the place of wired controllers so folk aren't tripping over the wires. And I have some installed in my own trains for battery powered radio control.

I have tested a pair of the low power nRF24 modules (with PCB antenna) at a range of 110metres outdoors with clear line of sight. I suspect they would have worked at a longer range but I could not see any farther - badly designed experiment :)

I have not used the high power devices (with external antenna) but they should have a much longer range. AFAIK they (or their Cypress equivalents) are what is used in off-the-shelf model aircraft RC equipment.

2.4GHz wireless is much more easily affected by obstacles than lower frequencies. Wet leaves (on plants) are a major problem.

...R
Simple nRF24L01+ Tutorial
Two or three hours spent thinking and reading documentation solves most programming problems.

Willpatel_Kendmirez

I use them for radio control for model trains.  And I have some installed in my own trains for battery powered radio control.
Excellent. Presumably with a pretty small Arduino like a nano or perhaps a processor chip on a purpose-made pcb?

I have tested a pair of the low power nRF24 modules (with PCB antenna) at a range of 110metres outdoors
I had no idea they could talk so far, interesting. I'll see if I can get on to the local school.

Simple nRF24L01+ Tutorial
I have that bookmarked already, thanks. In fact I used your wiring diagram. Just thought I'd use the library's getting started first time round.

On that though @Robin2, the library (from TMRh20, v1.3.1 as installed via Library Manager), examples only include RF24.h, while you include RF24L01.h as well. What's that about?






Robin2

#5
Jan 04, 2019, 11:17 am Last Edit: Jan 04, 2019, 11:20 am by Robin2
Excellent. Presumably with a pretty small Arduino like a nano or perhaps a processor chip on a purpose-made pcb?
I use an Attiny 1634. I don't have space for a PCB. :)




Quote
On that though @Robin2, the library (from TMRh20, v1.3.1 as installed via Library Manager), examples only include RF24.h, while you include RF24L01.h as well. What's that about?
I don't know. I have never used the Library Manager.

Do my examples work for you?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Willpatel_Kendmirez

Thanks for reply.

I use an Attiny 1634.
So is that the ATtiny soldered on an nRF24?

Do my examples work for you?
Next step is to try those.


Robin2

So is that the ATtiny soldered on an nRF24?
I fixed it upside-down on the nRF24 with a double-sided sticky-pad.

I use the nRF24 pins for connecting to my programmer when necessary. One of the wires sticking out the back is the reset connection for programming. They are held on with a blob of epoxy.

In a more recent version I have used lacquered wire (as used in a transformer or electric motor) as it is smaller and easier to work with - apart from the tedium of removing the lacquer at the ends for soldering.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Willpatel_Kendmirez

I fixed it upside-down on the nRF24 with a double-sided sticky-pad.
Tres cunning

I use the nRF24 pins for connecting
Talking of which, I see the nRF24 is another example of non-breadboard-friendly pins


Paul__B

Talking of which, I see the nRF24 is another example of non-breadboard-friendly pins
Because use in breadboards by Arduino experimenters is a ridiculously trivial part of their usage.

Just get some adaptors.


I think the functionality of these is used with, or incorporated into all of the current range of 2.4 GHz RC toys (and such) which require you to "sync" both the controller and the model so that the pilot LEDs stop flashing, so they obviously have the bi-directional connectivity.

Looking into the RC flipping car that my granddaughter is presently using, I notice everything - Wireless transceiver and motor drivers - is in just one single chip!

Willpatel_Kendmirez

Because use in breadboards by Arduino experimenters is a ridiculously trivial part of their usage.
I daresay that's true: I'm jut annoyed that my local supplier catalogues them as DIP. I have since disabused them of the idea that just because the pins are in dual lines, doesn't make it DIP.

Just get some adaptors.
Good idea, thanks.




Robin2

Dupont cables are an easy way to connect the nR24 modules

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Willpatel_Kendmirez

Dupont cables are an easy way to connect the nR24 modules
Yep that's what I did actually. (Well, generic Dupont "style")


Robin2

(Well, generic Dupont "style")
That is indeed what I meant :)

I have a few nRF24s with a 5-strand piece of Dupont cable connected using the same colours in each. I have arranged the connections so they just plug into an Uno on pins 9 to 13. Makes it easy to use the Uno for other things and then quickly connect the nRF24 when needed.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Paul__B


Go Up