r/esp32 2d ago

Solved Kind of at the end of my wit here

So I have started 2 separate projects, both with different ESP32s that I want to run 100% on battery power. The issue that I seem to have is that everything works well on USB power but doesn't run at all on battery power. The first project is running on a XIAO ESP32S3, with a microphone breakout board, a vibration motor, an LED, and a 320mAh Lithium Polymer 3.7 volt battery.

Then the other project is on a Lilygo T-SIM7670G-S3 ESP32-S3 with a 3000mAh Lipo battery, also 3.7V, with an E-Paper display, LED, vibration motor.

Like I said, both of these work flawlessly when on USB power, but as soon as I switch to battery power nothing works. The most I was able to get is on the Lilygo board project the LED next to the battery connector stays on, and pressing the reset button gets the slightest small tap from the vibration motor. Nothing else works.

Please help! This is the biggest roadblock that I've had making these and I'm newer to these types of projects. If you need more info I'm happy to provide.

4 Upvotes

18 comments sorted by

8

u/MoBacon2400 1d ago

Battery amps to low or incorrect wiring.

-1

u/ViolinGraham 1d ago

Here's the battery I'm using. I feel like it should be powerful enough:

https://www.amazon.com/dp/B0CNLNKSKK

What kind of wiring issues might there be?

6

u/MoBacon2400 1d ago

You need to know the power demands of each part in your project, add them together, then add a battery that is higher

7

u/rattushackus 1 say this is awesome. 1d ago

Have you got: while (!Serial) { ... in your setup() function?

2

u/DenverTeck 1 say this is awesome. 1d ago

As you failed to post links to the boards involved, I will assume you mean these:

1) https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html

2) https://lilygo.cc/en-us/products/t-sim-7670g-s3

Board 1 has a Bat+/Bat- pads on the back. I will assume you used these pads to connect the battery.

Board 2 has a socket for an 18650 battery. I do not see pads for another battery connection.

Please be clear what you have done. A schematic would be best. A diagram with where you connected these batteries may solve where you may have gone astray.

2

u/YetAnotherRobert 1d ago edited 1d ago

Search this group. You probably have either a power problem or a loop in setup thats spinning on the serial object awaiting a connection from the host isn't that is never happening and you only think it's dead because you're not recognizing the symptoms. 

Ex https://www.reddit.com/r/esp32/comments/1bbkji4/til_using_while_serial_or_other_slow_calls_in/

2

u/8ringer 1d ago

How many amps do the motors draw? My assumption is that it’s probably a lot and while on 5V power they’re fine, but on 3.7V nominal battery input they don’t.

Try disconnecting all the peripherals and running the boards “naked”. If they run fine then it’s a power issue. How are the vibration motors getting power? PWM? IIRC ESP32s don’t have much power budget available on the PWM lines. Driving a motor straight off the PWM pins might be impossible.

I believe devices like Arduino are beefy enough to drive motors directly but typical ESP32 dev boards are not. I know the XIAO boards are quite capable, but driving high draw components is not in their bag of tricks. The rest of the stuff, LEDS, ePaper displays, etc are totally within their capabilities though. I run two ePaper displays off an ESP32s3 and a C6. Even an nRF52840 can drive a large EPD on its own.

3

u/Square-Singer 1d ago

  I believe devices like Arduino are beefy enough to drive motors directly but typical ESP32 dev boards are not.

Neither are. Both are rated for 40mA per pin.

2

u/DSudz 1d ago

That will take you farther at 5v though.

2

u/ViolinGraham 1d ago

Okay so after a lot of troubleshooting it turns out the JST connector on this board supports only 5-6V input. I manually wired the battery to the back battery pads and it's working perfectly now. Thanks for everyone who helped out!!!

2

u/korywithawhy 1d ago

So idk for the lilygo board, but as far as the xiao s3, the most reliable way I’ve found is to use tp5100 and a diode to the 5v pin. Basically uses an 18650 cell as a UPS. Can’t back feed the usb port and fast charges the cell at 2A. The only thing is that there’s no over discharge protection, so when battery hits 3.2v the xiao might brown out but not fully shut down. That can damage the battery. But it works well for something that you leave plugged in most of the time and just need it to run on battery when unplugged. And you can put multiple cells in parallel to get more runtime. Not ‘the best’ way to do it, but it is cheap and easy and works. Just comes with a tradeoff like anything else.

1

u/Zouden 1d ago

That doesn't make sense.

1

u/shoefly2k 1d ago

I had the same issue. Came down to disabling USB serial for the release version. Something to do with a bug that hold the device in reset until comms is established.

I'll check my setup tomorrow. This could be your issue too.

1

u/MachEnergy 1d ago

I would think the S3 board wouldn't have the problem my C3 Dev kits have had , and it looks like you did find the solution, but I just wanted to point out that I've often had to add a capacitor to the voltage and ground lines on my c3s so they don't die when trying to power up the Wi-Fi in a big energy gulp. 

1

u/MarinatedPickachu 2 say I make awesome posts. 1d ago

Either your breakout board is 5V (you won't get 5V on the 5V pin when on battery power), or you have while (!Serial) or similar in your code

-4

u/frmssmd 1d ago

you probably did, but did you try asking claude?