LED Dimmer PWM Hack

This cheap dimmer is designed to blink LEDs with a variable duty cycle. The default frequency can be altered by swapping out a single capacitor. 20 kHz makes a whine-free speed control for a DC motor, 1 Hz gives slow PWM for high power resistive heating loads.

The LED dimmer has can output a decent amount of power and is rated up to 8 A and 12 V. I bought one to try as a PWM (pulse width modulation) speed control on a DC motor. It worked up to a point but the motor whined horribly. Was there some way to adjust the dimmer to avoid this irritating noise?

I was inspired by the teardown in the video below to attempt an easy hack. A useful piece of information was that the oscilloscope showed an output frequency of 680 Hz. I confirmed this for my own dimmer using a multimeter with a frequency setting.

A brief inspection of the hardware told me that the frequency was governed by a 555 astable and could be altered by changing the value of the capacitor connected to pins 2 and 6. After a little further measurement and experimentation, I determined that the value of C3 was 100 nF. 

If you look carefully at the PCB above, you can see the solder blobs where I cackhandedly soldered a 3.3 nF 0805 capacitor in place of C3 on the bottom right of the PCB. This gave a frequency around 20 kHz, which is higher than I can hear, and sure enough when I tried the dimmer with a DC motor there was no more whine. Success!

Next I tried 47 uF electrolytic capacitor in place of C3. The negative pin needed to be soldered on the right hand pad. Unfortunately, I desoldered the SMD cap so carelessly that I destroyed the pad and was forced to scrape away a nearby part of the green mask and solder the capacitor to the exposed track.

Now the dimmer blinked at about 1.5 Hz, as demonstrated using a SSR and 120 V lamp. The video shows that the duty cycle can be varied across almost the full range. This would be useful as a variable power control for a resistive heating element, for which fast PWM would generate unnecessary electromagnetic noise.


Michael Mitchell said...

Tom, great article. Thanks for posting it. The board that I received changed a bit and I was wondering if you might be able to tell which capacitor I should replace. Thanks

Here is a link to a picture of the board.

Tom said...

Hi Michael! I've seen several different versions of this board but they all have a 555 generating a ramping waveform. The capacitor that governs the timing is connected to pins 2 and 6 on one side and ground on the other. It's probably C1 but the picture is a bit blurry so I can't be sure.

Michael Mitchell said...

Thanks a lot Tom. Yeah, my phone camera has seen better days and I really need to get a new one. I'll replace the C1 capacitor with the one you suggested and let you know. Thanks for the reply.

Michael Mitchell said...

I finally got around to doing a little soldering and may have done something wrong. I hooked up my 3v wall wort to the PWM and then measured the output voltage when I move the potentiometer and it seems to work fine. However when I plug it into the SSR I get <1v readings and the light doesn't come on. I plug the wall wort directly to the SSR and it works fine. Any advice?

Here are some better pictures.


Tom said...

3V might be a bit on the low side, try 5V.

Michael Mitchell said...

You nailed it. I tried a 5V and didn't see a change so I upped it to a 12v and it works! If I want to be able to slow down the speed even more could i replace the 47 uf capacitor with something like a 100 uf?

Michael Mitchell said...

I replaced it with a 470 uf capacitor I had laying around and it did just that. Thanks for all your help!

Tom said...

Great that you got it working Michael.

Anonymous said...

Gotta say I love these cheap dimmers, useful for so many things. I use them for speed control for pumps and diy stirplates. I was thinking about modifying it for for SSR control also, for a real cheapo rims setup I'm planning, and was delighted to find ol' 555 in there, made it easy to change frequency. Sadly I did the reverse engineering myself before i found this place. I also found a 100uf to do the job nicely. Since I was adding capacitance I didn't bother to desolder the smd cap, I simply piggybacked the electrolyte. Cheers!

Anoop Upadhyay said...

need schematic diagram help....

Tom said...

Unfortunately, despite the similar case, there are several different versions of the PCB inside. The best advice I can give is that there are two chips, one of them is a 555, and the capacitor that governs the timing is connected to pins 2 and 6 of the 555 on one side and ground on the other.

brokenmonkey said...

Would it be possible to modify this dimmer to have variable-frequency PWM? I don't know much about electronics, but I've seen resistors wired to potentiometers as a form of voltage-based dimming and I'm wondering if something similar can be achieved here with a capacitor and a potentiometer.

The reason is because I would like a cheap dimmer with variable PWM frequency so I can do some tests for a film/video project. I would like to test different PWM frequencies against different video frame rates and cameras with rolling shutter to find the advantages/disadvantages of different PWM frequencies. I know 6 kHz is a safe frequency for video but it can cause audio interference, and 20 kHz is safe for audio but maybe not all types of video. If I can hack together a simple module with a PWM frequency that's variable to the Hz I would be happy. Add in a frequency readout and that would be ideal.

Thanks in advance!

If nothing else perhaps it's possible to wire multiple capacitors to a switch so I can select one of several PWM frequencies. Thoughts?

trazam1986 said...

What was determined to be the best capacitor value to drive a heating element using a SSR. 47uf or 100uf ? What voltage does the cap need to be? Thanks.

Post a Comment