RF 433MHz receiver does not receive data

Hi, I want to test my RF 433MHz modules transmission by LEDs. This is the digram and code of the transmitter module:

//TRANSMITTER
#include <RH_ASK.h>
#ifdef RH_HAVE_HARDWARE_SPI
#include <SPI.h>  // Not actually used but needed to compile
#endif

RH_ASK driver(2000, 11, 12, 10, false);

void setup() {
#ifdef RH_HAVE_SERIAL
  Serial.begin(9600);  // Debugging only
#endif
  if (!driver.init()) {
#ifdef RH_HAVE_SERIAL
    Serial.println("init failed");
#else
    ;
#endif
  }
}

void loop() {
  char *msg = "TEST"; // Send a simple message
  driver.send((uint8_t *)msg, strlen(msg));
  driver.waitPacketSent();
  Serial.println("Sent TEST");
  delay(100); // Send every 0.1 second
}

And this is the receiver:

//RECEIVER
#include <RH_ASK.h>
#ifdef RH_HAVE_HARDWARE_SPI
#include <SPI.h>  // Not actually used but needed to compile
#endif

RH_ASK driver(2000, 11, 12, 10, false);

String str_out;

void setup() {
#ifdef RH_HAVE_SERIAL
  Serial.begin(9600);  // Debugging only
#endif
  if (!driver.init()) {
#ifdef RH_HAVE_SERIAL
    Serial.println("init failed");
#else
    ;
#endif
  }
}

void loop() {
  uint8_t buf[RH_ASK_MAX_MESSAGE_LEN];
  uint8_t buflen = sizeof(buf);

  if (driver.recv(buf, &buflen)) {
    Serial.println("Data received!");  // Add this line
    buf[buflen] = 0;
    str_out = String((char*)buf);
    Serial.print("Received data: ");  // Add this line
    Serial.println(str_out);          // Add this line
  } else {
  Serial.println("No data received"); // No data received
  }
}

The result is that the LEDs blink in sync which I assume the data has sent and received. However the serial monitor of the receiver says "No data received", which confuses me.
Does anyone know why and how to fix it?

Remove both LEDs from your circuit, Arduino pins can't be used to supply current for LED without series resistor. And especially it can't supply current to transmitter AND LED.
Neither can receiver.

Also, tx pin needs to be 12.

It must be a mistaken when I transfer my real-life circuit to digital diagram. My real-life tx pin actually connects to pin 12, so I have edited it.
About the LEDs, I use them to test whether the data has been sent and received. I will try providing the LEDs external sources and check the situation.

That's not the correct way.
Hopefully you haven't damaged transmitting arduino or the receiver module yet...

+1, at least.

You have Vcc going into the transmitter's input, and an output pin where the TX expects power.

You can run the LED and the data off one pin, but as has been pointed out you need a series current limiting resistor for each LED. But you won't learn much from that, other than confirming that you haven't blown out an output pin along the way.

It is not clear you have not made the same kind of mistakes with the receiver.

Hope that you have not irreparably damaged your module.

Post a schematic of how you have actually hooked things up. Draw it with pencil and take a picture, that will be easiest and fastest and give us confidence that you are accurately describing the wiring.

a7

Afaik VCC on these goes to the middle pin and input is.. ..ATAD.
The labeling is just so chinese...

I do not quite understand what do you mean by this. I just connect them like this.


It might be misprinted or something.

Or ambiguous. I see how they may have meant the labels in your first picture.

That's the nice thing about standards. So many to choose from. :expressionless:

a7

1 Like

Updated: I have removed the LED from the transmitter after re-cheking the schematic. Also, I changed the connection of the LED in the receiver into the images below since there are 2 data pins of the receiver which can work seperately.


The remaining LED still blinks after each 0.1 seconds as same as the transmitter's code. However, the serial monitor still displays "No data received".

You can NOT connect the LED to receiver output pin.
You really want to fry your components on purpose?

Follow this tutorial and copy the code from there.
If you don't have antennas soldered, keep the distance short <0.5m.

If it doesn't work, you need to replace some damaged components...

It does not work, unfortunately. I rememeber that the modules used to work before with the same code.

Maybe I will buy a new couple from a more reliable source and rechallenge them. I just had a quick research and found out that many people also struggle with the modules as same as mine, turning out that the modules are unreliable.

Also, I want to know why cannot the LED connect to the receiver's pin. The LEDs seems good and blinks as the transmitter's code delay.

First, please confirm you have a series current limiting resistor, not just the LED.

Second, without knowing for sure, it is reasonable and safer to assume that the output of the receiver may have limited current supplying capability.

You can't even be sure of what the output circuit looks like. Just read it with an INPUT or an INPUT_PULLUP and drive the LED in sync on its own OUTPUT pin.

a7

That doesn't help if you abuse them. Also the one you have is really crap.
With same price you can get something better:
https://aliexpress.com/item/1005006258870977.html

@alto777 answered already

To whom it may concern, attached is a possible circuit diagram of the receiver.

Of course, it is one of many available for purchase, but I hope it provides an idea of its output.

From my experience, all those who use an LM358 have the same output configuration.