ESP8266 battery power supply

Thread Starter

Playdric

Joined Feb 13, 2021
3
Hello all,

First of all I'm a complete newbie about circuits and electronics.

I recently bought a 3D printer and I saw this project on thingiverse.
Quick sum up : LEDs (WS2812) lamp controlled by an ESP8266.

The main issue is that the firmware of the ESP8266 provided to control the LEDs do not save configurations when powered off. I then thought of integrating a battery to keep the ESP powered even when the lamp is unplugged.

But i have about no idea of what I'm doing and before buying anymore hardware I'd like to have advices on how I could do that and what hardware I need.

I thought of a circuit like this : 1613218847941.png

but I have no idea if this will work at all. (Sorry for bad drawing skills I didn't know wher to draw a proper diagram)

Thanks for your help !
 

MisterBill2

Joined Jan 23, 2018
18,505
Actually, your drawing is better than many I have seen here. I am not sure if it is correct, but it is a better drawing.
Battery backup to maintain memory is usually more complex, since the goal is to have the battery last a long time between charges. So it might work to simply have a power switch between the controlled LD and the module powering it, instad of between the battery and the module.
 

SCKStef

Joined Feb 14, 2021
2

ElectricSpidey

Joined Dec 2, 2017
2,779
Just how often will this lamp be "unplugged"?

Is it really that difficult to set the controls?

The point is this...

If you don't really "unplug" the lamp that often, a good idea would be to simply switch the LEDs off and leave the micro powered.

The unit will draw very little power when the display is off.
 

Thread Starter

Playdric

Joined Feb 13, 2021
3
Actually, your drawing is better than many I have seen here. I am not sure if it is correct, but it is a better drawing.
Battery backup to maintain memory is usually more complex, since the goal is to have the battery last a long time between charges. So it might work to simply have a power switch between the controlled LD and the module powering it, instad of between the battery and the module.
I will try a power switch between the controlled LED and the module powering it. I will post when I receive the LEDs (in march :() and make this. Any idea what king of battery I need ? I found this but Idon't know if that's what I'm looking for.

Hi,
nice idea, you don't need to use a battery to save your data, just use the onboard flash memory which can emulate an EEPROM, or use the virtual filesystem and store your data in the "files".

Take a look at: https://arduino-esp8266.readthedocs.io/en/latest/libraries.html#eeprom for EEPROM emulation, or at: https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html for the Filesystem.

I prefer to use the file system.

regards,

Stéphane
I am not developping the firmware, I am using WLED So I don't think this is a solution.

Just how often will this lamp be "unplugged"?

Is it really that difficult to set the controls?

The point is this...

If you don't really "unplug" the lamp that often, a good idea would be to simply switch the LEDs off and leave the micro powered.

The unit will draw very little power when the display is off.
I am not sure how often the lamp will be unplugged but I want to make this more for learning about curcuits than because I will use this feature a lot.

Thank you all for your replies

Cheers
 

sghioto

Joined Dec 31, 2017
5,390
One method is to leave the Weemos connected to the 5 volt supply continuously and switch off the LED lamp.
You can add a battery backup consisting of 3 alkaline batteries connected to the Weemos through diode D2
D2 disconnects the battery pack when the AC supply is working. I would also connect the 5 volts to a digital input and program to shutoff the load if the 5 volt supply fails.
1613340645722.png
 
Last edited:

ErnieM

Joined Apr 24, 2011
8,377
The ESP8266 draws about 80 mA when on and running, and with the given program it will be on and running off your battery. That means you need nearly 20 amp-hours a day to keep in on... much more if the LEDs stay on too.

This is not a trivial current. A car battery might supply this for not quite a week.
 

MrSalts

Joined Apr 2, 2020
2,767
Your project is like buying a car because you found a recipe on the internet that shows how you can cook a steak on the manifold. Then you ask, how can I keep the manifold hot all the time so its ready to use the next time I buy a steak. Now we are essentially hearing that you don’t want to learn to drive, or start the car or...
First, we’re you able to load your code into the esp8266? Have you connected the LED string w good results? Why don’t you want to adjust the code to save to static ram vs your solution of leaving the car running 24/7?
 
Top