# NPN transistor seams to be “leaking” in simulation. What is wrong with my circuit?

I am kind of new to electronics, and I am eager to learn how to work with transistors; especially in realizing logic gates with them. I tried to build a very basic circuit with a transistor as my "switch", turning an LED on and off. However, even if I have no Powersource connected to the collector, there is current indicated by the amp-meter and my LED is turned on (please see screenshots below).

My questions are:

1.) How is my circuit wrong? Why is there 1/4th of the current present even though there is no connection from the +6V to my collector?

2.) When it comes down to transistors I often run accross schematics where the NPN's collector and base are connected to individual plus-power-sources (e.g. +6V), while the emitter is connected to ground (with some load in between). I am wondering how the +x V nodes and the ground are realized in a "real world environment"? Would you use 2 Batteries and connect both -Nodes with ground?

Circuits:

1.) NPN-Setup, no connection to the NPN's collector:

2.) NPN-Setup, NPN's collector powered:

1)

In the first configuration (the collector is not connected to the power supply) your NPN essentially behaves just like a regular PN diode, and the circuit is equivalent to this one:

simulate this circuit – Schematic created using CircuitLab

The reason for this behavior is that NPN transistor may be seen as two PN diodes connected back-to-back:

Leaving the Collector open and connecting the Base to the highest potential leaves you with simple forward-biased PN diode, having forward voltage drop of $\sim 0.72V$.

BJTs are not employed in this configuration because it is cleaner and cheaper to use a proper PN diode in such cases.

BTW, the usual way to use NPN as a switch would be to put the load (in this case the LED) between the power supply and the Collector:

simulate this circuit

In the above schematic you can also see one of the approaches for utilizing the same power supply for both the Base and the Collector driving (which answers your second question). The values of the resistors should be chosen based on the parameters of the LED and the transistor. The voltage divider formed by R1 and R2 is constantly consuming power (even when the switch is open) - this is the main disadvantage of this simple scheme.

The purpose of R_B is to pull Base's voltage to ground when the switch is open - usually you don't want to leave the Base floating. The value of this resistor may be taken very big, such that its presence does not affect the voltage divider.

NOTE: as mentioned by Jippie, R2 may be completely omitted from the circuit. In this case the voltage divider will be formed by R1 and R_B when the switch is closed. When the switch is open, the absence of R2 will prevent from current to flow, therefore the OFF power consumption will be reduced. There are cases when you do need R2 though: its presence reduces the maximal voltage on the switch, and this may be desired in some cases (depends on the switch you're using).

Hope this helps.

• Why did you include R2? It seems unnecessary to me. Otherwise nice explanation. – jippie Aug 17 '13 at 11:24
• @jippie, you are right - in this configuration R2 may be omitted and R_B will form a voltage divider with R1. When drawing the diagram I though of circuits where the switch is an electronic one (such as pass-transistor), in which cases it seems reasonable to have the option of reducing the maximal voltage on the switch. Now I see that this is too special case to be taken into consideration. Let me keep the schematic as is and add additional comment. Thx – Vasiliy Aug 17 '13 at 11:37
• Great response! Thank you so much. A great place to start from with further experiments etc. – Christian H Aug 19 '13 at 11:57
1. You are somewhat confusing base and collector. Use the base to control the load and collector should be connected to the power rail. Your 'leakage' is the current through R1, the base-emitter diode and the load itself. The BE-diode is forward biased and as collector is not connected it cannot amplify anything. Move your switch in series with base and you're circuit will work as expected. Refer to the image in nick g's answer.
2. There are various ways to create a split power supply. One way is to use two separate power supplies (or batteries) with one of the terminals connected to ground, the other way is to connect them in series. You can pick any terminal / node as your ground reference. The circuit doesn't change by picking another node as reference. It is pretty much just where you connect your voltmeter.

The base-emitter junction forms a diode, so your first circuit is the equivalent of this:

simulate this circuit – Schematic created using CircuitLab

where D1 is the base-emitter junction.