Flashing LEDs - need comments/feedback

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
I have 24 ultra bright white LED. 4 strings with 3 in each string. They are all flashing bright.

The output is like this:



I figured, since the 2N3906 is an PNP it is "off" when pin 3 on the 555 is high. So when pin 3 is low, the PNP is "on".

(I'm not so familiar with the proper terminology, but I think you understand what I mean.:))
 

t06afre

Joined May 11, 2009
5,934
Hi try google. And search for npn as switch. Reading the four or five first hits should bring you up to speed. I did a test before writing this and found it might be helpful for you. Are you still going for your first schematics?
 

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
Yes, I'm going for the first schematic, with a tiny twist. I'm replacing the relay, with a DIL 16 socket. Just because the relay fits in it.
 

t06afre

Joined May 11, 2009
5,934
Ok have fun. Hope it works as you hope. Did you found the the information on google expository enough. or do you need more help:)
 

t06afre

Joined May 11, 2009
5,934
Since it is a rainy day to day. I have took the time to simulate your a simplified version of your project. With a little twist. I am using a power MOSFET (Logic-Level Gate Drive) and 3x1.5 volt cells (LR14, or LR6). A benefit will be much lower internal resistance compered to 9 volt cells. And they also pack more energy pr unit. 3 LR6 cost the same as 1 6LRR1 battery (9 volt). You can use a PIC or a CMOS 555 to create your pulses. A PIC may create a more fancy blink pattern;)_;)__;).
I am using your data for the pulse 1.8 Hz and T-on 41 msec. As we can see from the results average current draw by LEDs is quite small. About 40 mA.
 

Attachments

Last edited:

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
Since it is a rainy day to day. I have took the time to simulate your a simplified version of your project. With a little twist. I am using a power MOSFET (Logic-Level Gate Drive) and 3x1.5 volt cells (LR14, or LR6). A benefit will be much lower internal resistance compered to 9 volt cells. And they also pack more energy pr unit. 3 LR6 cost the same as 1 6LRR1 battery (9 volt). You can use a PIC or a CMOS 555 to create your pulses. A PIC may create a more fancy blink pattern;)_;)__;).
I am using your data for the pulse 1.8 Hz and T-on 41 msec. As we can see from the results average current draw by LEDs is quite small. About 40 mA.
Oh, nice. It's been pouring down all day, and my circuit is finished. I'm now in the stage of making it stable in the mug or glass or whatever they call it. (I call it "et norgesglass det har vært sursild på"). It has been washed a lot, so theres no more smell.

I will upload some pics, if anyone is interested.

Thanks anyway, I guess ver 2.0 of the flashing LEDs will be more battery efficient. This was just a dirty quick shot at it.:)
 

Audioguru

Joined Dec 20, 2007
11,248
a 555 driving a PNP transistor will never turn it off because the output high of an ordinary 555 is 1.3V less than its supply voltage. The base of the PNP transistor needs a voltage divider to allow it to turn off.

Why are you using a weak little 2N3906? Its max current is half the max current from the output of a 555.
 

SgtWookie

Joined Jul 17, 2007
22,230
Jens, you can fix the problem Audioguru brought up by using a resistor of about 820 Ohms from the base of transistor Q1 to +12v. That will allow the transistor to turn off completely.

When you are using transistorized 555 timers, it is better to use NPN transistors on the output, and sink current from the load than to try to source current. The 1.3v drop from +V to the pin 3 output can be troublesome.

If you are using a CMOS 555 timer, then the opposite is true; CMOS versions can sink about 10x the current that they can source, and the pin 3 output can go all the way to +V/Vcc. So, if you use a CMOS 555 timer, it is better to use a PNP transistor to drive a relay or motor.

While the 2N3906 carries a maximum rating of 200mA, that's the absolute maximum, and it is not good to try to get that much current from it. When you look at the datasheet, divide the maximum current by 2, as that is usually a good, safe limit - so 100mA maximum for a 2N3906. A 2N2907 PNP has a much higher current limit; you can get up to around 500mA from them. A 2N2222 NPN is roughly complementary to the 2N2907.

Still, you need to use a base resistor that will give the base 1/10 the current that is needed through the collector. 1k Ohms is rather large, but I don't know what current your relay requires.

12v-Vbe ~= 11.2v. 11.2v/1k Ohms = 11.2mA base current, so the maximum collector current should be 11.2mA x 10 = 112mA. This is a bit over the 100mA practical limit for a 2N3906, but you could get away with it. If your relay coil actually needs less than 100mA @ 12v, then you are OK.
 

t06afre

Joined May 11, 2009
5,934
Hi jens. If you are using the g5v-2 relay from Omron rated 12 volt. It will have Rcoil spec equal to 288 ohm. So the rated coil current will be 41.7 mA. That current should the 555 circuit be able to supply. You must reprogram the 555 timer so the high and low period are swapped.
 

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
Why are you using a weak little 2N3906?
Well... I have this one and the BC557, and according to the datasheets, I thought the 2N3906 was the best choice.

Jens, you can fix the problem Audioguru brought up by using a resistor of about 820 Ohms from the base of transistor Q1 to +12v. That will allow the transistor to turn off completely.

When you are using transistorized 555 timers, it is better to use NPN transistors on the output, and sink current from the load than to try to source current. The 1.3v drop from +V to the pin 3 output can be troublesome.

If you are using a CMOS 555 timer, then the opposite is true; CMOS versions can sink about 10x the current that they can source, and the pin 3 output can go all the way to +V/Vcc. So, if you use a CMOS 555 timer, it is better to use a PNP transistor to drive a relay or motor.

While the 2N3906 carries a maximum rating of 200mA, that's the absolute maximum, and it is not good to try to get that much current from it. When you look at the datasheet, divide the maximum current by 2, as that is usually a good, safe limit - so 100mA maximum for a 2N3906. A 2N2907 PNP has a much higher current limit; you can get up to around 500mA from them. A 2N2222 NPN is roughly complementary to the 2N2907.

Still, you need to use a base resistor that will give the base 1/10 the current that is needed through the collector. 1k Ohms is rather large, but I don't know what current your relay requires.

12v-Vbe ~= 11.2v. 11.2v/1k Ohms = 11.2mA base current, so the maximum collector current should be 11.2mA x 10 = 112mA. This is a bit over the 100mA practical limit for a 2N3906, but you could get away with it. If your relay coil actually needs less than 100mA @ 12v, then you are OK.
I will take this in consideration, when I'm making the next version. Thanks.

Hi jens. If you are using the g5v-2 relay from Omron rated 12 volt. It will have Rcoil spec equal to 288 ohm. So the rated coil current will be 41.7 mA. That current should the 555 circuit be able to supply. You must reprogram the 555 timer so the high and low period are swapped.
Yes, its that relay.


Thanks for all replies and all considerations. I've ordered a new batch of ultra bright white LEDs, when they arrive, I will make another board. I think that will be in 3-4 weeks from now. Until then, this will have to do.
 

SgtWookie

Joined Jul 17, 2007
22,230
For your purposes, the 2N3906 was a somewhat better choice than the BC557, but they're pretty even.

Now that we know what your relay coil current is, you can calculate the base resistor to more closely match your requirements.

Rbase = (Vsupply - Vbe) / (Ic / 10)
where:
Vsupply - the voltage that will be on the opposite side of Rbase from the transistors' base.
Vbe - the base-emitter voltage at the base current that will be used. 0.7v is a good number to use for light to medium loading (up to about 1/4 of the rated collector current)
Ic - desired collector current; in your case, 41.7mA.
Rbase = (12v - 0.7v) / (41.7mA/10)
Rbase = 11.3 / 4.17mA
Rbase ~= 2709.8
The closest standard resistor value is 2.7k Ohms - or the Euro version, 2k7 Ohms.

You can use less resistance, but you will be using more current unnecessarily.
 

SgtWookie

Joined Jul 17, 2007
22,230
This schematic:



should work just fine.

R1 should be at the smallest, 100 Ohms per volt of Vcc; so if your Vcc is 6v, then R1 should be 600 Ohms minimum. If R1 is too low in resistance, the timer might get "stuck" trying to discharge the capacitor; the output pin 3 will be low all the time.

If you connect the diode upside-down, pin 3 will be high most of the time.
 

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
I can use the other pins on the relay, guess its the Normally Open, but is it possible to do it on the 555 timer?
 

t06afre

Joined May 11, 2009
5,934
... and how exactly would I do that? All I've read said that T1 must be greater than T2. Except halfway down this page, http://www.kpsec.freeuk.com/555timer.htm
but that didn't work...
Oh well I have not used the 555 in a while. You are correct. In astable mode the on time is defined (output high) by t1 = 0.693 (RA + RB)*C. Use a PIC instead:rolleyes: Much simpler. But it will require a a 5 volt regulator in your current setting. Perhaps not so practical
 

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
I'm leaning towards a PIC, but I have only the 16F628 and 18F25K22, and I think both of them is a little overkill to flash some LEDs...
 

t06afre

Joined May 11, 2009
5,934
I'm leaning towards a PIC, but I have only the 16F628 and 18F25K22, and I think both of them is a little overkill to flash some LEDs...
Not if it solve your problems...use a 8 or 14 pin variant. With internal OSC. By the way have you tried connect the 555 directly to the relay..
 
Top