stevie135s
Published © CC BY-NC

Wireless Doorbell Extender / Repeater

A simple project to extend the range of a 433mhz wireless doorbell using an Arduino Nano and 433mhz Receiver Transmitter pair.

BeginnerProtip1 hour24
Wireless Doorbell Extender / Repeater

Things used in this project

Hardware components

arduino nano
×1
rf433 Transmitter / Receiver
×1

Story

Read more

Code

Discovery

Arduino
Use this code to discover the code transmitted by the doorbell push
/*Receiver
  VCC 5V
  GND GND
  DATA Arduino digital pin 2
  Transmitter
  VCC 5V
  GND GND
  DATA Arduino digital pin 3
 */
 #include <RCSwitch.h>
 RCSwitch mySwitch = RCSwitch();
 void setup() {
  Serial.begin(9600); // Make sure the Serial Monitor is set to this baud rate
  mySwitch.enableReceive(0); // Receiver on interrupt 0 (pin 2)
  Serial.println("Lets Go");
  }
   
  void loop() {

    if (mySwitch.available()) {
      Serial.print("Received code: ");
      Serial.print(mySwitch.getReceivedValue());
      Serial.print(" / ");
      Serial.print(mySwitch.getReceivedBitlength());
      Serial.print("bit Protocol: ");
      Serial.println(mySwitch.getReceivedProtocol());
      mySwitch.resetAvailable(); } 
      }
//OpenSerial Monitor, press the button on your remote, and note the code printed.

Extender

Arduino
This is the final extender sketch. Remember to replace the received code with your own
/*Receiver
  VCC 5V
  GND GND
  DATA Arduino digital pin 2
  Transmitter
  VCC 5V
  GND GND
  DATA Arduino digital pin 3
 */
 String RecVal;
 byte RecBit;
 byte RecPCol;
 
 #include <RCSwitch.h>
 RCSwitch mySwitch = RCSwitch();
 void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(0);// Receiver on interrupt 0 (pin 2)
  mySwitch.enableTransmit(3);
  mySwitch.setProtocol(1);
  Serial.println("Lets Go");
  }
   
  void loop() {

    if (mySwitch.available()) {
      Serial.print("Received code: ");
      RecVal = String(mySwitch.getReceivedValue());
      Serial.print(RecVal);
      Serial.print(" / ");
      RecBit = (mySwitch.getReceivedBitlength());
      Serial.print(RecBit);
      Serial.print("bit Protocol: ");
      RecPCol = (mySwitch.getReceivedProtocol());
      Serial.println(RecPCol);

      if ((RecVal == "5604321") && (RecBit == 24) && (RecPCol == 1)) { 
          Serial.println("Send 5604321");
          delay(500);
          mySwitch.send(5604321,24);
          delay(2000);

      }
     mySwitch.resetAvailable();
     }
       
   }

Credits

stevie135s
29 projects • 13 followers
I've been interested in microprocessors for a long time.

Comments