dual bright LEDs/How it works/04. Five volts is the limit
How it works · 04 of 9

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.

Five volts is the limit
R = 10 Ω
LED from the maker's range
VCC5.00 V
One LED
168 mA
Light
108 %
10 Ω heat
282 mW
5.0 V, held fully on: about 168 mA, past what this LED is rated to carry all the time, and 282 mW in a resistor rated for 250. It lights, and it runs hot. On 5 V, cap the PWM: the book's sketches stop at two thirds, and every LED in the maker's range is inside all three limits there.

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

The LEDs and the board get hot on 5 V.

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.

Why not just use a bigger resistor?

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.

My 5V pin reads 4.7 V. Is that a problem?

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.

Where this goes next

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

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

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.

Browse Modules and blocks on the forum →