Hello! About the "limitation" of the nrf24l01 module listen up to 6 modules at the same time, I've read somewhere (guess it was in this forum) it can listen as many transmitters as it's possible as long as there are no more than 6 transmitting data at the exact same time. Is this info accurate?
In my project there will be up to 40 transmitters (Arduino RF-Nano) sending data to 1 receiver (Arduino Uno with nrf24l01 PA/RA module). Basically each operator (person) will have a Rf-Nano + push button. Every time they press their push button, rf-nano will send a simple data containing it's ID to the receiver. The receiver will write on serial port the id of the transmitter and there will be an app processing and doing stuff with this. Since I doubt there'll be 6 people pressing the button at the same time, I wonder if I can do this with basic 2-way code or if I'm gonna need Network Library code. Thanks!
You can set the nrfl to send a response back to the transmitter to show it has received its signal. There is still the issue that if two send at the same time they might clash and the receiver see nothing from either transmitter .
You are limited by the number of pipes .
Nothing to stop you have multiple receivers working on different channels ( frequencies ).
See the examples in the library .
Not quite. My understanding is that an nRF24L01 can listen for messages from 100's of other nRF24L01 modules, all on the same pipe. The point to note is that there is only 1 receiver inside the chip. It can only handle 1 message at a time.
If 2 nRF24L01 modules transmit at the same time, then the receiver will likely receive garbled data and won't be able to decode the received packet.
With multiple remote transmitters, you could wait for an ack from the receiver. If you don't get one, then wait a short period of time and retry. The short period of time could be a random time interval for example.
In your project, is it important to know precisely when a person presses their button, or just the fact that they have pressed their button?
I think you need to look at Master / Slave type topography.
The Master calls each slave in turn, requesting its status (Button pushed or not), when a slave has sent its data, the master then sends back a RESET command to that slave to clear the button press.
Its called polling.
It sounds like you are making an audience response system.
Can you tell us the application?
Can you please tell us your electronics, programming, arduino, hardware experience?
Iis the func radio.write() == true enough to know whether the rx has received it or not?
It's a project to control the production time of my company. The operator (employee) will press a button every time his/her step is completed. I wish to achieve mainly two things:
1 Status of an order, % complete
2 Individual production of employees
@markd833 yes, it's important to know when the button was pressed. The receiver's app will be listening the serial port to know when new data has arrived and process it. The transmitter only need to send it's ID and the receiver is expected to process it the same time it's arrived.
@TomGeorge I have programming as hobby for a long time. I run my family's company (textile segment) and I'm graduated in Information Systems, so I try to combine the two things sometimes. I started to learn electronics last year and arduino this year. When it comes to Arduino I think I've learned quite a lot this year. My first attempts were with simple 433Mhz rx/tx but I didn't find the data transmission reliable (probably I did something wrong since I'm a newbie). Looking for some wifi solution I found out about the nRF24L01 module. Bought one... bought another one with antenna... and bought the rf-nano solution which I think is the best cost benefit for me. My tests until now are fine but I only tested with 1 receiver and 1 transmitter. Now I'm trying to predict what problems I can come across when I buy all the transmitters and try to set them up.
That's a slightly different answer to my question. In your project, would it be acceptable to know when the button was pressed if there was a delay of maybe 4 or 5 seconds between the operator pressing the button and the message being received? Or do you need to know within, say, 500mS of the button being pressed?
Yes. If the data doesn't arrive the couting will fail. Also there'll be a gap in the employee's production time counting.
If every button press delays the same time then it's ok. I'll try to exemplify:
ACCEPTABLE SCENARIO:
13:20:11 - button pressed
13:20:13 - received data (2s to receive)
13:20:41 - button pressed (same employee)
13:20:43 - received data (2s to receive)
Info I got from this scenario: 2 items from order X were produced, average time for that emplyee is 30s
NOT ACCEPTABLE SCENARIO:
13:20:11 - button pressed
13:20:14 - received data (3s to receive)
13:20:41 - button pressed (same employee)
13:20:42 - received data (1s to receive)
Average time for that emplyee in this scenario isn't reliable
Yes. If data doesn't arrive properly the item counting will fail. Also there'll be a gap couting the average production time of the employees.
If the button press delays the same time every time, it's acceptable. I'll try to exemplify:
ACCEPTABLE SCENARIO:
15:20:11 - button pressed
15:20:13 - data received (2s to receive)
15:20:41 - button pressed (same employee)
15:20:43 - data received (2s to receive)
Info I got from this scenario: two items produced in order X, average time for that employee is 30s
NOT ACCEPTABLE SCENARIO:
15:20:11 - button pressed
15:20:15 - data received (4s to receive)
15:20:41 - button pressed (same employee)
15:20:42 - data received (2s to receive)
Sorry if I wasn't clear enough. By the way I accept suggetions if there's any module/hardware for arduino more reliable than the nrf24l01 for my project.
You can detect failed transmits if you use ShockBurst/AutoAck
(which includes up to 15 retries), and you can retry with your software until you succeed.
Failures due to range/obstruction can not be solved by retries,
but that would be true for any wireless communication.
Collisions are rather rare, because the NRF only sends when the medium is idle,
so it won't disturb ongoing transmissions.
Perhaps you may need an RTC on each sender that is synchronised with the master. That way each sender could transmit the actual time of the button press. Any delay due to transmission could then be excluded.