Hi Guys
Please assist, and please forgive me for my ignorance, as it might seem simple to seom of yourll.
I have attached a pic for more info.
Simple circuit - we have a LED, resistor, 5V power source, and a push button switch. Wired up as per normal. Push the switch, and it works, Piece of cake!
HOWEVER, I have seen in quiet a few places, a transistor is used. I cannot get my head around why do we use a transistor in such a simple circuit inthe push button switch can do the job of switching.
Obviously in unattended circuits, where the circuit needs to be switched on my a current it is understandable, but why in the above mentioned circuit ???
clinton_pillay:
HOWEVER, I have seen in quiet a few places, a transistor is used. I cannot get my head around why do we use a transistor in such a simple circuit inthe push button switch can do the job of switching.
Where did this schematic come from?
The only rational I can imagine is that it's part of a tutorial demonstrating a transistor in an emitter follower switch configuration. By itself it doesn't have much practical value for the reason you note.
If the switch is a small miniature type with limited current capability, a transistor can be used to handle higher required currents.
Hence a small current from the switch can control a higher current going through the transistor.
Also, you could connect the switch and a controller output to the same transistor giving you an automatic and a manual way of switching a load.
Yeah - at least with the LED they're showing there, there's no need for that, with all but the wimpiest of wimpy low current switches (maybe some sort of special purpose switch).
However, there are certainly LEDs and COB LED modules (COB is lots of little LEDs in a single package as a small panel - this raises the cost of the LED, but improves efficiency since the current density in each LED is lower) that you wouldn't want to power directly through a small cheapie low current switch (though you probably don't want to be using a resistor for current limiting on such LEDs either)
That's not how to wire a transistor for switching - its an emitter-follower, whereas a
common-emitter circuit is used for switching (less power and voltage wasted in
the transistor).
The reason to use a transistor is when the load takes a lot of current - its pointless for a
single LED as you suspect! A single Arduino output can drive up to 20 or 20mA max, whereas
something like a motor or relay or LED strip might want more like an amp or two - that's
when a power switching device would be used. Also for when the load voltage is higher than
the controlling logic device.
One use might be to isolate the switching for distance purposes.
This might be useful if the switch was a long ways away from the LED as a way to avoid voltage drop.
The voltage source remains close to the LED instead having to travel back and forth through two lengths of wire.
But if I were doing that, I'd use a PNP transistor so the remote switch switches to ground rather than run the voltage out to the switch and back.
And if using PNP transistor with a grounding switch, you might be able to get away running a single wire to the switch if you could share a common ground for the other "wire" between the switch and the rest of the circuit.