Power supply for 5V devices

Good morning!

I’ve been using home assistant for a while now with simple things: lights, blinds, some switches, presence via app, etc.
The thing is that a few months ago I started working on improving energy efficiency within the possibilities I have (it is a rented flat). In any case, my system is low cost (sonoff, esp32 and other “handicrafts”).

Currently, when my house detects that I am not around, it deactivates any power supply except the essential ones (fridge, router, ONT and raspberry with HA) which avoids “phantom” consumption.

Precisely because I use several ESP32 devices for different things (cameras, IR control, blinds position, etc.) I would like to power these non-essential devices with a renewable, efficient (transforming 240V to 5V has many losses) and economic energy system.
As they are 5V and low consumption devices, I have thought of installing a small solar panel (I insist, I can not make a photovoltaic installation because I am in a rented flat), with a battery enough to power all these devices.

Do you know any economic, simple and functional system for this?
Thank you very much!

Depends on your converter. High quality SMPS (not the stuff you find on AliExpress) are pretty efficient. I’m using the TIW line from TracoPower, they have efficiencies of around 80-85%. Which is not too bad.

Get a lead acid battery, preferably a special deep cycle one. Car batteries are not well suited for this, their electrodes are too thin, they’re not designed for continuous current draw. The cheapest are sealed flooded batteries, but deep cycle AGM is better in terms of a much longer lifespan (lower eco footprint) and it can’t leak, but is considerably more expensive.

For the charger you can either use one of these cheapo PWM controllers or a much better MPPT one. The former go for like 10 or 20€, but they will waste of lot of the energy produced by the solar panel and they can shorten the battery lifespan. The latter use buck converters and a microcontroller to get every milliwatt out of your panel, but they’re usually at 80€+. On my boat I use A Victron SmartSolar MPPT controller, they work really well and you can track the charging process over Bluetooth. They’re not cheap though.

Alternatively you can use a small LiPo battery pack with an appropriate charger circuit. You won’t have as much power but the setup is easier and smaller. Don’t use cheap LiPo’s from Ali, there is a real risk of them catching fire.

Thank you very much for your reply, you have given me some great ideas for the future, but what I want to set up right now is much simpler than this.

I have 8 ESP32 devices in total, so the consumption is very low.
I’ve been looking for information, and finally I think I’ll opt for a charger circuit, typical LiPo 18650 batteries (not from aliexpress, thanks for the advice!) and some not too big solar panels. Just enough to power those devices, but still be able to maintain energy efficiency at home.

Once again, thanks for your reply, I’ll keep waiting for someone to comment on a simpler setup ;).

Cheers!!!

You need to have some quite big solar panels to power those devices.
The problem with your devices is that its receivers and they have to be in listen mode even when being used.
You could lower power usage a bit by going with ESP-now, but it is still not really possible to deep sleep your devices for longer periods and that means you will have a constant drain, which is probably bigger than with your intended solar panel can provide.

Don’t underestimate consumption. An ESP32, according to a quick Google search, uses about 90mA when not transmitting and up to 260mA when transmitting. Let’s say an average of 120mA, since it will be listening more than transmitting. 8 times that gives a consumption of about 1A. That’s not what I’d call ‘very low’ when using a battery. It’s actually very significant, if you consider that most battery powered devices use in the µA range.

To get over the night and dusk / dawn, consider 12 hours on battery at least. That’s 12AH at the very minimum at 3.3V. You need additional safety margins or you will end up killing your batteries by deep discharging them all the time. And it doesn’t take into account cloudy days where your solar panel won’t be producing much at all. I’d say you need at least 3 full days of autonomous supply without charging. That’s 72AH without safety margin, say 120AH with a (small) margin. 120AH is a lot of LiPos…

And the solar panel will have to be large enough for that too. When using a buck converter from the typical solar voltage of 18V, we’re talking at least 60 to 70W here considering a conversion efficiency of 70%. That’s a 0.5m², 5kg solar panel.

So either you need to seriously use deep sleep mode on your ESPs (and I mean deep sleep to the extreme) or you need to rethink your solar setup :slight_smile:

Once again, thank you very much for your replies!

I will try to give more details of the setups where I use ESP32 so that you understand why I call it “low consumption”. I certainly gave too little information…

Of the 8 ESP32s, the uses are:
2 for controlling the position of the blinds. They have a potentiometer connected to a gearbox. They are only connected to HA when the position changes, it is sent to HA and goes back to deep sleep.
1 of them I use to eliminate IR remote controls (they pick up codes and send others, so I use the TV remote control, which has buttons that I don’t normally use to control all my appliances), and I can also use it to control the appliances via IR from HA. We could say that this one has an average consumption.
1 of them is used to control HA by means of a keyboard. This one worries me less because I don’t really use it if I’m not at home, I could only turn it on when I’m at home, so we can discard it for the query at hand.
4 of them are cameras, these do have a continuous and high consumption.

For a while, I was using an old UPS, which I charged at night (when the price of electricity is cheaper) and used it during the day to power some things, it was working fine until I needed the UPS to power ONT+Router+RPI(HA).

I will keep thinking about ideas for this, I think it could be very interesting.
I’m also thinking about creating a 5V DC line at home to power everything from a single source.

Thank you very much to all, greetings!

In the end, the only way to really do all these calculations is by measuring the average current draw of your entire setup in a real life situation. From there you can evaluate the size of the battery you need and once you know that, you can find the right size of solar panel according to battery size, load, intended location and orientation and the average number of sunny days in your region.

As an example, I’m running two DIY solar setups here. They required some fiddling around to make them stable, because my theoretical calculations were pretty far from reality on the field :slight_smile: One is on a hay shed way out on one of our horse pastures, it uses a 60AH AGM lead acid battery with a 40W solar panel and supplies an Arduino Nano Every with HC12 RF module (about 20mA continuous draw), about 20W of lighting and a water pump (occasional use). The battery is very much at the low limit. I should have taken a larger one. The solar panel is slightly larger than what would be needed.

The second install is on my sail boat. I have a 130AH AGM deep cycle battery with a 100W solar panel (2 x 50W). There’s about 10mA continuous draw from the charge controller when the boat isn’t used, the rest is a very random combination that can go up to 30A occasionally, but usually in the 2-3A range when I use the boat. The battery capacity is OK (although we’re talking about a 40kg battery here !), the solar panel is hopelessly undersized. Realistically I would need 200-300W, but I don’t have the space for that.

So yeah, solar setups really depend on your individual use case and can be tricky to size correctly !

Hello!

Thank you for your reply, I am really coming to terms with the harsh reality and I see that I will need a lot more than I had planned.
I really live in a very sunny region (Spain), and we have many hours of sunshine (besides, I live in a very windy area), I would like to take advantage of these resources.

I recently tested a small plate that self-oriented itself towards the sunniest area (with 3 PAP motors and 4 photoelectric sensors), and I got very optimistic results.

I’ll play with this a bit, and when I have information that I think you might find useful, I’ll be happy to share it with you.

Greetings!

I’ve used Vigortronix 240VAC to 5VDC modules like this with great success. You say the conversion “has many losses” but the devices don’t even run warm, so there cannot be much loss going on.

Might even be more efficient to use the 3.3V version and avoid the ESP step-down regulator if you don’t need 5V for anything else.