Box has limited space for solar panel. Could get a same size but better power. Perhaps a mono-crystaline panel. Considered removing LED on the wemos but never saw it light when tested before setting outside. Getting good wifi -54dB.
The Wemos may run off the 3V. The 3V is regulated. LDO for the 3V might waste just as much I worry. Battery Voltage goes up to 4.2V when fully charged so bit risky to connect directly to Wemos without regulator. Will reduce WIFI power down few milliwatts when take it in. Will adjust it to take fewer reading by increasing sleep time when battery lower. Looking for any ideas so thanks @orange-assistant
Another (software only) idea to improve the run duration a little bit is to send the device directly to sleep after it delivered it’s values over mqtt. Might save a second or two…
But in your setup I’m quite confident the “standby” current draw is mainly in charge for draining the battery and not really the run time of the esp.
There’s the whole code. I agree it’s the standby draining most current but it may be the price of doing business on this hardware. I noticed when I updated HA the voltage would drop when HA came up again. Device may not have gone into deep sleep when MQTT offline.
I don’t see any deep_sleep.enter action in your code so the runtime will always be the configured 10 seconds even if your device does all it’s work in 6 seconds for example
So if add on this bit to end of mqtt and move whole section to near the bottom will this enter deep sleep sooner. Don’t want to update Wemos unless I on the right track.
… and check out the video tip of @orange-assistant above. That guy from Switzerland has released a bunch of really good videos about your subject (see YouTube). He measures and compares deep sleep current of several boards, identifies energy wasting components on the boards and removes them if possible. Really helpful.
Use fast connect on most of my ESP32s. Doesn’t work as well on this project due to placement of my WIFI access points, I suspect. Perhaps it has improved in recent versions of ESPhome. Will give it a try. Thanks for reminding me.
Early update. Even with just few hours weak sunlight over last 3 days the voltage seems to be on the way up.
[22:25:11][I][mqtt:214]: MQTT Connected!
[22:25:11][I][app:060]: setup() finished successfully!
[22:25:11][I][app:099]: ESPHome version 2021.11.1 compiled on Nov 25 2021, 22:14:52
[22:25:21][I][deep_sleep:072]: Beginning Deep Sleep
[22:34:52][I][mqtt:214]: MQTT Connected!
[22:34:52][I][app:060]: setup() finished successfully!
[22:34:52][I][app:099]: ESPHome version 2021.11.1 compiled on Nov 25 2021, 22:14:52
[22:34:52][I][deep_sleep:072]: Beginning Deep Sleep
You can see from esphome log the previous setting of run for 10 seconds then sleep. I turned on the automation to send mqtt message to wemos as provided on early sleep and then it turns of all in the same second. I’ve noticed that it still sometimes takes the 10 seconds. Max time possibly saved of runtime is 24 mins a day. Might just be enough saving on battery to get me through the winter.
I have sent off for a similar sized solar panel but monocrystaline which should have at least a 25% greater power to charge.
Have build a second battery powered espboard with temp and pressure sensor. The outside battery is still connected to solar panel but no sunshine in over a week. Slower reduction in voltage but it may be just because battery is around the 3.7v.
New esp12f is just a bare esp12F on adapter board with few pullup/down resistors and no capacitor across the vcc/ground. It is connected to 3.3v connection on the 18650 battery shield. I broke the charge usb port off the shield. Good smooth readings from the BMP280. Tried to connect outside battery to the wemos D1 by 3.3v but a lot of jitters in the temp graph and possible board restarts. Might try it again later with a capacitor across vcc/ground. Suspect it’s the wifi that causes the spikes in power upsetting the readings.
This is the circuit diagram for new weather station. The cost of doing business has gone down since I used the 3.3V output from the Battery shield regulator compared the 5V output. No jitter on the temp and pressure as seen when tried to run Wemos D1 mini from 3.3V.
Just one little hint:
The Wemos D1 mini already contains an internal voltage divider with 220k and 100k behind its A0 pin. If you want to increase the max input voltage you can do that with a single resistor in front of the A0 pin. This adds to the 220k resistor. In your case (4:1 divider for voltages up to 5V) you would simply put 180k in front of A0, so your resulting voltage divider would be (180k+220k) : 100k = 4 : 1.
With your circuit you will actually not get a 4:1 divider because the internal sum of 320k lies in parallel to your 110k and pulls it down more than you expected.
Yes, on my original board I had a single 220K resister with the Wemos. ESP12F didn’t so I had to supply the extra resistor. The 110K is just 2 220K in parallel. With 2 220k in series before it.
This board is running off the 5V.
The multiplication factor for wemos was 5.1817 to get peak voltage to 4.2V
and 4.8208 for ESP12F ( although this may have to be increased a little when I check it again).
Current draw should be very small to A0. Battery shield and voltage check is still probably biggest drain as @orange-assistant suggested , but I think this will be enough in these dark latitudes to carry me though a whole year. I have got the wifi output_power: 14dB and still getting good signal.
Voltage has kept fairly constant now for weeks. Mostly the solar panel gets some sun from 10:30 and usually within an hour the voltage hits the point where overcharge protection kicks in. The overcharge protection then stops it charging for several hours. Once that maximum spike settles the voltage drops about 30mV over the next 20 or so hours. I think ditching the Wemos board with all its extra hardware probably made the most gains.
I think I have picked satisfactory values for my voltage divider of 440K and 110K. I have read around the subject of Resistors in voltage divider as I know the lower values you use then more current is used by the battery monitor on A0. I thought then, why not use resistors in the Mega Ohm range. The disadvantage of using high value resistors in a voltage divider is it makes the output impedance higher and the output voltage more sensitive to loading. Here you can see a small amount of jitter to 3 decimal places.
Also found out why the voltage you measure is not the same as you would predict from a voltage divider calculator. It’s because the ESP12F with my A0 is providing some resistance in parallel with the lower value resistor in the divider. Well that’s my understanding of it.
Just updating. For over 1 year this external Temp/pressure sensor has been out side without any intervention( been tempted to open the box). Running on solar Voltage hasn’t dropped below 4V with sun at times not getting above 12.5 degrees above the horizon and many days on end without direct sunlight. The 18650 battery has done well , although external temp hasn’t dropped lower than -6 C
.