Best approach for led off sequencer

Discussion in 'The Projects Forum' started by CNC_Geek, Jan 12, 2016.

  1. CNC_Geek

    Thread Starter New Member

    Jan 12, 2016
    6
    0
    This circuit will be used in a car with 12VDC (up to 15VDC) power. 32 LED's in total, powered in groups of 4 LED's (30ma each - 120ma per circuit), 8 circuits in total. See my graphic example attached.
    Normal state of LED's is off
    When 12V signal is applied to the circuit all LED's will turn on.
    When the 12V signal is removed each circuit will turn off with a delay between each circuit. A chasing sequence of circuits turning off.
    I install computer systems involving motion control and plc. Designing circuits is a bit outside my current skill set but I will enjoy putting this together and making it work. I find several circuits that could lend themselves to a sequence of LED ON but not the other way around. I also find several methods for transistor switching to handle the power requirement of each circuit. I have also seen PIC and other simple controllers that could handle this application. I am not knowledgeable enough to select the best components and circuit while keeping it simple. Please point me to an existing circuit on this site or perhaps another. I am eager to learn more as this project is built and put to use.
     
  2. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,067
    3,836

    You want to use a re-trigger able timer to control a transistor (n- channel mosfet) switch for each section of LEDs. Search timer will have a slightly different delay to meet your timing needs.

    It will switch on when you need, and stay on as long as the trigger is pulled low (low-side switch) and then will stay on according to a resistor-capacitor pair time constant when you turn the switch off. Each grouping will have its own timer with a unique resistor capacitor time constant.
     
  3. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,067
    3,836
    Minke one of these for each segment of LEDs.

    The chip is an NE555 or similar timer chip.

    The MOSFET transistor is a 2n7000 or similar low current mosfet. (Lower right)

    The PNP is any small PNP transistor (e.g. 2n4403, 2n2906, 2N3906)...

    This one stays on for about 2.5 seconds. Increase the resistor that is currently 22k. Any value up to 470k should give you a proportionally longer response (220k will give about 25 Seconds).
    If you need longer than 47 seconds, you can use a bigger capacitor for linear response as well.


    image.jpg
     
  4. CNC_Geek

    Thread Starter New Member

    Jan 12, 2016
    6
    0
    Thank you for the suggestion. As I see it, each circuit will need to be timed separately to achieve the sequence. I am looking for about .2 to .5 seconds between each off event (circuit). This could get tedious trying to get the exact same time separation between each off event. I am looking for a smooth sweeping flow in the off cycles. Also my trigger signal needs to be +12VDC.
     
  5. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    I believe you are mistaken. Setting up 5 timers that share a common start event is not that hard for a one time project. If you want to make thousands of these, there are better ways.
     
    GopherT likes this.
  6. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,067
    3,836
    I don't understand your concern. The times on the 555 are easily calculated and, if you select the timing resistor and timing capacitor with reasonable tolerance, it will be perfectly repeatable and predictable.
     
  7. Picbuster

    Member

    Dec 2, 2013
    376
    50
    All to complicated for 8 led strings only use pic16f690 8 fets 10 resistors 4 cap's 3 diode's lm7805.
    When used in a car spike suppression becomes mandatory.
    few lines of programming but power is needed to make the leds working.
    If you want I can give you schematic and an base program for free (now busy with the family give me a few days to dig it up)
     
  8. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,546
    1,252
    This can be done with an oscillator and a shift register.
    The control signal clears the shift register to all zero outputs and inhibits the oscillator.
    When control goes to zero, the oscillator starts clocking the shift register.
    The shift register input is a 1, so the one propagates down the shifter with each clock cycle.
    Each shift register output drives a transistor driver circuit that turns LEDs on with a 0 and off with a 1.

    A CMOS 4015 has all of the shift and reset functions you need. For the outputs I would use two ULN2803's, one as 8 inverters and one as 8 LED driver outputs.

    What is the LED forward voltage Vf? Any reason not to arrange each 4-LED group as two strings of two in series or one string of four in series? Much less driver current if so.

    ak
     
    Last edited: Jan 13, 2016
  9. CNC_Geek

    Thread Starter New Member

    Jan 12, 2016
    6
    0
    This sounds like a project I could tackle. It also leaves the possibility open for programming other sequences. Plus I have wanted to learn about the PIC chip. No rush, Whenever you can put something together is much appreciated.
     
  10. Picbuster

    Member

    Dec 2, 2013
    376
    50
    The first set-up to discuss more needed / less / different?
    lets hear your comment.
    When the idea is stable I will make the sw basic set-up.
     
  11. Picbuster

    Member

    Dec 2, 2013
    376
    50
    Sorry The leds are drawn single ( to lazy to draw a string) and resistors have now a non applicable value to be calculated later.
     
  12. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,546
    1,252
    An all hardware approach. Missing things like decoupling, but it gets the idea across. Used a 4060 rather than a 555 to get the first LED off delay.

    ak
    LED-Off-Sequencer-1-c.gif
     
  13. CNC_Geek

    Thread Starter New Member

    Jan 12, 2016
    6
    0
    The LED's and current limiting resistors I can figure out. It's the triggering and power switching where I am totally lost.
    You wrote "more needed / less / different?" I don't know how to respond.
     
  14. Picbuster

    Member

    Dec 2, 2013
    376
    50
    more less text; I try to ask if you want changes or is this fulfilling your need.

    Not to worry. It is a general vehicle allowing all type of port control, input, output, pulse, frequency, voltage measurement and more within the capabilities of the PIC used.

    The electronics is powered from a dc source between the 7 and 30V connected to P3 and should be up al the time.

    The program, at start-up, is setting all RC ports (output to Led_0_G to Led_7G) high. All leds are on.
    This remains high until the voltage on p1 goes to zero.
    The cpu will detect this and set RC outputs to low one by one with an interval as defined by you.
    What I don't know is what to do when the voltage on pin on goes high again. All on or one by one till all on?
    I connected the leds to +5V but when 4 leds in series you need at least 12V to feed them.

    I added the optional RS232 port allowing to change and save values like interval/ timers etc.
    You also can use this system to measure voltage and do things at a certain voltage level.
    This requires a small change in the set up.
    I will provide you with a program allowing you to tailor it to your needs.
    Will look at it in the weekend.
     
  15. CNC_Geek

    Thread Starter New Member

    Jan 12, 2016
    6
    0
    Every time the signal is applied (high) all LED's must turn on (output High). It is just the LED off condition that receives this animation.
    Does communications to the chip (RS232) require a serial to USB converter or can the connection be direct to USB computer input?
     
  16. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    I sim the circuit in proteus and it works like a charm. There are some mistakes in the 4015 pinout number though.

    I also think that you might need a pulldown resistor on the enable line to prevent floating when the +12v signal is removed.

    Allen
     
  17. Picbuster

    Member

    Dec 2, 2013
    376
    50
    No problem controlling the leds fading in and out is also possible.
    Yes but if you want I can put a FTDI USB chip in allowing you to contact directly to a pc.
    Drivers are available from FTDI and communication will be serial acting like a comport. terminal progs available for free. Are you going to make a pcb? ( if so, please look at Kicad software to makes things easy ).
    Oops telephone customer
     
  18. Picbuster

    Member

    Dec 2, 2013
    376
    50
    Found some time to build one.
    This one should work.
    Don't forget to tell me:
    if you want USB or rs232
    Are you going to make your own PCB or do you stick to proto board? not using SMD.
     
  19. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,546
    1,252
    I was slammin and jammin yesterday, so I'm not surprised that a few thing slipped through. I didn't have a 4015 in my library, so I edited another part. OK, half-edited...

    ak
     
  20. CNC_Geek

    Thread Starter New Member

    Jan 12, 2016
    6
    0
    No SMD. I am making just one for my personal use. Will use RS232 since I already have a couple of converters.
     
Loading...