dual bright LEDs/Using it/09. When it stays dark
Using it · 09 of 9

When it stays dark

Neither LED lit is VCC or GND, because the pins only switch. One colour dark is that colour's pin. Full on with no dimming is a pin without PWM. A board that resets is VCC on a 3.3 V pin. Flicker on camera is PWM. A glow before the sketch starts is a pin nothing holds LOW yet.

Start from what you see

When it stays dark
What you see
The other colour works, so VCC and GND are fine. Count from the square pad: GND, VCC, 3000K, 6500K. Check the sketch's pin number is the GPIO the wire is on, and that setup() made it an OUTPUT. Two wires swapped makes the colours swap, not vanish.

Pick what you see. The first split is how many LEDs are affected.

Neither lights: the shared part, VCC or GND. The colour pins only switch the transistors; with VCC unwired nothing flows, whatever the sketch does. An older lesson's wiring list for this block left VCC out.

One colour never lights: that colour's pin. The other LED working proves VCC and GND. Check the pin number in the sketch is the GPIO you wired.

Fully on or off, never in between: the pin cannot do PWM. On an Uno only D3, D5, D6, D9, D10 and D11 dim, and analogWrite on any other pin rounds to on or off.

When the board misbehaves

It resets as the LEDs light: VCC is on a 3.3 V pin, and the regulator is feeding both LEDs and the chip at once. Move VCC to 5V and keep the cap.

It flickers on camera: that is the PWM, invisible to you. A camera's rolling shutter samples it line by line.

An LED glows before the sketch starts: nothing on the board holds a base LOW, so the LED follows its pin through reset. It does no harm, and the sketches set both pins LOW first.

When it is hot

On 5V held fully on, each LED and its 10 Ω run a little past their ratings, and the board can get hot to the touch. That is not a fault of the block; it is what five volts is the limit is about. Cap the duty at 170 or move VCC to 3V3.

When it does not work

Both LEDs light, but the wrong one for each name.

The 3000K and 6500K wires are swapped, or WARM_PIN and COOL_PIN are. Swap the numbers in the sketch. The upper LED on the board is the warm one.

Only one LED ever lights, whichever pin I drive.

Both colour wires may be on one GPIO, or one wire is on VCC. Count from the square pad again: GND, VCC, 3000K, 6500K. A colour wire on VCC does nothing at all, since only a pin with a sketch behind it switches a transistor.

It worked on 5V, and is dim on 3V3.

That is expected: about 62 mA per LED instead of about 168 mA, a little under half the light. Nothing is wrong, and on 3V3 you can raise the duty to 255.

An LED stays lit after I stop the sketch.

Stopping MicroPython with Ctrl-C leaves the pins as they were. Set both duties to 0 at the REPL, or press reset. In Arduino, uploading a new sketch resets the board and the LEDs go out until it runs.

Alongside this page
Where this goes next

Back to the block's page: the specs, the downloads and the questions people ask.

Dual Bright LEDs →

Edit this page — content/books/dual-bright-leds/when-it-stays-dark.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 →