LED lighting

Discussion in 'General Electronics Chat' started by rohitraj_91, Oct 29, 2013.

  1. rohitraj_91

    Thread Starter New Member

    Oct 29, 2013
    9
    0
    This might be a noob doubt so please bear with me.

    I am doing a project where I need to light 240 LEDs. The lighting should be such that all the LEDs are lit one by one albeit with a slight delay i.e if I have a line of 10 LEDs the on giving the power the first one lights up then half a second later the second one lights up ( first one will be on) and so on until all ten light up.

    In my project I have many such lines with about 10 to 15 leds in each line. I thought of using a microcontroller with a demultiplexer and then control the lighting by giving a delay through software but the number of digital output pins required are too high. I tried to have an RC circuit between each led in the line to induce a delay but that doesnt seem to be working.

    Do suggest me what I can do and I hope I have made my problem clear. Thanks in advance.
     
  2. Danm1

    Member

    Jul 19, 2010
    55
    7
    if all the LEDs need to be controlled individually, then I would just find a cheap micro controller with a lot of ports. If you need several duplicate controllers then that's OK.
     
  3. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,282
    1,236
    Look into shift registers.
     
  4. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Welcome to AAC.

    A similar question came up a while ago although a little different - turning on multiple LEDs on, one at a time, and keeping them lit for clock applications. I had to do some searching, but I believe this will help you achieve your goal. The circuit uses 74XX164 ICs controlled by a clock. The circuit is using a 1-second clock, but you could replace this with a 555 in astable mode and use a potentiometer to vary the time to your choosing.

    If the LEDs require more current than the 74XX164's can provide, you can add transistors or transistor arrays.

    Are you attempting to light all 240 LEDs one at a time or are you trying to light rows of 10-15 where each LED in a row lights one at a time but all rows light at the same time?

    Alternately, you could use a microcontroller with an LED driver such as the TLC5940/1 or MAX6969/71.
     
  5. rohitraj_91

    Thread Starter New Member

    Oct 29, 2013
    9
    0
    Thank you for the replies..

    @elec mech :- the link you provided does seem useful. I will look into it and post the updates.

    I have many lines of leds (15 to 20 leds in each line) and the lines have to be lit in a specific order.. i am making a training module to demonstrate the fuel injection system in cars.. so i have a button which acts as ignition when i press it, the line of leds depicting the electrical lines will be lit first ( one by one as mentioned) followed by the line of leds depicting fuel lines etc. hope this makes it clear enough..

    using a micro would enable me to control the lighting easily but the limiting factor has been the number of digital output pins required.. even using a mux i would need lot of them..
     
  6. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    With the MAX7219 chip you can control 64 LEDs with a serial drive from a processor, and you could chain multiple chips for as many outputs as you need. The LEDs are wired as a matrix with no need for a resistor for each one. It's nice, but the MAX7219 is an expensive chip, unless you get them from China (which I've done via eBay, and it worked out fine).
     
  7. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    I like John's idea. I've used a MAX7221 (same basic chip) for 7-segment displays and it works well. For 240 LEDs, you'd need four MAX7219. The advantage is you could program the LEDs to light anyway you want including brighting or dimming certain LEDs and all without the need for resistors. Here's a picture I found outlining John's idea.

    Unfortunately, as John mentioned, these are a bit pricey at about $11 USD a chip from a reliable supplier. You can use eBay and sounds like John has had good luck, but I'm leery of ICs from eBay.

    However, comparing appples to apples, if you use the 74LS164, you'll need 30 ICs plus 240 resistors - a quick estimate yields about $36 compared to $44, but a lot more soldering for the resistors plus a very larger and costly PCB board, so the choice is yours.

    If do opt for the 74LS164 method, you can get away without a uC and use a clock from a 555 astable circuit. You could add switch to interrupt the clock and, in theory, pause the LED string so you can talk about each part of system at your leisure. Just some thoughts. :)
     
    rohitraj_91 likes this.
  8. rohitraj_91

    Thread Starter New Member

    Oct 29, 2013
    9
    0
    Due to cost constraints I have modified the module hence the LED requirement has come down to around 100. The 74LS164 method seems very viable now and I can use the astable mode of 555 as you said to pause the LEDs switches can be added and so on.

    Thank you all so much for replies.
    Cheers! :)
     
  9. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    I built the 74LS164 circuit using just one IC after my post and it works quite well. One thing to note is the LED string will light up one at a time and stay on - when you get to the end of the string, if you wire it as shown, the LEDs will then turn off one at a time.

    I think if you just avoid connecting the last 74LS164 IC to the first you should be fine.

    I still have it set up, so if you have any questions or would like to see a video, let me know. Good luck!
     
    rohitraj_91 likes this.
  10. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,779
    1,103
    For a 100 LEDs display you could use 10 x LM3914 bargraph ICs plus voltage ramp generators to drive them.

    Or..... for maximum portability you could just write a small app for a tablet/smartphone ;)
     
    #12 likes this.
  11. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    Have you picked a color?
    CD74AC164E has VCC range of 1.5V to 5.5V, & output of +- 24 mA, with package limit of maybe 100mA.
    The use of shift reg.s takes care of the large no. of outputs reqired of a μC which then could control clock string timing.
     
  12. #12

    Expert

    Nov 30, 2010
    16,261
    6,770
    Alec t covered the idea I was thinking about. $2.17 USD each. Ten outputs per chip.
     
  13. rohitraj_91

    Thread Starter New Member

    Oct 29, 2013
    9
    0
    @elec mech

    I would like to see a video of the setup if possible.

    I have a an arduino board and if i use a 74HC595 8 bit shift register ( for 16 bits I can daisy chain two of them together).. through the arduino I can send only 8 bits at once and because of this I cannot achieve the desired sequence I metnioned.
     
    Last edited: Nov 11, 2013
  14. rohitraj_91

    Thread Starter New Member

    Oct 29, 2013
    9
    0
    @bernard
    I have a line of about 18 red leds then 14 blue leds and so on.. I guess it gives you the idea.. the deal with shift registers is this.. ( I am using an arduino controller)

    I have 16 red leds which are connected to two shift registers as mentioned.
    As per this following video
    http://www.youtube.com/watch?v=R7xI-flj1Mw

    I can only do byte shifting that is after sending the first byte when I send a second byte the first byte will be entirely shifted onto the second shift register..

    i need to light the first LED so I send 10000000 ( MSB first format) now I give some software delay and send the following byte to the light the second led: 11000000

    when this happens the first byte 10000000 is shifted to the second register and the led connected to it turns on before I want it to thus breaking the sequence. I hope I made that clear and do correct me if I am wrong.
     
  15. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Here is a video of the 74xx164 circuit in operation. I'm using a simple clock and just one 74xx164. You can keep the LEDs from turning off at the end of the cycle by simply keeping pins 1 and 2 connected to Vcc (+5VDC) and not using the 74xx04 (NOT gate).

    If you're going to use LEDs that require more current than the IC can provide, you can place a ULN2803 or similar between the LEDs and the 74xx164.

    Are you still wanting to light up one LED at a time and keep them lit until all of them are on? If so, why not use the 74xx164? All you need to do is send a clock pulse to it. Each clock pulse turns on one LED. You can use the uC to control how fast or slow the LEDs come on. If you want to turn certain LEDs on and others off at different times, then the 74xx595 is the way to go.
     
    rohitraj_91 likes this.
  16. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,006
    3,763
    I don't mean to change your project but, have you considered simplifying the LED "connections" with a acrylic tube. That way, one LED could be used for each connection. 3mm or 5 mm ID tubing can be easily heated and bent as needed. LEDs fit nicely inside one end. The fiber optic effect lights the whole length. White works well or clear but you have to roughen the surface a bit to get reflection.
     
  17. rohitraj_91

    Thread Starter New Member

    Oct 29, 2013
    9
    0
    @elec mech

    The requirement is the same..I will most probably be using 74xx164.. the reason for the query was I had some 74xx595s with so was wondering if i could use the same but on first look it doesn't seems like i could..

    @GopherT
    I am not sure about the cost of an acrylic tube and the time it will take me to procure through company channels.. But will it have the effect I desire? I mean if the one LED is the lit the entire line ( the acrylic tube here) will be lit at once right? there is no way to indicate the flow.. in case of the leds i am lighting one by one with a delay as in the circuit shown by elec mech
     
  18. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    Shown is a stand alone string of 10 blue LED's. A pos pulse on IN advances SR one count, Q0 goes high enabling 555 & lights first LED. 555 output advances SR one step at 1/2 sec rate. When second SR advances to Q4, all 10 LEDs are on & stay on for next 2 counts. When Q6 goes high, output is inverted & diferentiated to put a neg. pulse on reset clearing SR's which then inhibits 555. Just one posibility
     
  19. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    Might look at post by linwiz, 9-25-13, LED chaser, from post # 12. Never received a conclusion as is the general case.
     
  20. rohitraj_91

    Thread Starter New Member

    Oct 29, 2013
    9
    0
    @bernard

    Thanks fort he suggestion bernard but this again almost doubles up the number of ICs I may need.. i have decided to use 74xx164.. thanks a lot for all your help..

    @elec mech
    A small doubt, in the schematic for the clock circuit the link you had given earlier

    http://ne555.square7.ch/74xx_ledclock/index.html

    the vcc for 74xx164 chip is not connected in that.. i am assuming that is a mistake? we do need to connect a supply of 5 volts right?
     
Loading...