2

I think this question may have already been answered, in a way... But I am not satisfied. I'm reading this book about creating a NOT gate and it mentions that electricity flow from the collector to LED2 connected directly to ground stops when the transistor begins conducting.

Question is, why would LED2 stop if it is connected in parallel? enter image description here

user3704920
  • 121
  • 1
  • 5
    If the transistor is turned on, what is the voltage across it? Since the transistor & LED are in parallel, what is the voltage across the LED? Will that voltage cause it to light up? – brhans Jul 23 '15 at 17:03
  • 1
    @brhans I understand that part, what I don't understand is why LED2 directly to ground with only 330 resistance will have less voltage? – user3704920 Jul 23 '15 at 17:15
  • 2
    @user3704920 Because transistor shorts LED2 anode to ground. When Q1 is on, try to replace Q1 with a piece of wire and see how it affects the voltage across the LED2. This is a very rough approximation. – Golaž Jul 23 '15 at 17:18
  • 1
    @Golaž what do you mean by "shorts"? How does a short circuit fit here? As far as I know, a short circuit is caused by less resistance, in which case LED2 would burn out? I am a newbie so I apologize in advance. – user3704920 Jul 23 '15 at 17:23
  • 2
    When Q1 is conducting (base is pulled high), the voltage between Q1 emitter and collector will be very low - around 0.3 volts or so. Since LED2 and Q1e/c are in parallel, the voltage across LED2 will also be about 0.3 volts. That is much less than the voltage required to light the LED. We might say that Q1 places a short circuit across LED2 since it provides such a low voltage, even though it is not a Real short circuit. (Sometimes we get a bit sloppy with terminology.) – Peter Bennett Jul 23 '15 at 18:53
  • @PeterBennett I don't get why the voltage between collector and emitter would be so low when Q1 is on. Isn't the purpose of a transistor to allow current to pass when a voltage is applied to the base? If so, then the collector/emitter path would have high voltage since there is only a 330 resistance across R2. – user3704920 Aug 13 '15 at 19:55
  • When Q1 is conducting, it will draw about 17 mA - enough current to cause a 5.7 volt drop across the resistor, leaving 0.3 volts across Q1 and LED2. Since typical LEDs need about 2 volts to light, LED2 will remain dark. – Peter Bennett Aug 13 '15 at 20:47
  • @PeterBennett when Q1 is conducting would the flow of electricity go from the base to the emitter? – user3704920 Aug 13 '15 at 20:53
  • When the base is pulled high to turn on the transistor, current from both the base and collector will flow out of the emitter. – Peter Bennett Aug 13 '15 at 21:09
  • @PeterBennett so why would the flow choose the base/emitter path over collector/emitter when there is less resistance on the latter? – user3704920 Aug 13 '15 at 21:20
  • Current into the base of an NPN transistor controls the flow of current from the collector to the emittter. – Peter Bennett Aug 13 '15 at 22:22

3 Answers3

2

Current only flows into the base of the transistor, not out. When the switch is closed, the circuit acts like this:

schematic

simulate this circuit – Schematic created using CircuitLab

LED2 is shorted out. With no voltage across it, it doesn't conduct. All of R2's current goes straight to ground.

With the switch open, the circuit acts like this:

schematic

simulate this circuit

The transistor is now off (no collector -> emitter current), so 6 volts is put across R2 and LED2 in series. This allows LED2 to turn on and conduct, with R2 limiting the current.

Adam Haun
  • 21,331
  • 4
  • 50
  • 91
  • thank you. So why is it current travels best straight down to ground and not through LED 2? Is it because LED2 causes more resistance? – user3704920 Jul 23 '15 at 17:50
  • Current can't flow through the LED unless there's a voltage across it, which for LEDs is often around 2 volts. Diodes don't obey Ohm's Law, but they still require voltage in order to conduct. – Adam Haun Jul 23 '15 at 17:56
  • Think of the first circuit as a zero-ohm resistor in parallel with an infinitely large resistor. – Adam Haun Jul 23 '15 at 17:56
2

The "gate" you've shown is confusing I think because while its purpose may be to have LED2 and LED1 give opposite indications, the input to the "gate" is a current and the output is a voltage. In most cases, it makes more sense to define logic gate behavior for both inputs and outputs in terms of voltage. For example:

schematic

simulate this circuit – Schematic created using CircuitLab

In this example, a logic high is a signal which will sit at least 1.5 volts above ground if no more than 5mA is drawn from it; a logic low is a signal below 0.6 volts. The left circuit will output a voltage of at least 1.5 volts until the current drawn from it exceeds 5.1mA. The gate in the middle (starting before the 1k resistor) draws slightly under 1mA if the input is at 1.5 volts); one could attach four more similar gates without exceeding the 5mA limit of the source (though any current used to feed gates will reduce the LED brightness). If the input is over 1.5 volts, the base-emitter current will be at least 0.8mA, and the transistor should have no trouble sinking the 6.4mA necessary to pull its collector down to 0.6 volts. If the input is below 0.6 volts, then R3 should have no trouble pulling the output up above 1.5 volts if nothing downstream demands more than 5mA.

Note that all LEDs are referenced to ground. If one is willing to have a buttons and LEDs which are floating, one can build an "inverter" without needing any transistors, but incorporating such a device into a larger circuit will be difficult. Assuming LEDs want roughly 10mA at about 1.8 volts:

schematic

simulate this circuit

When the switch is open, D2 will drop 1.8V; the 3.2 volts remaining will be divided between R1 and R2, with each dropping 1.6 volts at 10.6mA, so D2 will get 10.6mA. When the switch is closed, D1 will drop 1.8V. R2 will drop 3.2 volts at 21.3mA, and R1 will drop 1.8 volts at 1.2mA, leaving about 9.3mA for the D1.

supercat
  • 45,939
  • 2
  • 84
  • 143
1

The purpose of a NOT gate is to have the OUTPUT (LED2) be the opposite of the input (LED1). If LED1 is lit, LED2 should be off. That being said,

When SW1 is pressed, current flows through LED1 turning it on, and also providing current to turn on Q1. When Q1 is "ON" is provides a low resistance path to ground--a short--bypassing LED2. LED2 was originally on because it was begging power through R2, but now that Q1 is "ON" that power is being shunted away from LED2 directly to ground through Q1. So LED2 is off.

When you release the switch, SW1, Q1 no longer gets current and shuts "OFF". LED1 is not getting any current and is also off; however, LED2 is now on because the current is flowing through it instead of Q1.

Make sense?

Michael Molter
  • 430
  • 2
  • 10
  • thank you very much. Still, I don't understand why it would bypass LED2 when the resistance in the part of the circuit is lower? R2 is 330 and R1 is 1k, so why would it choose 1k resistance instead of 330? – user3704920 Jul 23 '15 at 17:11
  • When Q1 is in the "ON" state, imagine it as if it where replaced by a 0 ohm resistor between R2 and ground. – Michael Molter Jul 23 '15 at 17:31
  • @user3704920 This circuit uses a transistor to act like an "electric switch". Imagine collector and emitter are like the sides of a switch, and the base controls whether the switch is on or off. – user253751 Jul 23 '15 at 22:03