Constant current source with transistor and op amp

Discussion in 'General Electronics Chat' started by nikomas, Apr 22, 2010.

  1. nikomas

    nikomas Thread Starter New Member

    Joined:
    Mar 31, 2010
    Messages:
    11
  2. Markd77

    Markd77 Senior Member

    Joined:
    Sep 7, 2009
    Messages:
    2,796
    Location:
    Birmingham
    The op amp is comparing the voltage across the resistor R to the voltage reference and keeping them the same by making the transistor conduct more or less.
    The voltage across R is proportional to the current.
    The unlabelled resistor is the load and it's resistance can be varied without the current through it changing.
  3. t_n_k

    t_n_k AAC Fanatic!

    Joined:
    Mar 6, 2009
    Messages:
    5,023
    Firstly - there is a small error in the schematic. The feedback from the transistor emitter should go to the OP-AMP negative terminal and the reference input should go to the positive input terminal.

    Does that correction provide any further help in understanding the circuit operation?
  4. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,077
    Location:
    In the vast midwest of the USA; CST
    An LM317 might be easier if they require current in a range of 10mA to 1.5A.

    However, if they need less than 10mA, they will either need to go to an LM317L which is rated for as low as 5mA, or use two regulators; one sourcing >= 10mA, and the other sinking >= 10mA. The current difference between the two can then be as low as zero.
  5. nikomas

    nikomas Thread Starter New Member

    Joined:
    Mar 31, 2010
    Messages:
    11
    can you explain with more details? why is constant current Ie=Vref/R? and why feedback from the transistor emitter should go to the OP-AMP negative terminal?
  6. bitrex

    bitrex Member

    Joined:
    Dec 13, 2009
    Messages:
    79
    An op-amp always "fights" to keep its inputs at approximately the same voltage, when connected as a negative feedback amplifier - that is with the output connected in some fashion to the inverting or "-" input. Consider the equation for a differential amplifier, which an op-amp is:

     V_o = A(V_+ - V_-)

    Where V_o is the output voltage, A is the op amp open loop gain, V_+ is the noninverting input voltage, and V_- is the inverting voltage.

    If you connect V_o directly to V_-, that is  V_o = V_- , you get the following equations:

     V_- = A(V_+ - V_-)

     V_-(1 + A) = A*V_+

      V_- = \frac{V_+}{\frac{1}{A} +1}

    Most op-amps have extremely high open loop gain A at low frequencies...maybe 1 million. So the 1/A term becomes very close to 0, and you get approximately

     V_- = V_+ .

    In the constant current source circuit, since the two input voltages to the op amp are trying to be equal, you can analyze it by assuming this condition is true. You then see that the voltage at I_e, which should be the negative input in the schematic must be the same as the reference voltage, and the op-amp output will supply an output voltage about 0.6 volts lower to make this true: the op amp automatically compensates for the voltage rise across the transistor. The emitter current will then be the voltage drop across the emitter resistor, which is Vref/R, and the collector will be the same times the factor alpha.
    nikomas likes this.
  7. nikomas

    nikomas Thread Starter New Member

    Joined:
    Mar 31, 2010
    Messages:
    11
    thank you for answering.

    I need to have constant current of 35mA through pt100 thin film resistor. That current will heat pt100 and it will have resistance of 135ohms. If i understand good i set that current with choosing resistor R=1.25V/35mA? what input voltage i need? Vin = 35mA*135ohm + 3V (Vdrop)?
    Last edited: Apr 23, 2010
  8. Darren Holdstock

    Darren Holdstock Active Member

    Joined:
    Feb 10, 2009
    Messages:
    262
    Location:
    UK
    It doesn't help in understanding this circuit in that it's all upside-down because of the ground-referenced load and PNP transistor. You'll need to think of Vcc as being your reference point, not ground. Just like in the old days when the only transistors available were germanium PNP devices, and cars had positive earths.

    The voltage across the sense resistor R will be Vref. Simple as that. But here's something I found out the hard way - don't make the sense resistor too large, or the feedback will form a pole with the op-amps parasitic input capacitance, and you'll have gain peaking and/or instability. As a rough rule of thumb, below 100 ohms is good; lower than that is even better. If the sense resistor comes out in the calculations as larger than this then lower the input reference with a lower voltage Vref or a couple of resistors in a potdown arrangement.

    The op-amp inputs appear backwards because the PNP signal inverts the signal to the feedback, so as it's already inverted this has to go to the non-inverting input.
  9. bitrex

    bitrex Member

    Joined:
    Dec 13, 2009
    Messages:
    79
    I'm pretty sure it won't work the way it's set up in the schematic. The PNP isn't inverting anything - if the voltage from the op amp goes up or down the signal will appear in phase at the emitter (like an emitter follower) and appear in phase at the "+" input: positive feedback instead of negative. Imagine changing the transistor from PNP to NPN and swapping ground and the supply - still wouldn't work! :(
  10. Norfindel

    Norfindel Active Member

    Joined:
    Mar 6, 2008
    Messages:
    235
    Location:
    Buenos Aires, Argentina
    mmm... Assuming it's at equilibrium, if Iout rises, more voltage drops in R, so the voltage at the emitter of the transistor (AMP+) lowers, lowering the output of the amplifier, which causes still more current to flow. Yeah, it seems like the amplifier inputs are reversed.

    Correctly done, with negative feedback, the amplifier's inputs are going to be at the same voltage (this is the key to understanding opamp circuits with negative feedback). If AMP+ is at Vcc-Ref, then AMP- is going to be kept at the same level, which is the same that the bottom of R. The voltage drop over R is then going to be = to Vcc - (Vcc - Vref) = Vcc - Vcc + Vref = Vref. If the voltage drop in R is fixed, the current is fixed.
    If for any reason the current raises (for example: transistor heating), the voltage drop in R will be more, AMP- will lower, AMPout will rise, and the transistor is going to conduct less current, regulating it
  11. Ron H

    Ron H E-book Developer

    Joined:
    Apr 14, 2005
    Messages:
    7,050
    Location:
    Idaho, USA (GMT-7)
    It makes more sense to me as drawn. I like my (conventional) current flowing from top to bottom.:)

    Op amp circuits often have resistance looking out of the inverting input on the order of megohms; hundreds of kohms is common. Furthermore, the transistor emitter impedance is re=0.026/Ie ohms, which will dominate the resistance at that node unless the reference voltage is tiny (which will require that the sense resistor value be small relative to re).

    As others have pointed out, this is wrong.
  12. Darren Holdstock

    Darren Holdstock Active Member

    Joined:
    Feb 10, 2009
    Messages:
    262
    Location:
    UK
    Thank-you Ron, I stand corrected. The op-amp inputs are indeed transposed; my apologies to all for the misinformation. I shouldn't try to think when I should be sleeping.

    The gain peaking with the high value sense resistor was a very real phenomenon the last time it bit my butt. I had inherited the same circuit as this (as a VCSEL laser driver) where the original designer was long gone, except that our circuit used an NPN transistor, the input and sense voltages were referred to 0V, and the laser load hung between the collector and the +ve rail. Oh, and feedback to the inverting input... Anyways, I was in the process of cleaning up the signal path to the laser as it was a right mess, and saw an unexplained resistive potdown circuit on the input to the op-amp. In order to maxmise the signal-to-noise ratios I got rid of this and rescaled everything else to compensate, including increasing the value of the sense resistor to a few hundred ohms. Later I realised I had introduced gain peaking with the higher value sense resistor, and had to sheepishly put it all back the way it was.

    I may have to explain this to everyone's greater satisfaction (or eat more humble pie), but not tonight. Sleep now.
  13. Norfindel

    Norfindel Active Member

    Joined:
    Mar 6, 2008
    Messages:
    235
    Location:
    Buenos Aires, Argentina
    That's correct. However, if you expect 35mA to flow under worst case conditions, you must use pt100's resistance at that conditions to calculate the minimum voltage you're going to need.
Similar Threads
Forum Title Date
General Electronics Chat Help please - constant current load Jul 10, 2014
General Electronics Chat Strobing a high power LED with a constant current power supply? Jul 10, 2014
General Electronics Chat Low constant current source Jun 2, 2014
General Electronics Chat ripple on constant current load May 29, 2013
General Electronics Chat MOSFET Constant Current Selection May 5, 2013

Share This Page