Arduino R3, 433Mhz receiver and RF sniffer, no output on serial port

Hi,

I'm using Uno R3 and a low cost 433Mhz receiver (Ebay) trying to decode raw data from my weather station.

I'm using RCswitch library.

But there is not any output on the serial port, not a single character.

I have used an oscilloscope and checked the input on the micro controller and can see the pulses on pin 4 ,Arduino pin D2, interrupt 0.

Any hints ?

regards,

Nils

You must think we have crytal balls or something.

Any information missing ?

regards,

Nils

Hi, I have balls.

See below :

/*
RF_Sniffer

Hacked from GitHub - sui77/rc-switch: Arduino lib to operate 433/315Mhz devices like power outlet sockets.

by @justy to provide a handy RF code sniffer

--

hacked further by pico to supply power to unit from data pins (lazy!)
just make sure your recv unit has max draw < 40mA... (typically rated 10-20mA)

this is set up for a 4 pin recv unit GND DATA DATA VCC
plug GND into D2, DATA into D3 and D4, and VCC into D5
*/

#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();

#define VCC_PIN 5 // source 5V up to 40mA from this pin
#define GND_PIN 2 // sink up to 40mA on this pin
#define DATA_PIN 3 // external int 1 on Uno

void setup() {

pinMode(DATA_PIN, INPUT);
// just leave D4 tristated

pinMode(GND_PIN, OUTPUT);
digitalWrite(GND_PIN, LOW);

pinMode(VCC_PIN, OUTPUT);
digitalWrite(VCC_PIN, HIGH);

Serial.begin(9600);
mySwitch.enableReceive(1); // Receiver on interrupt 1 => that is pin D3
Serial.println("rf_sniffer started");
}

static unsigned long count = 0;

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();
count = 0;
}
else {
if (++count == 0) Serial.println("no activity");
}
}

Sorry, wrong example in the previous post. Here is the one I'm testing at the moment:

This one uses D2 as input. Tested on 3 brand new UNO 3's right out of the antistatic bags.
no output on ther serial port, not even noise or garbage characters.

Any hints ?

regards,

Nils

/*
RF_Sniffer

Hacked from GitHub - sui77/rc-switch: Arduino lib to operate 433/315Mhz devices like power outlet sockets.

by @justy to provide a handy RF code sniffer
*/

#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();

}

}

The Rc switch library relies on the transmitting device using an SC2262 or equivalent data encoder.
If your weather station doesnt use one of these chips , you wont see anything.

Thanks.

I'll try a more modern oscilloscope with logic analyzer to record the pulse train and see what is coming in and try to decode manually.

Nils

If you have a CRO, try and detect the data where its actually generated in the Sensor thats sending it.
Means opening up the sensor and connecting the CRO directly to the data pin of the transmitter.
Most weather stations only transmit their data in very short bursts at infrequent intervals, so trying to make sense of whats coming out of a 433 receiver is very hard.