4017-charging bar effect

Discussion in 'General Electronics Chat' started by magnet18, Feb 27, 2011.

  1. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    I'm back
    What I need is for the outputs of the 4017 to remain on until all outputs have been used. This is to create the effect of a charging bar filling up, like on a phone, but a larger scale (its a prop for a skit)
    Would the attached schematic work for this, assuming what I have is repeated for each output?
    (I'm guessing not, most things I make don't)
    also, how would be the best way to have the LED's within each strip light up one after the other, or for them to light up smoothly across?
    If it can be done with just resistors and capacitors I might incorporate it.

    Thanks again :)

    EDIT
    just caught a flaw, I need more diodes, fixing
    Ok, I updated the schematic.
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,669
    804
    LEDs in parallel is a no-no. They would not share the current right and one will take the majority and burn out faster.
    You are missing base resistors.
    The diodes should be more like:
    q0->T1
    q1->T1,T2
    q2->T1,T2,T3 (that´s 1+2+3 diodes)
    where T1..3 are going to the base resistors of the transistors.

    Tie one of the outputs q3-q9 to the reset pin to lower the dead time after the first three light.
    You need RC divider to make it reset on power-on, so it starts in a known state.
     
    Last edited: Feb 27, 2011
    magnet18 likes this.
  3. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    I think i get what you're saying, but can you post a schematic so I'm sure?
    I got the RC pull-up, and I don't need the reset if i repeat this for each output, but I'm not sure I get the transistor bit...
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    <snip> Unhelpful and rather rude comments removed. Apologies have been made to magnet18, who graciously accepted them.

    These are stressful times. My apologies to others who may have been offended at my misdirection of frustration.
     
    Last edited: Mar 4, 2011
  5. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    Parallel LEDs work if Vf are = for each branch, millions of multi LED flashlights can not be wrong? If VDD is high enough, use series parallel arrangement if possible, even if needing to add another LED. Using emitter followers, base resistors not needed. All diode gating should be done before bases. For = brightness of strings keep number of series diodes feeding bases =. Q 1 has 3 diode drops, Q2-2 Q 3-1, so add 2 more diodes to base of Q 3, etc.
     
    PackratKing and magnet18 like this.
  6. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    SgtWookie, I apologize if my lack of formal education angers you, my lack of understanding seemingly simple things bothers even me, I can't imagine how annoying it must be for those of you with years of experience.
    I'm trying to learn and thats why I'm here, considering that 8 months ago I hadn't the foggiest idea what a transistor was and that 2 months ago ohms law confused me, I thought I was doing OK for a kid trying to teach himself with no resources but the internet.
    I believe I know what a transistor is and how it works, and while I'm not sure of how to take gain into account, if there are any other gaping holes please show me where to fill them. Believe it or not I want to learn these things, and I want to go to college in a couple years to be an Electrical Engineer. I might be going to a community college course next year as a senior so I can start learning these things.

    As is, I would like to believe that I didn't understand his post because of the wording, It confused me.
    I attached a schematic of what I believe he was trying to tell me, if I have it wrong please tell me, I have a whole team that depends on me for these things since I'm the only one who knows the difference between a resistor and a capacitor, and it may look like I'm asking dumb questions but I'm just doing my best not to let them down by having a circuit fail before competition.

    Heres the schematic, if I have it wrong please let me know where it needs correction.
    Thanks
     
  7. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    Last edited: Feb 27, 2011
    magnet18 likes this.
  8. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    Parallel LEDs, it is also spelled out in my article, such as it is. It is meant to teach beginners LEDs and more.

    I had the epiphany earlier, high school student with minimal electronics training. No transistor theory, no AC/DC theory to speak of, so be kind. Our OP is the kind of person this site was designed for.

    I pretty much went through same thing when I was in high school, except I didn't have the resource you have here. No computers, no internet, just a 300 in 1 electronics kit and a willingness to read.

    Get Ohm's Law fixed in your head, and build from there.
     
    magnet18 likes this.
  9. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    A better option for bar graph type display's is the LM3914 or LM3915 (they are related). You might say it is made for the job.
     
  10. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    Alright, thanks for all the help guys, sorry I kinda left the thread alone...
    Bill, I had seen the portion in the article about parallel LED's and thats why I was thinking I could get way with it
    And thanks also Bernard, but in any case I ordered some EL wire units and I'm just going to use transistors to turn those on and off, I think I should be able to handle that....
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Sorry for my rudeness the other day. I'm not normally like that.

    Anyway, have a look at the attached.

    I'm using a single gate from a 4093 quad NAND Schmitt-trigger as a clock. The flash rate may be a bit too quick for your display; roughly 150mS per clock.

    For simplicity, I've just shown Q0 through Q3 of the 4017 used. The LEDs/light strips aren't shown, but the MOSFETs sink current from them. You'll need to use appropriate current limiting resistors for each "string" of LEDs.
    The 4071 is a quad CMOS OR gate.

    After thinking about it a bit more, you really should start off using Q1 rather than Q0, as otherwise the lower (NMOS) MOSFET, Q1, will be on all the time; if MR (reset) goes high, the Q0 output goes high. Keep that in mind.

    If output Q0 is high, only MOSFET Q1 will be on.
    If output Q1 is high, MOSFETs Q1 and Q2 will be on.
    If output Q2 is high, MOSFETs Q1 through Q3 will be on, etc.

    Tempting as it is, you really cannot use diodes for the OR gates, as the combined voltage drop will be too great after cascading several stages.

    The MOSFETs can be any of a wide variety of logic-level N-ch MOSFETs. IRLD024's are likely candidates; they're available in a 4-pin DIP package from Mouser, Digikey and other vendors, have a Vdss rating of 60v, and Id of 2.4A. The DIP package makes them handy for breadboarding.
     
    magnet18 likes this.
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Updated version; see the attached.

    This version starts off with an auto-reset on power up, and waits until you press S1 to start the "filling" sequence. As before, you could have up to 9 "bars" of LEDs, but you'd need more OR gates past 5 outputs.

    Pressing S1, a NC pushbutton, starts the light bar "fill" sequence by enabling the clock. The display fills one step/strip at a time. When all are lit, the clock is disabled, and all lights stay on.

    If you want it to automatically turn off and stop after one cycle, leave U1C, D1 and S2 out of the circuit.
     
    magnet18 likes this.
  13. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    Apology accepted.
    Thank you very much for the schematics, but I'm unfortunately limited to what I can do with simple transistors and diodes for now, as this needs to be working before parts would have time to ship. (today)
     
  14. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    *sigh
    alright, what am I doing wrong in this circuit?
    My multimeter says that theres voltage getting to the transistor...

    (The other transistors are unconnected as of yet, I was trying to get the first one to work first)

    [​IMG]
     
  15. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    *thoughts from the one who has no clue what he's doing-
    could it be that it's not working because the input voltage on the transistor is greater than the voltage of the AA's?
     
  16. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    You could do this with diode gates (OR) and emitter followers. If you were going with small MOSFETs it would be easier.
     
  17. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    ... sorry, ya lost me :(

    why?
     
  18. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    MOSFETs are very high input impedance. They take a bit of current to charge the gate capacitance, but once it is switched the current is negligible. In many ways MOSFETs are both superior and easier to use than BJTs. I cut my teeth in electronics learning BJTs, so I tend to use them, but for simple switching there is no doubt.

    Read my revised chapter in my article, it give a lot of good background in all modes of both transistors, Chapter 10 - Transistor Drivers.

    As a suggestion you should open a thread for you to discuss transistors, and transistor theory. You'll need to do some homework, but it will hold you in good stead for future projects, or even this one.

    Wookie already showed you how to do it with gates. This has some advantages, since the gates are also amplifiers and will isolate the 4017 from the LEDs. You'll still need transistor drivers either way.

    I mentioned it earlier, there are several chips that will do bargraphs directly from a DC voltage (similar to a voltmeter), and drive the LEDs directly. That is the LM3914 and LM3915. One chip is linear, and the other logarithmic (for audio applications).

    I mention the LM3914 (and link to the data sheet) in chapter 3 - The LED / Resistor Only Bargraph. This bargraph works, but is sloppy. The transition is very loose between LEDs, not crisp and clear as a digital circuit would do it.

    I think Wookie's schematic is pretty clear, but if you want me to draw something up I would be happy to. Diodes work, but in this case I think the true gates are much better.

    **************************************

    About your schematic in post #14, I think it has a problem. The base emitter junction looks like a diode to the outside world. I think the other transistors will offer alternate current paths. You are planning on using EL drivers for each transistor? It would be better to switch the high voltage around using transistors (both BJTs and MOSFETs could do this).
     
    Last edited: Mar 9, 2011
    magnet18 likes this.
  19. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    As I mentioned in post #11, it's awful tempting to try to use diode ORing, but it just won't work in this case; the cumulative voltage drop across the diodes will be too great.

    33k is too high of a value for a base resistor. Base current would be ~ (9v-(0.7v+0.7v)/33k = 7.6/33k = 0.23mA for the first transistor if Q0 is high, for 2.3mA collector current. I don't know how much current your "EL wire unit" requires, but 2.3mA will barely light up an LED. Perhaps your "EL wire unit" box is the inverter; in that case 2.3mA likely won't be nearly enough to power it. A wild guess tells me that it'll need a few hundred mA's to start operating.

    When output Q0 goes low and Q1 goes high, then you have another diode drop between the output and the top transistor's base, along with the current load from the 2nd transistor's base. The next clock input adds another transistors' base current load and another diode drop.

    Here's a slight mod to the 1st schematic I'd posted the other day:
    [​IMG]

    Q0 is unused.

    I've cascaded OR gates to get around the diode voltage drop problem.
    I'm using 5.1k resistors on the gates of small power MOSFETs; that way even if the gates short, the outputs should still rise to a proper high logic level. 2N7000 MOSFETs will work OK for up to around 100mA drain current. I used MOSFETs, because once the gates are charged or discharged, no current is required to maintain their state. There are many logic-level MOSFETs available. One interesting such MOSFET is the IRLD024, available from Digikey, Mouser, and many other suppliers. Id=2.4A, Vdss=60, in a 4-pin DIP package - very handy for breadboarding, too.

    If you look at reply #12, I posted a 2nd schematic that had a couple of pushbutton switches to start the sequence, and to reset it once the sequence was complete.

    It would require fewer components to use something like a 74HC164 or 74HC595 serial-in, parallel-out shift register, clocking in 1's from the data input. In the case of 74HCxx components, you'd need to use 5v for Vcc/Vdd.
     
    Last edited: Mar 9, 2011
  20. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    I tend to agree. You might get by with Shottky diodes with their lower voltage drops, but in this case the gates will still work more reliably.
     
Loading...