BJT op amp current source issue

Thread Starter

Gibson486

Joined Jul 20, 2012
360
I made a current source very similair to this:

http://www.ecircuitcenter.com/Circuits/curr_src1/curr_src1.htm

to drive an LED.

The voltage to the opamp is controlled with a DAC (DAC7562TDGSR). The op amp is an MCP6002. The BJTs are your standard 2222A NPN.

The problem is that I can never get the LED to fully shuts off. Other than that it works fine. It is like there leakage current through the BJT. The amount of current is immeasurable with my multimeter, but it is enough to give a faint glow on the LED. I tried it with a mosfet, the problem went away, but I have found that I get much more dynamic range with the BJT.

I have a few theories to why the BJT is leaking current. Do you guys want to comment to see how valid they are or just comment to tell me what is actually wrong?

1. The op amp has an output offset current, so to fix this, I need a resistor on the base. It would explain why a mosfet works well since mosfets are voltage related.

2. The op amp has an output offset voltage, so to fix this, I need a resistor somewhere.

3. BJTs just leaks current? Easy solution, but probably wrong.

4. The DAC does not have a true zero ouput, so any small voltage gets leaked to the negative side of the op amp (the feedback side), which gets propagated to the emitter. This is my BS response. ;)

5. My PCB design sucks. I hope it is not this. :(
 

DickCappels

Joined Aug 21, 2008
10,661
3. BJTs leak current.
But make sure to check the other possibilities so you are sure that the circuit is acting "nicely" since there might be more than one thing contributing to the current.

One solution is to put a high value resistor across the LED so the leakage current cannot develop enough voltage across the LED for it to be able to glow.

You can measure the leakage current with a DVM. Put the DVM on the voltage scale and measure the voltage across the DVM terminals. Divide by the input resistance of the DVM. For example I have a DVM which can be set to show 100 microvolts resolution (by putting it in the 200.0 mv scale), and the input resistance is 10 meg Ohms. Current measurement resolution is 10 uV/10Meg = 10 pA. I have used this technique to verify the collector leakage current for small signal bipolar transistors.
 

danadak

Joined Mar 10, 2018
4,057
Pull the 2N2222A, short its base to emitter, place ammeter EB to ground, collector
to Vcc, and measure leakage. Maybe part is damaged.

If you get uA some LEDs will start to glow at those levels.

Regards, Dana.
 

ebp

Joined Feb 8, 2018
2,332
Inability of amp to swing fully to negative rail should not be an issue, nor should "output offset", however the input offset voltage might be enough to cause some current, depending on the sense resistor. However, if this were the problem it would also show up with a FET.

BJT leakage current will be minuscule at room temperature unless the transistor has been damaged. BJT collector-emitter leakage was an issue with germanium transistors. It isn't anymore. The spec for a 2222A is 10 nanoamps max at 60 V at room temp.

Noise at the input to the amp might be a problem. The capacitance of a FET might tend to eat narrow spikes. Typically a FET should have a resistor between amp & gate to isolate gate capacitance, and a small cap output to inverting input to compensate, but that amp tolerates pretty high capacitive load. [EDIT] I was assuming a small FET like an 2N700x. A power MOSFET will have a lot of gate capacitance.
Does everything have proper power supply decoupling? If you do the amp input grounding test, be sure to ground it locally, not at the other end of some long connecting wire.
 
Last edited:

OBW0549

Joined Mar 2, 2015
3,566
My first guess for the culprit here would be the DAC output not going all the way down to GND; even if it bottoms out at only a few millivolts, that could well cause enough LED current to make it glow dimly.
 

Thread Starter

Gibson486

Joined Jul 20, 2012
360
thanks all. I got a little side tracked, so i will try some more stuff tomorrow.

I tried grounding the BJT input and made the led turn off. I will try the op amp tomorrow.
 

OBW0549

Joined Mar 2, 2015
3,566
I tried grounding the BJT input and made the led turn off. I will try the op amp tomorrow.
Good, so it isn't the transistor. I suggest disconnecting the DAC output from the op amp input, and grounding the op amp input; if the LED stays off, it's the DAC.
 

Thread Starter

Gibson486

Joined Jul 20, 2012
360
Looks like a combination of the DAC and op amp. Even though the op amp is rail to rail, it still cannot do true zero (completely forgot about that). I am guessing that this means the output will always have current out no matter what (the smallest amount of current can still be amplified). Also, the DAC outputs a 900uV to 1mV at 0 counts.

I also shorted the DAC output to ground. That made the LED shut off. So if anything, the DAC output was a bigger/major contributor.

I did a final test and I made the op amp a buffer. The input was at 1mV, but the output was at 1.6mV. So, there is the offset as well, but the op amp alone was probably not enough to do it.

So, if I had to theorize, I would guess that the 1.6mV output was enough to make the be junction conduct something. With the mosfet, the 1.6mV on the gate was not enough to get the mosfet to conduct. ...or at least not noticeably?

I guess the solution is that I can figure out how to take care of that excess voltage at 0 counts, or I could just call it a day and use the mosfet.

Thanks a bunch guys!


edit: Also found this in the datasheet...
 

Attachments

Last edited:
Top