RF 433Mhz receiver with Arduino and Transmitter without

Hi,

I'm trying to build a simple doorbell with a button, ht12e for encoding, and 433Mhz RF transmitter on one side, then arduino, 433Mhz receiver and ht12d for decoding.
The setup is not working so I am trying to simplify the setup by removing the ht12 on both sides and see if that is my cabling with the decoder/encoder which is faulty or if any part is faulty.

That means that on the receiving part I have now:
Arduino Nano
433Mhz receiver connected like that:
D3 to receiver data pin
+5v to receiver VCC
GND to receiver GND

Then on the transmitter:
433Mhz transmitter and button connected like that:
TX Data pin to left top of the button
Bottom right of the button to 5V line of the breadboard
VCC of the transmitter to 5V line of the breadboard
GND of the transmitter to GND line of the breadboard
The breadboard is powered through the +5V and GND of the arduino

I am using the below code to debug the reception. However when I press the button, I still get a 0 reception value, no change.
I tried to add a resistor (33kohm) in serial between the exist of the button (bottom right) and my +5V line. Nothing change.

Would anyone be able to advise what I am doing wrong?

// Include required libraries:
#include <RCSwitch.h>

#define RECEIVER 3 // from RECEIVER


// intialize the receiver driver
RCSwitch mySwitch = RCSwitch();

void setup() {
  // Initiate the serial monitor.
  Serial.begin(9600);
  mySwitch.enableReceive(RECEIVER);  
}

void loop() {
  byte receivedValue = mySwitch.getReceivedValue();
  Serial.println("Received value: " + String(receivedValue));
  mySwitch.resetAvailable();
  delay(100);
}

The only output I get is:
Received value: 0

Tentative diagram of the setup:

How are You powering this?
Transmitters usually draw quite some current. I wonder if breadboard is advisable.

Directly from the breadboard yes.
Here is the pair I use:

1receiving module (RX470-4)
1
Transmitter Module (WL102-341)

They are not supposed to draw much power:
Mains input voltage range: 2.2V-5V
Working current: type: 2.1mA (required: VDD=5V); type: 2.1mA (required: VDD=3V)

You did not reply to how it's powered.
No transmitter runs and draw 2 mA.
Pictures don,t tell any data. Please post links to their datasheets.
Please post code and schematics.

I wrote this last last: I give up. Just read this. I have no idea what you think you are doing. Unless you are working from someone else's known good code and schematic, getting creative is not an option for you at this time.


You may have those modules way too close too each other for them to function correctly.

Oh dear, I see you are not using an Arduino for each side. This will not work ever. You cannot pushbutton your way to a valid data stream - cheap radios like those do not work transmitting a level… they need a data stream that is modulated at a fairly high rate, which furthermore must be DC balanced. Read the rest of this post, but give up on getting anywhere with one Arduino.

I write the below before I noticed:

If you are using a low level radio set like that, here's a handy trick for development.

Remove the RF modules from the picture.

Wire the data out from the sending Arduino to the data in of the receiving Arduino. Use a 10K resistor in the oath, the value is not critical. 10K, 47K. I'd use more than 1K and less than 100K.

Then try your system. Whatever data was getting modulated and transmitted is now directly through the resistor talking to the place where the data would have been received and demodulated.

This will take the RF off the list of what is wrong.

Then, separate the two parts by two or three meters, and use a pair of sketches you did not write and did not tinker with. That should confirm that your radio set is functional.

a7

A button cannot send a signal with RFSwitch protocol, so "0" is the expected return.

Sry, I get your question now.
The arduino gets its power from usb, and sends power to the breadboard lines via the gnd and +5v pins.

Got it, so I need the ht12e to send a signal then. Thanks for the details.

For info I try to replicate this:

It works even when very close to each other. Will try to rewire everything from scratch then. Thanks

Looks like you figured it out. The use of the HT12 encoder/decoder pair is something you might have mentioned!

On the transmitter side, there now is no need for an Arduino. On the receiver side, the Arduino is sim,y reacting the same way it might if there was a pushbutton instead of the data out from the decoder.

I've used those chips, they work well enough. And the RF trick is more obviously one you can use - wire data out from the HT12E to data in of the HT12D omitting the part where that signal is transmitted, that is to say putting the radio set aside for the moment.

Which you did not need to try, if you built the circuits and find the radio set works whilst only inches apart.

I say I've used those chips. There is nothing in them that can't be done with an Arduino sketch, but then you'd need an Arduino on each side of the link. So there is a tradeoff.

My preference at the time was to write my own encoder and decoder in software. I had other reasons to need more functionality than the HT12E provides, for doorbells and things like that the HT devices are entirely adequate.

But the trick of direct wiring to eliminate RF problems and make them separate to figuring out the logic is useful in either case. And for testing if it fails one day. The first suspect woukd be the radio set, testing without it would be of diagnostic value.

With modern more sophisticated radios, such a easily played trick is impossible.

I se also that those chips are obsolete xor obsolescent and are much cheaper now. A mixed win.

a7

Thanks for all these details. I tried the resistor trick and indeed the rf transmission was faulty.
Luckily I have an sdr and could see that the transmitter was not emitting anything. Mystery solved!