OK, in continuing my data collection journey, I need to switch from the RFM12 to the RFM69 get more range.
To this end I’ve build a clone of the EmonTH on breadboard using an Arduino Pro Mini, DS18B20 and RFM69CW.
I’ve programmed it, and it reads the temperature just fine (via the monitor), but I get nothing on EmonHub/EmonCMS.
After spending a couple more hours checking the code, triple checking the wiring etc, I swapped in a new RFM69CW, but this didn’t work either. Using another RFM12B (with alternate firmware obviously) works as expected.
Swapping back to the RFM69CW, I accidentally noticed that if I hold my finger on the antenna, it transmits as it expected and data shows up in EmonCMS.
And ideas what’s going on? The antenna is firmly soldered and the correct 82mm (for 868Mhz) length, with no loose connections.
I’m not an r.f. expert (@Bill.Thomson help!), but my first suspicion would be the breadboard - is the supply adequately decoupled very close to the module? The '69 has a higher peak current when transmitting, so that could also be an influence.
I doubt that it’s this - that changes all the library functions around and it plain doesn’t respond at all if that’s wrong. More likely: is the frequency correct - is it an 868 MHz module and is the frequency in software 868 MHz? They DO work on the wrong (inconsistent) frequency, but over a limited range. And a correctly set up Tx will work to a correctly set up Rx on the other frequency over an even more limited range - a few inches.
See https://learn.openenergymonitor.org/electricity-monitoring/networking/which-radio-module to check you have the right hardware.
From the top…
Yes, I have decoupling caps right next to the RFM69.
Yes, the RF69_COMPAT is set to 1.
Yes, frequency is set as RF_freq=RF12_868MHZ;
I also wondered if while I ordered the 868MHz hardware, they sent the 433MHz hardware?
But looking at [Learn | OpenEnergyMonitor]
the cap is missing, suggesting it’s the 868Mhz version.
It’s been running/powered over a USB link to the laptop, I also tried running it from batteries in case it was the 3.3V regulator on the USB link browning out, but it didn’t help either.
OK, so I’ve made a little progress, thinking about what Robert said, I’ve added some electrolytic caps to the breadboard and I’ve finally got it transmitting on it’s own! Yay! So it’s a power issue!?
Well, sort of. It only works plugged into the USB lead.
If I power it from a battery, it doesn’t work. Right up until the moment when I disconnect the battery, then I may get a single burst of data that turns up in EmonCMS.
So near yet so far. I’m beginning to think this is all being caused by the breadboard, but more RFM69’s & Arduino’s are still in transit from China, so I can’t build a new soldered up prototype just yet!