Greetings,
Firstly, I’d like to thank this community for the wealth of useful knowledge that users have been sharing across this platform. Many ancient threads here have provided me with great info that has helped me along the way on my project. Thank you for your concise and sourced posts sharing information!
My project:
I have built two individual LED controlling units using the ESP32C3, both are powered by an external LiPo battery for a wearable device. I chose the XIAO board because I am working with extreme size constraints and may in the future need some IoT-features as well. Each device is operated with a tactile push button.
My next task:
Currently the project has been a success, and I am able to squeeze roughly 6 hours of use from a small 3.7V 180mAh LiPo. Not great, not terrible. Due to physical constraints, I am unable fit a battery any larger than this. Therefore, I’d like to know what options do I have to increase power time through software.
Changes I’ve implemented so far:
Reduced CPU speed from 160Mhz → 80Mhz.
Disabled Wifi and BT by calling a function in my setup that calls the btStop(), WiFi.disconnect() and WiFi.mode(WIFI_OFF). To my understanding these should completely shut off the IoT functionalities on each startup.
Limited LED maximum brightness to half.
Increased resistor values connected to LEDs.
Refactored code to be more economical.
After these changes I was able to climb from 4hours use to 6hours. Are the any other significant improvements one could implement to increase power time? I am aware about light sleep mode and while this does decrease power consumption, it also shuts off the peripherals, meaning my LEDs will not light up. Instead of a true power off-mode, I am simply placing the device in deep sleep when not in use.
In summary, I only need the board to send data into 6 pins and monitor button behavior from one other pin. Most other features of the board are currently redundant for my use case.
[Secondary Question]
Battery Charging:
I am recharging my batteries (connected to the bat pads at the backside of the board) through the USB port. Does the XIAO ESP32C3 have any protection from overcharging a battery, or is overcharge protection relying solely on the battery’s own overcharge protection circuits? I’m aware of @msfujino’s threads concerning battery topics, however I wasn’t able to deduce how the XIAO behaves exactly when charging a battery.
Glad the forum provided some incite, we are ALL here to help each other to achieve our dreams and goals where possible.
You are in the typical power consumption phase of the development cycle.
Did you do the basic’s first?
Visit the online battery profiller from digikey. HERE
Get an Idea where you need to be.
Check out the chart of the Xiao’s on the WiKi see the lowest power consuming unit is NOT the “C3” btw.
Nrf52840, then the C6 are the low power leaders.
All of the Xiao’s have battery management built-in. Under and over charge control, but know THIS the Battery should always have Overcharge protection itself , Go look at the threads on it again and the WiKi’s info specifically as it pertains to the C3(i.e.Charge LED). Pictures in the threads show the circuits on several batteries.
consider using a non-rechargeable battery
Read the datasheets on the IC used in each the schematic they are NOT all the same unit.
You will find the Xiao is very robust for charging and managing the LIPO battery given you follow the basic guidelines for both.
You can also use a online power profiler for the Xiao Nrf52840
does your device use the RF section BLE/WiFi ? if the answer is NO, then you should use the Nrf52840. for example…
You should do a power profile of your device first ALWAYS.
battery size is last. size wise the Cr2450 is strong enough it’s like two cr2032’s but not much bigger dia.
The battery pad on the back of XIAO is for 3.7V LiPo batteries only.
The charge current of the on-board charge controller is 370mA for C3, 120mA for C6, 110mA for S3, 200mA for MG24, and 100mA for nRF52840.
Unless a LiPo battery has a special built-in feature to limit the charge current, it will be charged at the above current. In general, it is recommended that a 180mAh battery be charged at 180mA or less. If a 180mAh battery is charged with C3, it will be charged at 370mA, which may reduce battery life.
The following link may also be helpful.
The following document may be helpful regarding the possibility of LED lighting during sleep.
ESP32-C3 Technical Reference Manual
5.9 Pin Hold Feature
32 LED PWM Controller (LEDC)
ESP32-C3 Series Datasheet
3.4.7 LED PWM Controller
Interesting and promising paths pointed to from both replies. I will do some due diligence on these topics. For some reason I confused the power charging rate of the ESP32C3 with the nRF52840 during my initial research, which means the C3 will absolutely kill my battery lifespan prematurely…
I’m going to reconsider button batteries, however I just tried to test fit a CR2450 and the diameter is too large for my system. CR2032 will just about fit, which I understand should hold an approximate capacity of 220-240 mAh. For the sake of research I’m going to see how long the recharchable LiPo is able to hold on and move to disposable batteries once it dies on me.
The nRF52480 indeed appears to be the more appropriate chip for this project. Next iteration shall be built using this chip.
Same mistake I did when I started my development on ESP32C3. Too greedy. Even with all the non-needed things shut down it still demands a lot of mAmps comparing to other boards.
If it is a simple Arduino code which manages the LED the nRF should be the way to go from the power consumption standpoint. And the code is easily portable. Be aware, there’s no Wi-Fi in nRF52840, in case you need it.