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:-
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.