Hi,
I'm building a very simple audio player, I'm using a Lolin32 lite, a microSD SPI module, and a I2S DAC (uda1334). Basically, it's based on this example :
Everything works fine, but I have a question regarding power, as i'm designing a small PCB for this.
As the Lolin32 has a power connector, i'll be using a 3.7v Lipo battery. But i'm wondering if it's a good practice to have both the SD module and the DAC powered from the esp32, or if i should rather have power tracks directly from the battery to each breakout boards.
As a side note : while doing some tests, changing the SD SPI connections from vspi to hspi (just as an exercise), I noticed there were a lot of clicks, and when I touched the circuit with my fingers the clicks disappeared, the sound was clean again. It happened both with the circuit powered from the battery or via USB. Even though I don't have this issue with the more standard vspi connection, i'd be reassured to understand what happened, and any advice concerning the power connections would be welcome !
Thanks.
The 3.3V from the Lolin32 is connected directly to the battery over the ME6211.
If you disable the WiFi, the ESP does not need more than 50mA. SD also does not need more than 20-30mA.
Your DAC not more than 10mA.
You can draw up to 500mA from the ME6211 (3.3V pin) and was made to power more than just the ESP32 as the 3.3V pin is available on the board.
@bidrohini thanks for the link, that's interesting, but i find the schematics a bit vague and misleading. If I get it, the battery (3.7v Lipo ? it's not specified) is directly connected to the esp32 and the DAC. And there's a filtered power rail in parallel, that goes through a LDO to power the microphone. The 3.3V pin of the esp32 isn't connected to anything on the schematic, except a header. I don't get the purpose of this 9 pin power header at all.
Anyway, one feature I'd really like to use on the Lolin32 is the possibility to charge the battery simply via usb. Can I keep this without connecting the Lipo directly to the Lolin32 and having the rest powered as i described?
@jim-p could you elaborate ? what should I fear ? audio clicks ? worse ? the ten plagues of Egypt ?
You question was if it was "good practice"
What should you fear?
That the information provided to you by others on this forum is wrong.
What's the power dissipation of the ME6211 as it it mounted on the Lolin PCB?
I don't see any advantage of powering everything from the Lolin.
Ok, let's say the Lipo is connected to the Lolin and to a LDO in parallel, that would be better? what happens when i plug the usb cable on the Lolin? Does it still charge the battery normally? Unfortunately I don't have the right connectors to try it on breadboard right now, and i need to be sure before I order my pcb.
You have the 5V from the USB. This will charge your Lipo over the TP4054 (VBATT => say 5V to 4.2V)
At the same time, VBATT is used to power your ESP32 over the ME6211 (3.3V => 4.2V to 3.3V). ME6211 is a LDO regulator with a dropout voltage of 0.1V (will work until your Lipo has a voltage of 3.4V).
If you disconnect the USB, the Lipo will be used.
So, the ESP32 will NEVER power your devices connected to the ESP32 itself.
But you can create a new board with the same components like the Lolin32, so you have it twice. But why?
What you do, is to "steal" current from the ESP32. But if your entire project doesn't draw more than 500mA, you can use the 3.3V from the Lolin32 board. This 3.3V is not an ESP32 pin like on the Teensy for example.