-->
Page 1 of 2

Stops operating after some time on battery

PostPosted: Tue Jun 02, 2015 5:59 am
by Kasper Jepsen
Hi,

I have made a code example from the SDK and compiled on windows, which reads a temp/hym. sensor and sends it to the internet.
It did work for a long time running on battery, then i added the ADC and measured the batt voltage, now the upload stops after short time ~ some hours.
I have set the upload time to 15min between and goes into deep sleep.
Normally it wakes correct, and also before the ADC was added.

Anyone there has a clue?
I recall the SDK to be 1.0.0 or 1.0.5.

I am litle unsure if i have to update the module itself when i flash directly from eclipse, will it then update the firmware in the module?
And also what is the difference in the different flash option ~ Flash file ~ Flash all etc.?

BR
Kasper

Re: Stops operating after some time on battery

PostPosted: Tue Jun 02, 2015 12:22 pm
by GeorgeIoak
The ADC can only handle up to 1V input so you need a voltage divider on your measured signal to make the maximum input 1V.

There is also a command to read the Vcc voltage level so you could be using that instead of trying to directly read the battery level.

Re: Stops operating after some time on battery

PostPosted: Tue Jun 02, 2015 3:27 pm
by twaymouth
I am doing something similar and uploading temperature, battery voltage and supply voltage to thingspeak. In order for the ESP to read the analog values I found that they had to be taken before WiFi was connected otherwise the ESP would force reboot or get stuck in a boot loop. For my application simply taking the readings in the first lines of code before WiFi had connected was enough to make it stable.

Re: Stops operating after some time on battery

PostPosted: Tue Jun 02, 2015 3:34 pm
by AcmeUK
You can monitor the battery level using the readvdd33 function. See this post for info :-
http://www.esp8266.com/viewtopic.php?f=33&t=2485