need transistor refresher
need transistor refresher
It's been 15 years since I wired a transistor so I can't remember how I want to do this. The basic circuit is 12v going out to a lamp and back to the ground. I want to tap into the hot wire before the lamp and light an LED but only when the lamp is on. I could easily put a relay in, but it's bigger than I want, cutting the hot wire and one end into the 86 and the lamp side into the 85. If I just use a PNP transitor with the Base to the lamp power, Collector to power and Emitter to the LED, I think it will light the LED whether the lamp is functioning or not. I can't use the ground because it's a common ground among many other circuits that I am going to wire like this. Could I use my hot wire for the collector, the ground wire for the base and then have a stable voltage/amperage for the LED out of the emitter regardless of the resistance on the lamp (say 1,2,4 or 8 ohms on the lamps?
I would use an NPN in a common-emitter setup. Wire your 12 volts "signal" line to the base through a resistor, then your 12 volts power to a current limiting resistor, through the LED, to the collector. Ground the emitter. To calculate the value of the resistor on the base, figure out how much current you've got in the collector, look up the Beta in the transistor data sheet and figure out how much base current you need to put the transistor in saturation.
Honestly though, a transistor is probably overkill. You can probably just wire the LED off the original 12 volts and use a current limiting resistor. Even if there are a lot of other loads on that circuit, LEDs are pretty tolerant in that luminescence is fairly consistent even if the upstream voltage sags some.
Honestly though, a transistor is probably overkill. You can probably just wire the LED off the original 12 volts and use a current limiting resistor. Even if there are a lot of other loads on that circuit, LEDs are pretty tolerant in that luminescence is fairly consistent even if the upstream voltage sags some.
Using Transistors As Switches
I don't know what you are doing, but why can't the led be driven by the 12 volt signal going to the lamp?
I don't know what you are doing, but why can't the led be driven by the 12 volt signal going to the lamp?
I've thought about doing just that, but I expect 2-10A loads. I drew it using a shunt to provide power for the LED, but I think that my voltages will change too much with a shunt. Dropping this wire down to 3v and trying to keep it in the mA range will not do a good job of lighting all of the bulbs I fear. I was mainly looking for a way to isolate the LED from the power wire, but only have it active if current flows through it.
That page is pretty much what I was looking for. If I use the collector off the switch, then the base to the lamps, the emitter will provide the voltage to the LEDs. Now I just have to figure out how to integrate that into the design.
I'll probably never build it, but it's been a fun little project to remember what I am forgetting.
I'll probably never build it, but it's been a fun little project to remember what I am forgetting.
A LED is like a diode, and once the forward voltage is met, it's like a short circuit and the current will rise till it burns itself out. It's the same for the transistors. That's why they have all those resistors in the circuit in the link. Once the transistor starts conducting, you have to control the current or it will burn up.
The forward voltage drop on most LED's is 1.2v. Once that is met, you want to keep the current under control at 20ma. So this is how you figure it;
Your supply voltage minus the 1.2v and then take this number and divide it by 20ma. This number you get will be the resistor value required to be put in series with the diode. So once the LED starts conducting, it will keep the current down around 20ma through the LED.
The forward voltage drop on most LED's is 1.2v. Once that is met, you want to keep the current under control at 20ma. So this is how you figure it;
Your supply voltage minus the 1.2v and then take this number and divide it by 20ma. This number you get will be the resistor value required to be put in series with the diode. So once the LED starts conducting, it will keep the current down around 20ma through the LED.
I get that part, but I still want/need 12v and 2-10A to be supplied to the bulbs on the same wire. Which is why I though about using a transistor or the shunt like I drew. A LED is not like a diode, it is a diode and I've used them in place of diodes when screwing around. I ran out of diodes when installing my alarm, so I started using LEDs. The LEDs lit dimly when the doors were open and make a neat effect, but I replaced them with standard diodes.







