Current source schematic

Discussion in 'The Projects Forum' started by bart_dood, Jul 15, 2010.

  1. bart_dood

    Thread Starter New Member

    Jul 14, 2010
    22
    0
    Hi Folks, I am new to the forum and am hoping someone can help me with a small project I am doing.
    I've been working on this for a while but had some frustration getting it working, it would seem like a very simple circuit..

    Basically I am looking for a constant current source, I want to run a constant 200mW power through a 120 ohm resistor, my supply voltage is 13-14 volts.
    At this point my latest design consists of one op-amp feeding a P channel mosfet or a PNP transistor which supplies the 120ohm resistor which is in series with another small resistor (about 20 ohms acting as a potential divider). The fet/pnp is fed at its gate/base from the output from the op-amp, the op-amp positive input goes to an adjustable voltage reference, the inverting input goes to the junction of the 20/120 ohm resistors. I added some capacitors to prevent oscillation which I know is a problem in these circuits.

    I based this around some info I found during google searches.

    I can't get the thing to work....at all...I've attached an image from wikipedia of a similar layout, except I have removed the resistor on the left and the zener diode and replaced it with an adjustable voltage source.

    Thanks for all the help, this has been driving me nuts for two weeks now...
     
  2. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    The load would normaly be on the collector side of the transistor...
     
  3. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    It would be better if you can post the exact schematic.

    The big red flag here is that your real circuit is using PNP, while the posted schematic is using NPN. The first thing that comes to my mind is to check to see if you have accidentally created positive feedback. You need negative feedback for this circuit to work. However, without the correct schematic, we can't be sure.

    Even if you have the correct polarity on the feedback, you can still get instability (i.e. high frequency positive feedback), but again without the exact schematic showing the OPAMP type and exact components, there is no way for us to tell. For example, do you have filter caps on the power supply?
     
  4. bart_dood

    Thread Starter New Member

    Jul 14, 2010
    22
    0
    Yeah I think I got the collector and emitter back to front. I will try it the right way around. Here is the schematic I want, this one is a NPN transistor fed by the op-amp.
    Should this work?
     
    Last edited: Jul 15, 2010
  5. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    [​IMG]
    Not totally stable, but definitely a constant current source.

    [​IMG]
    Requires at least 10 ma to work well, but very simple.
     
  6. bart_dood

    Thread Starter New Member

    Jul 14, 2010
    22
    0
    Thanks Bill, I am looking for a stable circuit and I'm guessing that using an op-amp will give it less thermal drift and improve stability?
     
  7. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    If it meets your requirements the LM317 has the edge. If you want a source don't you want it from the output of the source to ground?

    Another item, a plain op amp inverter amp has a constant current between output and the inverting input, R2 in the case shown below.

    In this circuit, using dual power supplies, adjusting the voltage in on the input will vary the current through R2. It will be as stable as the input voltage. The design would have to be modified a little for a single power supply, but not by much.

    [​IMG]

    I suspect you are after a true source, something that will go from it's output to ground.

    The transistor version is unstable because of heat. If the transistor gets warm the BE voltage drop changes, which will cause a minor shift in current. It is not unstable in and of itself.

    I also think an instrumentation amp would make a dandy current source, but since instrumentation amps tend to be a bit more expensive it could also be overkill.

    If you let us know your application (or at least the minimum and maximum, and max voltage out) we would have more to work with.

    Current sinks are even easier to design, and the approach you have is pretty close to one. A source is on the power side of the power supply, a sink is on the ground side.

    Where is Norcal?
     
    Last edited: Jul 16, 2010
  8. bart_dood

    Thread Starter New Member

    Jul 14, 2010
    22
    0
    Hi Bill, norcal is northern california.

    I am trying to run a constant current of around 200mW through an RTD which will heat it up, I'll use it to detect flow of air from a fan. As the air passes over it it cools and lowers it's resistance, with the constant current supply the voltage to it should drop giving me a signal change.

    My RTD resistance is about 120 ohms when heated, my Vcc is 12-14 volts (single). I thought I found a good circuit today to make it work (see attached image). I used an LM358 and a TIP42G (PNP) from radioshack and a Rsense resistor of 30 ohms, my Vin was about 1.5 volts, I couldn't seem to get it working at all, I just don't see why I can't get any of these current source circuits to work.. :(

    Is there something missing from this schematic that would stop it working?

    Here is the link:

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

    Moderator

    Mar 24, 2008
    20,764
    2,534
    I just looked at your schematic again.

    [​IMG]

    Where are your voltages coming from? This schematic is basically incomplete.

    This circuit on the other hand...

    [​IMG]

    has the same problem my transistor version has, the Base Emitter is part of the feed back circuit.

    Going back to my inverting amp...

    [​IMG]

    If the RTD were either R1 or R2 the output voltage of the op amp would reflect a change.

    Personally I'd go with the LM317. It can easily program with 200ma as a constant current, put the RTD on the output and the voltage across it will tell the tale. The LM317 will drop around 2V you will have to allow for.

    [​IMG]
     
    Last edited: Jul 16, 2010
  10. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469

    For starters, there is no power pins shown on your OPAMP. Some people leave these out, but power is always implied. Assuming you have power, we don't see any power supply filter caps. Again, you may have them, but we can't be sure because you haven't provided a complete schematic.

    Please provide a complete schematic to the actual circuit you have built. If you can provide any voltmeter and O-scope measurements, that helps too.
     
  11. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    This circuit can also benefit from a small capacitor placed across the OPAMP output and negative terminal. It also helps to place a small resistor in series with the base terminal of the transistor. For example a 10 ohm resistor and a 100 pF capacitor may do the trick, but the capacitor value may need to be tweaked. The capacitor acts as a compensator and can stabilize the circuit if you have instability.
     
  12. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    Just as a side note, you mention a constant power through the RTD. If its resistance is changing and the current is constant then its power will change.
    I'm not saying that I know how to get a constant power through it or that you can't measure temperature by putting a constant current through it, just that you will have to make some adjustments to your calculations.
     
  13. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    I suspect 200ma is way high. There will be a significant wattage generated, and since wattage is heat, there go your measurements.
     
  14. bart_dood

    Thread Starter New Member

    Jul 14, 2010
    22
    0
    I've tidied up this schematic to show what I did last night that didn't seem to work.
    If I vary Vcc the voltage across the 120 ohm Rload is changing, it should stay the same if the current is staying constant?

    I thought I might have fried my op-amp so I switched it out but it still did the same thing..
     
  15. bart_dood

    Thread Starter New Member

    Jul 14, 2010
    22
    0

    Well I tried testing what I want manually, I ran and RTD in series with a 10 ohm resistor and put in 200mW, I then measured the voltage at the junction between the resistor and RTD (which should go in the inverting input of the op-amp in these feedback circuits), I then applied airflow across the RTD.
    This caused it to cool and lower its resistance, because the resistance was lower the voltage drop across it lowers too, this means less power flows through it, I then manually I could bring it back by increasing Vcc on the power supply.
    The increase in voltage is my actual signal out.

    It does work manually, I am just struggling to get it in a feedback circuit where the voltage drop (IE current) across the RTD is maintained at some automatic preset level.
     
  16. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    OK, the LM358 is a dual op amp, you need to disable the second op amp in such a way as to prevent oscillation. Something like this perhaps.

    [​IMG]

    Vdd can be ground for a single power supplied op amp. Open inputs can cause erratic behavior, so it needs to be eliminated.

    If the circuit is working the inputs to the working op amp should be the same voltage. Otherwise, the output will be fully plus or minus depending on the most positive input. If the + input is more positive than the - input then the output will be positive, if the - input is more positive than the + then the output will be negative.
     
  17. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    Well, the big mistake is that you are using a PNP transistor, but the schematic symbol (as well as the schematic itself) is for an NPN transistor. You either need to use an NPN transistor, or change the schematic to be correct for a PNP transistor.

    Other, improvements are as follows:

    1. Filter capacitors should be placed on the power supply and the voltage reference.

    2. A battery is not the best voltage reference to use, although it should work.

    3. A compensating capacitor should be placed across the negative terminal and the output terminal of the OPAMP. This will prevent oscillations.
     
    Last edited: Jul 17, 2010
  18. bart_dood

    Thread Starter New Member

    Jul 14, 2010
    22
    0
    I thought an NPN transisitor required current to flow into the base? using an op-amp as a control means current can't flow back in to the output?
     
  19. bart_dood

    Thread Starter New Member

    Jul 14, 2010
    22
    0
    Success!! I got it working!!

    I switched out the PNP for an NPN and then added some 0.1uF caps, put a 220uF on the Vcc to ground too.
    Now when I increase Vcc the voltage drop and current (I checked it both ways) goes up to a certain point and then stays there, this corresponds to the voltage on the + input on the op-amp which goes up until it matches the voltage on the inverting input and then stays the same.
    Thanks for all the help again guys, I can move on with my project now, I'm sure I'll be back with more questions!!

    :)
     
  20. bart_dood

    Thread Starter New Member

    Jul 14, 2010
    22
    0
    Hi folks, I figured I would run into some problems and I have. It seems that the circuit I got working was close to what I needed but not exactly right.
    I've attached a circuit of what I think will do what I need, its basically a bridge with an RTD (shown in orange) which has a resistance of 100ohms at zero centigrade, when heated its around 120 ohms.

    The op-amp takes the difference between the two sides of the bridge and controls an NPN transistor which controls the bridge current.

    Basically when the circuit is switched on the current rises due to the bridge imbalance, the current heats up the RTD and raises its resistance until the bridge is balanced out.
    When air blows on the RTD it requires more current to keep the bridge balanced.
    I need to add some method of converting the applied current which varies into a voltage signal which I can measure.

    Does this look right? I have some question marks on there for things I'm not sure about.

    Thanks again
     
Loading...