Electrical – Can i switch npn transistor using 12v
12v5vrelayswitchestransistors
I want to switch on 5V when switch is connected to 12V. I have been using relay to do this, but I am wondering if I can use NPN transistor or something similar that is cheaper and smaller than a relay.
With NPN transistors, you can't switch on the high side unless the base is a higher voltage than the emitter. If you're using 12V, you shouldn't have a problem with this
NPN (and PNP) transistors look like a diode from the base to the emitter. If you try to drive it without someway to limit the current, the transistor will be destroyed. In the circuit below, R1 limits the base current to about 1/10 of what can flow through through the load resistor, placing the transistor firmly into saturation. This means that the transistor is on about as much as it can be, so it will have only a small voltage drop (~0.3V) across it.
P.S. 10K resistors are just there as a generic value. For this purpose you can use almost anything. Base-ground resistor is 100K as recommended by @Russell.
Best Answer
Yes you can:
simulate this circuit – Schematic created using CircuitLab
Some considerations though:
With NPN transistors, you can't switch on the high side unless the base is a higher voltage than the emitter. If you're using 12V, you shouldn't have a problem with this
NPN (and PNP) transistors look like a diode from the base to the emitter. If you try to drive it without someway to limit the current, the transistor will be destroyed. In the circuit below, R1 limits the base current to about 1/10 of what can flow through through the load resistor, placing the transistor firmly into saturation. This means that the transistor is on about as much as it can be, so it will have only a small voltage drop (~0.3V) across it.