récupérer info sonde oregon

Bonjour

suivant ce lien : http://connectingstuff.net/blog/decodage-protocole-oregon-arduino-1/ j'ai essayer de reproduire pour récupérer les infos de ma sonde thgr228N mais je ne reçois rien!!

Mon rx 433mhz est branché sur la pin 3 de l'arduino uno , montage réaliser sur une breadboard.

// Oregon V2 decoder modfied - Olivier Lebrun
// Oregon V2 decoder added - Dominique Pierre
// New code to decode OOK signals from weather sensors, etc.
// 2010-04-11 <jcw@equi4.com> http://opensource.org/licenses/mit-license.php
// $Id: ookDecoder.pde 5331 2010-04-17 10:45:17Z jcw $
 
class DecodeOOK {
protected:
    byte total_bits, bits, flip, state, pos, data[25];
 
    virtual char decode (word width) =0;
 
public:
 
    enum { UNKNOWN, T0, T1, T2, T3, OK, DONE };
 
    DecodeOOK () { resetDecoder(); }
 
    bool nextPulse (word width) {
        if (state != DONE)
 
            switch (decode(width)) {
                case -1: resetDecoder(); break;
                case 1:  done(); break;
            }
        return isDone();
    }
 
    bool isDone () const { return state == DONE; }
 
    const byte* getData (byte& count) const {
        count = pos;
        return data;
    }
 
    void resetDecoder () {
        total_bits = bits = pos = flip = 0;
        state = UNKNOWN;
    }
 
    // add one bit to the packet data buffer
 
    virtual void gotBit (char value) {
        total_bits++;
        byte *ptr = data + pos;
        *ptr = (*ptr >> 1) | (value << 7);
 
        if (++bits >= 8) {
            bits = 0;
            if (++pos >= sizeof data) {
                resetDecoder();
                return;
            }
        }
        state = OK;
    }
 
    // store a bit using Manchester encoding
    void manchester (char value) {
        flip ^= value; // manchester code, long pulse flips the bit
        gotBit(flip);
    }
 
    // move bits to the front so that all the bits are aligned to the end
    void alignTail (byte max =0) {
        // align bits
        if (bits != 0) {
            data[pos] >>= 8 - bits;
            for (byte i = 0; i < pos; ++i)
                data[i] = (data[i] >> bits) | (data[i+1] << (8 - bits));
            bits = 0;
        }
        // optionally shift bytes down if there are too many of 'em
        if (max > 0 && pos > max) {
            byte n = pos - max;
            pos = max;
            for (byte i = 0; i < pos; ++i)
                data[i] = data[i+n];
        }
    }
 
    void reverseBits () {
        for (byte i = 0; i < pos; ++i) {
            byte b = data[i];
            for (byte j = 0; j < 8; ++j) {
                data[i] = (data[i] << 1) | (b & 1);
                b >>= 1;
            }
        }
    }
 
    void reverseNibbles () {
        for (byte i = 0; i < pos; ++i)
            data[i] = (data[i] << 4) | (data[i] >> 4);
    }
 
    void done () {
        while (bits)
            gotBit(0); // padding
        state = DONE;
    }
};
 
class OregonDecoderV2 : public DecodeOOK {
  public:  
 
    OregonDecoderV2() {}
 
    // add one bit to the packet data buffer
    virtual void gotBit (char value) {
        if(!(total_bits & 0x01))
        {
            data[pos] = (data[pos] >> 1) | (value ? 0x80 : 00);
        }
        total_bits++;
        pos = total_bits >> 4;
        if (pos >= sizeof data) {
            Serial.println("sizeof data");
            resetDecoder();
            return;
        }
        state = OK;
    }
 
    virtual char decode (word width) {
       if (200 <= width && width < 1200) {
            //Serial.println(width);
            byte w = width >= 700;
 
            switch (state) {
                case UNKNOWN:
                    if (w != 0) {
                        // Long pulse
                        ++flip;
                    } else if (w == 0 && 24 <= flip) {
                        // Short pulse, start bit
                        flip = 0;
                        state = T0;
                    } else {
                        // Reset decoder
                        return -1;
                    }
                    break;
                case OK:
                    if (w == 0) {
                        // Short pulse
                        state = T0;
                    } else {
                        // Long pulse
                        manchester(1);
                    }
                    break;
                case T0:
                    if (w == 0) {
                      // Second short pulse
                        manchester(0);
                    } else {
                        // Reset decoder
                        return -1;
                    }
                    break;
              }
        } else if (width >= 2500  && pos >= 8) {
            return 1;
        } else {
            return -1;
        }
        return 0;
    }
};
 
OregonDecoderV2 orscV2;
 
volatile word pulse;
 
void ext_int_1(void)
{
    static word last;
    // determine the pulse length in microseconds, for either polarity
    pulse = micros() - last;
    last += pulse;
}
float temperature(const byte* data)
{
    int sign = (data[6]&0x8) ? -1 : 1;
    float temp = ((data[5]&0xF0) >> 4)*10 + (data[5]&0xF) + (float)(((data[4]&0xF0) >> 4) / 10.0);
    return sign * temp;
}
 
byte humidity(const byte* data)
{
    return (data[7]&0xF) * 10 + ((data[6]&0xF0) >> 4);
}
 
// Ne retourne qu'un apercu de l'etat de la baterie : 10 = faible
byte battery(const byte* data)
{
    return (data[4] & 0x4) ? 10 : 90;
}
 
byte channel(const byte* data)
{
    byte channel;
    switch (data[2])
    {
        case 0x10:
            channel = 1;
            break;
        case 0x20:
            channel = 2;
            break;
        case 0x40:
            channel = 3;
            break;
     }
 
     return channel;
} 
void reportSerial (const char* s, class DecodeOOK& decoder)
{
    byte pos;
    const byte* data = decoder.getData(pos);
    Serial.print(s);
    Serial.print(' ');
    for (byte i = 0; i < pos; ++i) {
        Serial.print(data[i] >> 4, HEX);
        Serial.print(data[i] & 0x0F, HEX);
    }
 
    // Outside/Water Temp : THN132N,...
    if(data[0] == 0xEA && data[1] == 0x4C)
    {
       Serial.print("[THN132N,...] Id:");
       Serial.print(data[3], HEX);
       Serial.print(" ,Channel:");
       Serial.print(channel(data));
       Serial.print(" ,temp:");
       Serial.print(temperature(data));
       Serial.print(" ,bat:");
       Serial.print(battery(data));
       Serial.println();
    }
    // Inside Temp-Hygro : THGR228N,...
    else if(data[0] == 0x1A && data[1] == 0x2D)
    {
       Serial.print("[THGR228N,...] Id:");
       Serial.print(data[3], HEX);
       Serial.print(" ,Channel:");
       Serial.print(channel(data));
       Serial.print(" ,temp:");
       Serial.print(temperature(data));
       Serial.print(" ,hum:");
       Serial.print(humidity(data));
       Serial.print(" ,bat:");
       Serial.print(battery(data));
       Serial.println();
    }
 
    decoder.resetDecoder();
}
 
void setup ()
{
    Serial.begin(115200);
    Serial.println("\n[ookDecoder]");
    attachInterrupt(1, ext_int_1, CHANGE);
 
    //DDRE  &= ~_BV(PE5); //input with pull-up
    //PORTE &= ~_BV(PE5);
}
 
void loop () {
    static int i = 0;
    cli();
    word p = pulse;
 
    pulse = 0;
    sei();
 
    if (p != 0)
    {
        if (orscV2.nextPulse(p))
            reportSerial("OSV2", orscV2); 
    }
}

Je me suis aperçu que dans les pins 2 et 3 de mon arduino , le fils insérés avait du jeu d'ou mauvais contact!!

Maintenant cela marche bien j'ai les infos channel , temp ,hum et nib Bat.
Par contre la portée est faible 4 m max.
J'ai un fil de 15cm branché sortie antenne...

C'est ce que mentionne également l'auteur de ton article

Y a t'il une personne qui aurait réalisé un montage avec un récepteur 433Mhz et qui aurait une portée beaucoup plus importante?
Si oui merci de me donner le type de récepteur...

Le mien c'est celui ci, module de gauche

archibal11:
Y a t'il une personne qui aurait réalisé un montage avec un récepteur 433Mhz et qui aurait une portée beaucoup plus importante?
Si oui merci de me donner le type de récepteur...

Le mien c'est celui ci, module de gauche
http://image.dhgate.com/albu_261635291_00/1.0x0.jpg

bonsoir
ce genre de petit recepteur surement à supereaction ne comporte pas de vrai antenne (digne de ce nom), c'est le genre de récepteur utilisé sur les prises telecommandées
ça reagit en champ proche et c'est sujet au bruit .

il y a a 2 solutions assez simple soit mettre une antenne accordée un peu digne de ce nom, soit passer à du recepteur moins cheap superhétérodyne (avec une bonne antenne)
genre ça
http://www.lextronic.fr/P865-recepteur-43392-mhz-rrq3-433.html
genre ça

Avec un récepteur superhétérodyne et une antenne accordée quel porté puis je avoir?

archibal11:
Avec un récepteur superhétérodyne et une antenne accordée quel porté puis je avoir?

bonjour
c'est typiquement le genre de question à laquelle il est impossible de répondre
un bilan de liaison s'evalue en fonction de toute la chaine emission/reception.

tu peux déjà essayer de mettre une antenne adaptée à ton recepteur existant
un bon lien pour "tailler" des antennes en 434
http://www.rfm.com/corp/appdata/antenna.pdf

Quel récepteur 433Mhz utilises-tu ?
Moi je ne reçois rien...
J'ai une Arduino UNO, un récepteur XD-RF-5V, et une sonde Oregon V3 THGR800 (qui fonctionne bien avec le récepteur Oregon)
Mes tests 433Mhz fonctionnent bien avec RCswitch, mais impossible de recevoir les Trames Oregon, y compris avec la version
// Oregon V3 decoder revisited - Dominique Pierre

j'ai acheté un récepteur superhétérodyne, et en branchant un fil de 15cm comme antenne, je recois bien mes infos .
La sonde est a l'extérieur au RDC et le RX dans mon bureau a l'étage ,distance environ de 15 m...

Si tu mets ta sonde a coté du RX , as tu des infos? Si non, peut etre un problème de décodage..