4017

Discussion in 'The Projects Forum' started by biemole, Jan 31, 2012.

  1. biemole

    Thread Starter New Member

    Jan 16, 2011
    15
    0
    hi all,, i need a little help with this circuit. attached this is the circuit that i am building, the problem that i am having is, i need to drive about 20 leds off of each output, i am using 8 outputs. as each output gets lit they get dimmer and dimmer, i was wondering if i could use a ULN2804 to eliminate this problem... thanks bill
     
  2. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Hi Biemole,

    First, please note I'm not great with transistors, so I hope someone with more knowledge on the subject chimes in, but here's my take.

    I'm not sure why you're tying the base of one transistor to the emitter of another through a diode. I'd suggest removing the diode and use a pull-down resistor on each transistor base if you want to ensure the transistor is off when the output from the 4017 is low. I'd also add a resistor between the base of the transistor and the output of the 4017. I'd suggest starting with a 1kΩ for the base and a 10kΩ for the pull-down.

    You've placed diodes between the output of the 4017 and the base of the transistors. This is fine if you're concerned about feeding power back into the 4017, especially if you end up tying two or more 4017 outputs together to turn on the same set of LEDs. Probably not needed otherwise though.

    You appear to have the transistor wired as a common collector. Not knowing much about transistors, I'd suggest using a common emitter configuration where the emitter is tied to ground ,the LED anodes are connected to Vcc, and the cathodes are connected to the transistor collector. Check this out and look under Transistor currents: http://www.kpsec.freeuk.com/trancirc.htm.

    I assume you don't have a large voltage, but it would help if you could provide the voltage for the circuit you're using as well as the forward voltage of the LEDs. If you don't have the LED voltage handy, just let us know the LED color(s).

    For the best in uniform brightness, a string of LEDs should be hooked up in series and use a single current-limiting resistor. However, this means you need a very large voltage source for 20 LEDs. Twenty red LEDs would need about 20 x 2 = 40VDC! You can hook LEDs up in parallel as you've shown, but you need a current-limiting resistor on each and every LED. Otherwise, one will hog the current and the rest will appear dim. For better power efficiency and reduced parts count, a combo of series and parallel circuits would work well. This depends entirely on the voltage of your power supply though.

    Hope this helps.
     
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    Umm, don't do that.

    I assume the diodes are there to turn string 1 on when string 2 is on, and turn string 2 on when string 3 is on. That should work but only if you connect the diodes from the 4017's outputs to the transistor bases.

    Why? Look at the bottom string. You drive the transistor with Vcc-Vd, and it outputs Vcc-Vd-Vbe. When that goes thru the middle string the transistor outputs Vcc-Vd-Vbe-Vd-Vbe. By the time that hits the top string you get Vcc-Vd-Vbe-Vd-Vbe-Vd-Vbe. That sounds like your symptom.

    I don't advise running LEDs in parallel like that. Things get easier (you don't have to use extremely matched LEDs) if each LED gets it's own current limiting resistor.

    And stop calling me Shirley!
     
  4. biemole

    Thread Starter New Member

    Jan 16, 2011
    15
    0
    hi ernie,, thanks for the reply you are correct when 1 string goes on it stays on and then string 2 goes on and stays on and so on until reset. i do have the diodes from the 4017 to the transistor base,,, and i know the shematic shows the leds in paralell but i also did run them in series,, and still it dims alot.. i am using about 14vdc of power i would appreciate any help you could offer bill
     
  5. mcasale

    Member

    Jul 18, 2011
    210
    12
    You say you need to drive 20 LEDs off of each output. If you have them in parallel, and they are standard garden variety LEDs, your load is about 400mA. The CD4017 output can only source 1 or 2 mA, which means the transistors need a minimum Beta of 200.

    Instead, do as "Shirley" says and run the LEDs in series - but you'll need a supply voltage of over 40VDC. Is that a problem, because the CD4017 only goes up to 18V, so you'll need a separate supply for the LEDs. You can always use 3 strings of 7 LEDs on each output.

    Also, use a MOSFET to drive each chain of LEDs. This will help isolate the logic circuit from the power circuit. Some sort of driver chip would be better.

    Why did you pick a chip like the old CD4017?
     
    elec_mech likes this.
  6. crutschow

    Expert

    Mar 14, 2008
    13,021
    3,235
    Why not? I'm old too and I still work pretty well.;) The old CD4000 CMOS family is cheap, tough, and will run off of any voltage between 3V-15V. It works fine as long as you don't need speed over a few MHz.
     
  7. mcasale

    Member

    Jul 18, 2011
    210
    12
    Yeah, I'm old too.
    I was just curious why you picked it.
     
  8. crutschow

    Expert

    Mar 14, 2008
    13,021
    3,235
    If I don't need speed then I always use CD4000 series digital circuits since they are durable, run off a wide voltage range, and their relatively low frequency response means they are less susceptible to noise and spikes.

    My motto is don't use a higher performance device if a lower performance device will do the job.
     
  9. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    I think several people have pointed out what I would have. If you need to run LEDs in parallel put a resistor in series with each one, instead of putting them directly in parallel. Resistors are cheap, you are not saving money by taking shortcuts and using only one resistor per circuit.

    When ever you draw a schematic take the time to give the parts individual labels, it makes it a lot easier to talk about.

    It is obvious you are trying to put a diode OR gate for the second transistor. The 1st and 3rd transistor do not need the diodes, it will work better without them.

    I can see part of what you are trying to do, but it is a guess. Are you trying to get them to light and stay on in sequence? What is your power supply, and the color of the LEDs.
     
  10. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Anything that involves sequencing the old 4017 is quite good. I use it a lot.

    LEDs, 555s, Flashers, and Light Chasers
     
  11. biemole

    Thread Starter New Member

    Jan 16, 2011
    15
    0
    hi guys i am using green leds about 20 per output, i will be using 8 outputs on the 4017.. the leds are 20ma and 3.2 to 3.6 forward voltage.. the transistors are tip122 npn i could make the power supply to handle any voltage and current that i need but for now i am using 14 volts and 3 amp supply... thank you for any help bill
     
  12. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Lets talk what you want to do here. You have a potential short how it is currently wired.

    So, outputs Q0, Q1, and Q2, and LED1, LED2, and LED2

    Q0 high - LED1 on, LED2 off, LED3 off
    Q1 high - LED1 on, LED 2 on, LED3 off
    Q2 high - LED1 on, LED 2 on, LED3 on
    Q3-9 on - All LEDs off.

    Note, the above is a question, not a statement.

    The actual drivers for the transistors is both easy and minor.
     
  13. biemole

    Thread Starter New Member

    Jan 16, 2011
    15
    0
    yes thats correct. the only thing i am using 8 outputs up to and including Q7. 20 leds per output. thanks bill
     
  14. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    If I'm looking at the datasheet correctly, a TIP122 has a minimum Beta of 1000, so 1-2mA from the 4017 should give the OP the ability to pass up to 1-2A through each transistor. I still assume a base resistor in series with the 4017 is in order, but I'll wait to see what Bill_M suggests.

    In my very limited experience with transistors and MOSFETs, I agree with mcasale, I think a MOSFET would do the job without a lot of fuss, calculations, or extra parts for this application.

    If the OP has a 3A supply, note that 20 LEDs per output with 8 outputs at 20mA will require 20 x 8 x 0.02 = 3.2A if the LEDs are all hooked in parallel. If the OP can get by with 3.2VDC per LED, I'd suggest five rows of four LEDs in series per output. 3.2V x 4 = 12.8V -> 14V-12.8V = 1.2V -> 1.2/0.02 = 60Ω current-limiting resistor. Of course, if diodes and transistors are used, you won't see 14V across the LEDs, so this will need to be checked with a meter and the correct resistor value calculated from there. This drops the current requirement for the LEDs alone from 3.2A to 800mA.

    I thought it was better to put the load on the collector side of an NPN transistor and tie the emitter to ground? Again, I look forward to seeing Bill_M's solution.
     
  15. biemole

    Thread Starter New Member

    Jan 16, 2011
    15
    0
    thank you for your help, i could try this i will let you know how it works when i do.. i also am looking forward to seeing what ideas bill_m has also.. thank you bill
     
  16. biemole

    Thread Starter New Member

    Jan 16, 2011
    15
    0
    hi all if i decide to go with the mosfets should i eliminate the transistor thanks bill
     
  17. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    My time is in short supply right now, but if I get a chance I'll sketch something up.
     
    biemole likes this.
  18. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,173
    397
    If you use OR gates [ 4071 ] to couple the stages , it can form a bar-graph with = output for all stages. Must run- getting new glasses.
     
  19. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,173
    397
    elec_mech likes this.
  20. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,173
    397
    Something like this? If the 14 V power supply is not regulated, the LEDs might start dimming as count increases. Total drain is about 1 A & about 1 W for ULN, not counting duty cycle.
     
Loading...