georges80
Flashlight Enthusiast
I never posted about this driver on CPF since at the time it seemed more specific/useful to folk on the MTBR diy lights forum for bike lighting use.
The latest version while still great for bikes and helmet lights, might find some use with the flashlight crowd. So, here's an introduction and some of the history that went into the lflex driver. l = linear driver. Basically it is a low drop out regulator design that provides constant current output and covers a range of outputs for various LEDs like xre or xpg or xml etc. User configurable maximum output current via the menu system, from 500mA to 3500mA.
Being a linear driver, it obviously is aimed at single led single li-ion or two led (2s) and 2 li-ion (2s) type lights.
The lflex Rev1 board, one of the first from the production run. This version ran a software current regulated core. Due to the software regulation I did not have a free pin to provide a separate status LED output (for battery voltage warning levels) and so only the main LED could be used to flash warning levels.
Testing the production board and fine tuning the current regulation algorithm to minimize flicker on the low settings. I ended up having to implement some dithering in the PWM output to 'hide' the low level flicker.
I generally do a smaller production run of a first revision board just in case there are things that need tweaking from having a larger spread of component values that may not be apparent in a single prototype. This means I then have the option to run more of the Rev 1 boards if all is perfect, or take the opportunity to make some changes before running a new revision.
In this case I decided to beef up a few of the thermal paths, specifically to the FET which is used as the linear regulator. Rev 2 was then born, with just some changes to the PCB layout. The astute observer will notice a bunch of additional vias around Q1 to help transfer more heat through to the bottom side of the PCB - which is attached to the housing/heatsink with thermal tape.
The Rev 1 and Rev 2 worked well and lots of folk built various helmet and bike lights out them. There was a small amount of flicker that could occur on some of the dimmer settings and with various battery/led combinations. This was due to the software regulation algorithm and an artifact of the PWM step size and creating visible step changes at lower intensity levels, where unfortunately the human eye is even more sensitive to flicker. For a bike light it wasn't really an issue since the flicker was minimal and on a bike you won't notice such small variations in light output.
But, some folk were using the lflex for helmet lights and wanting it to also double as a reading light. I started to think of a way to design a fully hardware current regulated driver, while still retaining the low voltage drop out of the original lflex and the full range of current tables while providing analog dimming (not PWM).
I then thought of a new regulation scheme and started searching for a cost effective very low input offset opamp and successfully located a nice chip in a small compact package.
Built up a prototype to test the new scheme and ported the firmware from my flex driver onto the new hardware. Worked perfectly after a few small component value tweaks. I tested it at various temperatures 0C to 90C and it was stable and consistent over the full output current range. Success!
The new scheme also freed up a pin, so the dedicated status LED output could be added in for voltage warnings, just like my other flex drivers.
Did a production layout of the new design and here is a picture of the latest lflex V3 board.
This is a linear driver, so works well with single LED and single li-ion or 3 nimh cells etc, or 2 LEDs and 2 li-ion cells. Obviously excess voltage x current is dissipated as heat. It runs the same UI's as all my other flex drivers. It has a choice of current tables (with dimming within each table). You can choose 500mA/1000mA/1500mA/2000mA/2500mA/3000mA or 3500mA as the max output current. The firmware will scale the dimming steps as needed for the chosen current table. i.e choose say the 1500mA table and you'll have a range of dimming steps from around 30mA minimum up to the 1500mA max. Choose say the 3000mA table and you'll have a range of dimming steps from 30mA to 3000mA. Step sizes are chosen to provide reasonably spaced (to the human eye) intensity changes.
I hope some of you have found the writeup interesting and to see how many steps (albeit abbreviated here) it takes to develop and fine tune a driver.
cheers,
george.
The latest version while still great for bikes and helmet lights, might find some use with the flashlight crowd. So, here's an introduction and some of the history that went into the lflex driver. l = linear driver. Basically it is a low drop out regulator design that provides constant current output and covers a range of outputs for various LEDs like xre or xpg or xml etc. User configurable maximum output current via the menu system, from 500mA to 3500mA.
Being a linear driver, it obviously is aimed at single led single li-ion or two led (2s) and 2 li-ion (2s) type lights.
The lflex Rev1 board, one of the first from the production run. This version ran a software current regulated core. Due to the software regulation I did not have a free pin to provide a separate status LED output (for battery voltage warning levels) and so only the main LED could be used to flash warning levels.
Testing the production board and fine tuning the current regulation algorithm to minimize flicker on the low settings. I ended up having to implement some dithering in the PWM output to 'hide' the low level flicker.
I generally do a smaller production run of a first revision board just in case there are things that need tweaking from having a larger spread of component values that may not be apparent in a single prototype. This means I then have the option to run more of the Rev 1 boards if all is perfect, or take the opportunity to make some changes before running a new revision.
In this case I decided to beef up a few of the thermal paths, specifically to the FET which is used as the linear regulator. Rev 2 was then born, with just some changes to the PCB layout. The astute observer will notice a bunch of additional vias around Q1 to help transfer more heat through to the bottom side of the PCB - which is attached to the housing/heatsink with thermal tape.
The Rev 1 and Rev 2 worked well and lots of folk built various helmet and bike lights out them. There was a small amount of flicker that could occur on some of the dimmer settings and with various battery/led combinations. This was due to the software regulation algorithm and an artifact of the PWM step size and creating visible step changes at lower intensity levels, where unfortunately the human eye is even more sensitive to flicker. For a bike light it wasn't really an issue since the flicker was minimal and on a bike you won't notice such small variations in light output.
But, some folk were using the lflex for helmet lights and wanting it to also double as a reading light. I started to think of a way to design a fully hardware current regulated driver, while still retaining the low voltage drop out of the original lflex and the full range of current tables while providing analog dimming (not PWM).
I then thought of a new regulation scheme and started searching for a cost effective very low input offset opamp and successfully located a nice chip in a small compact package.
Built up a prototype to test the new scheme and ported the firmware from my flex driver onto the new hardware. Worked perfectly after a few small component value tweaks. I tested it at various temperatures 0C to 90C and it was stable and consistent over the full output current range. Success!
The new scheme also freed up a pin, so the dedicated status LED output could be added in for voltage warnings, just like my other flex drivers.
Did a production layout of the new design and here is a picture of the latest lflex V3 board.
This is a linear driver, so works well with single LED and single li-ion or 3 nimh cells etc, or 2 LEDs and 2 li-ion cells. Obviously excess voltage x current is dissipated as heat. It runs the same UI's as all my other flex drivers. It has a choice of current tables (with dimming within each table). You can choose 500mA/1000mA/1500mA/2000mA/2500mA/3000mA or 3500mA as the max output current. The firmware will scale the dimming steps as needed for the chosen current table. i.e choose say the 1500mA table and you'll have a range of dimming steps from around 30mA minimum up to the 1500mA max. Choose say the 3000mA table and you'll have a range of dimming steps from 30mA to 3000mA. Step sizes are chosen to provide reasonably spaced (to the human eye) intensity changes.
I hope some of you have found the writeup interesting and to see how many steps (albeit abbreviated here) it takes to develop and fine tune a driver.
cheers,
george.