Battery Powered

Hi guys!

I want to place one of the DYI units outside where there are no electric outlets. I"m thinking of building a solar powered battery pack with a dc-to-usb converter.

How can I figure out how much voltage and ampage the dyi unit needs?

My skill level when it comes to electronics is basic. This was my first soldering project.


1 Like

the power consumption of the wemos and all the components is little but still enough to drain a battery in minutes (or a few hours, depending on how large the pack is). so besides a battery you most likely want to put the wemos to sleep and have it wake up only every 5/10min or so.

google for ‘ESP8266 battery’, that should give you plenty of links. youtube also has some nice videos, Andreas Spiess comes to my mind for example

You can relatively easily put the Wemos to sleep but you not only need to put in the code but also connect D0 and RST.
A good tutorial is here: ESP8266 Deep Sleep with Arduino IDE (NodeMCU) | Random Nerd Tutorials

I have a little usb power meter. I just got my first unit up and running with one grab sample on power consumption. The highest values I have seen in the first 10 minutes:
Most of the time it’s in the 600-700mW range
I am within 1m of my wifi router, so I wonder if it would take more power at a greater distance?

To summarize overnight power consumption:
It’s been running for about 12.5 hours. I have used about 8Wh of power.
I have seen some peak power over 1W on my meter that has a refresh rate of about 1s. I would expect there to be transient peaks well over 1W so you will want to make sure your power supply has some headroom to cover that intermittent load. I moved the unit to the opposite side of the house and I do think the wifi radio is using a little more power, hence the slightly higher peak load. For long duration use it seems to average in the 600-700mW range.

1 Like

Thanks @derek for sharing that!

@AirGradient yeah, I did the hardware mod, but it’s still consuming way too much. A 900mah battery is lasting around 24 hours after a full charge.

I also noticed that even in deep sleep (of the wemos), the co2 sensor still lights up during the Wemos sleep interval. Also the pm sensor’s fan is still going.

Currently looking at the code to see how I can turn them off, then back on on wakeup. If anyone has any tips, wold be appreciated!

@nkabbara You need to attach pin 3 for the PM5003 to be able to control/set its HIGH/SUSPEND/LOW modes. Using pin 4 and 5 only gets data in/out. Pin 6 is used to reset the module only.

Arduino Library Manager has a PMS library available for some examples of how to go about the code.