Tag Archives: MOSFET

PWM Based LED Driver

** Updated code for better performance and stability [26 Feb 2015, rev.3]

It has been quite some time since my last post – as often happens, life intervenes and this time just a bit too much hospital time both for myself and one of my kids. Things are good now and normal can resume…

Black-Decker-FSL18FL-Firestorm-18-volt-FlashlightFor years I have had this Black&Decker FireStorm FSL18 flashlight, but hardly ever used it due to its anemic light quality. The fixture is powered with an 18v battery pack and uses a KPR18v0.3A bulb putting out 7 candlepower when running at 18 volts. 1 candlepower = 1 lumen. Compared with the brightness of the 12v power LEDs I have been working with lately, the brightness from this incandescent bulb is not much better than a glassed candle.

The trigger for upgrading this flashlight came one day when the wife complained an LED lightbulb had failed in her workshop. I replaced the bulb, but rather than throw it away, I took it down to my workshop to disassemble and identify what had broken. Continue reading

Advertisements

Simple Constant Current Driver for a High Power LED

** Schematic diagram corrected and updated **

Update: New post highlighting a ATtiny85 based PWM LED Driver!

In my previous post, I slapped together a quick LED lighting solution for my workbench… but it is truly a hack. What I really want to do is make a simple constant current driver, so the power LEDs can be used in other projects. One of those projects is an LED swimming pool light. It needs to be running at maximum brightness and low cost.

Updated Schematic, correcting op-amp connections

After much digging and testing, I found a simple circuit using a power FET, an OP Amp and 0.5 ohm resistor.

Continue reading

Never Trust a Schematic Blindly

Last week I posted a long winded video on using an oscilloscope to evaluate the performance of two different transistors. The 2n2222 transistor was behaving oddly at the top end, and the MPS A42 transistor had a rather significant turn-on delay.

After discussing my findings with someone who knows much more about these things than I, I was advised to take another look at the circuit. The A42’s performance did not seem correct. (Turns out before being used as a video driver transistor, it’s 300V capability was used to switch tubes). Below is the circuit I used as a template in my testing. I used an FET I had on hand and initially replaced the 2n3903 with a 2n2222 and later with an MPS A42.

Simple PWM FET driver circuit

On a hunch I decided to replace R1 with a 10k trimmer. Bringing R1 down to about 300 ohms fixed the delay issues for the A42 and for both of the transistors and significantly squared up the corners for both.

Moral of the story… don’t blindly trust someone else’s schematic to work for you. Test. Measure. Evaluate. Fix and re-test. For my needs, replacing Q2 with a 2n2222 and R1 with a 330 Ohm resistor generates the perfect PWM driver. YMMV.

Nice Square Waves