Voltecx is in beta. The macOS build comes first; Windows and Linux packages are still being tested.Beta. macOS comes first; Windows and Linux are still in testing. What's new

An LED wants a current, not a voltage. A driver holds the string's current and lets its voltage fall where it will, and it has to dim: by lowering the current (analog dimming) or by switching it on and off (PWM dimming). Each way brings its own check.

What the job needs checked

  • The held current and its ripple. The mean string current at full and at dimmed brightness, the peak the LEDs see, and the switching frequency the regulation settles at.
  • Flicker. PWM dimming makes the light go fully off between pulses. IEEE Std 1789-2015 sets a low-risk limit on percent flicker that rises with the dimming frequency and sets none above 1250 Hz, so a 1 kHz dimming that is fine to the eye can still fail.
  • The shortest pulse. A pulse needs time to rise from zero, so a very short dimming duty never reaches regulation.
  • The loop on a boost. A boost driver steps up onto a long string and has a right-half-plane zero, so its current loop needs phase margin against it.

How Voltecx does it

  • Design › Design Steps › LED Driver (design.ledDriver) reads the open circuit, sizes a hysteretic buck or a PI-controlled boost, and reports the switching frequency, the mean and peak current, the shortest dimming duty, the percent flicker and the IEEE 1789 limit at your dimming frequency. With verify it simulates the circuit and checks the mean current; with apply it writes the parts in one undoable step.
  • Two examples ship ready to run: a buck from 48 V with 1 kHz PWM dimming, and a boost from 12 V onto ten LEDs with both analog and 200 Hz PWM dimming.
  • scope.measure reads the current held inside a pulse and its mean over a dimming period.

The LED current of the boost driver example simulated in Voltecx over two 200 Hz dimming periods at half duty, with the analog level Adim at 0.6 and at 0.3. Inside each pulse the loop holds 0.307 A and 0.152 A; over a period the means are 0.150 A and 0.075 A.

The figure is the boost example dimmed both ways at once. Halving Adim halves the current inside each pulse with no flicker added; the PWM duty sets how long the current flows. At 200 Hz the flicker limit is 16 %, and PWM dimming gives 100 %, so a design dimmed at 200 Hz should dim with the current and keep PWM above 1250 Hz.

Try it

Tutorial 23 opens both drivers, sizes the buck, shows why 1 kHz PWM dimming fails the flicker check and 2 kHz passes, and dims the boost both ways. About 15 minutes.

Know the limits

The LEDs in the examples are illustrative: each is a 3 V threshold and a 1 Ω straight line, not a part from a data sheet. Percent flicker is computed from the simulated current; the light output of a real LED, its colour shift with current and its temperature are not modelled. Nothing has been compared with a built driver yet.

Related: Design tools · Examples · Scope