While bench testing this circuit I think I have discovered that op-amps hate capacitive loads. I am experiencing an unwanted oscillation.
Yes - you'll probably have to find a high current op-amp. Ideally you need to analyse how the phase-shifts associated with the transistor affect the stability, but thats complex stuff... You can add a little high-frequency feedback directly from the opamp output to its inverting input (small capacitor) to get the loop stable (this impacts the bandwidth at which the load follows the DAC input though)
Some op-amps are better than others at tolerating capacitive loads. I've had good luck with an Analog Devices OP113 driving a cable, which has similar requirements to driving a MOSFET.
Just realized you have a positive feedback loop from U1B/R7. Move R7 from U1A+ to U1A-.
An Op-amp tries to balance the input. So, as you increase the + input, the output goes up turning Q1 on further. More current flows, more voltage across R3, more voltage out of U1B. Feed that into U1A-, and it'll balance out.
How significantly does the load resistance change with temperature?
You can also calm down unwanted oscillations in a circuit like this by making sure the op-amp circuit doesn't respond too much faster than the Fet + load + load wiring combination. (stray inductance in the load wiring is a real pain for circuits like this) The simplest way to slow this op-amp circuit is to add a Capacitor in place of (or parallel with) R4 . (in the dual op-amp circuit from post #5) Try several values of capacitor, the capacitor size will control the balance between speed and oscillation damping.
Somehow you have managed to attract some of the very sharpest minds in the forum to your thread and you are definitely in good hands. You seem to be very knowledgable and intelligent, so I am sure that you really don't need any luck, but since you asked for it, I wish you the best of luck. Additionally welcome to the forum.
Could leaving some of the pins on the LM258 be causing this oscillation? I am using one half of the IC and left the remaining pins floating.
Nowhere near the group of sharpest minds on the Forum, but I do know that leaving opamp inputs floating is asking for trouble (oscillations, output railing, general yuckiness).
Tie the (-) input to the output, and ground the (+) input to avoid the above.
Apparently I became one of "them". I only read about these nightmares.
So I made a few PCBs to test the design and it works, well some do and some dont!. In fact only one of my boards is/are {{cant remember if its IS or ARE}} working. In fact Its working better than I even imagined. The others I cant speak about because I get sick. The don't work well.
This is where it gets strange. The board that works has a definitive oscillations and its something I did not intend on having designed in to the system. The other boards have no oscillation and as mentioned before they are not preforming at all the way I expected them to. I can say that the preform well just not good enough.
The oscillation is, in my opinion, rooted in the feedback circuit and its not consistent in that it will oscillate for a few seconds then subside for a few more only to return again.
Any ideas on how I can troubleshoot this discrepancy?
Here is what I am thinking. My current mosfet data sheet shows that the Drain to Source voltage with respect to Drain to Source current. I noticed that its, for a lack of better words, is sloppy.
Keep in mind I am not operating this device beyond 10 amps and the Drain to source voltage will never be greater than 12V. That said could I get better resolution using a mosfet with less current to gate voltage ratio? I feel that my circuit is pulsing because I am operating the mosfet in no mans land for a short time then operating the mosfet in a know region for a short time.
Resistor Rz has no effect on the gain of the circuit. However, to balance out variations caused by the small input current to the amplifier, Rz should be made equal to the parallel combination of Rf and Rin.
Since I left out the input resistor Rz could this contribute to my oscillation in preceding amplification circuits? Where can I find more information on Rz issues? Attachment not found.
Bits, those curves are marginally relevant to operation in the linear mode. The main thing they tell you is that either of those transistors can supply the maximum current required, within the Vgs range that the op-amp can supply. It also tells you how much overhead the transistor is going to require. Take that 10 amp figure. The first transistor has a minimum internal resistance of 0.1Ω (the slope of the line, V/I). So when 10 amps passes through it, there will be 1 volt left across the transistor. You can read that right off the graph: 10 amps, 1 volt. That level of current can be achieved with a gate-source voltage of 4.5V, well within what the op-amp/comparator can supply.
If the load is a 1Ω heater, you have to have a power supply of at least 11V to allow for the 1V across the mosfet + 10V across the load. Theoretically, with 10A flowing, there will be 10V across the heater, 1V across the transistor, and the transistor will be burning 10W and the heater 100W. Better a 12V supply though. Those mosfet curves are typical, not best case or worst case. With a 12V supply, the transistor will have to burn more power. With 10A flowing, the transistor has to drop 2V instead of 1V and that means 20 watts for the transistor and 100W for the heater.
With the second transistor, under the same conditions, its internal resistance is closer to 0.01Ω, so you could possibly get by with less power supply overhead, but overall that won't make much difference at all, because you will be operating it in the linear mode, not full on. Those curves do not tell you anything about that.
You might also see a curve like the following:
This shows you the range of gate-source voltages that the op-amp would have to supply as Vgs to the mosfet gate in order to control the current through the power loop. This is an IRF520, which has a much higher threshold than the two transistors in your graphs, but the idea is the same. The local slope of the line is called the transconductance gain (in units of mhos, amps/volts). This graph shows a transconductance gain in the mid-range of about 8A/2V = 4 amps per volt. That gain might be part of the stability equation. I'm not clear on what circuit you are working with now. There were problems with the one in post#5.
Thanks for the reply Tracy. Ill trash that notion that I have poorly selected a mosfet and move on to the design.
Please let me know if I had made a mistake.
I basically have 4 blocks that deal with controlling the load.
Cir A. Takes the 20 bit DAC output (range of 0 - 5 volts) and multiples it by a factor of 2. Possible issue is that there is no input resistor on pin 3.
Cir B. This is the feedback / voltage offset amp circuit. Takes the overall power (5volts) and subtracts it from the load. As far as I can understand it this circuit will drive the output until the inputs are matched.
Cir C. Takes Cir A and Cir B and combines them together to drive the Gate of the mosfet.
Cir D. Mosfet used as common source configuration. R10 creates a voltage divider with respect to R9 however the large difference of resistance between the two makes looking at this circuit as simple as R10 a pull down resistor. This keeps the gate from floating. My problem area I believe resides in Cir B. Somehow there is an oscillation on pin 6.
The listed LM258 op amp has a 45nA input bias current. When this current flows through the parallel 15K resistors of circuit A it will create about a 0.3mV offset. That's far less than the specified 2mV input offset voltage, so it's safe to ignore.
My problem area I believe resides in Cir B. Somehow there is an oscillation on pin 6.
As pin 6 of the LM258 is an input, oscillation at that pin comes from somewhere else. I.e. look at the other side of R4. BTW, op-amps only hold the inputs at equal voltages if they are in a stable circuit with negative feedback. If the op-amp circuit is unstable, op-amps react identically to comparators.
To stabilize the circuit I'd remove R9 (or replace it with 10-100 ohms) and put a 1uF capacitor in parallel with R7. The circuit should now be stable but SLOW with a lot of offset error. Next I'd remove R7 to eliminate the offset error and try successively smaller capacitors till the circuit oscillates again. Finally I'd operate with the smallest capacitor that stabilized the circuit in testing.
As pin 6 of the LM258 is an input, oscillation at that pin comes from somewhere else. I.e. look at the other side of R4. BTW, op-amps only hold the inputs at equal voltages if they are in a stable circuit with negative feedback. If the op-amp circuit is unstable, op-amps react identically to comparators.
Lawson
I was leaning towards the feedback into pin 6 as the oscillation. Since the feedback stems from the mosfet its as if it creates a loop where one feeds the other.
To stabilize the circuit I'd remove R9 (or replace it with 10-100 ohms) and put a 1uF capacitor in parallel with R7. The circuit should now be stable but SLOW with a lot of offset error. Next I'd remove R7 to eliminate the offset error and try successively smaller capacitors till the circuit oscillates again. Finally I'd operate with the smallest capacitor that stabilized the circuit in testing.
Lawson
I will give this a try.
Thanks for the help everyone so far I have learned an overwhelming amount of "stuff" I feel gluttony-ish.
First off, is it really the voltage across the heater that needs to be controlled, not the temperature or something like that?
As for the circuits, your math for A and B is fine, but C is not quite right, and D needs more consideration to close the loop. For circuit C, the equation for the mosfet gate-to-source voltage should be
Vgs = (DAC * 2) * (R7 / R8 + 1) - Vref * R7 / R8
The main difference is that there is an inverting gain factor for Vref. It is possible to work that out from basic principles, but when you become practiced at looking at op-amp circuits, it is just something you come up with "by inspection". With the specific resistor values you chose, that simplifies to,
Vgs = (DAC * 2) * 6 - Vref * 5.
(I used 50k for R7 instead of 47k, just to make neat numbers) The (DAC * 2) gain factor comes from your circuit number "A". That does not really tell you how to find Vgs, because it is part of a larger feedback loop, closed in circuit D. What you call Vref is equal to the voltage across the heater, which is IL * RL. So you can plug that in to find,
Vgs = (DAC * 2) * 6 - IL * RL * 5.
So what does that tell you? Still not much. One equation in at least two unknowns. Okay. You know you want a certain stable relation between input and output, but how do you get rid of Vgs?
Enter here the transconductance gain curve for the IRL530 from a data sheet, plotted on linear coordinates. (Sometimes it is done on semilog, so that you can discern more detail as Vgs decreases.) The trick is to plot the above equation on the same graph. Where the two lines intersect (assuming that they do so) is called the operating point. A little algebra can solve the above equation for IL versus Vgs. Here it is (if I got it right), with the further assumption that RL = 1Ω.
IL = (DAC * 12 - Vgs) / 5.
The dark blue line on the graph is with DAC = 1 V, and the light blue line is with DAC = 2.5 V.
One thing to notice is that if and when the transfer characteristics of the mosfet shift or drift a little left or right, the operating point also moves a little up or down. Bummer. Mosfet transfer characteristics vary not only from one to the next of the same part #, but also, as you know, with temperature. So the circuit is left with the dependence you have been trying to avoid.
Something funny happens when you get rid of resistor R7. The math becomes simpler, and the curve becomes like the horizontal red line, and mosfet transfer characteristic become pretty much irrelevant.
The math is,
Vgs = ((DAC * 2) - IL * RL) * Aol
where Aol is the open loop gain of the op-amp (now acting as a comparator), usually a number around 100_000. Rearranging, and again assuming RL = 1Ω
IL = (DAC * 2) / 1Ω - (Vgs / (Aol * 1Ω))
= (DAC * 2) / 1Ω
I dropped the term that has the huge number in the denominator. Viol
Okay sleeves are rolled up, time to dig in my high heels and debate a bit (friendly of course) ...
So quite a few people have mentioned or, at least as I interpret it to be, that I am trying to vary the voltage. This circuit cant do that and I dont want to vary the voltage. I want to vary the current.
Please follow my logic.
I declare that the voltage on the load is constant. Take a look at my post #47 and in particular Cir D.
The voltage before the load is 5V and that can not change no matter what the mosfet resistance becomes or what the load resistance is for that matter. It will still maintain 5 volts.
The main difference is that there is an inverting gain factor for Vref. It is possible to work that out from basic principles, but when you become practiced at looking at op-amp circuits, it is just something you come up with "by inspection".
Is it that obvious? Thanks for correcting me. Its a bit difficult for me to see this in my head but I am starting to see through the fog. Please dont take that the wrong way I am thankful for your help and the help of everyone else.
So quite a few people have mentioned or, at least as I interpret it to be, that I am trying to vary the voltage. This circuit can’t do that and I don’t want to vary the voltage. I want to vary the current.
Please follow my logic.
I declare that the voltage on the load is constant. Take a look at my post #47 and in particular Cir D.
The voltage before the load is 5V and that can not change no matter what the mosfet “resistance” becomes or what the load resistance is for that matter. It will still maintain 5 volts.
It seems you are equating what we are asking about voltage with the power supply voltage. No. It is nice that the power supply is so stiff and stable, but that is irrelevant so long as the it is adequate. We were talking about the voltage across the load.. Across means the voltage you would measure between the power terminal and the node you have called "feedback". The voltage across the resistor/heater/load. The mosfet absorbs the rest of the voltage and power, and the sum across the whole circuit is the total power supply voltage.
So, you really do want to regulate via the DAC current through the load, not the voltage across the load, nor the power dissipated by the load, nor the temperature of the load? We are just asking. There may be good reasons for doing any of those things.
If it is current through, you will definitely need a way to sample that current and use it for feedback. Like it or not (why do you say not?), the circuit that Circuitsoft posted just above is a superbly sweet option!
but when you become practiced at looking at op-amp circuits, it is just something you come up with "by inspection".
Is it that obvious? Thanks for correcting me. Its a bit difficult for me to see this in my head but I am starting to see through the fog. Please dont take that the wrong way I am thankful for your help and the help of everyone else.
No, it is not obvious. I salute you for searching your way through the fog! If you want, I could show how it is derived, or you can find it in many books. After you've been through it a few times, you will begin to see the patterns. I didn't want to get into those details, because I wanted to get into rest of the loop.
In Horowitz and Hill, Art of Electronics, they end many chapters with a collection of bad circuits, things that might look good on the surface but have a serious flaw. It is a good exercise to work through circuits even if they don't work as expected. By the way, if you don't have a copy of that book, put it on your list.
Horowitz and Hill, Art of Electronics, ... By the way, if you don't have a copy of that book, put it on your list.
Definitely second that.
For my circuit, you can use a smaller resistor between the source of the MOSFET and ground, and just adjust the input voltage divider to match.
Basically, pick a resistor for the current sense. I chose .03 ohms because it made math easy, but smaller, such as .01 ohms, would make more sense. Once you know what the voltage across that resistor will be at full scale (current * R = voltage), then you want full scale input (5) equal to that voltage times ((r2+r1)/r1) for the divider.
r1 = input resistor, currently 4.7K
r2 = input shunt, currently 300
r3 = source resistor, currently 30m
vin = maximum input voltage from DAC (I'm assuming 5)
Iout = maximum output current to heater (I'm assuming 10)
I need one more detail explained to me if someone can.
Circitsoft suggested in post #51 a circuit for me to try. It works great but there are some personal nagging concerns I have. I now know that the feedback resistor cant be to low or the performance degrades below my needs. Initially I implemented a resistor of .01 Ohms just to keep the power dissipation low on this part of the circuit board. Nevertheless I am not sure what to call this; too low of a feedback resistor problem but, it must be some type of spec on the op-amp I am reaching. Perhaps when a feedback resistor is too low the op-amp will in turn not notice it as much and thus the output will reflect this. Is it gain? I found that if I use any feedback resistor below .03 Ohms the circuit wont operate the way I need it to. Not a big deal because a .05 Ohm resistor is perfect. Perhaps an analog guru could explain why this is.
Then my other question is why wont the output of the op-amp go below the gate turn on voltage? When the + op-amp input is 0 V the op-amp output is always right at the gate turn on voltage. Is this just simply the way feedback is designed to do and if not what is this process called?
Thank you Circuitsoft for helping me on this as well.
"I found that if I use any feedback resistor below .03 Ohms the circuit wont operate the way I need it to. "
Can you say a bit more about what happened? Did you also make the changes at the input voltage divider that circuitsoft suggested?
"why wont the output of the op-amp go below the gate turn on voltage?"
That may be because the op amp is still maintaining a small current through the load. Did you measure the voltage across the load, when the input voltage is zero? You'd expect zero there too, right?
Op-amps however have what is called an input offset voltage, and that acts like a small signal that is always present, and it adds to your input signal. You can always find it in the data sheet for an op-amp. Here it is for the LM258. (Is that still the op-amp you are using?)
What that means is that there is typically an effective 2 millivolt input signal even when your input from outside is ostensibly at zero. That would make the circuit try to sink a current of 2mV/0.03Ω = 67 mA through the heater. The op-amp holds the mosfet gate near threshold to make that happen.
If you apply a few millivolts NEGATIVE at your input, the op-amp will try its best to generate a negative current through the heater, however, the best it can do is shut the mosfet off completely, and to do so it will drive the gate all the way down to ground potential.
"I found that if I use any feedback resistor below .03 Ohms the circuit wont operate the way I need it to. "
Can you say a bit more about what happened? Did you also make the changes at the input voltage divider that circuitsoft suggested?
It basically wont control the heater as well. It begins to oscillate. Now I did change the capacitor on the gate but this approach did not affect the oscillations.
Comments
Yes - you'll probably have to find a high current op-amp. Ideally you need to analyse how the phase-shifts associated with the transistor affect the stability, but thats complex stuff... You can add a little high-frequency feedback directly from the opamp output to its inverting input (small capacitor) to get the loop stable (this impacts the bandwidth at which the load follows the DAC input though)
-Phil
An Op-amp tries to balance the input. So, as you increase the + input, the output goes up turning Q1 on further. More current flows, more voltage across R3, more voltage out of U1B. Feed that into U1A-, and it'll balance out.
How significantly does the load resistance change with temperature?
Lawson
Ill read, research, and try what you guys are suggesting, wish me luck today.
Somehow you have managed to attract some of the very sharpest minds in the forum to your thread and you are definitely in good hands. You seem to be very knowledgable and intelligent, so I am sure that you really don't need any luck, but since you asked for it, I wish you the best of luck. Additionally welcome to the forum.
Is that Liberty Lake, IL? Near Wauconda?
Bruce
Nowhere near the group of sharpest minds on the Forum, but I do know that leaving opamp inputs floating is asking for trouble (oscillations, output railing, general yuckiness).
Tie the (-) input to the output, and ground the (+) input to avoid the above.
So I made a few PCBs to test the design and it works, well some do and some dont!. In fact only one of my boards is/are {{cant remember if its IS or ARE}} working. In fact Its working better than I even imagined. The others I cant speak about because I get sick. The don't work well.
This is where it gets strange. The board that works has a definitive oscillations and its something I did not intend on having designed in to the system. The other boards have no oscillation and as mentioned before they are not preforming at all the way I expected them to. I can say that the preform well just not good enough.
The oscillation is, in my opinion, rooted in the feedback circuit and its not consistent in that it will oscillate for a few seconds then subside for a few more only to return again.
Any ideas on how I can troubleshoot this discrepancy?
Here is what I am thinking. My current mosfet data sheet shows that the Drain to Source voltage with respect to Drain to Source current. I noticed that its, for a lack of better words, is sloppy.
Keep in mind I am not operating this device beyond 10 amps and the Drain to source voltage will never be greater than 12V. That said could I get better resolution using a mosfet with less current to gate voltage ratio? I feel that my circuit is pulsing because I am operating the mosfet in no mans land for a short time then operating the mosfet in a know region for a short time.
Current mosfet selected plot. notice the slope.
Attachment not found.
Deciding if this will preform better, the slope is greater.
Attachment not found.
It seems to me that the lesser one will allow me to control the current better. Am I headed in the right direction?
-Phil
I read here the following:
Since I left out the input resistor Rz could this contribute to my oscillation in preceding amplification circuits? Where can I find more information on Rz issues?
Attachment not found.
If the load is a 1Ω heater, you have to have a power supply of at least 11V to allow for the 1V across the mosfet + 10V across the load. Theoretically, with 10A flowing, there will be 10V across the heater, 1V across the transistor, and the transistor will be burning 10W and the heater 100W. Better a 12V supply though. Those mosfet curves are typical, not best case or worst case. With a 12V supply, the transistor will have to burn more power. With 10A flowing, the transistor has to drop 2V instead of 1V and that means 20 watts for the transistor and 100W for the heater.
With the second transistor, under the same conditions, its internal resistance is closer to 0.01Ω, so you could possibly get by with less power supply overhead, but overall that won't make much difference at all, because you will be operating it in the linear mode, not full on. Those curves do not tell you anything about that.
You might also see a curve like the following:
This shows you the range of gate-source voltages that the op-amp would have to supply as Vgs to the mosfet gate in order to control the current through the power loop. This is an IRF520, which has a much higher threshold than the two transistors in your graphs, but the idea is the same. The local slope of the line is called the transconductance gain (in units of mhos, amps/volts). This graph shows a transconductance gain in the mid-range of about 8A/2V = 4 amps per volt. That gain might be part of the stability equation. I'm not clear on what circuit you are working with now. There were problems with the one in post#5.
Please let me know if I had made a mistake.
I basically have 4 blocks that deal with controlling the load.
Cir A. Takes the 20 bit DAC output (range of 0 - 5 volts) and multiples it by a factor of 2. Possible issue is that there is no input resistor on pin 3.
Cir B. This is the feedback / voltage offset amp circuit. Takes the overall power (5volts) and subtracts it from the load. As far as I can understand it this circuit will drive the output until the inputs are matched.
Cir C. Takes Cir A and Cir B and combines them together to drive the Gate of the mosfet.
Cir D. Mosfet used as common source configuration. R10 creates a voltage divider with respect to R9 however the large difference of resistance between the two makes looking at this circuit as simple as R10 a pull down resistor. This keeps the gate from floating. My problem area I believe resides in Cir B. Somehow there is an oscillation on pin 6.
Are my equations correct?
Attachment not found.
As pin 6 of the LM258 is an input, oscillation at that pin comes from somewhere else. I.e. look at the other side of R4. BTW, op-amps only hold the inputs at equal voltages if they are in a stable circuit with negative feedback. If the op-amp circuit is unstable, op-amps react identically to comparators.
To stabilize the circuit I'd remove R9 (or replace it with 10-100 ohms) and put a 1uF capacitor in parallel with R7. The circuit should now be stable but SLOW with a lot of offset error. Next I'd remove R7 to eliminate the offset error and try successively smaller capacitors till the circuit oscillates again. Finally I'd operate with the smallest capacitor that stabilized the circuit in testing.
Lawson
I was leaning towards the feedback into pin 6 as the oscillation. Since the feedback stems from the mosfet its as if it creates a loop where one feeds the other.
I will give this a try.
Thanks for the help everyone so far I have learned an overwhelming amount of "stuff" I feel gluttony-ish.
As for the circuits, your math for A and B is fine, but C is not quite right, and D needs more consideration to close the loop. For circuit C, the equation for the mosfet gate-to-source voltage should be
Vgs = (DAC * 2) * (R7 / R8 + 1) - Vref * R7 / R8
The main difference is that there is an inverting gain factor for Vref. It is possible to work that out from basic principles, but when you become practiced at looking at op-amp circuits, it is just something you come up with "by inspection". With the specific resistor values you chose, that simplifies to,
Vgs = (DAC * 2) * 6 - Vref * 5.
(I used 50k for R7 instead of 47k, just to make neat numbers) The (DAC * 2) gain factor comes from your circuit number "A". That does not really tell you how to find Vgs, because it is part of a larger feedback loop, closed in circuit D. What you call Vref is equal to the voltage across the heater, which is IL * RL. So you can plug that in to find,
Vgs = (DAC * 2) * 6 - IL * RL * 5.
So what does that tell you? Still not much. One equation in at least two unknowns. Okay. You know you want a certain stable relation between input and output, but how do you get rid of Vgs?
Enter here the transconductance gain curve for the IRL530 from a data sheet, plotted on linear coordinates. (Sometimes it is done on semilog, so that you can discern more detail as Vgs decreases.) The trick is to plot the above equation on the same graph. Where the two lines intersect (assuming that they do so) is called the operating point. A little algebra can solve the above equation for IL versus Vgs. Here it is (if I got it right), with the further assumption that RL = 1Ω.
IL = (DAC * 12 - Vgs) / 5.
The dark blue line on the graph is with DAC = 1 V, and the light blue line is with DAC = 2.5 V.
One thing to notice is that if and when the transfer characteristics of the mosfet shift or drift a little left or right, the operating point also moves a little up or down. Bummer. Mosfet transfer characteristics vary not only from one to the next of the same part #, but also, as you know, with temperature. So the circuit is left with the dependence you have been trying to avoid.
Something funny happens when you get rid of resistor R7. The math becomes simpler, and the curve becomes like the horizontal red line, and mosfet transfer characteristic become pretty much irrelevant.
The math is,
Vgs = ((DAC * 2) - IL * RL) * Aol
where Aol is the open loop gain of the op-amp (now acting as a comparator), usually a number around 100_000. Rearranging, and again assuming RL = 1Ω
IL = (DAC * 2) / 1Ω - (Vgs / (Aol * 1Ω))
= (DAC * 2) / 1Ω
I dropped the term that has the huge number in the denominator. Viol
The question stands, do you really want to regulate heater voltage?
A simpler constant current option may be:
This circuit should be stable, and will give you 10 amps output with 5V input, linearly.
P = I^2 * R
= 10*10 * 0.03 = 3watt
So at least a 5 watt just to be safe.
http://www.mouser.com/Passive-Components/Resistors/Current-Sense-Resistors/_/N-7fjcfZscv7?P=1z0vjvmZ1z0vo1zZ1z0vl80Z1z0vnpi&FS=True&Ns=Pricing|0
So quite a few people have mentioned or, at least as I interpret it to be, that I am trying to vary the voltage. This circuit cant do that and I dont want to vary the voltage. I want to vary the current.
Please follow my logic.
I declare that the voltage on the load is constant. Take a look at my post #47 and in particular Cir D.
The voltage before the load is 5V and that can not change no matter what the mosfet resistance becomes or what the load resistance is for that matter. It will still maintain 5 volts.
So why are people asking me this?
This is a sweet option but I don't like the feedback resistor.
Is it that obvious? Thanks for correcting me. Its a bit difficult for me to see this in my head but I am starting to see through the fog. Please dont take that the wrong way I am thankful for your help and the help of everyone else.
It seems you are equating what we are asking about voltage with the power supply voltage. No. It is nice that the power supply is so stiff and stable, but that is irrelevant so long as the it is adequate. We were talking about the voltage across the load.. Across means the voltage you would measure between the power terminal and the node you have called "feedback". The voltage across the resistor/heater/load. The mosfet absorbs the rest of the voltage and power, and the sum across the whole circuit is the total power supply voltage.
So, you really do want to regulate via the DAC current through the load, not the voltage across the load, nor the power dissipated by the load, nor the temperature of the load? We are just asking. There may be good reasons for doing any of those things.
If it is current through, you will definitely need a way to sample that current and use it for feedback. Like it or not (why do you say not?), the circuit that Circuitsoft posted just above is a superbly sweet option!
No, it is not obvious. I salute you for searching your way through the fog! If you want, I could show how it is derived, or you can find it in many books. After you've been through it a few times, you will begin to see the patterns. I didn't want to get into those details, because I wanted to get into rest of the loop.
In Horowitz and Hill, Art of Electronics, they end many chapters with a collection of bad circuits, things that might look good on the surface but have a serious flaw. It is a good exercise to work through circuits even if they don't work as expected. By the way, if you don't have a copy of that book, put it on your list.
For my circuit, you can use a smaller resistor between the source of the MOSFET and ground, and just adjust the input voltage divider to match.
Basically, pick a resistor for the current sense. I chose .03 ohms because it made math easy, but smaller, such as .01 ohms, would make more sense. Once you know what the voltage across that resistor will be at full scale (current * R = voltage), then you want full scale input (5) equal to that voltage times ((r2+r1)/r1) for the divider.
r1 = input resistor, currently 4.7K
r2 = input shunt, currently 300
r3 = source resistor, currently 30m
vin = maximum input voltage from DAC (I'm assuming 5)
Iout = maximum output current to heater (I'm assuming 10)
vin = ((r1+r2)/r2) * Iout * r3
Power dissipation of r3 = Iout*Iout*r3
Circitsoft suggested in post #51 a circuit for me to try. It works great but there are some personal nagging concerns I have. I now know that the feedback resistor cant be to low or the performance degrades below my needs. Initially I implemented a resistor of .01 Ohms just to keep the power dissipation low on this part of the circuit board. Nevertheless I am not sure what to call this; too low of a feedback resistor problem but, it must be some type of spec on the op-amp I am reaching. Perhaps when a feedback resistor is too low the op-amp will in turn not notice it as much and thus the output will reflect this. Is it gain? I found that if I use any feedback resistor below .03 Ohms the circuit wont operate the way I need it to. Not a big deal because a .05 Ohm resistor is perfect. Perhaps an analog guru could explain why this is.
Then my other question is why wont the output of the op-amp go below the gate turn on voltage? When the + op-amp input is 0 V the op-amp output is always right at the gate turn on voltage. Is this just simply the way feedback is designed to do and if not what is this process called?
Thank you Circuitsoft for helping me on this as well.
"I found that if I use any feedback resistor below .03 Ohms the circuit wont operate the way I need it to. "
Can you say a bit more about what happened? Did you also make the changes at the input voltage divider that circuitsoft suggested?
"why wont the output of the op-amp go below the gate turn on voltage?"
That may be because the op amp is still maintaining a small current through the load. Did you measure the voltage across the load, when the input voltage is zero? You'd expect zero there too, right?
Op-amps however have what is called an input offset voltage, and that acts like a small signal that is always present, and it adds to your input signal. You can always find it in the data sheet for an op-amp. Here it is for the LM258. (Is that still the op-amp you are using?)
What that means is that there is typically an effective 2 millivolt input signal even when your input from outside is ostensibly at zero. That would make the circuit try to sink a current of 2mV/0.03Ω = 67 mA through the heater. The op-amp holds the mosfet gate near threshold to make that happen.
If you apply a few millivolts NEGATIVE at your input, the op-amp will try its best to generate a negative current through the heater, however, the best it can do is shut the mosfet off completely, and to do so it will drive the gate all the way down to ground potential.
It basically wont control the heater as well. It begins to oscillate. Now I did change the capacitor on the gate but this approach did not affect the oscillations.