Hello everyone,
I'm going to be moving my first arduino (ESP32) project to battery power. Currently (running from USB) I have an SDcard reader and an amplifer connected to the 3v3 pin on the esp32. My plan is to have three 18650 in parallel, connected to a Pololu 3.3V Step-Up/Step-Down Voltage Regulator S7V8F3. This has to get fed to the 3v3 pin. That means that the sdcard + amplier are getting constant current and can not take advantage of the ESP32's sleep. Is there anyway to fix this situation?
Get a second S7V8F3 to power the SD card and amplifier. Disable before going to sleep and enable after wake up. Depending on what the ESP32 pin does on sleep you may need a pull down on the enable.
Fortunately I don't have time to get more shipped. Could I just use a mosfet?
Probably - I have never done it. Look at some of the circuits using a low gate voltage p channel one.
If you have a GPIO pin on the ESP32 that stays high, or switches to tri-state mode, when the ESP32 goes to sleep, then you could use a simple high-side switch using a P-channel mosfet:
Is your SD card module currently being powered with 3.3V? Also, you may need to change the state of any ESP32 lines that are connected to the parts you will be powering down. Those lines should be set low or tri-state before doing the power-down.
Anyway, you would bring the GPIO high or tri-state to power down the SD card and amp. Bring it low to turn them back on.
So I bought some N-Channel Power mosfets before you replied. Will those work? Do I need to use a resistor? Would you explain why, I didn't realize it was needed. Both the amp and the sd card run from the same 3.3v rail as the esp32 currently.
An N-channel mosfet could be used to switch the ground line. In theory that will work too, but in practice it can complicate things because with ground switched off, all pins of the SD module and the amp will float up to 3.3V. So if any lines connecting those two back to the ESP32 are low, current will flow, possibly in large amounts. You would have to make sure that all such lines are tri-state or high on the ESP32 before going into power-down.
The resistor is there to bias the mosfet off when no other active signal is present at the gate. You don't ever want the gate to be floating.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
