Pull down resistor between transistors in AND gate. Good or bad idea?

Discussion in 'The Projects Forum' started by beginnersluke, Aug 26, 2015.

  1. beginnersluke

    Thread Starter New Member

    Aug 26, 2015
    Hello all. I am new to this forum, so, again, hello!

    I have recently started to work with and learn more about electronics. I used to play with this stuff a bit when I was little (fairly simple circuits though, nothing even involving transistors), and are now getting back into it because it was always fun, and it makes for fun projects to do with my kids.

    Here is my question (I did search previous threads, but did not find this question, sorry if something like this already exists):

    Yesterday, I was building a transistor AND gate. (This is going to be part of a larger circuit, but I wanted to build the gate out separately to make sure that was working properly.)

    I built it using two 3904 transistors (because it's what I had on hand), with 10k base resistors. I have attached the basic schematic.

    I connected two momentary push switches, connecting (when pressed) +5V to the two inputs on the gate. The output is connected to an LED through a 68ohm resistor.

    The gate worked, mostly. When one or no buttons were pressed the LED was off; when both buttons were pressed simultaneously, the LED would light. Yay! There was one flaw, however. When I would press and release Button A (button on input A), then Button B a short time later, the LED would dimly flash. This did not occur if button B was pressed first, then A.

    I also connected the output as a clock signal for a 4017. (This gate will eventually be used as the clock signal for a 4017 in the larger circuit.) In this instance the 4017 received a clock signal, in the same instance as the LED would flash.)

    This may not be correct (like I said, I'm a beginner), but it was acting as though there was a capacitor on the collector of the input B transistor, discharging through the transistor to the LED, when the base of the input B transistor was powered.

    I solved this problem by putting a 5k resistor between the Emitter of Transistor A and the Collector of Transistor B, connecting it to ground. (My theory was, if charge is being held here, I'll just drain it to ground.) This worked beautifully, as far as I can tell. There is no visible flash in the LED, and the 4017 only receives a clock input when both buttons are pressed, and only then And gates_800x599.jpg .

    While I was happy (and proud) that my solution worked, I'd like to know a bit more about what was going on here, and also if there is a better solution.


    1. What could have been causing the LED flash, when Button A was pressed and released, followed by Button B being pressed? (Can a transistor act like a capacitor sometimes?)

    2. Though my solution seems to have worked practically, is there a better way to solve (or better, prevent) this problem?

    3. Would this resistor I added be properly called a pull down resistor?

    4. Is there any reason adding this resistor is a terrible idea?

    Thanks so much for any insight.


    And gates_800x599.jpg
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    Using voltage followers as logic elements is a bad idea. You loose signal level in every stage of logic... after about three stages, you have nothing left.

    RTL (resistor-transistor Logic) is one of the oldest forms of logic out there (not counting tubes and relays). The basic building blocks are NAND, NOR, and INV, so if you really, really need an AND gate, you use a NAND followed by the INV. This way, each logic element is fully-level restoring, and you can cascade hundreds of logic levels...
  3. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    While there are other ways to implement the NAND function, stacked NPN transistors works well IF Vcc and the base drive voltages are high enough. It is a common technique left over from the days when transistors were very expensive.

    1. Yes, the transistor base-emitter junction can has capacitance. Also, leaving the base lead floating lets it pick up noise.
    2. Yes, 10K to 100K resistors from both bases to GND.
    3. Yes.
    4. No, but moving it to the base is better.

  4. beginnersluke

    Thread Starter New Member

    Aug 26, 2015

    That all makes sense. Even if this is not the best way to do this (as Mike notes above), I learned something from doing it this way, so win-win. :)

    Thanks again.