# Dimming an LED Strip (9v) with a 555 timer and MOSFET

I'm doing some VERY amateur prop building for an upcoming night of cosplay and I'm trying to create a throbbing/pulsing crystal for the top of a magic staff. Initially, I was just going to use a simple red LED circuit driven by a 9 volt battery, no muss no fuss. But I discovered that I can power the blue channel on a small strip of 5050 LEDs (3 diodes, normally 12v) with 9 volts beautifully, rather than drop  on individual blue LEDs.

Solid on is no issue, but fading on and off would be brilliant. Trouble is most of the fading circuits I've found are strictly for one or two low power LEDs. They all call for a 555 timer, 1k-ish resistor, 100uf-ish capacitor and a general purpose transistor. For my LED strip, the transistor was underpowered, but a N-MOSFET gets the job done. Here's the Schematic:

simulate this circuit – Schematic created using CircuitLab

Breadboarding this will light the LED strip, but I don't get any fading. I do see a very quick, but barely noticeable blink ever 2 seconds or so, which I suppose is better than solidly on, but not the effect I was hoping for. I've tried swapping out differently rated capacitors and resistors, but aside from slightly different timing, I haven't had much luck. My understanding of timers and capacitors is only a few days old, so it wouldn't surprise me to know I completely missed my mark. Also note that I've no intention of using a 'duino' of any kind because I want minimize the components I need to hide on the staff itself.

• You 555 is not properly configured to generate a variable mark spaace (on/off) square wave. The discharge pin should not be floating as shown. If this is not how it is you should fix the diagram. Look at some PWM ccts on web and drive the FET from them. Look at ccts which work and UNDERSTAND how they work so you can then modify and troubleshoot them. – Russell McMahon May 14 '15 at 8:20

As Russell says, your 555 timer circuit looks a bit off. Search for 'astable 555 circuit' to get your square wave generated. There are online calculators to set the values of the resistors and capacitors.

To get 0.2Hz you will need about 50K for R1 and R2 and 47uF for C:

Now the reason that you are just seeing a flash when you changed to a MOSFET is that their gain is so high. So even if you are using your R1 and C1 to generate a ramp, the on/off voltage of the MOSFET is probably crossed immediately.

What you need instead is an NPN transistor that can handle the current that you need for your LEDS. Just find out how much current you are drawing for the LEDs and check the datasheet of the transistor to see if it will work.

Here's a circuit that I simulated that gives a pretty good ramp up and down at 20mA. Not sure how much current you need but that might be a pretty good start.

I used a 0.2Hz square wave instead of the 555 just for simplicity.

To slow down the ramp up/down time increase R1 or C1. Because R1 is connected to the base, this will also effect the brightness of the LED. So it might be better to choose a good value there first and then change C1 for the timing.

• This was incredibly helpful in getting me to understand quite a bit more about how the 555 works. So thank you for that. Using one of the online calculators and tossing in a proper transistor, I was able to get a nicely timed 3 seconds on, 3 seconds off blink. I'm still stuck at getting things to fade though. It kinda looks like it's fading on, just very quickly. Using the first schematic you provided above, R1 and R2 are 16k and C is 100. Pin 3 goes to the base of the transistor, V2 goes to the collector and the emitter goes to the LED strip without resistance. – Christopher K May 16 '15 at 19:57
• Sorry I didn't make it completely clear I realised. Pin 3 of the 555 should be connected to the transistor through that 22k resistor R1. That's what will set the rate that C1 charges at and then gives the fade up/down time. If its too quick make C1 bigger or even double it up with another in parallel – silverscania May 17 '15 at 20:54
• FYI, I deleted my old comment after realizing I had made a wiring mistake. Pin 3 to a 100uf cap then to the base of the transistor gives me a perfect fade on, but an instant off. If I use any resistance between pin 3 and the capacitor, I get no light at all. I'll work up another schematic for the latest circuit tomorrow. As always, thanks for the guidance. – Christopher K May 18 '15 at 5:33