A note on my background: I'm a programmer in an electronic design company, starting out with hobby projects.

I'm planning to design a PWM LED strip dimmer and colour controller for an RGB/RGBW led strip (yes, this is a hobby project). Before I start picking parts and drawing the schematics I want to ask if I'm not missing anything.

System overview

Led strip

A common anode configuration. The LED strip will be up to 5m in length, with 14.4W/m for RGB or 18W/m for RGBW - that's up to 90W, or 7.5A drawn from a 12V power supply. With some overhead it comes out to a nice 3A per channel.


PWM switching frequency will be around 6kHz, everything will be controlled by an MCU (STM32F0 family).

What has been taken into account

Power supply

  1. A 12V one with sufficient power, most likely a modified ATX PSU or a dedicated LED one
  2. To make sure the PSU handles large switched load well there will be a few large electrolytic capacitors - most likely on the order of a few millifarads, rated for at least 25V with low ESR
  3. Inrush current protection - an NTC
  4. The MCU will be powered with an LDO, it has undervoltage protection so it will not boot until the logic supply is in it's operating range
  5. The 12V rail will be monitored by the MCU and it will only turn on the LEDs if supply voltage is ok
  6. According to an online calculator using 35um copper I will make the traces at least 12.5mm wide for common power (anode and current return) and 1.5mm wide between cathodes and drains

Driving the LEDs

  1. Low side switched with a single NMOS per channel, Rdson under 20 mOhm
  2. To keep Rdson in spec the MOSFETs will be driven using a dedicated driver, like the MCP14A0153, supplied by 12V
  3. With 200mW power dissipated in transistors with a larger package (DPAK or Nexperia's LFPAK56) it should not be a concern


  1. As per an article on Digikey I plan to have a frequenct of roughly 6kHz
  2. The MCU will run with a 48Mhz clock which is available to the PWM peripheral, giving 13 bits of resolution - probably more then enough

What I'm not sure about and will research

  1. Protection - overvoltage and overcurrent, do I need it and how to implement it
  2. ESD protection on the terminals
  3. Any (magic to me) effects like parasitics, inductance, ringing and what not
  4. The relationship between the emitted light and PWM duty cycle is almost linear. What is the relationship between emitted light and perceived brightness?

What I'm asking

Apart from the points I listed is there anything more I need to consider? Also I will be grateful for any comments regarding the points above.


I've noticed from comments and @Tony's answer that I should underline that the strip is a ready-made one - I'm not in control of it's schematic. It is a stock one with resistor-limited LEDs in parallel made to use with 12V source, like this one, schematic from Adafruit below. From what I understand you cannot use constant current dimmers with such a setup. LED schematic

  • \$\begingroup\$ @TonyStewart.EEsince'75 all those breaks spent reading this Stackechange didn't go down the drain :) seeing all those basic and low quality questions I've been entertainig the thought of a community wiki question about driving LEDs and other basics - it's a fairly recurring topic, especially with hobbyist electronics trending recently. \$\endgroup\$
    – jaskij
    Commented Nov 18, 2017 at 3:40
  • \$\begingroup\$ I have decades of experience on this subject, but I will try brevity for you. \$\endgroup\$ Commented Nov 18, 2017 at 3:43
  • \$\begingroup\$ @TonyStewart.EEsince'75 I know it's deep stuff. I can see how long it takes my colleagues to just get schematics done. I should probably mention in the question EMI is a bit off-topic for now since I dont plan to sell it. And thanks in advance. \$\endgroup\$
    – jaskij
    Commented Nov 18, 2017 at 3:47
  • \$\begingroup\$ In my opinion, it is better to avoid using PWM dimming. At the frequency you are using it should be flicker free, but it would not be that much harder to just make the current DC. \$\endgroup\$
    – user57037
    Commented Nov 18, 2017 at 4:48
  • 2
    \$\begingroup\$ From what I understood you can not use CC dimming eith ready-made dumb LED strips - resistors are built into the strip itself, and there are issues with varying the strip length. If I had control over the LED strip schematic CC is the way to go. \$\endgroup\$
    – jaskij
    Commented Nov 18, 2017 at 10:00

2 Answers 2


Design choices that need to be put into your design spec;

  1. Supply choices

    • current, voltage drop, cost
    • custom LED driver supplies cost about the same per unit watt so a higher voltage like 24V to reduce cost of copper in the flex circuit in conduction losses in each path and common return or even higher if more than 1 Amp per port from using 12V. In Japan it is common to see circa 100Vdc supplies to drive LED COBs with low voltage low side drivers with regulated current and PWM with an LC filter.
    • ATX supplies are cheap with $0.15/W with the 12V portion of the PSU this is less than the cost of the LEDs per Watt but a significant part. Don't compromise reliability here.
    • CC limited supplies for each port are best so that current is regulated while Vf variation can be 10% at the same current. This can be done with current sense feedback.
    • dimmer control interface Many options by design can be chosen including I2S, uC PWM , RS-485 digital control to DAC or 0 to 10V control interface for analog control. This depends on User interface requirements for remote control.
  2. Environmental protection: IPxy x from objects, y for water

    • IP20 (basic finger size protection)
    • IP54 (limited protection to dust and water splashes)
    • IP65 ( full dust protection and low pressure water )
    • IP68 ( full dust protection and water immersion 1m+ )
  3. EOS protection
    • induced stray lightning for outdoor use
    • handling protection from ESD during assembly
    • this is more necessary when the LEDs are OFF when high impedance and susceptible to induced negative fields or discharges on long cables or contacts. It is only most sensitive to negative voltages below -5V to damage or -15V if a string of 3 LEDs.
    • the best way to protect LED's is a reverse biased diode between driver and switched rail. Risk depends on exposure and frequency of lightning strikes per year. this also prevents the potential
  4. Beware of Luminous intensity and quality of supplier specs.
    • Watts don't always translate into accurate colours as there can be an order of magnitude difference in red & blue power LED which tend to be more expensive and lower efficacy in combo LEDs and also more expensive to combine 3 different chemistries into one epitaxial chip. Choose reputable datasheets from brand name sources like Cree or those from Japan, TW or Korea and compare.
    • for a good tool, buy a CIE corrected luminous intensity meter >$50 or for $5 buy a Panasonic CIE corrected 5mm Photo Sensor and operate using 5V from a 9V battery with an LDO into a gain load resistor into a cheap DMM with a diffused >1cm area to capture the LED light for testing.
    • also consider that color temp will change with aging as each LED may degrade at different rates according to operating temperature and duration used. LM70 is the standard used for White LED's but RGB LEDs have the same issue. Often the phosphor ages slightly more on white LEDs so we call this a small rise in CCT or blue shift.

As far as brightness perception, our eyes have a very wide dynamic range yet TV images are limited to about 2 decades of range. It would be very hard to recognize a 30% loss in visual power from time to time as our eyes and continually adjust and you need a reference for comparison. Yet small changes in LEDs side by side with variations of different wavelengths or intensities are easily seen on big screen LED billboards due to close proximity. So in short recognize differences far easier than absolute values. This is often due to cost vs bin size specifications of supplier choices. a 3:1 range of LED intensities can easily exist in open production but a 10% single bin quality exists at a premium, so supplier selection and specifications depend greatly on the application and ability to recognize differences. If you were driving in a tunnel of LED with a string of LEDs along the road and you paid a lot for this installed, you might be critical of the supplier if some seemed off-colour or insufficient intensity. ( I had a customer like this and very few complaints in a million LEDs over 10 years with most of them in 1 Cd/mA range at 20~30 deg.)

  • \$\begingroup\$ As it is a hobby project it's for home automation - the dimmer will have a touch panel built around the same MCU (separate MCUs due to layout considerations), but that's a separate topic. Also for remote control I plan to use Microchip's Bluetooth moduels and an Android app. I know Bluetooth serial port won't work with iOS but's that not a problem. \$\endgroup\$
    – jaskij
    Commented Nov 18, 2017 at 10:17
  • \$\begingroup\$ An EE buddy of mine in the early 70's invented a great dimmer. A hand wave within a few inches could control the lamp intensity up and down very quickly or slowly or full on and off with a hand wave gesture. It sensed 60Hz e-Field as a touchless detection method near the wall panel by capacitance coupling with up/down counters and Triac phase control. Then later for my thesis, I invented a 2 sequence sound activated controller for quadrapalegics who could whistle or block in a tube to select a slow scanning LED on a matrix display to dial a phone or toggle a light. \$\endgroup\$ Commented Nov 18, 2017 at 16:47
  • \$\begingroup\$ Something similar to how a Theremin is controlled? \$\endgroup\$
    – jaskij
    Commented Nov 18, 2017 at 16:49
  • \$\begingroup\$ More like a velocity sensitive e-piano keyboard. Theremin was a relaxation oscillator with pF modulated FM. This used 60 Hz E field amplitude for AM. \$\endgroup\$ Commented Nov 18, 2017 at 16:51

A few points. Most projects even commercial products wouldn't bother monitoring the 12V supply with the microcontroller. Skip the mosfet driver and find some mosfets that work for 3 amps at logic level gate voltages. This lowers the complexity and part count. Overvoltage protection is not needed if you aren't careless with the design and don't expect someone to plug the wrong supply in. Overcurrent you could throw a PTC resetable fuse for standard blow fuse if you are really concerned. ESD protection is a bit overboard for a led strip project.

The typical led strip controller only needs 4 or 5 parts. Voltage source, regulator for the microcontroller, microcontroller, n-fets, and the led strip. More than that and you are overengineering it.

  • \$\begingroup\$ Most logic level mosfets, even those with a threshold voltage around 1.5V have a sharp Rdson decline until 4-5V, that's the reason I'm thinking about using the driver. As an alternative I would have to severly overspec the mosfets. Also - this is intended as a learning experience - I'm currently at the stage of complicating stuff in "from simplicity to complexity to simplicity" if you know the concept. \$\endgroup\$
    – jaskij
    Commented Nov 18, 2017 at 13:37
  • \$\begingroup\$ Look at Figure 12. in mouser.com/ds/2/302/PSMN011-30YLC-102461.pdf - and as far as I know that's pretty decent for a logic level mosfet. As for inrush - am I supposed to to depend on the supply protecting itself? \$\endgroup\$
    – jaskij
    Commented Nov 18, 2017 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.