nRF2401 transmitter with multiple receivers

Hello,

I am trying to get a system working where one arduino is transmitting speeds over an nRF2401 transmitter to four arduinos being used to control a system of motors while these arduinos transmit encoder data back using ackpayload.

At this point, I'm still just trying to get four-way output to work with ack feedback. Communication works in both directions with three, but when I add a fourth pipe for it to switch to, it fails. The transmitter still receives the ack, but for the receiver, radio.available() returns false.

I'm avoiding using one receiver and four transmitters because I need those four to track encoders, and from what I understand, writing is blocking and would interfere with the encoder. I don't know if this is avoidable, or if writing the ack will create the same issue or not.

sketch_mar18a.ino (1010 Bytes)

sketch_mar09c.ino (691 Bytes)

The pair of programs in this link have been derived from a system that does what you want. In my case I am using the Arduino to control model trains.

I got my nRF24s working with this Tutorial

I suggest you use the TMRh20 version of the RF24 library - it solves some problems from the ManiacBug version

...R

Hi,
I'm working on a similar project with wireless motors control system.

I suggest you to avoid transmitting encoder data back to the main unit using ackpayload.

If you will send/read data with intervals, then it's OK with ACK, but if you will send/receive data continuously any lost packet will force the transmitter send same packet again and that could slow your system because will create a delay.

I had this problem and now I'm sending/receiving data using only 2 x transmitters and data structure , so all data is sent in one packet.

typedef struct 
{
 int         Motor1Angle;
 int         Motor2Angle;
 byte       Motor1Speed;
 byte       Motor2Speed;
} Payload1;
Payload1 theData;  // create transmission package 'theData'.

By the way, If you need longer range (~ 300m) I suggest you to check RFM69 433mHz or 915mHz modules.
There is a very good Arduino library from LowPowerLab: GitHub - LowPowerLab/RFM69: RFM69 library for RFM69W, RFM69HW, RFM69CW, RFM69HCW (semtech SX1231, SX1231H)