Go Down

Topic: Current from I/O PIN (Read 3 times) previous topic - next topic

Far-seeker

#10
Oct 26, 2012, 07:21 pm Last Edit: Oct 26, 2012, 07:47 pm by Far-seeker Reason: 1

Quote
but you'd have to make sure the BJT is biased so it is controlled by its base-emitter voltage, and not the base-emitter current

So do we ensure this by rewriting physics?


Two words: "Voltage buffers".  In that type of circuit the current (while still necessary to operate the BJT) can be set arbitrarily to a fairly small level and VIN determines VOUT. Unless you think a NPN common collector circuit requires non-standard physics... :P

Edit: Perhaps I overstated things a little by using the words "have to" instead of "should, and Grumpy_Mike is certainly correct that 3 mA can control a current hundreds of times larger.  However, it is entirely possible to use a BJT so that one voltage controls another without violating the known laws of physics!

Grumpy_Mike

Quote
However, it is entirely possible to use a BJT so that one voltage controls another without violating the known laws of physics!

Now from that link I suspect you are not suggesting using an op amp.
The whole point of a BJT is that it is driven by current, not voltage. That current might be small but it is current never the less because it is current that makes the transistor work. FETs on the other hand are voltage devices and draw negligible current apart from the initial charging of the gate source capacitance. All three configurations of the transistor are called a voltage buffer on that page.

Lets look at each in turn:-
1) Common emitter - the normal way I would recommend, base current determines collector current

2) Common base - note the page says this is not suitable for a TTL voltage buffer, it has a low gain and typically I use this for video coupling.

3) Common collector better known as an emitter follower. - This has no voltage gain but a current gain, you do not need a base resistor because of the feedback on the emitter keeping the emitter / base voltage stable. However this is 0.7V so this means when you use it as a voltage buffer you loose 0.7V. Used with the Due that will reduce the voltage output from 3V3 to 2.6V. When lighting an LED this will not be high enough for blue and white LEDs although it is enough for red and green. Again I would not recommend this due to the voltage drop that it produces.

franceslup

thank you guys...
I tryied a configuration On pspice.. if i use an 2N222 NPN BJT in common emitter mode, with 10K resistor on base (on a pin of arduino 2 so 3.3v).... the current on the base is less then 1mA... i don't remember the value of the Vcc on the led... maybe was 5v...
So i think i can use a BJT ;)

Grumpy_Mike

Quote
the current on the base is less then 1mA

In fact it is a lot less than 1mA it is 0.26mA.
Remember at 3V3 the 0.7V base emitter drop is a lot more significant. So you use the voltage across the base resistor of 3.3 - 0.7 = 2.6V for your calculations.
You can afford that base resistor to be down at 1K and still be within the limit.
I would use 4K7 - (0.5mA)  force of habit really.

Far-seeker


The whole point of a BJT is that it is driven by current, not voltage. That current might be small but it is current never the less because it is current that makes the transistor work. FETs on the other hand are voltage devices and draw negligible current apart from the initial charging of the gate source capacitance.

I never stated that a BJT could work without current!  I originally recommended using FETs over on the 3 mA pins because I know the difference on how they operate. 


Lets look at each in turn:-
1) Common emitter - the normal way I would recommend, base current determines collector current

2) Common base - note the page says this is not suitable for a TTL voltage buffer, it has a low gain and typically I use this for video coupling.

3) Common collector better known as an emitter follower. - This has no voltage gain but a current gain, you do not need a base resistor because of the feedback on the emitter keeping the emitter / base voltage stable. However this is 0.7V so this means when you use it as a voltage buffer you loose 0.7V. Used with the Due that will reduce the voltage output from 3V3 to 2.6V. When lighting an LED this will not be high enough for blue and white LEDs although it is enough for red and green. Again I would not recommend this due to the voltage drop that it produces.


Although you are correct that I should have stated, "common emitter" and not "common collector".  I... wasn't in a frame of mind conducive to self proof-reading when I wrote it.  I took your comment in a way you probably didn't mean, and furthermore let it irritate me more than I should have even if you did.  :smiley-red:   

Regardless, with NPN a common emitter circuit the voltage difference between the base and emitter will be the VIN.  Since VOUT can be expressed as follows VOUT = AV * VIN; how is VIN not effectively controlling VOUT?  Yes, I intentionally didn't mention that the current will be amplified as well and that is fundamental to the operation of the BJT.  However, in my mind at least, it wasn't necessary because the maximum current is so low and all the pins except DAC0 and DAC1 are either outputting digital or PWM signals. So it's just easier when biasing the circuit to concentrate on the voltage, either setting it up to be an actual voltage amplifier or a switch, and only address the current in the context of ensuring it doesn't go above 3 mA.

Go Up