Flashing LEDs - need comments/feedback

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
Hi.

I'm currently working on a project that flashes 24 white ultra bright LEDs, and I need some comments and feedback.

I'm using an astable 555 IC to generate the pulses, and I've come to the resistors and capacitors values using an OpenOffice Calc spreadsheet.


I'm using a 2n3906 PNP transistor to energize a relay.


Click on image for bigger version.

This is the LEDs schematic:



The relay is an Omron G5V-5 12v 2A.

So the question is:

Have I done the math correct?

Is this do-able?

The powersupply is 2 x 9v batteries in series.
LEDs are ultra bright

Forward volt = 3.2
Forward current = 20mA
They are connected in series of 3.

R= (12-(3.2 x 3)) / 0.02
R= 120

There are 8 string with 3 LEDs each.
Is the wattage = 0,02A * 12v = 0.24w?
OR
0.02A * 8 strings with LEDs = 0.16A
0.16A * 12v = 1.92w


Thanks.
 

wayneh

Joined Sep 9, 2010
17,496
Is this do-able?

The powersupply is 2 x 9v batteries in series.
Not for long. The voltage will drop very fast, maybe instantly. Those batteries just don't have enough juice. You'd do better with AAs.
There are 8 string with 3 LEDs each.
Is the wattage = 0,02A * 12v = 0.24w?
OR
0.02A * 8 strings with LEDs = 0.16A
0.16A * 12v = 1.92w
The latter. The first applies to a single string only. Multiply by 8 and you're at the same place.
 

Bernard

Joined Aug 7, 2008
5,784
What is Ah rating of 9V batteries? Why not use FETs instead of relays? Wire K1-13 to + 12V, as shown it will switch nothing.
 
Last edited:

iONic

Joined Nov 16, 2007
1,662
Did you add what power the 7812 will consume, not to mention the rest of the pulser circuit. I agree with wayneh that the circuit will not last long.
 

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
What is Ah rating of 9V batteries? Why not use FETs instead of relays? Wire K1-13 to + 12V, as shown it will switch nothing.
Don't know the ratings... OK, need to read more on relays... What FET do you suggest?

Not for long. The voltage will drop very fast, maybe instantly. Those batteries just don't have enough juice. You'd do better with AAs.
OK, then I need a buch...

The latter. The first applies to a single string only. Multiply by 8 and you're at the same place.
OK, I get it. It's 1.92w.

Did you add what power the 7812 will consume, not to mention the rest of the pulser circuit. I agree with wayneh that the circuit will not last long.
No, I did not.

Thanks.
 

SgtWookie

Joined Jul 17, 2007
22,230
The circuit itself will last OK. It's the batteries that will die quickly.

A typical alkaline pp3 9v "transistor" battery might have a rating of 500mAh or so; but that's with a 25mA load over a period of 20 hours. You're loading it with 160mA for just the LEDs. And no, that does not mean that it will last for 500mAh*25mA/160mA = 3.125 hours, either; the load is so heavy that you will be lucky if it lasts for more than about an hour.
 

Wendy

Joined Mar 24, 2008
23,415
After a bit of looking I have found AA packs that will do all the major voltages, including 9V (X6 AA batteries). The hard one was 12V (X8 AA batteries). The majority of them have 9V battery clip connections, which is handy.

You can get similar packs for every major battery type, such as "C" or "D" cells, though the 9V clip is missing.

If you need help finding such packs let me know, I can get them.

I would loose the linear regulator. There are too many good ways of efficiently regulating current through the LEDs no matter what the battery voltage is. I've show quite a few examples using transistor constant current sources, for example.

Relays are always bad for battery life, you can do much better with solid state equivalents, the relay coil simply draws too much juice, while a MOSFET gate takes the merest sip of power.

If you look at the long duration flasher series of circuits I designed ask yourself a basic question. Do you need 50% duty cycles?. If each side was on for 3% of the time (and still alternated) would this do what you want? If it does the battery life would go through the roof, it would make a huge difference.

I lit the LEDs for 30ms, and was able to get literally months from 2X AAA batteries using that technique. It plays to the strengths of solid state electronics.
 
Last edited:

Bernard

Joined Aug 7, 2008
5,784
What MOSFET would I suggest? Depends on your sources. If you switch low side, then just about any N-ch, 20V & up, 1A & up, would work. I would reach into my junk box & pull out-IRF1010E. IRF522, BUZ71A. For high side switching with P-ch MOSFET, FDS9435A, surface mount,but only US $.43; IRF9640, IRF9540.
 

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
Batteries are 6LR61, and basically the cheapest you can get in Norway.

I will consider changing the relay to some solid state equivalent. Thanks for the replies guys.

Jens
 

t06afre

Joined May 11, 2009
5,934
I have some ideas. Like using a PIC and dropping the relay. I once did a small project emulating the light/blinking sequence used for aircraft lightning. That kind of light is very eye catching. I will come back to it later then I am on the correct computer. I would also have considered say two or three C or D size batteries instead.
http://en.wikipedia.org/wiki/List_of_battery_sizes
Elfa also have led driver circuits. Have you looked at them
 

iONic

Joined Nov 16, 2007
1,662
I have some ideas. Like using a PIC and dropping the relay.
I'm not seeing that you need a relay at all, just a power transistor of MOSFET.

I would also have considered say two or three C or D size batteries instead.
http://en.wikipedia.org/wiki/List_of_battery_sizes
Elfa also have led driver circuits. Have you looked at them
Not sure 2 - 3 1.5V cells will operate the 555 let alone turn more than 1 LED of unless they were all in parallel. Id suggest (5) C or D cells in series for a total of 7.5V. It will operate the 555 and allow a switching voltage for a MOSFET. You would have to parallel series strings of 2 LED's instead of three, each with an 82 ohm resistor. The smaller the resistor, the less power is wasted.
 

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
I have some ideas. Like using a PIC and dropping the relay. I once did a small project emulating the light/blinking sequence used for aircraft lightning. That kind of light is very eye catching. I will come back to it later then I am on the correct computer. I would also have considered say two or three C or D size batteries instead.
http://en.wikipedia.org/wiki/List_of_battery_sizes
Elfa also have led driver circuits. Have you looked at them
I have an alternate circuit in the head, for now, using a PIC. I've not seen Elfa's LED drivers... At least not yet.

I'm not seeing that you need a relay at all, just a power transistor of MOSFET.
Bernard also suggested some MOSFETs... I use what I have, and I have some relays.

The smaller the resistor, the less power is wasted.
This is a nice tips. I've read some books and articles, but don't remember to have read this.... Guess it's too obvious.
 

iONic

Joined Nov 16, 2007
1,662
iONic said:
The smaller the resistor, the less power is wasted.
This is a nice tips. I've read some books and articles, but don't remember to have read this.... Guess it's too obvious.
I'm not condoning the use of resistors that are not appropriate for the regulation of the LED's current, but more so that the choice of power supply voltage can reduce power consumption.

In other words: a 3V power supply with a 1 ohm resistor and a diode with a Vf of 3V is the ideal situation Power consumed by the diode is IxIxR =0.4mW On the other hand if you have a 24V supply voltage under the same scenario you will need a 1.2K, 1W resistor and will dissipate 480mW.
 

SgtWookie

Joined Jul 17, 2007
22,230
In other words: a 3V power supply with a 1 ohm resistor and a diode with a Vf of 3V is the ideal situation.
that is, IF the voltage supply were absolutely stable, and IF the LED junction were kept at a constant temperature, and IF the LED's Vf @ current were verified prior to installation.

But, you really can't do that, as you don't have direct access to the LED's junction, and an ideal voltage supply exists only in Spice simulators and people's imaginations.

Vf changes over temperature. Even regulated power supply voltages vary. If you are not implementing current regulation, you must have a resistor in series with the LED to limit current. The worse the expected voltage regulation is, the greater the voltage drop will need to be across the resistor to ensure the current remains within limits.

Switching regulators are very attractive, because they waste very little power. It's the complexity that baffles newcomers.
 

t06afre

Joined May 11, 2009
5,934
Here is a simple program I once wrote to mimic the aircraft collision avoidance/ Navigation lights flash pattern. It is two quick flashes of 50 ms each followed by a one sec pause and one flash of 50 ms and a one sec pause and repeat. Even if the LED on time is very short (and hence battery friendly). They are easy to see. Since your LEDs are 3.2 volt How about using three 1.5 volt batteries and no voltage regulator. They can be controlled by transistors driven by a PIC. Transistors do have some Collector-Emitter Saturation Voltage. But in your case it will not matter as you need some voltage drop anyway. One transistor may control several LEDs. To reduce components count.
Rich (BB code):
/*
 LED navigation lights simple example using MPLAB, and PICkit 2 Starter Kit. All software need included in the sPICkit 2 Starter Kit.   
*/
#include <htc.h>
#define _XTAL_FREQ  500000
unsigned long slow_int=1000;
unsigned long fast_int=50;
__CONFIG(INTIO & WDTDIS & PWRTDIS & BORDIS & MCLRDIS & FCMEN  & IESODIS & UNPROTECT);
void fast_blink(void)
{
 PORTC = 0xff;
  __delay_ms(fast_int);
PORTC = 0x0;
  __delay_ms(fast_int);
}
void slow_blink(void)
{
PORTC = 0xff;
 __delay_ms(fast_int);
  PORTC = 0x0;
__delay_ms(slow_int);
}void main(void)
{
 TRISC = 0b00000000;// port directions: 1=input, 0=output
  OSCCON=0b00110000;//set internal OSC to 500KHz
   PORTC = 0x0;//Zero portC
while (1){
 fast_blink();
  fast_blink();
__delay_ms(slow_int-fast_int);
 slow_blink();
}
}
 
Last edited:

Thread Starter

nerdegutta

Joined Dec 15, 2009
2,684
Thanks!

Good thing the weekend is coming up. :D

And the weather forecast says:


Friday:Rain.
Saturday: Cloudy.
Sunday: Rain.

Guess I know what I'll be doing.
 

Wendy

Joined Mar 24, 2008
23,415
Are you using an alternating flash similar to rail road crossings, or the alternating double flash to police cars?

If they are the same color how are you distinguishing them apart, opposite sides of the PCB?

I know you are finished with this, but I would like to try drawing something that would match yours, but for absolute maximum battery life. Lately all my efforts have been going into the digital clock artwork for the AAC book article.
 
Top