Flashing LEDs - need comments/feedback

Discussion in 'The Projects Forum' started by nerdegutta, Aug 2, 2011.

  1. nerdegutta

    Thread Starter Moderator

    Dec 15, 2009
    2,515
    785
    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.
    [​IMG]

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

    [​IMG]
    Click on image for bigger version.

    This is the LEDs schematic:

    [​IMG]

    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.
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,126
    3,048
    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.
    The latter. The first applies to a single string only. Multiply by 8 and you're at the same place.
     
  3. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,172
    397
    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: Aug 2, 2011
  4. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    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.
     
  5. nerdegutta

    Thread Starter Moderator

    Dec 15, 2009
    2,515
    785
    Don't know the ratings... OK, need to read more on relays... What FET do you suggest?

    OK, then I need a buch...

    OK, I get it. It's 1.92w.

    No, I did not.

    Thanks.
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  7. nerdegutta

    Thread Starter Moderator

    Dec 15, 2009
    2,515
    785
    OK, so I need to get a new power source.
     
  8. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
  9. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    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: Aug 2, 2011
  10. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,172
    397
    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.
     
  11. nerdegutta

    Thread Starter Moderator

    Dec 15, 2009
    2,515
    785
    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
     
  12. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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
     
  13. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    I'm not seeing that you need a relay at all, just a power transistor of MOSFET.

    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.
     
  14. nerdegutta

    Thread Starter Moderator

    Dec 15, 2009
    2,515
    785
    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.

    Bernard also suggested some MOSFETs... I use what I have, and I have some relays.

    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.
     
  15. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    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.
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  17. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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.
    Code ( (Unknown Language)):
    1.  
    2. /*
    3.  LED navigation lights simple example using MPLAB, and PICkit 2 Starter Kit. All software need included in the sPICkit 2 Starter Kit.  
    4. */
    5. #include <htc.h>
    6. #define _XTAL_FREQ  500000
    7. unsigned long slow_int=1000;
    8. unsigned long fast_int=50;
    9. __CONFIG(INTIO & WDTDIS & PWRTDIS & BORDIS & MCLRDIS & FCMEN  & IESODIS & UNPROTECT);
    10. void fast_blink(void)
    11. {
    12.  PORTC = 0xff;
    13.   __delay_ms(fast_int);
    14. PORTC = 0x0;
    15.   __delay_ms(fast_int);
    16. }
    17. void slow_blink(void)
    18. {
    19. PORTC = 0xff;
    20.  __delay_ms(fast_int);
    21.   PORTC = 0x0;
    22. __delay_ms(slow_int);
    23. }void main(void)
    24. {
    25.  TRISC = 0b00000000;// port directions: 1=input, 0=output
    26.   OSCCON=0b00110000;//set internal OSC to 500KHz
    27.    PORTC = 0x0;//Zero portC
    28. while (1){
    29.  fast_blink();
    30.   fast_blink();
    31. __delay_ms(slow_int-fast_int);
    32.  slow_blink();
    33. }
    34. }
    35.  
     
    Last edited: Aug 5, 2011
  18. nerdegutta

    Thread Starter Moderator

    Dec 15, 2009
    2,515
    785
    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.
     
  19. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Ha....From since then. Has good Weather prevented nerds from working indoor:p
     
  20. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    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.
     
Loading...