Five volts is the limit
Only a 10 Ω resistor stands between VCC and each LED, so VCC sets the current: about 62 mA from 3.3 V and about 168 mA from 5 V. That second number is a little past the LED's 150 mA rating, with the resistor past its quarter watt. So on 5 V the book's sketches stop at 170 of 255. On 3.3 V the LEDs can stay fully on, at about half the light.
One resistor, one voltage
With the transistor on, VCC divides between three things: the transistor (about 0.15 V), the LED, and the 10 Ω. The LED takes more voltage the more current it carries, and whatever is left over drives the current through the 10 Ω. Move the slider.
From 3.3 V an LED takes about 62 mA. From 5 V it takes about 168 mA, and its 10 Ω turns about 280 mW into heat. These are worked out from the maker's typical curve, not measured, and every LED is a little different: the maker sells them anywhere from 2.8 V to 3.4 V at 150 mA. Press the buttons to see the two ends of that range.
Where 5 V lands
The LEDs are rated 150 mA and 500 mW continuous; the resistors are 1206 parts rated a quarter watt. Held fully on from 5 V, a typical LED is a little past both, and one from the low end of the range is further past. It lights; it runs hot, and running past a rating shortens an LED's life.
That is what the back of the board means by USE PWM TO ADJUST BRIGHTNESS. Every pulse still carries the full current, but PWM lowers the average, and the average is what heats things. At 170 of 255, two thirds, even an LED from the low end of the range averages under both of its limits, and its resistor under its quarter watt. Every sketch in this book stops there when VCC is on 5V.
3.3 V is the gentle choice
From 3.3 V each LED takes about 62 mA, far inside everything. It gives about half the light it gives at 150 mA, and it can stay on at 255 all day. The catch is where 3.3 V comes from: your board's own regulator, shared with the chip. On an Uno the 3.3V pin cannot supply even one LED. What your supply must give has the numbers for each board.
Never wire VCC to anything above 5 V. Nothing but the 10 Ω stands between it and the LED.
When it does not work
Held fully on from 5 V each LED turns about half a watt into heat and each 10 Ω a little over a quarter watt, on a board the size of a stamp. Keep the duty at 170 of 255 or under, or move VCC to 3V3, and the heat falls with the average current.
It is soldered on, and 10 Ω is what makes 5 V bright. PWM does the same job from your sketch: at 170 of 255 the average current is about two thirds of full, and you can change it without a soldering iron.
No, it helps. Many boards lose a few tenths of a volt from USB to their 5V pin through a diode or a switch. From 4.7 V a typical LED takes about 148 mA, just inside its rating, though one from the low end of the maker's range is still past it. Keep the cap.
Two colour temperatures, and every shade in between from two pins.
Warm, cool and between →Edit this page — content/books/dual-bright-leds/five-volts-is-the-limit.mdx
Questions about this product
See what other owners have asked, and read their solutions.
Dual Bright LEDs
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.