Not gate

dl324

Joined Mar 30, 2015
18,326
That first picture in post 1 is a picture from a tutorial I used. I didn't make that.
In your drawing, you have the collector resistor and LED shorted, the collector resistor isn't connected to the LED, and there is no power being applied to the board.
 

Thread Starter

Nirelan

Joined Nov 5, 2018
39


I think I see how to do it now.
One resistor goes to the collector of the transistor.
The other resistor goes from the switch to the base of the transistor.
The wire goes from the emitter of the transistor to the LED.
The long leg of the LED has to match up with the collector and the short leg matches up with the wire.
Is that right?
 

dendad

Joined Feb 20, 2016
4,637
That looks better. But is the transistor E B C like shown, or C B E like before?
You may have to pull the transistor out and rotate it 180 degrees.
 

Thread Starter

Nirelan

Joined Nov 5, 2018
39
That looks better. But is the transistor E B C like shown, or C B E like before?
You may have to pull the transistor out and rotate it 180 degrees.
Yes, the transistor is E B C.

I understand, now, that the collector takes in the current and shoots it straight to the emitter. When the base gets voltage it stops the flow from the collector to the emitter.

I trusted the picture I saw on that other site at first and tried to rationalize how it worked around that.
Thank you, sir.
 

dl324

Joined Mar 30, 2015
18,326
I understand, now, that the collector takes in the current and shoots it straight to the emitter. When the base gets voltage it stops the flow from the collector to the emitter.
Not quite how I'd explain it.

You're using the transistor as a switch. When you supply a sufficiently high voltage to the base, you cause sufficient current to flow into the base to saturate the transistor (turn it on fully).
 

dendad

Joined Feb 20, 2016
4,637
In any case, the LED isn't connected to a current limiting resistor.
In this case the LED used the collector 1K as the current limiting resistor. The LED is shorted out when the transistor switches on, and lights up via the 1K when the transistor is off. So it does not need a separate resistor.
 

absf

Joined Dec 29, 2010
1,968


I think I see how to do it now.
One resistor goes to the collector of the transistor.
The other resistor goes from the switch to the base of the transistor.
The wire goes from the emitter of the transistor to the LED.
The long leg of the LED has to match up with the collector and the short leg matches up with the wire.
Is that right?
Here is the correct way of doing your board above....
NPN not gate 2_bb.png

Since your button has only 2 pins, I shifted it from the centre to the lower part, so you can plug in your button horizontally and it should work. Not sure about the orientation of the LED, if it doesnt light just reverse it.

Allen
 
Last edited:

dendad

Joined Feb 20, 2016
4,637
If you want to have an LED indicating both input and output, you can wire it up as the circuit in post #13 and a sample breadboard layout is shown in post#18.
In the above circuit, if you had an LED in series with the base, or an LED and series resistor powered by the switch, both LEDs would be on together.
So I think the other circuit demonstrates a NOT function better.
 
Top