Connect with us

4017 Transistor Gating

Discussion in 'General Electronics Discussion' started by mooginnyc, Feb 3, 2010.

Scroll to continue with content
  1. mooginnyc

    mooginnyc

    40
    0
    Feb 3, 2010
    Hello, my name is Mike. I just joined.

    I'm stuck on a problem with a 4017 circuit I've been building. It's frustrating in that it worked when using a few steps on the breadboard, but the final circuit isn't acting right. I've swapped things out, tried different hook up configurations, but I can't get it to be stable, or even work all the time.

    Basically, I'm trying to send the output of each step to separate AND gates, as well as light an LED when that step is on. When the 4017 step is on, and a switch is on for the other input of the AND gate, the output of the AND will be high. The LED from the 4017 should light regardless of the AND gate. This same configuration is applied to every step.

    Also, the outputs of the 4017 (the LED and the AND gate) should only function if the 4066 is on, sending the 9V to to the transistor bases.

    I've also tried swapping the outputs of the 4017 and 4066, so the 4017 goes to the bases, and the output of the 4066 goes to the collectors. Not much better.

    The last configuration I tried, I could get the AND bit working properly. Then I tried adding the LED. The LED would light each time the correct step of the 4017 went on, but that was regardless of the 4066 state, or current going to the base pin.

    Here's a little schematic attached. My guess is that my problems have to do with the base/collector resistors. I've tried 1K, 10K, and 100K resistors on all configurations (as well as no resistor), but nothing really works correctly.

    Thanks a lot for the help!
     

    Attached Files:

  2. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
    There are a couple of potential problems with the circuit.
    1st. the LED current may load the step output too much to make a good logic "1" into the 4081.
    2nd. the b-c may become forward biased when the 4066 is on and step is low.

    Why don't you replace the transistors with 4081 AND-gates, and ditch the 4066?
     
  3. mooginnyc

    mooginnyc

    40
    0
    Feb 3, 2010
    Thanks for your help!

    Here's an updated drawing with what I think you're saying.

    Also, I left out a couple of things before. The last step of the 4016 is going into the input of a 4027 flip flop which feeds the 4066. I suppose I could still eliminate the 4066 and just feed the outputs of the 4027 into the AND gates?

    I'm hoping that the first LED will light whenever the 4017 is on the right step (and the 4027 is on), which will light up the second LED if the switch is on. Does this look correct?
     

    Attached Files:

  4. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
    I won't pay too much attention to the logic function you want, but the 4066 does nothing here and can be omitted. (A 4066 can in some cases be used as an AND-gate btw..)
    One other matter is that you (still) have a LED loading the same output that is used to feed the input of another gate. That is not good practice to ensure proper logic levels.
    You also don't need pull-down resistors between gates, only when the input is fed from a switch that opens.

    Oh, and I forgot to greet you welcome to the forums! :)
     
  5. mooginnyc

    mooginnyc

    40
    0
    Feb 3, 2010
    Thanks for the warm welcome! :)

    Yeah, the 4066 stemmed from an earlier idea, and it just remained in the circuit. I'll ditch the 4066 and just use the 4027s to feed the other AND inputs.

    So, I guess I need to put an NPN transistor to light the LED parallel to feeding the other AND gate? If so, should I use a 10K resistor to the base? Can gate outputs light LEDs on their own, or should I always use a transistor?

    Using the AND gates instead of the transistors makes a lot of sense now. And I can still use the big 4081 array I've already soldered! :D

    I'll let you know how it goes!

    -Mike
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    A gate output can drive a LED, but depending on the current you want, the gate will not be able to maintain a full voltage swing at the output.

    If you have a spare AND gate, you can tie both inputs together and attach that to the logic level you wish to monitor then drive the LED from the output. The input of the AND gate will not load down the output of another AND gate.

    I have modified your circuit (pretty much in line with what Resqueline said, but using an AND gate to buffer the LED). The parts in grey are almost certainly not required.

    I wonder why you're using the 4066's when it appears that you could use an AND gate -- but I'll admit I really don't understand what's going on there (I may have to read back some more). Aha! already dealt with.
     

    Attached Files:

    Last edited: Feb 4, 2010
  7. mooginnyc

    mooginnyc

    40
    0
    Feb 3, 2010
    Awesome! Well, I only tested one step, but it seems to be working just right! A few questions: is it okay to leave a 10K pull down resistor on a logic input (not from a switch, but from 4081)? I already have them soldered, so I won't remove them if I don't have to. And, would it be better to use a buffer gate to light the LED like *steve*'s suggestion, or is a transistor adequate enough? Also, because I have those wired already. Thank you both!
     
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    yep, those additional 10k resistors increase (marginally) the current required, but otherwise should not affect the operation of the circuit.

    A buffer or a transistor will do the same thing (the transistor is acting like a buffer). If you have the spare gate, you mat as well use it, if not a transistor and a couple of resistors is perfectly fine.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-