Current sink experiment: mosfet vs bjt - Page 1
Forum section: electronics / beginners

author: Moriambar
author_rank: Unknown
timestamp: March 25, 2020, 02:29:24 pm
content: Hi.I'm trying to learn more about transistors (both bjt and mosfets) and tried to build up the BJT circuit in the picture below.I used a 2n2222A and it works fine; the current is stable both when the voltage connected to the LED is different from the one connected to the base (and varied) and also adding more LEDs or using different loads.I understand why this works (B-E junction has a diode drop between Vb and Ve, and the voltage drop across the emitter resistor sets the collector current).Then I tried and replicated the circuit using a mosfet (second diagram, although I used anFQP30N06L) not sure about what to expect (unfortunately the only real electronics manual I got is the AoE – which imo doesn't care much about mosfet circuits apart from switches) and I was surprised that it works just the same, ie: it provides a constant current (different from the BJT one) as before.My understanding, though, is that there's no "diode" between gate and source, which are basically isolated from one another. So what is happening?Thanks

author: magic
author_rank: Super Contributor
timestamp: March 25, 2020, 02:52:39 pm
content: It works the exact same way except that no current flows from gate to source. Therefore the gate is permanently at 5V regardless of R1.MOSFET is controlled by the gate to source voltage, Vgs. If drain current is low, voltage across R2 is low and Vgs is high so the FET turns on more. If drain current is high, voltage across R2 is high and Vgs decreases, the FET turns off. At some point equilibrium is reached.

author: Moriambar
author_rank: Unknown
timestamp: March 25, 2020, 03:07:09 pm
content: Quote from: magic on March 25, 2020, 02:52:39 pmFirst of all, thanks for your reply.Sorry, but I don't understand. How can teh current be "set" (as I am seeing it to be) varying both the voltage across the load (but not the gate) and the load itself? I mean: by varying those parameters I would expect the current to vary if it's not set by some characteristics of gate and source and source resistor… This is what puzzles me…

author: exe
author_rank: Unknown
timestamp: March 25, 2020, 03:36:53 pm
content: Mosfet source is lifted by voltage drop through the source resistor. More current -- more voltage drop. As source is lifted, the gate voltage (voltage between gate and source) is reduced. So Vgate = 5V - I*R2. As Vgate is reduced, so is current.

author: Moriambar
author_rank: Unknown
timestamp: March 25, 2020, 03:42:40 pm
content: Quote from: exe on March 25, 2020, 03:36:53 pmThanks for your reply.I think I understand it better but not fully still.It's clear how I depends on Vgs, but how can I stay constant? Or, if you want to flip it around, how do I calculate I and Vgs?I know, there's something basic I might be missing…Thanks for your patience.

author: Zero999
author_rank: Super Contributor
timestamp: March 25, 2020, 03:47:38 pm
content: With the gate/base connected to the same voltage as the load like that, neither circuit will behave as a constant current source. Reduce the voltage on the base/gate to a level when the voltage across the emitter/source resistor is much lower, than the voltage across the load and they will work.

author: Moriambar
author_rank: Unknown
timestamp: March 25, 2020, 03:49:23 pm
content: Quote from: Zero999 on March 25, 2020, 03:47:38 pmI did, perhaps I wasn't clear, but I experimented with different voltages connected to the load/led, while keeping the Vb/Vg=5V.I'm not complaining about the circuit not working (it works) but I'm complaining about not understanding fully what's going on in the mosfet counterpart.

author: Zero999
author_rank: Super Contributor
timestamp: March 25, 2020, 03:53:46 pm
content: The voltage across R2 tracks the base/gate voltage minus the base-emitter/gate-source voltage. The current trough collector/drain and thus D1 is the same as the emitter/source, therefore should be constant. The BJT does leak some current through its base, through to the emitter resistor.

author: Moriambar
author_rank: Unknown
timestamp: March 25, 2020, 03:57:33 pm
content: Quote from: Zero999 on March 25, 2020, 03:53:46 pmThanks for your reply, but…let me restate my doubt.I have understood (at least to a certain degree) the BJT-> Vb-Ve≈ 0.7V (1 diode drop due to the junction) so I can calculate Ve and I as Ve/R2.I don't actually understand how to do that with the mosfet.

author: Zero999
author_rank: Super Contributor
timestamp: March 25, 2020, 04:12:56 pm
content: Quote from: Moriambar on March 25, 2020, 03:57:33 pmIt's exactly the same, except replace VB-VEwith VG-VS, which is equal to the threshold voltage of the MOSFET. Unfortunately, unlike BJTs, MOSFET threshold voltage is subject to greater variation.

author: Moriambar
author_rank: Unknown
timestamp: March 25, 2020, 04:52:13 pm
content: Quote from: Zero999 on March 25, 2020, 04:12:56 pmOk, thanks, now I get it.

author: Wimberleytech
author_rank: Super Contributor
timestamp: March 25, 2020, 05:20:24 pm
content: They way you have this configured, and assuming your LED has a couple of volts across it, this particular MOSFET will most likely be in the linear region of operation. Thus if you are interested in doing a hand calculation calculate LED current, use the expression for the linear region. It will be a quadratic and a little messy.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: March 25, 2020, 10:27:53 pm
content: Try to make these modifications.1. Add a pot to adjust voltages so you can compare different settings easily.2. 10V or 15V supply gives more room to adjust settings.3. R1 is a precaution for when the potentiometer is at the end of it's wiper.4. R2 increased from 470 to 1k to limit LED current for higher voltages.With these settings it's easier to spot the differences between the FET and BJT.With the BJT there will be a current through R1. Not with the FET.With the FET the voltage between Gate and source will be around 4V.Which means, the voltage over R2 is always 4V lower then the Wiper of the pot (as long as it's above the FET's threshold) A few modifications that help in viewing the differences between MOSfet and BJT version.* Move R2 from between the TUT (Transistor under Test) and GND to between the LED and TUT. This way it still protects the LED from accidental overcurrent while the base (or Gate) of the transistor is more separated from the collector current and it's inluences.* Change R1 from 1k to 10k, 100k or 1M and repeat the tests.* Change the TUT to a power BJT (These usually have much lower Hfe) or to a darlington (with much higher Hfe and observe the changes.