Olimex Support Forum

Microcontrollers => ESP32 => Topic started by: Rendier on November 25, 2023, 12:58:34 PM

Title: ESP32-C3-DevKit-Lipo
Post by: Rendier on November 25, 2023, 12:58:34 PM
Hi everyone,

I have a short question please. Is there an USB-C ESP32-C3-DevKit-Lipo board with a sleep current of 0.065mA sleep current? I cant seem to find it the datasheets.

Thank you
Title: Re: ESP32-C3-DevKit-Lipo
Post by: LubOlimex on November 27, 2023, 10:11:28 AM
Lowest power consumption can be reached when the board is powered from a Li-Po battery using deep sleep code.
Title: Re: ESP32-C3-DevKit-Lipo
Post by: 4373673733526 on December 14, 2023, 12:53:42 AM
Hi everyone

i am a beginner and with very little exprience in this matter, i am sorry if i put in any question that makes no sense.

To monitor level baterry (GPIO3), i need sold Bat_sense_E1?

Other question what i need to calculate da volts. and % the battery? im using esphome.

example the code:

- platform: adc
    pin: GPIO03
    name: "battery_voltage"
    id: "battery_voltage"
    update_interval: 10s
    accuracy_decimals: 2
    entity_category: diagnostic
    unit_of_measurement: "V"   
    filters:
      multiply: 4.2

  - platform: template
    name: "Battery Percentage"
    device_class: "battery"
    id: "battery_percentage"
    accuracy_decimals: 1
    update_interval: 10s
    unit_of_measurement: '%'
    lambda: |-
      return ((id(battery_voltage).state-3) /1.2 * 100.00);
    entity_category: diagnostic
 

Board Rev.B
Title: Re: ESP32-C3-DevKit-Lipo
Post by: LubOlimex on December 14, 2023, 09:50:06 AM
QuoteTo monitor level baterry (GPIO3), i need sold Bat_sense_E1?

Yes, but also BAT_PWR_E1. The voltage divider is disabled by default to minimize current consumption. So:

- Solder the pads of BAT_PWR_E1 together. This closes the connection and allows the voltage divider to be enabled.

- Solder the pads of BAT_SENS_E1 together. This closes the connection and allows GPIO3 to be used for battery measurement purposes.

It is usually a good idea to also have BAT_PWR_SENS1 closed too. Power sense allows you to know when external power supply is missing and when it gets restored. It goes to GPIO4.

You can use this Arduino demo as basis (it was made for ESP32-POE but it should work if you just change the pins at start to GPIO4 and GPIO3):

https://github.com/OLIMEX/ESP32-POE/blob/master/SOFTWARE/ARDUINO/ESP32_PoE_PowerReading/ESP32_PoE_PowerReading.ino