Hi guys,
I have just bought my Arduino 2560 + RF 433mhz KIT - http://www.icstation.com/images/big/productimages/1402/1402.JPG
I am trying to clone my existing garage remote control(i believe it's not encoded) - http://www.theelectricgateshop.co.uk/Product-1449/electric-gate-remote-replacement/Smile-Remote
So far:
I have connected:
Receiver -> Arduino
VCC to 5V(POWER)
the data pin that's near to VCC to PIN 2 (PMW)
GND to GND
/*
Simple example for receiving
https://github.com/sui77/rc-switch/
*/
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
mySwitch.enableReceive(0); // Receiver on interrupt 0 => that is pin #2
}
void loop() {
if (mySwitch.available()) {
int value = mySwitch.getReceivedValue();
if (value == 0) {
Serial.print("Unknown encoding");
} else {
Serial.print("Received ");
Serial.print( mySwitch.getReceivedValue() );
Serial.print(" / ");
Serial.print( mySwitch.getReceivedBitlength() );
Serial.print("bit ");
Serial.print("Protocol: ");
Serial.println( mySwitch.getReceivedProtocol() );
}
mySwitch.resetAvailable();
}
}
I have also tried changing the enablereceive(0) to enablereceive(4) with no success. I have also tried to use pin 21.
I have also tested all bauds.
It seems that I get no signal at all. mySwitch.available() is always false.
What am I missing?
1 Like
By the way, I have no breadboard. Does that matter?
Always use code tags ("</>" button).
Even if your garage remote is not encrypted (which is very unlikely) there is no guarantee that it uses the RC-switch protocol.
You should start without making any assumptions except for the transmitter frequency band, and figure out the protocol as done here.
Thanks for the input. I've taken it apart and apparently it has a NDR4001 transmitter that runs on 433.920 MHz. I have tought that my receiver is 433. Does that matter? DO I need this 434mhz receiver?
https://www.proto-pic.co.uk/433-mhz-rf-link-receiver-4800bps.html?gclid=Cj0KEQjw_eu8BRDC-YLHusmTmMEBEiQArW6c-JIlWQViYM7H-poBRjdR3NjrB6GyX7NMNwOeWwEte4oaAtiY8P8HAQ
Any of the cheap 434 MHz (usually about 433.92) receivers should work. They are pretty broad band. Mine even weakly respond to nearby 315 MHz transmitters.
434and 433 are so close that that shouldn't matter. But again, they cant talk to each other unless many other things are just right. For example, bit rate, frequency deviation, preamble bits, sync bits, message block format, CRC (if any). Buying any 433 MHz radio, at random, to work with some other radio is likely to be very frustrating.
Here's a simpler way to "clone" your opener. Your garage door opener almost certainly has a push button to open the door from the inside. Buy two transceivers, one is your opener, the other mounts with the opener hardware in your garage. Design your own signal and code to send from the opener to the other unit. When the code is correct, the unit in the garage just momentarily shorts (relay) the wires to the pushbutton, and the door will open.
I always recommend the Nano and the RFM22B transceiver. The transceiver is about half the size of a postage stamp, and easy to solder pins to, even though its 2 mm. pitch. You should easily be able to fit a Nano, the transceiver, and a 9 v. battery in something about the size of a garage door opener. I cope with the 5 v. Nano and the 3.3 v. RFM22B, but if you can locate a 3.3 v. nano, the wiring becomes flat out trivial. Not really that bad with the 5 v. nano.