Further to the above, I removed the runCount tracking (so no file writes) but it still fails after a while.
After these failures I must re-flash as I did not find a way of avoiding this.
[later] I replaced the battery input with a USB charger. The no-write test completed 1000 loops before I killed it. I am now running the full test (counting run numbers) and we will see.
1100 loops so far. Time to go back to battery and see if it dies again.
OMG, accidentally left the voltmeter connected and saw that the voltage is only 2.8v. from the 3.3v output. It is 3.9v out of the 5v so I will now use this.
So, was I looking at a power issue all this time? Sad…
Running on the 3.9v … worked well and stopped at 650 iterations.
I now moved to using a small adjustable DC-DC set to 3.3v and am running a test. Fingers crossed.
So far so good, test stopped.
I now confirmed that the problem is not the 5v/3.3v attachment but the battery. After exactly 1 minute it drops from 5v to 4v. This is unexpected, and may be in response to the low power usage? Here is an example of the data published by the test rig. The columns are date/time, runCount, time, readvdd33(), temp
Notice how at after run 20 vdd drops from 3.2v to 2.7v. Some time later it will die.
20150216154225 9 2830497 3.194 26.5
20150216154230 10 2802349 3.205 26.5625
20150216154235 11 2820747 3.206 26.5625
20150216154241 12 2903959 3.207 26.5625
20150216154246 13 2817140 3.209 26.5625
20150216154251 14 2769595 3.208 26.5625
20150216154256 15 2821660 3.210 26.5625
20150216154302 16 2806267 3.209 26.5625
20150216154306 17 2823125 3.211 26.5625
20150216154311 18 2813864 3.215 26.5625
20150216154316 19 2794999 3.211 26.5625
20150216154321 20 2772898 3.213 26.5625
20150216154327 21 2783713 2.691 26.5625
20150216154332 22 2910990 2.673 26.5625
The above has a 2s dsleep, and the program takes about 3s to run, so an item is published every about 5s.
I am now using another battery and it does not exhibit this “feature”. I will let it run in the bedroom for a day and see how it goes. Fingers still crossed.