I've got some 433mhz transmitters and receivers, I also have a 433mhz remote control (as confirmed by several vendors). I'm basically trying to find out what info the remote sends out with the receiver and then replicate it with the transmitter. Sounded simple enough after all I read about it. I'm not new to the arduino, been messing about with it for quite some time and i'm a software engineer so the code is not a problem.
When i transmit from my 433mhz transmitter and listen on the 433mhz receiver, i get a result on the receiver, so both of these are working. I also have this 433mhz remote control for turning on the lights in the house, so I know the remote works. However, when I press a button on the remote while the receiver is listening, I get no result! Nothing at all! So i know all the hardware works and i know the code works, and they are all (supposed to be) on the same frequency.
One thing I did notice that if i run the transmitter and receiver, that when i press a button on the remote, it stops the signal, so i get no results from the transmitter or the remote. This makes me think that the remote control is having SOME effect on the receiver as it's jamming the signal, but why can't it understand what's coming from my remote?
I've tried about 5 different libraries and multiple receivers etc. How do i find the signal the remote is sending, or any other way i can send the same signal as the remote to my light switch?
Sounds like the remote is using FM , which is incompatible with your 433 Mhz receiver.
Only sure way to find out is to pull the remote apart and try and indentify what chipset its using.
I pulled the remote apart yesterday and the chips don't really have any code in them, one just had i think a 4 digit number on it.
At least I have a reason now. So is there no way i can communicate with it? As I say it seemed as though it interrupted a signal, so it's obviously having some effect. If not i guess I'll just hook the circuit from the remote to my arduino by pulling the buttons off and closing the button circuit with the Arduino so the remote can worry about what signals to send. Not exactly the route i planned on taking, but lacking a good solution, a bad solution is still a solution. Unless anyone has any better ideas, without of course forking out another 30 quid on a different light switch.
An FM transmission into an OOK receiver will just look like a permanent carrier, which will give a permanent logic 1
on the data pin.
Your method is about the only way forward if you identify the remotes chipset.
If you have a scanner that can tune to 433 Mhz , you may be able to get a crude idea of what the remote is sending
as most scanners have FM demodulators, but it still doesnt help as you will need an FM transmitter.
Ok, at least i have an answer so i can stop trying different things with these, scratching my head wondering why it's not working. I think it's fairly safe to say you're probably right, and it's not worth the time trying to find out what the remote is sending as i just want to get this working, so, time to destroy a remote
What make & model of remote control are you talking about and what rf modules did you buy.
Also a picture of the insides of your remote control may help to identify the modulation type used.
You can buy cheap AM & FM chips and I have duplicated an AM gate entry remote control so both me and the spouse can have one in each car.
I've contacted the manufacturer anyway to find out whether it's am or fm. If it's fm I'll have a browse around for some of those. Failing that, I'll just hack the remote for this light switch and make sure i get an am light switch next time. I bought 5 transmitter receiver's and yes they are ridiculously low prices, as low as you'd expect just postage to be. I'll wait to hear back from the manufacturer anyway and let you know. I googled for hours trying to find someone with the same problem to no avail, so if i ever come to a solution I'm sure it will help someone else one day
thanks for your responses once again. Always nice to talk to someone who knows what they're talking about
Apparently the remote is on AM frequency, as per the manufacturer, the receiver and transmitter I've got I'm not sure what they are, but they look exactly the same as every other I've seen. So if AM is the usual, then they are probably on am as clearly the person selling them didn't think it important enough to mention the frequency. So if that is the case, any idea what else could be the problem?
If you say you get nothing at all, i suppose you mean the library used does not any decode output?
Did you also try to look at the raw signal to see if you get pulses when you press the button on the transmitter?
It could just be the libraries you tried do not support the protocol used by the remote.
Normally you would hook-up a scope or so to see if you get pulses from the receiver but you could also use a sketch to display the status of a input pin an the arduino against time.
I normally use a scope and/or a logic analyzer, but for quick things i use the quick and dirty script below.
The script expects the input on pin 2. It will wait for a character on the serial port (from the monitor window for example) and then starts recording. When finished it will print-out the pin-state and the time that pin-state lasted on the serial monitor.
Depending on the 433 MHz receiver board there can be a fair amount of noise on the receiver output.
You can test for that by starting the sketch, start the receiver by sending a character and then let it run without stopping it and without pressing a button on the remote. The sketch will stop after 30 seconds. If there are more then 0 samples, you could have noise.
I had this in my receiver and i cleared it up by putting a 100 nF capacitor between the receiver output and ground, worked ok here.
Hope this helps,
Guido
//Define settings
const int INPUT_PIN = 2; //Input pin
const unsigned int MAX_SAMPLE = 256; //Maximum number of samples to record
const unsigned long MAX_TIME = 30000UL; //Maximum record time after start pulse (msec)
//Variables used in the ISR
volatile boolean running = false;
volatile unsigned long last = 0;
volatile unsigned int count = 0;
volatile unsigned long samples[MAX_SAMPLE];
void setup() {
pinMode(INPUT_PIN,INPUT);
Serial.begin(9600);
while (!Serial) {};
Serial.println("RecordPin sketch started");
}
void loop() {
unsigned long startTime;
int startState = 0;
while (Serial.read() != -1) {}; //Clear the serial input buffer
Serial.println("Send character to start");
while (Serial.read() == -1) {}; //Wait until we receive the first character
while (Serial.read() != -1) {}; //Clear the rest of the buffer
startState = digitalRead(INPUT_PIN); //Save the initial port state
attachInterrupt(0, receiver, CHANGE); //Interrupt 0 = Pin 2
count = 0;
last = micros();
running = true;
Serial.print("Running. Send a character to stop");
startTime = millis();
while (running && ((millis() - startTime) < MAX_TIME)) { //Run until the buffer is full, the time is up, or we receive a character
if (Serial.read()!= -1) { //Stop if we receive a character
running = false;
}
}
Serial.println("Stopped");
detachInterrupt(0);
Serial.print("I recorded ");
Serial.print(count);
Serial.println(" samples");
for (unsigned int x = 0; x < count; x++) {
Serial.print("Pin = ");
if (startState == 0) {
Serial.print("Low ");
} else {
Serial.print("High");
}
startState = !startState;
Serial.print(" for ");
Serial.print(samples[x]);
Serial.println(" usec");
}
Serial.println("");
}
//Pin change interrupt routine
//Called when the state of the input pin changes
void receiver()
{
if (running) { //If we are running
samples[count] = micros() - last; //Save the time from the last change to this one
last = micros(); //Reset the time of last change
count++; //Go to next buffer entry
if (count > MAX_SAMPLE) { //If we are past the last entry
running = false; // we stop
}
}
}