RFM69HW + MCP1700-33 + FOTA = potential overload
manutremo last edited by
I've been struggling for some time to troubleshoot this combination and now that I think I found the reason I thought I shuold share it with the community in case someone else has had or is facing the same issue.
In my battery powered nodes I've been using a 16340 lithium battery as a power source. Since these batteries can go up to 4.2v when fresh, I've been using a MCP-1700-33 LDO, which has a very low quiescent power, and are rated to up to 250mA. The MCP reduces the voltage from the batt to 3.3v when it's higher, and then tracks it down when the batt goes below that, until 2.8v when the mini pro stops working.
On the other side, I'm using rfm69 radios. I chose the HW version since they were cheaper than the non-HW, even though I knew that they were probably overkill for the size of my home. I've been using the 2.2.0 dev branch, and the new RFM69 driver with ATC enabled.
The nodes have been working well until I tried to implement FOTA. FOTA send slong packets of data so communications needs to be very good for it to succeed. In my case, my nodes were stopping at the middle of the update.
Long story short, it turned out that if the RFM doesn't get good reception, the ATC bumps up its power and at some point, the MCP1700 gets overloaded, lowering the output voltage, which renders the RFM69HW into a weird state.
What is interesting is that the RFM69HW datasheet states that the consumption at +20dB is 130mA, which added to the arduino + rest of deviced won't go over the max MCP1700 output of 250 mA. However, there is probably some current peak which goes over that but I'm unable to detect with my multimeter.
When this happens, the MCP1700 output goes down to about 1.7v and stays at around 130mA, with the RFM69HW sending a constant signal at +20dB and the Arduino seems to get stuck into some waiting loop.
I've been able to reproduce this in my workbench, and I also found someone else at the lowpowerlab forums who experienced the same here.
This guy stated that power levels of up to +15dB are fine, so I added
#define MY_RFM69_MAX_POWER_LEVEL_DBM 13
to my sketch, and problems stopped, so I can now perform FOTA updates with no problem.
I hope this helps.
Have you tried with a beefy capacitor near the radio module? In fact the HW version is less tolerant to low voltages compared to the normal W version (check datasheet). Just in case you will ever need full power, you may use LiFePO4 batteries that don't require any regulator (I am very happy with those since I can power a node with a single AA battery)
BTW, have you tried on the bench to actually measure current consumption during FOTA using a normal power supply without the regulator? Maybe it is a faulty regulator.
@manutremo interesting results, thanks for sharing. This would probably apply to signed messages as well as FOTA, sine both use the full packet length.