TLDR: Since I'm using stock code, its likely a hardware related issue likely a bad solder joint or short or something. Will have to look into it later.
Hardware:
Moteino Trace Antenna 915MHz with Flash Memory Chip
LowPowerLab BME280 Board
2 CR2032 in series in a battery holder with on/off switch
1 MOhm resistor from VIN to A7 - Battery Monitor
1 MOhm resistor from A7 to A3 - Battery Monitor (A3 is set to LOW so same as ground)
Tools:
LowPowerLab FTDI Adaptor (default settings)
Software:
Weather Mote Example
Changes (only configuration settings):
- NODEID to 41
- NETWORKID to 200
- BATT_FORMULA(reading) reading * 0.00322 * 2
- Removed listening section for OTA programing (as directed to in the file)
Expected Behavior:
Send data ~ every 2 mins
Actual Behavior:
Abnormal when powered by FTDI adaptor - only sends information once, have to unplug and replug into get it to send again
20:45:32.280 : /dev/ttyAMA0>:[41] BAT:5.03v F:75.99 H:50.99 P:29.94 SS:-37
20:45:31.954 : /dev/ttyAMA0>:[41] START SS:-36
20:29:15.771 : /dev/ttyAMA0>:[41] BAT:5.02v F:75.76 H:62.95 P:29.94 SS:-36
20:29:15.445 : /dev/ttyAMA0>:[41] START SS:-35
Abnormal when powered by battery - sends information constantly
20:28:49.412 : /dev/ttyAMA0>:[41] BAT:5.40v F:74.30 H:60.80 P:30.09 SS:-42
20:28:49.004 : /dev/ttyAMA0>:[41] BAT:5.41v F:74.30 H:61.16 P:30.09 SS:-42
20:28:48.600 : /dev/ttyAMA0>:[41] BAT:5.44v F:74.26 H:61.38 P:29.98 SS:-43
20:28:48.265 : /dev/ttyAMA0>:[41] START SS:-43
Hypothesis:
Hardware
- Potential short circuit / solder bridge / wire whisker (passed my initial visual inspection)
- Voltage divider resistor that goes from: A7 to A3 should go from: A7 to GND. A3 is set to go LOW, but if A3 gets set to an input and high impedance, A7 could potentially see VIN aka 6V which could be a problem. This just seems like a red herring right now
Software
- Seems like there is an issue surrounding
byte sendLoops=0;
byte battReadLoops=0;
It seems to be getting stuck and not sending when powered via the FTDI adaptor but it seems to be never sleeping when powered by the battery and sending every single loop.
The frustrating thing is that it was working, but then I started changing code, broke then fixed a wire, added resistors to monitor battery. Not sure what caused it to break. I went back to the stock code, but it is still acting funny. Since the code is "stock" and just configured, this seems to point to a hardware issue. With that in mind this seems like I need to check over the hardware.
Thanks for letting me put my words down and talk it through.
Update:
Started over using all new parts.
Didn't work, checked battery voltage and it was lower than it should. Seemed node was drawing too much current or something?
Changed to Li-ion battery instead of using coin cell. Node is working now as expected.
Maybe I'm asking too much of 2 - CR2032s in series. Reading more in the forum, seems using coin cells takes extra special care and consideration. Will have to look into it more later.