ESP32C6 + Grove Base Power Consumption

Hi All

I’ve been working for many months on a hobby project to build a BLE weather sensor. (It’s been on hold for a few months while my stuff went into storage during some building works at home.)

The problem that I have is power consumption, but first let me explain the device. I have an ESP32C6 on a Grove shield, a Grove BME280 sensor and a 330MAh LiPo battery. It’s a BLE beacon and works well from a software perspective. I can read it reliably from a Raspberry Pi Zero2W which runs the web site for my home weather station.

I initially had problems with power consumption that were traced to the BME280 and the need to power it via a controllable GPIO pin rather than from the I2C. That problem was solved thanks to great help from these forums.

Unfortunately, my device only lasts approximately 100 hours on a single charge of the 330MAh battery which is a LOT less than the several weeks/months I was expecting. I initially thought the power problem was still down to the BME280, so I tried every trick I could find to reduce its power consumption, but nothing worked,

Next, I tried removing the BME280 grove board altogether and replacing its output with dummy readings, so the device now just consists of an ESP32C6+Grove Shield+330MAh battery. Guess what? The device still only lasts ~100 hours on a single battery charge! Clearly, something in this setup is consuming ~3mA instead of the (average) 60μA I was expecting. I am suspicious of the Grove shield but I lack the tools to prove this.

So, now to the questions:

1. Has anyone built a successful BLE beacon using ESP32C6+Grove shield and got anything like the expected power consumption?

2.Has anyone built a successful BLE beacon device with long battery life using any other processor that is compatible with the Grove Shield socket?

{Aside: If you’re wondering where that 60μA figure comes from, I found this excellent write-up by @msfujino. BLE Advertising Current Comparison, ESP32C3,C6,S3, MG24, nRF52840 and plugged in the advertising/wake numbers for my device: 100ms wake+80ms advertise plus 5 seconds sleep. Yes, 5 seconds is very short but I need that for debugging!}

Hi SteveF,

How was the estimate of 60 uA calculated?
My experiment, linked above, shows that when the ESP32C6 advertises for 1 second and sleeps for 59 seconds, the average current over 60 seconds is 1270 uA.

My device does 100ms wake/boot,(mainly delay for BLE stack to stabilize) then a short 80ms advertising cycle (2 x 40 ms advertising packets) then 5000 ms sleep. I used your 1270uA.figure for the wake/boot and for advertising, and then your 13.1uA for the sleep. This gives ((1270x180)+(5000*13.1))/(5000+180) = 56.8uA average, which I’ve rounded up to 60,.

As can be seen from the ESP32C3 example in the graph, the device consumes 80 mA during the period when it is awake and advertising.

Ouch!! I was looking at the wrong graph. That gives me an average power consumption of 2.8mA, which explains everything. The ESP32C6 clearly isn’t suited for the job. I need to find a better processor.

PS. I forgot to say thanks for such a quick and helpful response

Hi there,

So , You see @msfujino is good like that, He knows the 411.
Take a look at the newest XIAO Nrf54LM20a that should do everything you need, including the ability to turn off the Sensor for “zero” consumption from it. also can accurately characterise the battery and send you the battery level over the BLE as well.

Great project too, btw :+1:

HTH
GL :slight_smile: PJ :v:

FYI.. the price is thru the roof in my curency, maybe better in yours

Hi SteveF,

Please refer to the link below for related information. I recommend the nRF52 or nRF54.

Nice, but kinda defeats the object of building your own :grin:

Thanks. I now have two on pre-order

Thanks. I’ve pre-ordered a couple of the nRF54LM20a

If you want to build your own weather station, you can make one according to this tutorial. This is based on ESP32-S3.

If you want to add anemometer and avoid ready-made one, you can make a 3D printed anemometer.

Thanks. Part of the reason I’m doing this is to build my Arduino skills as a retirement hobby. I have lots of years tinkering with Raspberry Pi, a little Z80 (…from the 1980s!…) and many, many years on commercial processors. So, I’m deliberately designing and building everything myself.

As to the anemometer: I live next to a river (the river Mersey in Liverpool, UK) and its is very windy here ALL the time. An anemometer would wear out in days :grin:

Hi there,

So, Don’t get triggered on anything
:grin: :+1:

Z80A & “B” plus ALL the Support chips here too. CTC, DART, PIO, OctDart (yea 8 serial ports) … EEProm Erasers, LOL, Waiting, Some really good memories…
Graduated in 79’ by the 1981- 85 it was Cheers :clinking_beer_mugs:

GL :slight_smile: PJ :v:

the comparison for me is like dinosaurs to spaceships :grin: #LoveXIAO
We aren’t alone… Different views on Bare Metal Programming - #2 by PJ_Glasso

For some reason Gerry and the Pacemakers comes to mind :thinking:

I have Sinclair (ZX80 in 1980) to thank for my “intro” to all things computery :slight_smile:

While you’re waiting for your new NRF devices, perhaps consider an 'MG24 based device?
(Although to really achieve long term low power you may need to ditch Arduino for their more comprehensive development environment.)

For those of you wondering how I got on with this, here’s a brief progress update and some key learning points:

My chips arrived on Thursday. I refactored my code for the nRF54 and had it all working - almost -within an hour or two. Why almost? The answer is that transmission power and power consumption turned out to be big issues.

On USB power, everything worked perfectly except that tx power was vey low. The transmit power on the chip is configurable over a small range, and I set it to max but still couldn’t get decent output. I wondered if an external antenna would help. This brings me to learning point no 1:

1: DONT THROW AWAY THE CHIP PACKAGING!!!. It turns out there is a small antenna wire curled around the outside of the foam insert.

And, learning point no 2:

  1. Download the nRF Connect app. This is by far the best app for BLE diagnosis that I’ve come across. It’s free, too.

With the external antenna, tx power was great and everything worked fine on USB power. Then I switched to battery power and nothing worked. (The battery is a 330mAh 3.7V LiPo)

If you recall, when I was using an ESP32C6, I had to separately power the BME280 sensor from a GPIO pin as well as using I2C so that I could power it down properly for sleep mode. It turns out this causes the nRF54 to draw too much current and stop working, so I switched back to a single I2C Grove connector. Everything still worked perfectly on USB but not on battery power.

I next reasoned that maybe the nRF54 could not deal with both the BME280 and the bluetooth modem being active at the same time. I changed my code to read the BME280 precisely once and then put it in sleep mode before activating the BLE beacon. Again, this worked fine on USB power but was temperamental on battery power, temperamental in this case mostly meaning “no”.

Finally, I explicitly switched off I2C as well as putting the BME280 into sleep mode before starting the beacon. This finally seems to have done the trick, and the device has been running on battery power now for 24 hours. If it gets past 100 hours, it will have beaten the ESP32C6. (I’m off on holiday tomorrow for a few days, so I won’t know the outcome until I return.) This brings me to learning point no 3:

3: The nRF54 bluetooth modem, when running on battery power, is very sensitive to other devices also drawing current. Turn off everything you don’t need before starting a BLE beacon

Hi SteveF,

Posts about the XIAO_nRF54L20A are just getting started on this forum. We’d love it if you’d share details about your project as well.
By making full use of the built-in nPM1300, you may be able to further reduce power consumption.

Hi there,

Out Standing..
Great follow through too..

No kidding the LM20A will be the truth, the PMIIC really dials it in.
and you can Actually read the battery SOC with out standing on a chair waving a chicken leg around. :grin: (doesn’t work either)

Not since the first BSP and the first Xiao nrf52840 could reading the battery so good.
IMO.

LQQK’ing forward to more…

GL :slight_smile: PJ :v: