LED Feedback Power Budget
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
LED Feedback Power Budget
The chapter budgets visual feedback from real parts: a single indicator LED at 2.1 V and 20 mA, and a 30-pixel WS2812B strip whose pixels each draw about 60 mA at full white, all sized with a 20% supply margin. It is tempting to treat an alert colour as a free software choice. This audit re-derives the LED, PWM, and addressable-strip figures and asks whether the device can actually show its alert without browning out the supply or draining the battery.
Companion to the chapter Visual and Audio Actuators — every number here comes from that chapter.
Ada: Visual feedback is not just a color choice. The LED physics, PWM timing, and addressable-strip current budget decide whether the device can show the alert without browning out the supply or wasting battery. Let me carry every value in the chapter’s own table to full precision.
- Single LED at full brightness.
P = V_f x I_f = 2.1 x 0.020 = 0.042 W– about 42 mW for one full-bright indicator. - 50% PWM current and power. Average current is
0.50 x 20 mA = 10 mA, soP = 2.1 x 0.010 = 0.021 W– about 21 mW, half the full-brightness draw, because PWM scales average current linearly rather than lowering the LED’s forward voltage. - 24-hour PWM saving.
(0.042 - 0.021) x 24 = 0.504 Wh, rounding at the end to the chapter’s “about 0.5 Wh” saved per LED-day. - 5 kHz PWM timing. One period is
1 / 5000 = 0.0002 s = 0.2 ms. At 50% duty that splits into0.2 x 0.50 = 0.1 mson and0.1 msoff – about 100 microseconds each, far faster than the eye’s flicker-fusion threshold. - 8-bit brightness step. One PWM code is
1 / 255 = 0.0039216of full scale, or0.392%. On the chapter’s 5 V driver that step is5 x 0.0039216 = 0.0196 V, about 19.6 mV of ideal average – the finest brightness change the 8-bit dimmer can resolve. - 30-pixel strip at full white.
30 x 60 mA = 1800 mA = 1.8 A, so the strip alone draws5 x 1.8 = 9 Wfrom the 5 V rail. Adding the chapter’s 20% safety margin gives1.8 x 1.20 = 2.16 Aas the supply floor. - The code’s actual ceiling.
strip.setBrightness(50)caps output at50 / 255 = 0.1961of full scale, so the worst full-white frame the firmware can actually produce draws1.8 x 0.1961 = 0.353 A, or5 x 0.353 = 1.76 W– comfortably under the 2.16 A supply, but only while that brightness cap stays in the code.
Every one of these figures reproduces the chapter’s own table to the digit, so both design rules stand: PWM genuinely halves LED power at 50% duty (0.5 Wh per LED-day is real, not marketing), and the 30-pixel full-white current – not the data pin – is what sizes the 5 V supply, ground return, and fuse.
Every number above is taken from the chapter’s own material and re-derived step by step.