78.125 KHz ATtiny85 Based Boost LED Driver

by hanlin_y in Circuits > LEDs

5265 Views, 23 Favorites, 0 Comments

78.125 KHz ATtiny85 Based Boost LED Driver

MCU Based LED Driver Powering 6 - 3W Whte LEDs
20170316_124130.jpg
20170316_124144.jpg
20170316_124244.jpg

You can increase the switching frequency of microcontroller based LED drivers by using a faster crystal oscillator. A 20 MHz oscillator was used to increase it to from 31.25 kHz to 78.125 kHz.

With a higher switching frequency, you can:

  • increase the LED string's drive current
  • increase the LED string's forward voltage
  • decrease the input voltage
  • decrease the input and output capacitor's value
  • decrease the inductor's value

You can use this circuit for LED lamps, testing LEDs, testing other components, and other projects that require a constant current source.

Component Selection

switching converters.png

To calculate the component values, enter the parameters for the boost LED driver.

It will calculate the values for the:

  • Inductor rating
  • Switch rating
  • Diode rating
  • Output capacitor
  • Current sense resistor

Make sure that their absolute maximum ratings aren't exceeded.

Note that with a higher switching frequency, the ripple current decrease, allowing a higher average inductor and current.

Driver Board

schematic.png

The circuit's very similar to my previous microcontroller based boost converters. The main difference is that a 20 MHz oscillator was used. A 24V zener diode was selected in case of open voltage or too high of an LED string voltage. If the output exceeds 24.7V, the NPN transistor turns on, causing the microcontroller to reset which protects the MOSFET, output capacitor, and Schottky diode from overvoltage.

Note that the drive current was selected for a 0.82 ohm current sense resistor.

Program for the ATtiny85

boost screen shot.png

In this program, you can set the:

  • drive current
  • PWM frequency
  • maximum duty cycle

You can modify the code to add other features such as strobe light, timer, turning off the LED, and sleep mode.

LED Driver Measured With an Oscilloscope

MCU Based LED Driver Oscilloscope Readings

The LED driver was tested with:

  • 6 white LEDs
  • 12V power supply

Modes 0 through 4 were used. The drive currents were up to 700 mA.