XIAO ESP32C3 Battery ussage

I have purchased 20 of these for a project, and they all work with a LiPo 3.7V battery…

2 Likes

Cool, that sounds promising! My three board will arrive today or tomorrow. I’ll test then …
Need to purchase 3.7V LiPo batteries first, though. Tips welcome. :wink:

If you are connecting your circuit 5v to xiao board you will not be able to power your circuitry.
In my case, when using Lipo battery , I have found that only 3.3v terminal of xiao is powered and not the 5v terminal. So, if anyone is facing issue, try connecting your peripheral boards/circuit to 3.3v terminal of xiao esp32c3, when working with battery.

1 Like

I have two of these boards - one of them will not work on battery (I even tried removing all Serial references and it still didnt work) - it does charge the battery but will not power the device.

Another board I have is working on battery without USB so the only difference is I soldered some pin headers to the one that doesn’t work.

I wish I had tried it before that but it could be related. I’m not sure if it’s a batch issue with some of them, if it’s potential heat damage (I’m not a beginner with soldering but may have to be EXTRA careful) … suffice to say, I really like this board and was trying with two before I bought a load more :slight_smile:

I’ve received 4 of these boards. (1) doesn’t work at all with the battery, but charges, (1) charges ok and runs off the battery, but consumes 60ma from the charging line continuously; runs warm, even off battery; (2) work perfectly, charging and low deep sleep current.
All the boards are running a sensor script using espnow hourly updates with deep sleep in between.
I love these boards and ordered 3 more. I’m hoping my yield of good boards increases!
UPDATE: Just for yucks, I disabled Serial (as previously suggested) when on battery alone and the deep sleep current dropped to normal. I’m back in business! 100%

I haven’t tried the serial trick, but do want to add to the others that I’m experiencing the same thing.

Tested the soldered pads and saw 4v coming from my 18650, but nothing on the other pins.

I’ve got 10 on the way, but I won’t need the recharging circuit, and am just considering powering things from the +/- power traces on my protoboards to get the project ready quickly.

Any downside to this? (Other than not being able to recharge through the esp32c3?

Since I haven’t seen it mentioned, I created a battery and USB-C cable connection, then plugged the USB C into the Xiao, and everything works, no code changes.

Definitely doesn’t seem like it’s my battery, or soldering, or wiring.

Seems like a problem where the battery pads are. I’ll report in here when I test the next 10 out the same way.

I actually use a solar charger (via a 4016) on the lion battery and not the esp32c3 charging circuit. This way I accuratly measure the current battery voltage on the divider. It’s been working for months now without a hitch. The module drives 2 neopixels running white at 50% brightness for 15 seconds (retriggerable in the dark) and updates my server on motion and clear via espnow. With about 5-6 triggers per night, the battery rarely drops below 3.7v.

Hi,

Why don’t you use the input 3V3 pin as power input with a lifepo 3.2V battery?
Soldering a battery is in my opinion not a good thing with these pads. It’s stronger to use the pins.
Of course if you do this, 5V pin won’t be powered.
All your devices will be powered with the lifepo, so no current limitation (other then the battery one).
For flashing three ways:
1 - using native usb with pins IO18 (D-) and IO19 (D+). USB connector is useless in this case
2 - using the USB connector but in this case pin 3V3 must be disconnected during flashing.
3 - using TX and RX pins and an external UART adapter connected to your PC. In this case remember to connect only GND, not VCC to the ESP32-C3.
It’s as simple as this!

Hi,
I also started with the same problems. A few hours ago I found the following:

  1. Insert the USB to PC plug
  2. Open Serial Monitor. Data should be received.
  3. Connect the battery
  4. Disconnect USB cable
  5. Data are still sent

Therefor I think this will be caused by the energy saving settings and/or wake-up settings.
Any suggestions?

Kind regards
Peter

After I played - a lot - with SAM21 and BLE Sense without any issues - and super happy about it - , I bought 17 of those ESP32C3 as it is so much cheaper then the Sense.

Well, the first one was extremely hard to anchor the antenna to, and the two first of the 17 batches are not working on battery while perfectly fine on USB.

That is a big deal and I not sure if I should open more of the 15 left, or if I should send it all back… Pretty disappointing in terms of building quality.
Bought from Seeeduino Germany.

Again I had zero issue with the SAM21 or the BLE Sense.
I guess you get what you pay for.

Too bad the BLE Sense price is going to the roof. Someone should adress the issue and keep the price down I guess the demand is high.

This is a good discussion. I have not any problems with the ESP32C3, yes connecting the antenna is hard but very doable.

I have an 18650 soldering directly to back of board for my proto-type not a problem. I am using Blynk as my development platform to handle it does a lot of hard things for me, users can log into their device without me hard codding it.

BTW I do watch the power with constant WIFI and running an app it is running 90ma+. When I plug in USB it reverses 200ma+ charging so that works.

I want to start playing with turning modem off and on next, not sure how to do that yet.

Someone on this list asked how to tell if USB connected, no one answered, how do you do that?

Update now power is 36ma. Put CPU at half speed dropped tp 27ma. Plenty of power to run off a good 18650 for day. charging works great using USB C charger.

Happy so far.

Good morning. Can someone tell me how to implement an ON OFF switch when the battery is being used to turn off the ESP32C3?
thank you so much.

I am facing a similar issue, battery is working fine when charging. I have tried on 2 different ESP32C3 xiao modules. They work fine for one day and next day when I remove usb type C, they don’t work on battery. Battery and xiao ESP32C3 is mounted inside an enclosure.

Hi there,
I see several options for Battery’s holder with a switch


Cr2032, or 18650. These are AOK.and if you want to ONLY charge the battery. one like this.

HTH
GL :slight_smile: PJ :v:

News? Can I purchase some of them, or it’s just a waste of money?

1 Like

Battery is working fine for me. Here is my test script.
Hardware is just a basic lipo battery attached and two buttons connected to gpio 2/3 and gnd

#include "WiFi.h"
#include <PubSubClient.h>

#define DEBUG_ENABLED 0

const char* ssid     = "DronesAreWatching";
const char* password = "";   

const char* mqtt_server = "blue.home";
const char* mqttUser = "internal";
const char* mqttPassword = "";


void debug(String msg){
  if (DEBUG_ENABLED){
    Serial.println(msg);
  }
}

WiFiClient espClient;
PubSubClient client(espClient);

void setup_wifi() {
  delay(10);
  // We start by connecting to a WiFi network
  debug("Connecting to ");
  debug(ssid);

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    debug(".");
  }

  debug("WiFi connected");
  debug("IP address: ");
  // debug(WiFi.localIP());
}

void setup() {
  if (DEBUG_ENABLED){
    Serial.begin(115200);
    delay(100);
  }
  
  pinMode(D0, INPUT_PULLUP);
  debug("Startup...send message");

  setup_wifi();

  client.setServer(mqtt_server, 1883);
  client.connect("ESP8266Client", mqttUser, mqttPassword);

  uint64_t gpio_reason = esp_sleep_get_gpio_wakeup_status(); 
  debug(String(gpio_reason));
  int GPIO = 0;
  if (gpio_reason > 0){
    GPIO = log(gpio_reason)/log(2);
  }
  debug(String(GPIO));


  String GPIOString = String(GPIO);
  int str_len = GPIOString.length() + 1; 
  char char_array[str_len];
  GPIOString.toCharArray(char_array, str_len);

  client.publish("mouse/trigger", char_array);


  esp_deep_sleep_enable_gpio_wakeup((1ULL << 2), ESP_GPIO_WAKEUP_GPIO_LOW);  //GPIO2
  esp_deep_sleep_enable_gpio_wakeup((1ULL << 3), ESP_GPIO_WAKEUP_GPIO_LOW);  //GPIO3

  debug("Going to sleep in 5 seconds"); //time to send message
  delay(5000);

  if (DEBUG_ENABLED){
    Serial.flush();
  } 
  esp_deep_sleep_start();
}

void loop() {
}

One way that I have used successfully on boards that don’t have any built-in circuitry to detect the USB is to simply put in a resistor divide by 2 circuit from the 5V pin and connect the centre of the resistor divider to an analog input and read the voltage. A bit of maths lets you work out if the 5V is present. (Note that it might not be exactly 5v depending on diodes, usb supply etc. But there ought to be a significant difference to the voltage sensed this way between when the USB is plugged in or if you are running on a single cell LiPo battery.
Note that you need the resistor divider because the 5V is more than the chip’s inputs can take. Divide by 2 is safe (i.e. 5/2 is less than the 3.7 or so that the pins can take) There is probably a diode from the USB V+ as well that drops the voltage actually seen at the 5V pin.
Good luck!

1 Like

Hi folks, thanks for this thread. Since no one has mentioned ESP32S3 boards yet in this discussion, I’ll add that my experience is identical to @chipko. When plugged into USB with a battery attached, the charging light blinks and the program runs. But when unplugged, the program halts and does not run, even after manual restarting. This is the sample Arduino Blink program, which does not include any use of Serial.begin(). I have 3 other boards that all work with this same program and same battery. I think some boards might just be faulty.