Most power efficient way to blink two RGB LEDs under Zephyr

So, I'm working on a project with two RGB LEDs, that's going to be powered by a coin cell.

The device is going to spend most of it's time asleep, only waking up for a minute or so, during which time it needs to flash some status on the two LEDs.

Clearly, power management is key here, but we're also going to be scanning and advertising on BLE at the same time, so we're already drawing decent power right there.

Since we're doing this with the nRF Connect SDK, I'm trying to find the most power-efficient way to accomplish what I need to do.

I've come up with a few:

1. Run a thread that handles the blinking in software, seems like it might not be very efficient.

2. Use two PWM peripherals, with the NRFX API, so that we can just hand it the blink times and colors and it just works. Apparently the PWM peripherals draw a lot of power.

3. Use a timer or RTC and PPI to control the GPIOTE. While this should be efficient, apparently we cannot use the zephyr GPIO driver and nrfx at the same time. So, we'd have to rip out the rest of the GPIO code and replace it.

3 seems like it might be the most power efficient, but a lot of work. When stacked up against the power draw from the LED itself, and the BLE stack.... is it worth it?

Parents Reply Children
No Data
Related