I'm building a toy for a baby that basically runs an ESP32, 2 class-D amplifiers, an SDCard module and a NeoPixel (a single one..). It has to be battery powered and so far I've found out that it's harder than I thought...
Here are the power requirements of all components (at least as I understand them). I tried to put together my design of how to power this using a rechargeable battery but would love to know if I'm doing it OK.
|Component||Input voltage||Estimated current|
|Wireless charger receiver||Rated for output of 1A|
|ESP32||Regulated 3.3V or 5-12V||~80mA|
|MAX98357A||2.7-5.5V||? (see question 3)|
|Adafruit SDCard Module||3.3V or 5V||~100-150mA ? (based on general estimations)|
|NeoPixel||5V (but seems to work fine with 3.3V)||~30mA|
When I connected everything to a powerbank (5V) I noticed that voltage fluctuates when I play audio through the speakers. The powerbank wasn't the most quality one so I normally started with 4.8-5V and when started to play audio it dropped to 4.5V and sometimes just caused the ESP32 to reboot.
It seems that I can power all components using either 3.3 or 5V. I assumed that it's best to regulate voltage only once (all those boards have internal regulators), so I came up with this schematic. I hope it makes sense but I never built something like that before so have no idea if it is even practical or there is anything else I'm missing.
The TP4056 gives me a voltage between 2.4-4.2V. I first need to regulate it to 3.3V (mainly for the ESP32 and the SDCard which seem to be sensitive to voltage changes). What's the best way to do it in my setup? Is "buck-boost" the converter I need? It seems that I need it to have a pretty stable output. Is it better to only regulate voltage down and cut it off at 3.3V?
Can anyone refer me to the recommended component? I'm overwhelmed by many types of regulators and many many different parts..
Is it OK to connect the amplifiers to the raw battery voltage? I assumed that since they need the most current (and cause the spikes), maybe it's better to feed them separately from the sensitive components, and save some of the load on the regulator if it's not needed in their case.
As for the amplifiers - They are rated for 3W. I tried to measure current while playing an audio file, and got an average of 200-250mA. But if I understand correctly, that only gives (250mA * 5V = 1.25W). Is that within normal range or did I miss anything? (I played a reasonably loud file).
I'm mostly afraid for battery hazards. If I understand correctly, the TP4056 (with the DW01 protection chip) should be safe for use, right? I thought to add another 1A (or 2A) fuse on the main battery line to limit the total drawn current even more, but not sure if I'm not just too paranoid..
I don't need fast charging (and the wireless receiver only gives 1A anyway). I saw there's a resistor I can play with to limit charging current. Is it safer if I lower it down to something like 500mA or it won't really make a difference?
Is that battery (for example) suitable for me? Do I need to look for anything specific?