RF433 signal reception and processing problem

Hi! I created a small project - radio control machine, based on the RC-Switch lib. The main idea is that I have several radio-controlled cars and each car has its own remote control (in the code of each car it is written what values ​​the receiver should respond to). But when debugging, I found some error - if you simultaneously press the buttons on two remote controls - the cars do not go and the receiver cannot receive the signal, but if you press these buttons with a difference of half a second - the cars move.
I analyzed the signal receiving code and I think I found the problem.

#include <RCSwitch.h> //RF receive lib
#include <Arduino.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(1);  // receiver must be connected to digital pin 3 (enable RF receiver)
}

void loop() {
  if (mySwitch.available()) { //if there is any data in buffer
    unsigned long start;
    start = mySwitch.getReceivedValue();
    Serial.print("start:");
    Serial.println(start);
  }
  mySwitch.resetAvailable();
}

If you press the buttons simultaneously on two remotes, there will be no output in the serial monitor.
After, I deleted clear buffer func - mySwitch.resetAvailable(); and put instead delay(20); there is an output in the port monitor - but it is not correct, instead of standard key codes, each time I received a new value.

So, I came to the conclusion that when two signals hit the receiver at the same time, the Arduino does not have time to process the first of them, and while clearing the buffer, the second signal gets to the receiver, so there is no output in the port monitor.
If you have any ideas how to solve this problem, I will be very glad to help, thanks in advance!

Your main idea is flawed! Any receiver of any type cannot receive two signals on the same frequency without each signal becoming garbage.

1 Like

CDMA receivers can receive two signals on the same frequency simultaneously. A mobile can under the right circumstances, conduct a call on two cell towers simultaneously using this ability. It can do this if it can't locate a single base that has a sufficient signal strength.

But using the equipment mentioned in this thread, yes, there is no way.

1 Like

I had to Google this and found: "CDMA optimizes the use of available bandwidth as it transmits over the entire frequency range and does not limit the user's frequency range. .

So, it only works over a broad frequency spectrum with specially coding of the data stream. Much like that amateur radio digital FT8 and FT4 where coding and multiple repeats allow hundreds of signals in a very narrow frequency band. Definitely beyond Arduino capability.

Yes. The remotes are available for 315(?) MHz as well as 433, so maybe the OP could use two frequencies...

1 Like

Yes, much depends on which ITU region the OP is in. The local ISM band is usually large enough to use several frequencies with narrow band filters to make it operate. But not for the normal hobby operation.

1 Like

So, I can't normally use several machines at the same time? Intermittently, they will interfere with each other?

Correct!

1 Like

@Paul_KD7HB @anon57585045 thank you for helping.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.