Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you power them? I've used ESPHome previously to scrape my solar analytics for consumption in Home Assistant using $3 Wittycloud ESP8266's. But as yet I haven't found an elegant solution for powering them other than using a USB adapter. It would be nice to find an elegant battery solution for outside sensors.


You can buy off-the-shelf modules that take a lithium ion cell and provide charging, overcurrent and overdischarge protection; just search your Chinese online retailer of choice for "TP4056 module" and you will find plenty of them. There is a Hackaday article [1] that goes in depth on how to use them properly.

If you'd rather not wire it up yourself there are also ESP32 dev boards with built-in battery management functionality, such as the LoLin32 Lite and Sparkfun ESP32 Thing. I haven't had much luck with the former (possibly due to its lack of RF shielding) but the latter seems to be pretty solid. I think Adafruit sells similar boards as well.

[1] https://hackaday.com/2022/10/10/lithium-ion-battery-circuitr...


The Olimux ESP32-POE / wESP32 boards have a proper ethernet connection and PoE support. Means you don't need to worry about wifi coverage or power as long as you can get an ethernet cable to it - and those are cheap & easy to find in ludicrous lengths for outdoor use.

ESPHome also has deep sleep support - so for some use cases you can just wake up every x minutes/hours, connect to wifi, do thing, back to sleep for x minutes. In deep sleep a decent ESP32 board (firebeetle or tinypico) will last for months on a small lithium cell. For a quick sensor, the whole wake up/read sensor/update HA/sleep again takes a second or so depending on wifi configuration.

Useful for something on a schedule like sprinklers or slow sensors (soil humidity or whatever).

You can also wake based on interrupts, which is good for stuff where you are using a low power external sensor that does interrupts (wake ESP up if humidity gets to x) or a GPIO switch (magnetic entry/float switch/etc etc).

Firebeetles and tinypicos both have cell connectors and onboard charging directly for lithium pouch cells. You could also get a cheapo solar power bank, although you'll want to do some research to make sure the relatively light load of an ESP32 will keep it powered on.


I second the Olimex ESP-POE boards. I use them for all my ESPhome projects as I'm a big fan of wired connectivity and having the ability to power them over PoE is awesome.

They also have a wide variety of sensors that connect with a ribbon cable (they call it uEXT) with no soldering required. Many of the sensors are supported by ESPHome.


Car "cigarette lighter" charger adapters are cheap and can take ~12V (and some even go up to 24) and give you a USB output.


https://shop.m5stack.com/products/battery-module-13-2-1500ma...

Featured yesterday on HN for being acquired by Espressif.


Battery can be a problem as low power takes a lot more engineering than you’d imagine and being outdoors creates additional problems if you’re trying to use lithium chemistry cells when temps go below freezing.

For indoor use, I made this to power ESPhome devices from a cheap apple USB adapter: https://www.printables.com/model/703859-esp32-enclosure-with...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: