Project

General

Profile

OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-)

Added by jm_wsb over 6 years ago

Hi,

I’ve followed the guide: http://jeelabs.net/projects/cafe/wiki/Receiving\_OOKASK\_with\_a\_modified\_RFM12B to modify a standard 868MHz jeenode to receive OOK messages.

I’ve did:
- 100 ohm resister between P1 Analog and FSK/DATA from RF12MB receiver
- load the sketch RFM12B_OOK, also tried OOK_reley2 and demo_kaku (also RF12demo)

But I never succeed in receiving any message from a KAKU type A transmitter (remote control) or an ELRO one.

The only thing I did not change was the capacitor.
I tried it from different ranges, but without success.

Anyone an idea what I am missing.

Thanks in advance,
jeroen


Replies (77)

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jardar about 6 years ago

don’t know if this fixes your problem, but I had to lower the DRSSI value to be able to receive anything. I had to much noise on the signal.
Try changing the rf12_control(0x9489) value to 0x948A or 0x948B

Jardar

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jm_wsb about 6 years ago

Hi Jardar,

thanks for the feedback
I tried it, but still no KAKU or ELRO signal received.

I gave up and ordered yesterday a RFX433 tranceiver. Looks like great device for many protocols.

Best regards,
jeroen

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jseixal about 6 years ago

I’ve been facing a problem that is more or less like Jeroen’s, although my setup has two major differences when compared to his. One is the fact that I’m using a Jeelink instead of a Jeenode, and the other is that I haven’t (yet) replaced the C-arssi capacitor to improve the sensitivity (unless it doesn’t work without replacing the C-arssi capacitor, I’ll avoid replacing it). I’ve attached a picture with the modified RFM12B in the Jeelink. Modified JeeLink (reduced - martynj)
I followed the instructions in http://jeelabs.net/projects/cafe/wiki/Receiving\_OOKASK\_with\_a\_modified\_RFM12B and I’m using the attached sketch to try and pick any transmissions from a THGR228N sensor from Oregon Scientific, but so far, no success. It strikes me as odd that the ISR (ANALOG_COMP_vect) function is never called, if I understand correctly, it should be called every time new data is received by the RFM12B. I expected that something would be picked by the receiver, even if it were just noise…
The spi_init () function is cryptic for me and I wonder if it should be changed because of the modification of the RFM12B. In the rf12_init_OOK () I made the changes that seem correct to receive data from the THGR228N sensor.
Apart from the risk of seriously messing up the Jeelink, I was wondering if anyone could see anything (either in the picture or in the sketch) that could be the reason for the Jeelink not to pick any data from the THGR228N sensor.
Thanks in advance for any help or hints.

Best regards,
Jorge.

Ook_OSV2.pde (17.4 KB) Ook_OSV2.pde
DSC03570_shrunk.jpg (210 KB) DSC03570_shrunk.jpg Modified JeeLink (reduced - martynj)
740

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by joop about 6 years ago

Hi,hardware is ok I think, you use AI0 pin 23.
Pin 14 in software as an interrupt pin.

I changed mine jeenode C_arssi back to 4.7nf

Loaded Ook_OSV2.pde in my jeenode.
Data is on the FSK/DATA/nFSS pin RFM12B
Debug led is blinking when receiving.
No data is decoded any distance.

Next I loaded it with ookRelay2.ino with some changes.
Data is on the FSK/DATA/nFSS pin RFM12B
Debug led is blinking when receiving.
Sometimes data is decoded output on screen when
slowly moving an turning transmitter when transmitting
within one meter.

So hardware seems ok , there is data on FSK/DATA/nFSS pin RFM12B
and interrupts are generated,maybe you can test this with a led
and resistor.? 1k or > .

There is no output with your file ,can you test it with ookRelay2.ino ?

changed defines in ookRelay2.ino (both are defined on the same pin)
#define PIN_868 14 // AIO1 = 868 MHz receiver
#define PIN_433 14 // 17 AIO4 = 433 MHz receiver

changed OOK_init in ookRelay2.ino
your values for 433 Mhz
0x8017
0xA620

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by martynj about 6 years ago

Joop - just a question. What is the reason for the series resistor between FSK/DATA/nFFS and Analog input pin? Just convenience for making the connection or the R has some function?

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by joop about 6 years ago

Martyn,the idea was protecting the RFM12B FSK/DATA/nFSS and AI0 pin ATMEL when for some
reason (different software) the AI0 becomes an output. ( connecting 2 outputs together)

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jseixal about 6 years ago

Hi Joop!

Thank you very much for your reply.

I tried ookRelay2.ino with the changes and still get nothing on the serial.
Do you think the changes to ookRelay2.ino you mention might explain the different behaviour of your jeenode and my jeelink? If that’s not the case, I think it’s safe to say the problem is not in the software.

I will try to figure out how exactly to add the debug LED and resistor to the jeelink and then ask the person that soldered the 100 ohm resistor between the FSK/DATA/nFSS and the AI0 pin 23 if he can make that additional modification (along with the C_arssi capacitor). Please feel free to give any hints/advice you think might be useful to someone with no knowledge in electronics.

Best regards,
Jorge.

P.S. Sorry for the over-sized picture from my previous post. In the preview I couldn’t see any picture, only the link to it.

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by martynj about 6 years ago

That’s a 434MHz RFM12B in the JeeLink - but that is what you want, right?

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jseixal about 6 years ago

That’s right. I’m trying to collect data from an Oregon Scientific temperature/humidity sensor that sends data on 433.92MHz.

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by joop about 6 years ago

Jorge ,Maybe it’s a little difficult to add a debug-led on a Jee-Link
because it’s all SMD , maybe you can do without.

Just for testing you can also skip the capacitor change for now , I
received KAKU and HEZ sometimes within 4-5 meter , not in 1-3 meter and
not in 6-> meter.(with original 4,7 nf capacitor).

Attached is the file from Dominique Pierre I changed it slightly.
http://jeelabs.net/projects/cafe/wiki/Decoding\_the\_Oregon\_Scientific\_V2\_protocol

Somehow the pinning for jeenode is not right. it should be 14 .
All changes in this file are marked **** change , so you can find it back.

You will need to use I tested it with arduino 1 and latest Jeelib.
It receives KAKU and HEZ , in a few days I can lend a oregon .THGR 122NX
and will try it , but I think this software is already right to decode
V2 en V3 Oregon protocol.

output screen

[ookDecoder]
KAKU 720F
HEZ 54CD4CCDCC00
HEZ 54CD4CCDCC00
KAKU 720F
HEZ 54CD4CCDCC00

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jseixal about 6 years ago

Joop,

I had the LED added to the Jeelink (I asked for the change before reading you last post) and tried it with both ookRelay2.ino and Ook_OSV2_433.ino, but the result is the same as before, no output on the serial. I tried both sketches at different distances (1-3 meters; 4-5 meters and >6 meters). A small note, the resistor added is 560ohm instead of 1k as you suggested. an this influence the results I get?
Here’s a picture of the modified Jeelink. Perhaps you can check whether the LED has been correctly added.

The behaviour of the LED when running both sketches is the same, it blinks when the sketch is being uploaded and momentarily right after. Afterwards it just remains on but somewhat dimmed. I came to notice later on that it remains on only when the Serial Monitor window from the Arduino IDE is open. When the window is closed, the LED blinks quite often (2-3 times per second).
Regarding Ook_OSV_433.ino, I tested it unchanged and tested it replacing rf12_control(0xA618) with rf12_control(0xA620), just to try the exact frequency mentioned in the OS sensor, but still, no output on the serial.
Thank you very much for your time and for your help.
Cheers,
Jorge.

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by joop about 6 years ago

It looks ok , can you make your led blink with the code below ?.

#define DEBUG_LED 14

Best to put this right after setup() .
pinMode(DEBUG_LED, 1);
// brief LED flash on startup to make sure it works
digitalWrite(DEBUG_LED, 1);
delay(1000);
digitalWrite(DEBUG_LED, 0);
delay(1000);
digitalWrite(DEBUG_LED, 1);
delay(1000);
digitalWrite(DEBUG_LED, 0);

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jseixal about 6 years ago

Hi!

Over the weekend, I had the chance to have my jeelink listening this remote control which sends at 433MHz using the KAKU protocol (http://www.fabertronics.nl/domotica/di-o/dio-53-starterset-3x-stekkermodule-afstandsbediening.html). I still get no data on the serial, but, again, I noticed a different beaviour when the serial monitor window from the Arduino IDE is open and when it’s closed. With the window open, the LED is on all the time. When the window is closed, there was a very clear pattern of the LED blinking when a remote control button was pushed and no blinking when the button is released. It seems that the data is being received by the Jeelink, but for some reason it’s not being displayed in the serial monitor window. Assuming there’s not too much noise in the data (the sketches I’ve tried are capable of decoding KAKU data), is there some setting I might be missing that would keep the sketch from writing data to the serial?

Cheers,
Jorge

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by joop about 6 years ago

Interesting Jorge ,

With the window open, the LED is on all the time.
This is strange , this means when window open (serial port open) AIO has a HI level.

When the serial port is open is the LED as bright as digitalWrite(DEBUG_LED, 1); ?
When remote data is received is the LED as bright as digitalWrite(DEBUG_LED, 1); ?

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jseixal about 6 years ago

Do you think it might be related to the hardware modifications?

I tried setting digitalWrite(DEBUG_LED, 1); in the setup() function and repeated the two actions (serial port is open and remote data is received) with the LED already on. In both cases the LED becomes sightly brighter while the actions are occurring than when they’re not.

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by joop about 6 years ago

It should not be related to the hardware modification , be sure to
set the led of. digitalWrite(DEBUG_LED, 0);
before using the rf12_init_OOK () function and don’t use it after this function.

something like this :

static void test_debug_led (){
pinMode(DEBUG_LED, 1);
// brief LED flash on startup to make sure it works
digitalWrite(DEBUG_LED, 1);
delay(100);
digitalWrite(DEBUG_LED, 0);
delay(100);
digitalWrite(DEBUG_LED, 1);
delay(100);
digitalWrite(DEBUG_LED, 0); }


void setup () {
    test_debug_led ();
    Serial.begin(57000); 
    Serial.println("\n[ookDecoder]");
    rf12_init_OOK ();                     // 
    }

Do you see [ookDecoder] as output on the serial port at startup.?

With the window open, the LED is on all the time.
It still puzzels me, I can’t reproduce it on my JeeNode.

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jseixal about 6 years ago

I included the “test_debug_led ()” function but the result is the same as before.
The [ookDecoder] is displayed in the serial monitor window. I’ve also included some Serial.print() statements in the “loop ()” function and in the “decode (word width)” function of the classes for OregonDecoderV2, OregonDecoderV3 and KakuDecoder and, although there is a constant flow of data being displayed in the serial monitor window, the “decode (word width)” function always returns “0”. The constant flow of data seems to be consistent with the fact that the LED is always on, but still, where is that data coming from? I tried using the remote control (Kaku sender) from several different distances (~1m, 3-4m and >6m) but never a message is decoded as a valid message.
After trying this, by accident, I noticed something interesting. If (with the serial monitor window open) I hold the antenna between my fingers, the LED goes off and the flow of data stops and new data is displayed infrequently (when I push a button on the remote control, and probably when there is some data from the temp/hum sensor). Still, none of the messages is decoded as a valid message.
I’m guessing this is probably related to the C_arssi capacitor that hasn’t been changed, what do you think?

Cheers,
Jorge

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by joop about 6 years ago

When you disable the OOK-mode and put it in JeeNode mode see below
The led stays out ?

void setup () {
    test_debug_led ();
    Serial.begin(57000); 
    Serial.println("\n[ookDecoder]");
    // rf12_init_OOK ();              // OOK-mode. 
    rf12_initialize(0, RF12_433MHZ);  // "JeeNode" mode
    }

If it’s noise ,it’s not related to the C_arssi capacitor.
If the LED stays out with disabled OOK-MODE it probably will be noise.
The RFM12B 433 Mhz module could be to sensitive ,this can maybe fixed with the
trick from Jardar.

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by joop about 6 years ago

I’ve tested the JeeNode with 4.7nf and 150pf capacitor using the Oregon sensor THGR 122NX .

JeeNode with 4.7nf

Sensor       : THGR 122NX 
Module       : RFM12B 868 module initialized at 433 Mhz
Modification : RFM12B FSK/DATA/nFSS connected to AIO .
Capacitor    : Standard 4.7nf Arssi capacitor.
Software     : Ook_OSV2_433_v1.ino    
Distance     : 4 meter


Result 5 hex strings received after 20 minutes. 

CRES BEBAFABFFEAAEEAFBAFEFABFEEFBAFFAEBEA0F
CRES BEBAFABFFEAAEEAFBAFEFABFEEFBAFFAEBEA0F
CRES BEBAFABFFEAAEEAFBAFEFABFEEFBAFFAEBEA0F
CRES BEBAFABFFEAAEEAFBAFEFABFEEFBAFFAEBEA0F
CRES BEBAFABFFEAAEEAFBFFEFABFEEFBAFFFEBAE0A

JeeNode with 150pf

Sensor       : THGR 122NX 
Module       : RFM12B 868 module initialized at 433 Mhz
Modification : RFM12B FSK/DATA/nFSS connected to AIO .
Capacitor    : 150 pf
Software     : Ook_OSV2_433_v1.ino    
Distance     : 0 - 8 meter (with RFM12B 868 Mhz double antenne-length)


Result every 40 sec a hex string is received

CRES BEBAFABFBEFAAABEFBFFFABFFEEBEBBABBFB0B
CRES BEBAFABFBEFAAABEFBFFFABFFEEBEBBABBFB0B
CRES BEBAFABFBEFAAAFEFAFFFABFFEEBABBEBBAA0A
CRES BEBAFABFBEFAAAFEFAFFFABFFEEBABBEBBAA0A
CRES BEBAFABFBEFAAAFEFAFFFABFFEEBABBEBBAA0A
CRES BEBAFABFBEFAAAFEFAFFFABFFEEBABBEBBAA0A
CRES BEBAFABFBEFAAABEFEFFFABFFEEBEBBFBBBF0E
CRES BEBAFABFBEFAAABEFEFFFABFFEEBEBBFBBBF0E
CRES BEBAFABFBEFAAABEFEFFFABFFEEBEBBFBBBF0E

You can adjust the sensitivity of the RFM12B 433 Mhz with the LNA gain
and DRSSI values if there’s to much noise (LED always stays on ?).

http://jeelabs.net/boards/7/topics/288?r=512\#message-512

Tool

http://tools.jeelabs.org/rfm12b

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jseixal about 6 years ago

I disabled the OOK-mode and indeed the LED stays off.
Then, I reverted the change and tried Jardar’s trick on the Receiver Control setting and with the DRSSI values he suggests, the LED stays off and when there is data either from the temp/hum sensor or the remote control, the LED blinks. I spent a while trying different values for LNA Gain, but can’t tell which values work the best. I settled for 0x948B. The good news is that after a long while waiting for data from the sensor from various distances, I finally started receiving data with the sensor at about 25cm. This is what it looks like:

OSV2 1A2D10F3611630063AA3
CRES BEBAFABFBEBBFFFEEEAEFEBFFBEEFFEABBFB2A
CRES BEBAFABFBEBBFFFEEEAEFEBFFBEEFFEABBFB2A
OSV2 1A2D10F3611630063AA3
CRES BEBAFABFBEBBFFFEEEAEFEBFFBEEFFEABBFB2A
OSV2 1A2D10F3611630063AA3
CRES BEBAFABFBEBBFFFEEEAEFEBFFBEEFFEABBFB2A
OSV2 1A2D10F3611630063AA3
CRES BEBAFABFBEBBFFFEEEAEFEBFFBEEFFEABBFB2A
OSV2 1A2D10F3611630063AA3
CRES BEBAFABFBEBBFFFEEEAEFEBFFBEEFFEABBFB2A
OSV2 1A2D10F3611630063AA3
CRES BEBAFABFBEBBFFFEEEAEFEBFFBEEFFEABBFB2A
CRES EEBBFFABEFEEAB

I don’t know why I’m getting CRES decoding (actually I was wondering why you were getting it also, since you have a OS sensor) but it might be the same data as the OSV2 because they come together most of the time. I also got a few HEZ messages which I assume are from the remote control, although I was expecting it to be KAKU. I couldn’t figure out yet what’s the best distance to received data from the remote control.
I will now try the distances at which I get good reception from both devices to see if replacing the C_arssi capacitor is indeed needed. Would you suggest doing it?

A big “thank you” for your time and for your help, I really appreciate it.

Cheers,
Jorge.

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by joop about 6 years ago

You certainly should change the capacitor ,it will make a big difference.
Nice that it all works , now it needs some fine tuning.

I tried some GAIN and DRSSI values , I also changed the data rate.

Highest sensitivity = GAIN max    and DRSSI -103 dBm
Lowest  sensitivity = GAIN -20dBm and DRSSI -73 dBm

Values I used for 868 module

Data rate      : 0xc647 = 4.8kbps 
GAIN and DRSSI : 0x9481 = LNA Gain max  DRSSI = -97 dBm

now I get these hex strings

OSV2 1A2D10EC811520044073
OSV2 1A2D10EC811520044073
OSV2 1A2D10EC911520044165
OSV2 1A2D10EC911520044165
OSV2 1A2D10EC11161004390B
OSV2 1A2D10EC11161004390B
OSV2 1A2D10EC311610043B27
OSV2 1A2D10EC311610043B27
OSV2 1A2D10EC411620043D7A
OSV2 1A2D10EC411620043D7A
OSV2 1A2D10EC711620044040
OSV2 1A2D10EC711620044040

Wich is right I think,each string is send out twice by the sensor.
The two first bytes of the string represent the type of sensor.(1A2D)
Sometimes I get HEZ and CREZ strings but not often.

These values could only be right for 868 RFM12B module intialized as 433 Mhz
because the 433 Mhz module is much more sensitive for 433 Mhz RF.
You have to try different values for your situation (with 150pf capacitor).

Interesting to know what the results will be in your situation.

Joop

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by joop about 6 years ago

The timing from cresta (pulse-width) is close to oregon.

Oregon
if (200 <= width && width < 1200) {
byte w = width >= 700;

Cresta
if (200 <= width && width < 1300) {
byte w = width >= 750;

When I disable the cresta code then stable Oregon data is printed on the screen.

RE: OOK receiver based on modified Jeenode voor OOK, ELRO devices (pulling my hair out :-) - Added by jseixal about 6 years ago

I’ve had the capacitor replace on the Jeelink (the new is 220pf, within the 150-300pf range) but the results so far are a bit disappointing. I didn’t find the time yet to try different values for the GAIN and DRSSI, but the only change I noticed in the brief tests I made is that data is now received at an even smaller distance (<10cm). I’ll try different values for the GAIN and DRSSI and ask for a double check on the capacitor to see if something went wrong with the modification. I’ll post an update when I have some results.

Cheers,
Jorge.

(51-75/77)