> What is the use of transistor in this circuit?

What is the use of transistor in this circuit?

Posted at: 2015-01-07 
Some people do actually hook up LEDs directly to the I/O pins of a micro. But usually these aren't some kind of ultrabright LED used for headlamps and taillights of an RC car, which need to be seen from a distance in ambient light. They are usually tiny, 2mA high efficiency types mounted on the circuit card itself. Some microcontroller output pins can sink 40mA (Microchip makes some of these, for example.) But there are usually only a couple of them at most like that and there aren't a lot of micros that do that, either. Quite a few can handle up to 20mA, though. But even then, it's not wise to run I/O pins like that for continuous duty -- there is a heating effect inside the micro.





So usually if the needed currents are more than 8-10mA (and even then), it's a good idea to use an "outboard" BJT. They aren't expensive. I pay less than half a cent for them (resistors cost me more), so I use them like water.





What's a little odd about the circuit, to me, is that the headlights are probably white LEDs and the brake lights are probably red LEDs. Red LEDs require about 2V or so to operate, even at some fairly high currents for bright ones. White LEDs are usually based upon blue LEDs with phosphors used to whiten the output and require 3.5V or so to operate. But the circuit uses the same current-limit resistors for both. Assuming both BJTs are operated "saturated", the white LED should experience (6V-3.5V-0.2V) ? (100Ω) = 23mA, while the red LED should experience (6V-2V-.2V) ? (100Ω) = 38mA. That's a little odd, design-wise.





In any case, there should be about (4.5V-0.1V-0.76V) ? (1000Ω) = 3.64mA base drive in the BJT. As you can see, about 1???th the collector current. So the BJT really will be operated in saturated mode as a switch. That much is clear. Also, it's still requiring about 3-4mA from the micro's output, which is about as much as should be wanted. So that part of the design makes sense to me.

It looks like the current in the LEDs is approximately





(6 - 2)/100 amps ie 40mA





I suspect that the microcontroller cannot source or sink so large a current, so an external transistor is needed.

the transistors are used to drive the LED's because requiring the outputs of the 2313 would cause it to heat up quite a bit maybe effecting the crystal frequency and other functions inside.



It is common to BUFFER the outputs of logic circuits to keep the power low and reduce heat.

To elaborate on what Colin said, it is typically bad practice to stress a microcontroller. Even if the microcontroller were capable of sourcing that much current, it is better to have the current coming from a power source

This was a common collector DC amplifier that contains both voltage and current gain. This stage adds more sensitive to trigger the Light and apply large enough current that the IC output might not be able to support a light.

So i was going through a micro controller circuit. What I didn't understand was why they used a transistor in it. can't you just directly connect the LEDs.



The link to circuit is



http://uzzors2k.4hv.org/projectfiles/blucar/Bluetooth_control.GIF