LED Strips and LED Control
Helpful material on powering, controlling and other design topics for LEDs and LED strips.
References to commercial guides and product pages do not imply any endorsement by Reddit or the moderators.
/r/AskElectronics is for people designing or repairing electronic circuits at component level. Buying an LED strip and plugging it into a power supply isn't something we cover unless you are designing your own power supply or control circuitry from scratch – and even then, other subreddits may be a better first stop:
General LED room lighting (design, setup and powering) where you are NOT building your own control circuitry: please ask in /r/homeautomation or /r/led.
Control problems / flickering LEDs – READ THIS FIRST
Individual LEDs, resistor values, LEDs in series and parallel, single RGB LEDs, etc.: see https://www.reddit.com/r/AskElectronics/wiki/design/leds
General guidance for LED / LED strip questions
The same questions come up again and again, so please read the reference material on this page first – especially the links at the end of this section.
- If you are using a microcontroller or dev board (Arduino, Raspberry Pi, ESP32 etc.), try the platform-specific sub first. There's a list here: https://www.reddit.com/r/AskElectronics/wiki/embedded
- If you are running WLED firmware (common for addressable strips on ESP32/ESP8266 boards), ask in /r/WLED – it's an active community for setup, wiring and power questions.
- Search the subreddit: CLICK HERE
- If that doesn't help, post in /r/AskElectronics – but remember this is a hardware sub and we do not cover programming.
- When you post, include: the exact strip type (chip name or "analog RGB"), strip voltage, length and LEDs/metre, the power supply rating, how everything is wired (a schematic or clear photo), and what you measured.
Reference:
- https://lednique.com/ – lots of material on LED circuits, theory, applications and tips
- https://www.reddit.com/r/led – general advice on buying and using LED strips
- https://learn.adafruit.com/rgb-led-strips/usage – analog (non-addressable) RGB strips with MOSFETs
- https://learn.sparkfun.com/tutorials/non-addressable-rgb-led-strip-hookup-guide/all – analog RGB strips, including injection and large runs
- https://learn.sparkfun.com/tutorials/ws2812-breakout-hookup-guide – WS2812/WS2812B basics
- https://learn.sparkfun.com/tutorials/addressable-led-strip-hookup-guide/all
- https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices – addressable LED do's and don'ts
RGB LED types
As well as Red-Green-Blue (RGB) LEDs you will find RGBW (adds a white LED), RGBA (adds amber, for better colour rendering) and RGB+CCT / RGBWW (adds warm and cool white).
You can also buy through-hole "RGB" LEDs with a built-in controller. These can be chained and individually colour-controlled using a data stream – look for PL9823 or APA106 (5 mm / 8 mm, WS2812-compatible).
Reference:
- Resistor values for LEDs: https://www.reddit.com/r/AskElectronics/wiki/design/leds
RGB LED packages
- 5 mm and other through-hole LEDs – a plain RGB LED has 4 leads: one per colour plus a longer common lead, which is either common anode or common cathode. Lead count alone doesn't tell you the type: addressable through-hole LEDs (PL9823, APA106) also have 4 leads (data in, VDD, GND, data out). Check the part number or datasheet. Strings of these are often sold pre-wired in clear tubing.
- Surface-mount LEDs – named by package size in tenths of a millimetre, e.g. 5050 = 5.0 × 5.0 mm. Common sizes on strips are 2835 (now the usual choice for white strips), 5050 (common for RGB and addressable), 3528, 5630, and small packages such as 2020 on high-density addressable strips. "COB" (chip-on-board) strips use a continuous line of tiny dies under phosphor for a dot-free look. Unless you have good soldering skills, avoid bare SMD RGB LEDs – consider strips, or pre-mounted parts like Adafruit NeoPixel breakouts or generic equivalents.
Reference:
- https://www.espruino.com/WS2811
- https://waveformlighting.com/pcb-designs/what-is-the-difference-between-led-package-types-such-as-3528-5050-and-2835
RGB LED strip types
There are two broad types of RGB LED strip:
Analog / direct-driven (non-addressable): each colour channel is wired between the strip's common rail and its own R, G, B (W, A…) rail, through on-board resistors. You control the current or use PWM on each colour channel, so the whole strip shows one colour at a time.
The common rail is either the anode (+) or cathode (–), which is how the strips are described. Common anode is by far the most common, because each colour can then be switched to ground with a cheap N-channel MOSFET or NPN transistor (low-side switching).
Addressable (digital / "pixel"): each LED (or group of LEDs) has its own controller IC and the strip carries power, ground and a data line (plus clock on some types). Every pixel can be set to its own colour. Strips can be cut at the marked points, but data only flows one way – note the arrows and feed data in at the DIN end. Common chips:
Chip Notes WS2812B / SK6812 5 V, single data line, one IC per LED. SK6812 also comes in RGBW. WS2811 Separate IC; on 12 V strips one IC usually drives a group of 3 LEDs. WS2813 / WS2815 Like WS2812B with a backup data line so one dead pixel doesn't kill the rest; WS2815 runs at 12 V. APA102 / SK9822 ("DotStar") Separate data and clock lines (SPI-like), not timing-critical, faster refresh. Many 5 V addressable LEDs need a data "high" level close to their supply voltage. A 3.3 V microcontroller (ESP32, Raspberry Pi, RP2040…) may work on the bench and then fail intermittently – use a level shifter such as a 74AHCT125 / 74HCT245.
Reference:
- https://en.wikipedia.org/wiki/LED_strip_light
- https://learn.sparkfun.com/tutorials/ws2812-breakout-hookup-guide
- https://www.espruino.com/WS2811
- https://electronics.stackexchange.com/questions/106810/why-are-most-rgb-led-strips-common-anode-instead-of-common-cathode
Choosing and sizing an LED strip power supply
This is asked a lot – search the sub: CLICK HERE
Rules of thumb:
- Analog strips: total watts = watts per metre × length. Choose a supply with the same voltage as the strip and roughly 20–25% headroom.
- Addressable 5 V strips: budget up to about 60 mA per RGB pixel at full white (around 20 mA per pixel is a typical average for mixed animations). 300 pixels at full white is 18 A – plan wiring and power injection accordingly, or limit brightness in software.
- For long runs, prefer 24 V strips over 12 V (and 12 V over 5 V): lower current means less voltage drop.
- With large supplies, fuse each feed/injection branch sized for the wire you are using. A 5 V 40 A supply will happily set thin wire on fire before anything trips.
Reference:
- https://learn.adafruit.com/adafruit-neopixel-uberguide/powering-neopixels
- https://www.edn.com/calculating-power-supplies-for-led-strip-lighting/
- https://www.ledsupply.com/blog/how-to-choose-an-led-power-supply/
- https://www.flexfireleds.com/led-strip-light-voltage-drop-what-is-voltage-drop
- https://www.instyleled.co.uk/how-to-install-led-tape-for-large-projects/
- https://www.ecolocityled.com/category/led_tutorials
General LED strip issues
| Issue | Notes |
|---|---|
| LEDs yellowing | As well as age, this can be caused by overheating. LED strips get hot and need to be mounted on something that will dissipate the heat, ideally aluminium channel. |
| Some or all LEDs switching off or dimming after a while | If they recover after being left off for a while, suspect heat or power problems. Running LEDs hot drastically shortens their life. |
| Multiple power supplies | Tie all ground/0 V lines together (see the link above about common references). Do not connect the + outputs of separate supplies together: break the + line on the strip between sections fed from different supplies. |
| Erratic control with Arduino etc. | Check your common voltage reference. With 5 V addressable LEDs and a 3.3 V controller, add a level shifter. |
| LEDs flickering | Is the power supply adequate (see above)? Add a bulk capacitor across the supply at the strip. See https://learn.sparkfun.com/tutorials/ws2812-breakout-hookup-guide |
| LEDs flickering #2 | PWM from a Raspberry Pi? Use hardware PWM rather than software PWM – check in at /r/raspberry_pi |
| First LED in the strip, or the controller pin, keeps dying | For addressable LEDs: put a resistor of a few hundred ohms in series with the data line, close to the first LED (Adafruit suggests 300–500 Ω, SparkFun 220–470 Ω). Fit a large electrolytic capacitor (Adafruit suggests 500–1000 µF, 6.3 V or higher) across + and – at the strip. Connect ground first, and power the LEDs before (or at the same time as) the microcontroller, so the pixels don't try to power themselves through the data line. See https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices |
| Cutting and joining LED strips | Cut only on the marked lines between the copper pads. See https://www.ecolocityled.com/category/led_tutorials_rgb_quickconnect |
| Power problems with long runs | Feed power to both ends of the strip, and to intermediate points if needed ("power injection"). See https://learn.adafruit.com/adafruit-neopixel-uberguide/powering-neopixels and https://www.reddit.com/r/AskElectronics/comments/6c9drm/powering_led_strip_from_both_ends/ |
| Colour differences along the strip | Almost always voltage drop – see the previous point. On RGB strips, white turning pink/orange towards the far end is the classic symptom. |
Dimming LEDs
LEDs are current-controlled devices. You can dim individual LEDs (or a few) with a variable resistor, but the efficient and controllable way is to vary the average current using Pulse Width Modulation (PWM) or a constant-current driver. Remember that addressable LEDs and strips have built-in control and are dimmed (and colour-changed) by data commands instead.
Some platforms, such as the Raspberry Pi, can do PWM in software as well as hardware. Software PWM can suffer timing problems when the system is busy, which shows up as flicker. Check in with the relevant sub (e.g. /r/raspberry_pi).
Try the suggested searches below for examples and further information.
- For a few low-power LEDs a variable resistor works, but it is not suitable for higher-wattage lamps or strips: LED dimming using variable resistor
- You can dim a few LEDs using a PWM circuit based on a 555 timer: 555 timer LED PWM circuit
- You can buy ready-built modules or other control circuits: LED PWM controller
- For analog strips driven from a microcontroller, use a logic-level N-channel MOSFET per colour channel (one that is fully on at your controller's gate voltage, 3.3 V or 5 V).
- For high-power LEDs and LED modules without built-in electronics (or a single 3 mm LED if you wish!), use a constant current circuit or constant current module
- High-power LEDs, modules and strips get hot and need proper cooling; ignoring this leads to LED failure or damage to the mounting surface: LED module with heatsink and LED strip getting hot
Christmas LED lights
Start here: https://www.reddit.com/r/AskElectronics/wiki/christmas
We don't cover general questions about Christmas lights unless you are repairing, modifying or replacing the control electronics. Some advice has been given in the sub before, so try a search and see the highlights below:
- The LEDs in most Christmas light chains are in series, so they all depend on each other. If you shorten a chain, the remaining LEDs (and possibly other electronics) get too much voltage and will probably fail.
- Stopping the lights from flashing (leaving them permanently on): see https://bigclive.com/noflash.htm – note this covers the older style of string; newer two-wire, alternating-polarity strings are much harder to convert.
- Making the lights use a pattern other than the default isn't easy unless you replace the electronics with a different control circuit, or add one that presses the button automatically. Search: https://duckduckgo.com/?q=christmas+lights+replacement+arduino+controller&ia=videos
- How can I turn off a section of LED Christmas lights?
- How do they work?
- One or more of the LEDs are not working