Telecnatron

radio, electronics, computing, telecnology.

rss icon

Support This Site.

Please consider helping to support this site by making a contribution.

Dimmable 12v LED Lighting For Workbench

By Stephen Stebbing 2014-11-27 07:13:26 1 comment

I had been finding it difficult to see what I was doing when trying to do close up work on dull days and at night, and realised that the workbench lighting needed to be improved.

A number of LEDs focused onto a small work area seemed to be the obvious answer, and, as a part of my project to convert the workshop to solar-charged battery power, minimal power use and the ability to run the LEDs only at the brightness required were important factors.

Testing showed that six 1W LEDs mounted above the work area, and one 1W LED mounted either side provided good illumination. The LEDs and the driver modules ran quite hot and so a variable-speed cooling fan was deemed necessary.

Anyway, here I describe the solution that I came up with.

1. LED Driver Module


This module uses the GS620 Constant Current Driver IC which provides a PWM input, it claims the ability to drive up to 10 1W LEDS at 350mA, but as the input and output capacitors are rated at only 35V, a maximum of 8 LEDs would seem to be the practical limit.

The PWM is negated, ie the LEDs are on when the PWM input is at ground potential, and off when it is at 1.2V or above.

2. 12 Volt Operation and Step Up Module.

As the LEDs are run from a 12V battery, the input voltage can vary from 14.5V when the battery is charging, down to 11V or less when it is almost fully discharged. Initially I tried using three LEDs in series but found that they would dim noticably as the voltage approached 11v.


The solution was to use a step-up module and run six leds in series, but with the LED controller module being powered at 24V instead of 12V.

Running six 1W LEDs in series, the power into the circuit was measured as little over 9W for an efficiency of around 66%. I deemed this as acceptable for this application. Of course, with fewer LEDs or with a higher supply voltage, the step up converter could be omitted and the efficiency would be closer to the 85% of the GS620 module.

3. Mounting The LEDs

The mountings were made by attaching the LEDs to offcut pieces of aluminium angle bracket which were then doubled up to form a U shape, as the photos below show. The LEDs were attached by smearing their backs with heatsink grease, applying pressure, and carefully gluing around the edges with superglue.


When testing, and without any fan cooling, one out of six LEDs failed after 12 or so hours. Investigation revealed that the superglue had flowed between the bracket and the back of the LED, I suspect it formed an insulating layer which caused the LED to overheat.

No other failures have occured since, so if care is taken with the gluing, it appears that this mounting method is satisfactory.


Two single LED mountings shine down at an angle onto the work area, one from either side. These also provide sufficient lighting for the radio equipment on the shelf above.

The LED in the photo is attached using an epoxy-type glue rather than superglue. Being thicker, it is easier to keep the epoxy glue from running between the LED and the bracket.


The prototype was a messy afair, but the two mountings of three LEDs each can be seen attached to the white shelf at the top of the picture.

4. Schematic


Unclear in the picture is the 2N7000 MOSFET that controls the fan, it has a 100k resistor pulling its gate to ground. This resistor could probably be omitted as the gate is never left floating.

I used 50k potentiometers as I had them on hand. Any value between around 2k and 100k should work okay, with 10k being ideal as this is the impedance that the ATTINY’s ADC is designed for.

5. Software

The source code is available for download here.

The code is very simple:

  • The timer is set up to interrupt approximately every 6.8ms and just sets a flag to indicate that it is time to do the next ADC reading. This also sets the PWM period at 6.8ms, or about 146Hz.
  • The ADC reading-complete interrupt just sets a flag to indicate that a new reading is available.
  • When an interrupt occurs, the processor is woken from sleep mode and the main loop executes.
  • If it’s time for the next ADC reading, the main loop sets up the ADC for either the fan-pot or led-pot channel to be read, alternating from that which was read previously.
  • If the reading-complete flag is set, then either the LED or fan PWM value is set to the ADC value depending on which pot was just read.
  • That’s it!

There are two requirements regarding the fan’s minimum PWM setting:

  • It wont spin at all if the PWM value is too low – a minimum allowable value is used to prevent this.
  • If the leds are above a certain brightness, then the fan should be running (at least a little)

Therefore, these two defines in main.c might need to be changed depending on the particular fan and hardware layout:

// The minimum pwm duty cycle that the fan will run at
#define FAN_MIN_PWM 65
// If led pwm is above this, then the fan will be on (no matter the fan pwm setting)
#define LED_PWM_FOR_FAN 18

6. Assembly


The controller electronics were assembled on a piece of matrix board.

The power traces were made with pieces of stripped copper wire which were soldered to the board to help with current handling.

The connections to the pots and LED driver modules were made with pin headers and wire wrap.

The black front-panel is from an old PC speaker with the grille being just the right size for the fan. The white frame is made from nylon chopping board. Everything is held together with hot-melt glue.

The step-up and LED driver modules were mounted back-to-back and placed behind the fan where the air is drawn over them.


The second driver module for the side LEDs has not yet being fitted.

The 12V power comes in via the 2.1mm barrel jack, then runs to the matrix board via a 1.5A fuse.

A reversed diode connects between ground and the fuse to protect against accidental reverse polarity connection.

7. Conclusion

The control unit fits snuggly on the shelf behind the two top LED mountings from where the fan blows air over them: even at minimum fan speed then stay cool to the touch, and on hot days and at higher fan speeds, the air blowing over me is very refreshing.


All in all, I am now able to see clearly for close up work at night and on dull days, and without the annoying shadows that were created by the old halogen lamp, and consider this little project to have been entirely successful and worthwhile, and with significant power savings.

I can see much more custom LED lighting coming in my future.

Copyright 2012 - 2024 Telecnatron CSS | Login | Privacy | Sitemap Web software by Stephen Stebbing.