Go Down

Topic: Aurel RX2 433.92Mhz noise filter (Read 884 times) previous topic - next topic

Trught

May 03, 2012, 12:29 pm Last Edit: May 03, 2012, 01:33 pm by Trught Reason: 1
Hello I am new here.
I would like to help with programming the noise filter for receiver Aurel RX2.
I tried to take the solution from the IR decoder but the noise made ??it impossible to capture data.
So I made small changes but the result is still bad.

I had best results with this code but there is still a lot of noise
Code: [Select]

#define IRpin_PIN      PIND
#define IRpin          6
#define MAXPULSE 5000

// what our timing resolution should be, larger is better
// as its more 'precise' - but too large and you wont get
// accurate timing
#define RESOLUTION 20

// we will store
uint16_t pulses[300][2];  // pair is high and low pulse
uint8_t currentpulse = 0; // index for pulses we're storing
uint8_t LEDpin = 13;
void setup(void) {
 Serial.begin(19200);
 Serial.println("Ready to decode 433.92Mhz!");
 
}

void loop(void) {
 uint16_t highpulse, lowpulse;  // temporary storage timing
 highpulse = lowpulse = 0; // start out with no pulse length


   while (IRpin_PIN & (1 << IRpin)) {
    // pin is still HIGH
    highpulse++;
    delayMicroseconds(RESOLUTION);
     digitalWrite(LEDpin,HIGH);
    if ((highpulse >= MAXPULSE) && (currentpulse != 0) && (currentpulse <= 299)) {
      printpulses();
      currentpulse=0;
      return;
    }
 }
 pulses[currentpulse][0] = highpulse;

 // same as above
 while (! (IRpin_PIN & _BV(IRpin))) {
    // pin is still LOW
    lowpulse++;
    delayMicroseconds(RESOLUTION);
     digitalWrite(LEDpin,LOW);
    if ((lowpulse >= MAXPULSE)  && (currentpulse != 0) && (currentpulse <= 299)) {
      printpulses();
      currentpulse=0;
      return;
    }
 }
 pulses[currentpulse][1] = lowpulse;
 
 
 currentpulse++;
}

void printpulses(void) {
 Serial.println("\n\r\n\rReceived: \n\rOFF \tON");
 for (uint8_t i = 0; i < currentpulse; i++) {
   Serial.print(pulses[i][0] * RESOLUTION, DEC);
   Serial.print(" usec, ");
   Serial.print(pulses[i][1] * RESOLUTION, DEC);
   Serial.println(" usec");
 }
}

I got it for, debug and decoding my weather stations, remote switch and etc..
I attach pictures of the measured noise and noise with the signal in the red circles.
I would advise anyone how to improve filtering.
Thanks for reading.
Sorry for bad English.

MarkT

What is the exact nature of the signal you are trying to extract?  The pictures don't enough resolution to show it.
[ I won't respond to messages, use the forum please ]

Trught

The problem is that nature may be different, I do not want to capture only one type but a universal solution for multiple devices. So if it's possible for multiple types of signals?
The signal from the noise always recognize because it has a higher frequency, and on this basis I imagined filter. Record to be the first 5-8 pulses in a short period of time, know that it is a signal.

Docedison

Send your data as rs232 OOK transmissions, perhaps for evaluation ? Any 'filtering' of that pseudo random noise would per force limit the max data rate and as such not too great an idea. rs232 is more tolerant of errors  (noise) at low speeds. Just a thought.

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

MarkT


The problem is that nature may be different, I do not want to capture only one type but a universal solution for multiple devices. So if it's possible for multiple types of signals?
The signal from the noise always recognize because it has a higher frequency, and on this basis I imagined filter. Record to be the first 5-8 pulses in a short period of time, know that it is a signal.


What frequency or frequencies?  Can we see a sample of the actual signal graphically - it really helps to know what we're talking about.
[ I won't respond to messages, use the forum please ]

Trught

Quote

What frequency or frequencies?  Can we see a sample of the actual signal graphically - it really helps to know what we're talking about.

"frequencies", please excuse my bad English.

Go Up