Close

An update on power

A project log for AND!XOR DEFCON 24 Badge

Building our own electronic badge. ARM Cortex M3 and Arduino based

zappZapp 03/12/2016 at 08:392 Comments

To date we haven't considered power consumption n the badge. Our goal is for the badge to run for 80 hours on 3 AA batteries to that it survives DEF CON. All software and hardware work has been to address functionality and to build the best hardware we can. Now that the badge is becoming more and more real it was time to address power consumption.

Until this week, the badge has been running at full 72mhz even during delays for animation and waiting for user input. This created a relatively constant load of about 70mA. Based on the STM32F103 datasheet 40mA of that was simply going to the MCU. We are also powering the RFM69 and 4 WS2812B LEDs.

This week we implemented a low-power delay function into the badge that drops the clock frequency down to 6 mhz temporarily. This is the slowest we could reliably get the MCU while still maintaining the RFM69. It's only being used by the Matrix animation but the other delays will soon be switched.

ModeOptimized?Current
Menu IdleNo69.5 mA
Glow (100% white LED Brightness)No114.7 mA
Glow (40% white LED Brightness)No81.7 mA
Matrix AnimationYes43.5 mA

Not bad.

These results are far from scientific as we are not doing a great job at isolating variables. The values were measured as peaks on a multimeter and may have been when the RFM69 was handling packets in the background. The 100% White Glow test was by far the worst case we observed while measuring the badge. Values typically hovered around 69-70mA without the LEDs on.

What's interesting is that by varying the LED brightness from 100% to 40% we are able to save about 33 mA or 8.25 mA per LED (we're using 4 on this design). 40% looks great so it is now our default brightness.

Next steps are to optimize the remaining code, especially any code that blocks for user input, disable unused peripherals, and to try to put the MCU into a deeper sleep waiting for interrupts.

Discussions

Zapp wrote 03/12/2016 at 20:04 point

Thanks True! I appreciate the help a lot. I was eager to see what the new numbers looked like with the slower clock delay. Next step is to try your method and go lower. I thought about it last night a bit, it should work pretty well and not break the RFM69 since it's interrupt driven. 

  Are you sure? yes | no

true wrote 03/12/2016 at 19:57 point

I discussed this with you on IRC, but this is not the proper way to do this. You should be able to get power consumption even lower. Looking forward to what the numbers will be using a timer and sleeping the CPU.

  Are you sure? yes | no