555 LED dimmer

Thread Starter

Sharpen047

Joined Apr 19, 2012
51
Sorry, I'm not very good at explaining things.
Ok I'll use an 1157 tail ligh bulb as an analogy, the bulb has two positives and one negative.
I'm aiming I have one positive be 50% brightness and the other positive at full power, while sharing a ground.
But let's get the LEDs working first.
The reason I am confused now is why the LEDs light up when connected directly to the battery but as soon as I put the circuit between the battery and LEDs they dot work and I blow a transistor. If I hook it up to a power adapter it works great wired the same way as to the battery, the transistor doesn't even warm up.
Would changing a resistor or cap value change this?
When I get my new parts from dk I'll just make a new one to e sure I did it correctly
 
Last edited:

#12

Joined Nov 30, 2010
18,224
I think what you've done is try to connect +12 Volts to the top of the NPN transistor to get the LEDs to come full on but all that accomplishes is having the transistor try to short the power supply to ground.

If we switch to a PNP transistor, you can connect +12V to get the LEDs to come full on.

This circuit uses a 2.4 volt 1/2 watt zener diode to overcome the limitations of the 555 chip not being able to go all the way to the supply voltage when the output is high. Then a 470 ohm 1/2 watt resistor and a 100 ohm 1/4 watt resistor insure that "on" is on and "off" is off and when you apply +12 to the top of the LED string, nothing smokes.
 

Attachments

Thread Starter

Sharpen047

Joined Apr 19, 2012
51
Alright that seems very similar to what's happening. I'll try to find the parts at radio shack in the morning. Would a MOSFET work? I just ordered a bunch of them. I'm not familiar enough yet to understand the difference between mosfets and transistors when it comes to pnp and npn.
Sucks I bought a bunch of parts I don't need but I guess it will be for the next thing I try to make.
Thanks a lot! I'm sure that wasn't a "let's just try this" post, looks like a bit of time was spent on a couple of these posts. Really appreciate it, everyone.
 

#12

Joined Nov 30, 2010
18,224
I think a P channel MOSFET would work and simplify the resistor network because standard MOSFETs won't notice the 1.7 volts that the 555 chip misses the suply rail by. Avoid "logic level" MOSFETs because some of them can be activated by -1.7 volts on their gate.
 
Last edited:

Thread Starter

Sharpen047

Joined Apr 19, 2012
51
So I would get the same diodes resistors and exchange the pnp for a p channel MOSFET? Or would you recommend the transistor? Thanks for beig do patient.
 

#12

Joined Nov 30, 2010
18,224
I have already shown in post #16 that the MOSFET you offered would not improve this circuit. You could try a different MOSFET but I have to go to work today. Perhaps someone else will design that circuit for you.
 

Thread Starter

Sharpen047

Joined Apr 19, 2012
51
Do not change where the transistor is connected. Way more complications than I want to deal with a this time.

1:First, the time constant caused by C1 and P1 (the 50k potentiometer) calculates to 178 cycles per second, which is way faster than a human can see. It will appear that the LEDs are on at half brightness and never turn off (when it is working correctly). I suggest changing the capacitor to 10uf to slow this down to about 1.8 blinks per second.

2:Second, the way to calculate the resistor that drives the transistor is to assume you need one tenth of the load current to slam the transistor fully on and fully off. Six rows of LEDs at .02 amps each is .12 amps. You need to hit the transistor with .012 amps at its base. Allowing a volt or 2 of loss in the 555 chip and the base to emitter circuit, 12V/.012 amp is 1000 ohms. (The original circuit is correct. I must have slipped a digit.) Because this circuit can do 98% "on" time, you calculate the wattage as (12V squared over 1000) times 98% = .141 watts. Always use bigger wattage than you need, so 1/4 or 1/2 watt will work for the 1000 ohm resistor. (Bigger is more reliable.) Use 1/2 watt (or larger) for good reliability.

3:Third, the most likely cause of a smoked transistor is that you hooked it up backwards.

4:Fourth, LEDs are not like resistors or incandescent light bulbs. They don't work from giving them enough voltage, they work by giving them enough current, and even that has a fudge factor. The "breakover" voltage of an LED increases a little bit as the current goes up. What you want to do is calculate AT LEAST one less LED than the available voltage can breakover, and then add a resistor that will limit the current to .02 amps.

5:For lowest available voltage = 12, you figure 12V/1.9V = 6.3 LEDs.
Hook up 5 LEDs for a "leftover" voltage of 2.5V
Then allow .04 volts for the collector to emitter saturation voltage of the transistor (Fig. 3 in the datasheet)
2.46 leftover Volts / .02 amps = 123 ohms in each string of LEDs.
Because .02 amps is the Maximum for most LEDs of this size, use the next larger amount of resistance, 150 ohms.
P = I squared R
P = .02 squared times 150 = .06 watts
the 150 ohm resistors will need to be at least 1/8th of a watt.

The MOSFET is not about current gain. It's a variable resistor, but not a very convenient one. Not a problem in this case, we only want it ON of OFF. You do that by applying between 10 and 20 volts to its gate. When the gate goes positive, the MOSFET turns into a resistor that is often way more efficient than a bipolar junction transistor. The IRF510A collapses to .4 ohms for a voltage loss of .4 x .12A = .048V
Not an improvement over the FJE3303 at .04 volts loss (collector to emitter).

Please allow that I make mistakes, and there are a lot of chances to make a mistake in this much writing.
1:Wont 1.8 blinks per second be noticeable? Like cheap LED holiday lights?
2:i learned to try to account for on tenth of load current for that transistor to turn it on and off. I also learned you are very good at explaining it so it makes sense!
3:If i hooked the transistor up backwards, does that mean to the wrong 12v or ground side? Or does the transistor have a flow direction from side to side?
4:ill use 1/2 watt instead of 1/8 for reliability because they are only 2c more per.
and 1w instead of 1/2w because space isnt an issue.
 

#12

Joined Nov 30, 2010
18,224
Lunch time!

Meanwhile, I recommended 1.8 blinks per second because I misunderstood your problem. I was trying to slow it down so you could see if it was working rather than just be a blur that looked about half bright. Changing to 10uf would slow it down enough so you could see it working.

See post#22: I think you tried to attach +12 to the top of the NPN to lock the LEDS in the "on" condition, but you have to apply ground there to lock them on. That is likely why the transistor smoked. ALL transistors have a direction of flow. Bipolar, MOSFETs, jFets, IGbjt's...all of them.

Most hobbyists stock 1/2 watt resistors because they are used the most. Even after 40 years, I probably don't have 20 different values of 1 watt resistors. Always have to order them.

Glad you could understand me. Some people can't, and some people just hate the way I describe things. "Slam it full on" Hmmmpf. What an amateur! Those people are free to ignore me.
 

Thread Starter

Sharpen047

Joined Apr 19, 2012
51
i see, ill order one cap with the rest of the order.
I flipped the transistor around between frying it and not, so i think i had the transistor on the + side of the leds instead of the -.
Alright i will order the rest of the parts right now and update this thread when i finish a circuit.
The way you described it was perfect haha, especially if i understood it!
A bit of patience goes a long way doesnt it.
 

Thread Starter

Sharpen047

Joined Apr 19, 2012
51
Got everything working thanks to #12! Thanks for everyones input. The new circuit allows for my switch too. Tested and working!
 

wayneh

Joined Sep 9, 2010
17,496
Thanks for posting back. Always good to see things work out. :)

So you used the circuit in #22, with which transistor?
 

Thread Starter

Sharpen047

Joined Apr 19, 2012
51
OK i went to install the same circuit in another panel and the leds turned off when i plugged them in. Turns out the second positive acts as a ground when turned off. So the test went well and tested correctly but when actually installed the power goes straight to the ground(second positive) completely bypassing the circuit.
Could i use a certain diode to prevent the current from going back in to the positive? or is 700 amps too much for a diode to handle?
 

#12

Joined Nov 30, 2010
18,224
700 amps is too much for most diodes but this circuit uses 700 thousandths of an amp.
I think a 1N4000 series diode should work because this 7/10 of an amp is DC and has no waveform factor. Theoretically, a 1N4001 would work but the higher voltage 1N4007 diodes cost the same amount so pick anything in that range from 4001 to 4007.

ps, be ready to replace the transistor again. You just tried to get a 12 volt supply transistor to blink a ground wire.
 
Last edited:

Thread Starter

Sharpen047

Joined Apr 19, 2012
51
wayneh, there are two positive terminals and one ground. I do mean 700 amps from the batteries, they are car batteries.
I hooked up the dimmer to one positive and a "full" positive to bypass the circuit and have it light up at full brightness.
If you look at #12s circuit you see the extra positive to the leds, thats so i can set the dimmer to say 50% and when the other positive is turned on from another switch it goes to 100%. I tried wiring it that way but that extra positive directly to the leds turns the leds off, i tested it with a multimeter and it says the positive wire connected to the positive of the leds is a ground.... until its turned on. When on its about 11v.
Hopefully i explained it better this time haha.
 

#12

Joined Nov 30, 2010
18,224
Your idea about 700 amps being involved in this circuit indicates a lack of understanding.
However, we can get this working without addressing that problem.

I believe I have a clear picture of what you are doing. I regret that your wiring switched the "full on" wire to ground when it is "off" and is supposed to be an open circuit. I did not expect that but a diode in series will fix the problem.

Adding 2 diodes is even safer and will balance the voltage better. Put one diode (1N4001 or better) from the collector of the pnp transistor to the LED strings and put another in series with the external +12 connection. Then you can change the value of the series resistor on each LED string and get your current adjusted to compensate for the voltage drop caused by the diodes.

Be careful to keep enough resistance so the LEDs don't get over powered when the battery is on a charger. A 12 Volt lead acid battery commonly has 12.5 volts when fully charged and can go as high as 15.5 volts during charging.

Edit: I was typing while you were posting. This is called, "cross posting" and often causes garbled conversation. In this case, it didn't. This answer is still valid.
 
Last edited:

Thread Starter

Sharpen047

Joined Apr 19, 2012
51
So the diode will only have to handle the current going through the circuit?
I am aware that less than an amp of power will be running through the circuit.
Like i said this is my first electrical... well anything really other than replacing already existing wire in a car stereo.
 

Thread Starter

Sharpen047

Joined Apr 19, 2012
51
I will finish swapping the subframe of my car then will head to radio shack to look for their highest ampere rated diode and will hopefully get this thing working. Thanks
 
Top