Core Electronics Forum

433MHz remote control by hacking a wireless doorbell, Arduino and Raspberry Pi

A 433MHz wireless remote control is great for outdoor applications and will work even there are obstructions between the transmitter and the receiver.

This project is a simple hack of a cheap wireless doorbell kit, with examples working on an Arduino and a Raspberry Pi. It is an easy way to give your project a remote control if you only require one button.

For this project, you will need:-

  • Arduino or Raspberry Pi (I use an Arduino Uno and a Raspberry Pi 3B+).
  • Prototyping breadboard (for Raspberry Pi project).
  • A HPM Wireless Doorbell Kit model D642/01 (available from Bunnings Warehouse).
  • 2 x AA batteries.
  • 2 x Wires with alligator clip ends.
  • 5mm LED (optional for the Arduino version, you can just made do with the inbuilt LED on pin 13).
  • 1 x 220 ohm resistor (Rasp Pi project).
  • 3 x pin-to-socket wires (Rasp Pi project).
  • 2 x wires or metal pins to connect to GPIO (Arduino project).

The Doorbell Kit:-

First, remove the battery cover from the back of the speaker unit to reveal the battery holder. There is 1
screw to remove from here, then you should be able to open up the speaker unit.

Now remove the 2 screws holding the circuit board in place and flip the board over to reveal the receiver unit:-

The receiver unit is labelled RL-3952RX. From testing the receiver using a multimeter, these are what I identified the pinouts to be:-

Receiver pinout

To do a quick functionality test of the doorbell:-

  • Connect either signal pin to a breadboard rail via alligator clip.
  • Insert a 220 ohm resistor where the alligator clip wire is inserted and place the other end the resistor into another rail.
  • Insert the anode end of the LED into the rail and the cathode end into the GND rail of the breadboard.
  • Connect a GND pin of the receiver unit to the GND rail of the breadboard.
  • Insert 2 x AA batteries into the battery holder.

When you press the button on the doorbell, you should see the LED light up and then go out (as well as hearing the doorbell ring).
NOTE that the LED is flickering. This is because the signal is pulsed.

For the Raspberry Pi version of this project:-

To connect the remote to the Pi:-

  • Put jumper wires on GPIO 21, GPIO 20, and a GND pin on the Raspberry Pi.
  • Plug the GND jumper wire into the GND rail of the breadboard.
  • Connect either GND pin on the receiver module to a pin sticking out of a hole in the breadboard ground rail (use alligator clip wire).
  • Connect the other alligator clip wire to a signal pin on the receiver, then onto the pin end of the jumper wire running to to GPIO 21 on the Pi.
  • Connect the wire on GPIO 20 to a slot in the breadboard, connect the 220 ohm resistor to this slot then connect the other end of the resistor to another empty rail.
  • Insert the anode end (the longer wire) of the LED into the breadboard rail where the resistor ends and connect the cathode (short wire) to the GND rail on the breadboard.

For this example, we’re going to use the doorbell button to toggle the LED on and off. The following is the Python script used for this project:-

from gpiozero import LED, Button
import time

led = LED(20)
remote = Button(21, pull_up = False)	# By default pull_up is True
light_on = False						# Boolean to keep track of light state

while True:
	if remote.is_pressed:
		if light_on == False:
			light_on = True
			led.on()
			time.sleep(2.0)				# Prevents false triggers
			
		elif light_on == True:
			light_on = False
			led.off()
			time.sleep(2.0)				# Prevents false triggers

	time.sleep(0.1)

Run the script and press the button on the doorbell. If all goes well, the LED will light up and you will hear the doorbell chime. Press the button again after 2 seconds and the LED should switch off (yes, the doorbell will ring again).

For the Arduino project:-

  • Insert 2 x AA batteries into the doorbell speaker unit.
  • Connect either signal pin on the receiver to A0 on the Arduino, use alligator clip wire and pin/loose wire.
  • Connect either GND pin on the receiver to a GND pin on the Arduino (alligator clip and a metal pin/loose wire).
  • Optional:- insert the anode of a 5mm LED into pin 13, the cathode into the adjacent GND pin.

Here, I’m using the USB cable connected to my PC to power the Arduino, but you can also run the Arduino of a different power source once the sketch is uploaded if you wish.

Copy the following sketch into the Arduino IDE and upload it to your Arduino board:-

const int remote = A0;
const int ledPin = 13;
int lightState = LOW;

void setup()  
{
  pinMode(remote, INPUT);
  pinMode(ledPin, OUTPUT);
}

void loop() 
{
 int reading = analogRead(remote);

 if (reading >= 505)                          // Should be somewhere around 2.3 volts when doorbell button is pressed.
 {
  if (lightState == LOW)
  {
    lightState = HIGH;
    digitalWrite(ledPin, HIGH);
    delay(2500);                              // 2 1/2 second delay.  Needed because the signal flickers on/off for close to 2 seconds.
  }                                           // Any shorter a delay and you will get false triggers.
  else
  {
    lightState = LOW;
    digitalWrite(ledPin, LOW);
    delay(2500);
  }
 }
}

Note that you need to use analogRead() instead of digitalRead() to get the input. This is because the Arduino runs on 5 volt logic and the receiver runs on 3 volt logic. The digitalRead() function on Arduino interprets voltages greater than 2.5 volts to be ‘1’ and less than 2.5 volts to be ‘0’.
With analogRead() you can measure the incoming voltage and set where you want the trigger level to be at. The scale for analogRead() is 0 to 1023… 0 obviously represents 0 volts, 1023 represents 5 volts.
Therefore, a value of 512 is 2.5 volts.
With a little experimenting, I found a value of 505 for the reading was a good measure so the LED will toggle on and off correctly.

Once the sketch is uploaded, press the button on the doorbell and the LED should light up (doorbell will ring). After 2 seconds, press the doorbell button again and the LED should switch off (yes, the doorbell will ring again.)

If you wish to use the receiver in one of your own projects, you will need to de-solder the 6 pins that are circled in red below:-

Now you have a 433MHz transmitter/receiver you can use for your projects. Remember to attach a wire to the antenna pin when you do, the wire on the speaker circuit board measured 165mm long.

2 Likes

Thanks Matt. 've been wanting something like this.
Can you tell me what kind of range it achieves?

John.

Hi @John74406

According to the doorbell documentation, the transmitter/receiver will work up to 50 meters in open air.
I haven’t actually tested the limit of it’s range yet, but I have now successfully extracted the receiver from the doorbell speaker circuit (it will NEVER work as a doorbell again, I had to be a little harsh on the board to get the receiver out).
There are other models of doorbell available at Bunnings which offer greater range, but I can’t confirm if they can be hacked like the HPM D642/01 can.

Here’s a picture of the Raspberry Pi working with the receiver unit alone… I simply used the Pis 3.3Volt GPIO pin to power the receiver:-

1 Like

Hi Matt,

Very interesting work. Have you looked at optimizing the length and specifications of the makeshift antenna to suit the particular frequency of the transmitter? Otherwise, there are some interesting articles that I’ve linked below about how to increase the range of your antenna (please check your local regulations for the legality of the application of these methods).

http://www.antenna-theory.com/measurements/antenna.php

All the best with your project!

Bryce
Core Electroncs | Support

Hi @Bryce,

Now that the weather is getting very cold and wet this could give me something fun to do!
Thanks for sharing.

1 Like

Matt,
This looks like the start of some fun.
For anyone looking at using 433, transmitter and receiver modules are widely available (e.g. SKU: SS113990010 at https://core-electronics.com.au/433mhz-rf-link-kit-seeed-studio.html) if you don’t feel like pulling a brand new doorbell apart.
Also for Raspberry Pi users, using rtl-sdr (refer to https://www.rtl-sdr.com/tag/433-mhz/ and https://github.com/merbanan/rtl_433) is a whole field to explore. It uses a cheap dongle and software to decode 433Mhz controls. I use it to decode a Wireless Weather Station on my Pi.

Dave

2 Likes

Hi @dave50358,

Those options you linked to would be a great way to explore the workings of a 433MHz wireless control in more detail.

If your project requires more than 1 transmitter signal this would be the way to go.

At a price of $11.20 for the doorbell kit, it is still a very cheap way to get a button activated remote control on a project.:grinning:

1 Like

Hello all,

I’m going to install the wireless doorbell linked to here and I’m planning on connecting it to my Raspberry Pi Zero W. The idea I have is to have the RPi send me a message via WhatsApp (or something similar) to let me know someone has pressed the doorbell when I’m out of the house. My question is: the receiver runs off of 3x “C” batteries, which as far as I understand are 1.5V each. So as the combined voltage is 4.5V, my understanding is I should be able to connect the receiver directly to the GPIO pins on my RPi, is that correct?

With many thanks,
Tim

Hello Tim,

Excellent idea for a project! I’d check the power requirements of your board before connecting, but that should be close enough to the minimum voltage that you won’t run into any issues with that one. With a simple program that will send a message on your chosen service when a GPIO pin reads high, you should be able to set this project up relatively easily.

Once you’ve set this up I’d also recommend checking out adding it to our customer project collection here at Core to receive a store credit once processed.

Have a great day!

Bryce
Core Electronics | Support

PS - As written by Matt, I’d assumed that you’re using a logic level converter to interact with it. Such as this one.

Hello Tim 122099,

The RPi pins cannot have more than 3.3 volts applied to them otherwise you’ll fry the Pi! It would be recommended to go a little lower in the voltage to be on the safe side… 2.5 volts should still read as a HIGH on the GPIO.

Back when I did this project, the model of doorbell I used ran off 2 x AA batteries… in series this gives 3 Volts. After posting the project, I did a little more experimenting with the receiver using the Arduino.

The Arduino pins run off 5 volts, where RasPi GPIO pins work with 3.3 volts.

On the receiver unit, I identified a voltage regulator, which I have circled on the following picture of the receiver unit:-

Receiver pinout 2

What I found was that I could power this receiver unit using 5 volts and the receiver still worked fine. I use the doorbell button and receiver in a sports timer that I built for a dog activity called flyball. The receiver is powered off 5 volts directly, and the signal pin is directly connected to a GPIO on the RPi and it works fine.

Does your model of doorbell use the same receiver module? If so, you can connect the signal pin direct to a Pi GPIO pin.

If not, you can experiment with a simple voltage divider circuit. A Google search will get you going… but as a quick guide:-

Connect 2 resistors of equal value in series, the first resistor connected to the signal output pin on your receiver unit, and the second resistor connected to ground. If you run a wire from between these resistors to the ground, you should have half the input voltage on that wire.
This wire would go to your GPIO pin on the Pi, but with a lower voltage than the original output from the signal pin on the receiver.

You can experiment with the resistor values until you get an output which will be safe for the Pi and also register as a HIGH.

Hope this helps.

1 Like

Hello @Tim122099,

In case you missed it, I posted a reply to your question about 1 week ago.
If you scroll down to the bottom of this thread, you should find it. I hope it is of some help to you.

Hi @Matt87317,

Yes, I did see your reply thanks. I’m still awaiting the delivery of the doorbell so unfortunately won’t be able to test anything else until that happens :frowning: Will get back to you all as soon as that happens!

Thanks again,
Tim

2 Likes

Hi Sorry to revive a old thread.
But I’ve been following this guide to try and integrate that doorbell to Raspberry Pi.
I’ve bought the same doorbell from Bunnings. I cut up some CAT6 and used a pair from inside to wire it to the raspberry pi with connectors on them.
What I’m finding is that I’m getting false triggers. I haven’t figure if it is interference because I have unshielded twised pair ( I twisted them by hand not that tight either).

Monitoring at 100ms I had false triggers maybe once or twice a day.
Monitoring at 50ms, I had a few false triggers every hour or so.

So I read up about debouncing and how inteference would land on the wires.
My wires are quite long, maybe 15-20cm in the air.
So I used another 433mhz transmitter and the GPIO Pin triggered too (the doorbell didn’t ring though).
So I’m wondering whether the Signal pin is the raw 433 signals rather than the doorbell signal.
From 433mhz receivers then get 1’s and 0’s from 433 frequency.

I’m planning to wire the GPIO to the LED light instead since this is actually when the DoorBell triggers…

Could someone help me understand the actual 433mhz pcb Signal pin is actually for? And why is this signal pin pulsed?? Shouldn’t it just be on and then off…to trigger the doorbell noise? Where is the logic to decode the 433 signal…and make sure its the one encoded into the doorbell?
If its the actual raw signal , then any 433 tranmitter might trigger it…
Also how would I stop my false triggering?..
Is my long twisted pair becoming an antenna somehow ??

2 Likes

Hi @Danny70376,

I’ll offer whatever advice I can to help you, but I can’t answer all of your questions. I have no idea WHY the signal from the receiver is pulsed, that is something I’d like to know too.

When I hacked the doorbell to be a remote control I was also getting false triggers as a result of the pulsing.

The way I got around it was to do a debounce delay just like you mentioned. In my Python script I have a loop which ‘listens’ for a high signal. I added a boolean value to this loop so that when the button is pressed, the value changes from FALSE to TRUE (or vice versa, depending on your code). By switching the value of the boolean, the condition that you wanted to trigger can’t happen until you change the boolean value back to its original state.

If you look at the 1st post in this thread, you will see the simple Python script I wrote. It uses a boolean I called ‘light_on’ which I initially declared as false.
When you press the button, the first thing that is executed in the if statement is to change ‘light_on’ to TRUE, then it turns the LED on. Since this is a simple script with nothing else running I could get away with using the time.sleep(2.0) to pause the script for 2 seconds.
By the time the 2 seconds is up, the pulsing from the receiver has finished and I don’t get a false trigger.

If you have other processes that need to be running during the pulsing time of the signal, the code gets a little more complicated. You’d need to have timer counter which gets incremented every time your loop is performed. When you reach the desired value (eg:- 500 would be 500 milliseconds), switch your boolean value back to it’s original state so the button can trigger the receiver again.

It’s been quite some time since I’ve done any electronics and coding so I’m a little rusty. I hope this has helped you out somewhat.

2 Likes

Hi @Matt87317 , thanks for your reply.
I’ve been debouncing my pin already. My debounce is simply just to have 2 HIs within 2 seconds.
Most of my false triggers only have 1 HI within 2 seconds. But the odd one here and now has 2 HIs within the 2 second period.

I’ve tried recording alot of actual doorbell presses.
So I’m capturing at 50ms each time. So within a 2 second period you get 40 hi/lo
000000000000000000000000000000

100000000000000000000000000000 < my main false triggers come from something like this
110000000000000000000000000000 < this occurs but less frequent
101000000000000000000000000000< this occurs but less less frequent

Actual doorbell triggers look like this
110011000000000000000000000000
111000000000000000000000000000
101000000000000000000000000001
100000000000000000000000000010
100100000000000000000000000001

So the problem with my debounce is that, there is not pattern that I could find that could accurately indicate an actual doorbell press.
Maybe my Pi and Doorbell receiver are too close 250v AC cables.

I’m thinking about buying a cheap toy oscilloscope to check out the signal pin. That way I can try to calculate a suitable capacitor to smooth out the signal. Or else but a signal reader for the PI.
I might try using the full CAT6 cable since its shielded instead of pulling the twisted pair out.

@Matt87317 what made you use the Signal Pin rather than the LED indicator?
I’m tempted to use the LED indicator, since I was able to trigger the GPIO pin with other 433mhz transmitters.

1 Like

Hi all.
Only guessing here but I would suggest the “pulsing” referred to is a coded signal from the bell push transmitter which is decoded, then if the signal is the correct one the doorbell sounds. Just like your TV remote responds to the coded signals sent to it.
If you “debounce” as you suggest your system whatever that is would probably respond to any and every instance of receiving a 433MHz signal. This could come from anywhere, even the door bell next door. A lot of devices use 433MHz…
To activate your Arduino or whatever, you need to gain access to your wanted signal AFTER decoding. If this is too difficult the idea I saw somewhere of using the LED indicator has merit. Or work backwards from that or the speaker circuitry. An oscilloscope would be very handy here.
Cheers Bob

1 Like

Don’t start putting capacitors willy nilly across anything. If you do you will probably find the doorbell will not work as you may successfully remove or corrupt the wanted doorbell code.

You are right. There is no recognisable pattern to you. That is how the unit recognises a valid door button press and is able to ignore all others. You will have to get access after decoding. That should fix your random activations and/or “interference” problems.
Cheers Bob

1 Like

@Robert93820
Thanks for the reply.

Ok so I just reconnected the gpio pins and tried another 433 transmitter. And yes I have proved that the Signal Pin is the raw transmission prior to decoding and matching.
So there would be a sequence of 1’s and 0’s that match the doorbell remote, and then the door bell unit would make the door bell noise.
So I think I’ve concluded that the Signal Pin is not the pin we want.

I’m going to solder onto the LED and see if that will help.

1 Like

You will have to check how the LED is connected. You will have to check some volts. If the LED is connected via a current limiting resistor to ground it will only have a couple of volts across it depending on LED colour. Yes it is different, different colours have different forward voltage drops.
You should be checking voltages anyway. From what I can gather from forum posts these raspberry or loganberry things operate on 3.3V logic and 5V is a no no.
Randomly soldering bits of wire here and there may find you having no Pi…Smoke???
Cheers Bob

1 Like

@Danny70376 all I can say is that for my intended purpose it worked. All the signals you are getting will be from the inbuilt ‘rolling code’ the doorbell has. All the 433mHz products have this… if they didn’t then your doorbell button could trigger your neighbours doorbell!

To memory, the little red LED on the receiver unit toggles on and off for a number of seconds while the doorbell rings. This could put you back to square one regarding a smoothed out signal.

Sorry I can’t offer any more help than I have.

1 Like