A while back, JGJ Veken (Joop on the forum) added a page on the wiki on how the RFM12B can receive OOK.
I never got around to trying it … until now. In short: if you’re not afraid of replacing an SMD capacitor on the RFM12B wireless module, then it’s trivial!
Here’s what needs to be done – the capacitor on the left is 4.7 nF:
Unsolder it and replace it with a cap in the range 150..330 pF (I used 220 pF).
This cap appears to determine the time constant w.r.t. how fast the RSSI signal adapts to varying RF carrier signal strengths. With 4.7 nF, it’s a bit too sluggish to detect an OOK signal – which is nothing other than a carrier being switched on and off (OOK stands for: On / Off Keying).
The next trick is to connect the FSK/DATA/nFSS pin of the RFM12B via a 100 Ω resistor to AIO1 (a.k.a. analog 0, a.k.a. PC0, a.k.a. ATmega pin 23 – phew!):
As far as I can tell, this is a digital signal, so connecting it to AIO0 is really not a requirement. It might be more practical to connect it to one of the B0/B1 pins on the SPI/ISP header. Perhaps I should add a jumper in a future revision of the JeeNode PCB?
And lastly, the RFM12B must be placed in a special mode to get the RSSI signal onto that pin – i.e. compared to the RSSI threshold, also configured into the RFM12B (97 dBm).
All the pieces were there, and all I had to do was to follow the steps mentioned on the wiki page.
I made some changes to the code and added it as RF12MB_OOK.pde example sketch. Here is the main logic:
As you can see, all incoming data is forwarded using the normal RF12 mode packet driver.
Sample output:
It’s happily picking up FS20, EM10, S300, and KS300 packets, and the overall sensitivity seems to be excellent. And since it forwards all data as packets into the rest of the JeeNode network, I now have all the data coming in over a single JeeLink.
Sooo… with this “mod”, no separate OOK receiver is needed anymore for the 868 MHz frequency band!
PS. Haven’t done too many tests with this yet. Transmission is unaffected, as far as I can tell. Reception of packets with the RF12 driver still seems to work – it may be more susceptible to RF variations, but then again a “normal” packet uses FSK which is a constant carrier, so in principle this modification should not affect the ability of the RFM12B to receive standard FSK packets.
Did you also test OOK receiving at the 433 MHz band? For example KAKU/Oregon etc.?
Yes, interested too!
OOK-receiving should work if you have a 433 Mhz RFM12B module.
Sensitivity will be lower when using a module tuned for 868 MHz, but it should work.
See also tomorrow’s post…
interesting !
Great work joop!
I want to replicate this with an Arduino instead of a Jeenode. Could you let me know the minimum pins that have to be connected in order for it to initialize properly? From then on I understand all that is needed is the analogue/digital in. Thanks