Well you’re not the only one. I share one of my X-files.
For my nodes I use a 3.7V LiCh battery which works perfect for low temperatures. But sometimes 2 of the node start transmitting in a loop without any reason I could know off.
Just a few days ago (not even cold weather) one of the node started transmitting in a loop again and because I was home and use a minimal debug info on the serial port (just a unique char for certain points in the program) I found out that the node kept rebooting after a transmission. At first I thought I made program error, but that couldn’t be because the same code is used in more nodes which work fine.
So Measuring the voltage (for that time 3.3V idle) I found out that when the node transmitted and pulled the 50mA current it needed, it dropped the voltage to 2.3V. It could be a BrownOutDetection kicking in but for these nodes I always use the MiniCore bootloader with a BOD of 1.8V so at that voltage the BOD shouldn’t kick in yet. Strange things.
After some searching I found out that :
-
I removed the batter from the rebooting node and when I applied a default load of 5mA to the battery, the voltage stays ok (the remaining 3.3V). But when I applied a load of 50mA it drops to 2.3V.
A battery from a node which didn’t show the reboot after transmission (same model battery) didn’t show that behavior (ok 0.1V load drop but I can live with that). The difference is that the batteries used in the nodes which show the reboot behavior are from a webshop which sells the battery cheaper then the original batteries which I bought from RS Components. -
The nodes which show the reboot behavior after transmittion, where all programmed with a ISP programmer and not with a bootloader and serial connection. So maybe there was something wrong with that. To test this, I wrote a test program showing the MCUSR on the serial output and a heartbeat message (showing the loop is still running).
I flashed a Arduino pro mini with the bootloader with a 1.8V BOD and tested it with a variable power supply connected to the VCC of the Arduino. Starting with 3.3V down to 1.5V. At 1.8V the heartbeat stops and after increasing the power above 1.8V the program showed the MCUSR with the BrownOut flag set. So the BOD 1.8V works.
Then I flashed the program by ISP and repeated the test. At 2.7V the heartbeats stop and after increasing the power above 2.7V the Arduino showed the MCUSR with the BrownOut flag set. Showing that when I program the Arduino by ISP the default 2.7V BOD settings are used. Thats a thing to remember and even better, to look into.
Conclusion :
-
When you find a bargain for components, check it first before really using it.
-
When you use the OmniBoot bootloader, burn the bootloader by ISP with the required BOD setting and upload you’re program by serial. Writing you’re program with ISP will set the default 2.7V BOD setting.
Hope that with the above findings this X-file case is closed.