I am using a XIAO ESP32C3 and powering it using 6 volts from 2 coin cell batteries. I am using the GND pin and Vusb. Since its a battery connection, I tried using the pads on the back, but they did not work. When I power it uaing the battery, the onboard LED flashes quickly and the code does not run. When powered by the usb instead, the code runs and it works perfectly.
Why is this happening? How can i fix this so it will work off of 6v? Also, could it be related to this:
If you enter bootloader mode when the Seeed Studio XIAO SAMD21 is not recognized as a USB device by the PC, the LED will blink rapidly.
The quote is from partway down this page.
Is there a “while(!Serial);” in the sketch? This code requires a serial monitor.
What is the model of the button cell battery? If you are using WiFi or BLE, the battery must be capable of supplying a large current.
The problem was the serial connection, it is fixed and working now. Thank you!
It WAS fixed, but now its occuring again. I am using 2 CR2032 batteries. There is no serial monitor used in the sketch.
I don’t think the CR2032 can supply the current to run XIAO continuously.
You might consider batteries such as those found at “Getting Started with Seeed Studio XIAO ESP32C3 | Seeed Studio Wiki” Battery Usage
I am using energizer batteries and they say they can handle the current draw, it is only 20 mA max and from a source around the web they can handle .1 A.
According to the datasheet, Nominal Discharge Current = 0.2mA; an example of a 10mA discharge for 5 seconds is shown, but the voltage drops rapidly.
Would you be interested in measuring the voltage while in use?
For reference, XIAO consumes less current when the CPU clock is reduced to 10 MHz.
How can i reduce the clock? Also, how much less current is drawn? Thank you for all your quick responses btw!
ArduinoIDE Menu bar>>Tools>>CPU Frequency:10MHz
I believe it will be less than 20mA, but I have not measured it.
Okay, thank you! I will test that in about 2 hours or less and get back to you. Are there any other possible ways to get the MCU to work off of 2 CR2032 batteries?
Change to a MPU with low current consumption e.g. XIAO_samd21.
Is there a lower limit to the clock and current consumption? i could work with a really low clock speed as long as it saves power, but if it won’t then i wont bother lowering it that far.
The frequency that can be easily set with ArduinoIDE is up to 10 MHz.
See “ArduinoIDE Menu bar>>Tools>>CPU Frequency:pull down menu”
I measured the current consumption on a blank sketch.
It was 26 mA at 160 MHz and 8 mA at 10 MHz.
Thanks for your help, sounds like there’s not really a solution for me with this setup.