Shop OBEX P1 Docs P2 Docs Learn Events
Some circuit design questions — Parallax Forums

Some circuit design questions

BitsBits Posts: 414
edited 2012-11-16 09:06 in General Discussion
I am designing a circuit that controls current very accurately. My first design restriction is no PWM so it’s all analog for this gal. Also its only DC so that makes things a tad bit easier.

Check it out…
…I am using the following rudimentary circuit to get things started and all on a bread-
Questions:
  1. How do I go about calculating the gate resistor R1 in the picture? Keep in mind switching speed are not a factor here.
  1. If the mosfet I have selected has a Gate threshold voltage of say 2-4 volts. How much deviation can I expect, other than temperature related changes? In other words, how much variation can I expect given that the temperature remains constant?
«134

Comments

  • BitsBits Posts: 414
    edited 2012-02-21 19:48
    Moving forward I have biased the mosfet using an adder circuit. I need to still use some type of feedback system (replacing Gate_TH_voltage). Perhaps a differentiation op-amp circuit below R3 and above R3 respectively.

    What do
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-02-21 20:48
    Your power supply says 10Amp, at these high currents you gone need need to chopper circuit pwm.
    chopwave.gif

    http://www.stepperworld.com/Tutorials/pgCurrentControl.htm
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2012-02-21 21:17
    Leave aside for the moment the power implied by the notation of 10A beside the 5V source and the 1Ω resistor. That is definitely a concern.

    If you do want to get an accurate current using analog and linear, you are on the right track by including an op-amp in the circuit. However, the mosfet will have to be included in the feedback loop along with a current sensing resistor. The following is the basic idea. The resistor R1 is in series in the loop with the power source, the load, and the mosfet. The voltage across that resistor feeds back to the input of the op-amp and is compared with Vin, and the output of the op-amp drives the mosfet gate one way or the other until the voltage across R1 is exactly equal to Vin. That makes the current in the power loop IL = Vin / R1. You get to choose the value of R1. But also take into consideration the other limits such as power dissipation.

    I_sink.png


    To make the picture bigger, double click on it once you see it in your edit window. Size options will pop up.
    547 x 315 - 9K
  • BitsBits Posts: 414
    edited 2012-02-21 21:45
    Tracy Allen

    You my friend are reading my mind.:)

    I just finished drawing this sipping a warm beer. Take a look below.

    My only alteration from yours is the R1. That would have to be a fairly large resistor and I don't have the board space let alone heat evacuation

    Attachment not found.
  • BitsBits Posts: 414
    edited 2012-02-21 21:49
    tonyp12

    Ordanairly I would agree with you but, this is a time where my skills are going to be pushed in a different direction. I can’t PWM client insist and for good reason.


  • tonyp12tonyp12 Posts: 1,951
    edited 2012-02-22 07:52
    You did not say what current range you want or what you are powering.
    Or if this is just a learning experiment and that there are IC's made to do this is not what you want.

    Some reading: http://ww1.microchip.com/downloads/en/AppNotes/00894a.pdf
  • BitsBits Posts: 414
    edited 2012-02-22 08:06
    Tonyp

    That is a great link, thanks, Ill read it over more today.

    This is in fact going to be a product if I can make it work. Here are 3 requirements that I have to meet basically
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2012-02-22 08:17
    That new circuit idea looks fine to sense the voltage and thus the current across the load resistor directly.

    On first glance, the sense of the feedback is wrong, positive instead of negative. R7 could I believe connect to the inverting summing junction between R4 and R5. If R8 is made 20k instead of 10k, then the U1A gain will be the same thru from both the feedback and from the DAC.

    In the basic circuit in post #4, the sensing resistor can be quite small, provided that the op-amp has high accuracy. Suppose a 0.04Ω shunt resistor, it develops 0.2 V at 5 amps.
  • BitsBits Posts: 414
    edited 2012-02-22 08:43
    Again anyone know how to calculate the gate resistor for a mosfet? Is it not so important since switching speeds are low?

    Tracy,

    Thanks for the input. I will continue looking into a feed back method, but I have to take baby steps :) I would like to someway detect the Gate threshold voltage and add that to R7. This way if the mosfet generates heat and the gate threshold voltage goes up, then the adder circuit can accommodate for it.
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2012-02-22 09:04
    There is no reason I can see to go to extra work to detect the gate threshold voltage. The op-amp circuit automatically compensates for that. The feedback comes directly from the current sensing resistor and the gate voltage is adjusted to whatever it takes to make that match the input from the DAC.

    The resistor R1 from the op-amp output to the mosfet gate should probably be something more like 1kΩ, and 50k is too high. The reason to have a resistor there at all is to isolate the output of the op-amp from the input capacitance of the mosfet, which can be considerable, on the order of 0.01 µF. My inclination would be to dispense with C1, and to make the pulldown resistor R2 1M.

    Is the load going to be constant, like a 1Ω resistor as you have it shown? You say switching speeds are going to be slow.
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-02-22 09:08
    "The MOSFET's advantages in digital circuits do not translate into supremacy in all analog circuits. The two types of circuit draw upon different features of transistor behavior."


    I guess you have to look at the VGS chart of your mosfet to find what voltage range you want to be in a slightly open/closed state.
  • BitsBits Posts: 414
    edited 2012-02-22 10:09
    tonyp12 wrote: »
    "The MOSFET's advantages in digital circuits do not translate into supremacy in all analog circuits. The two types of circuit draw upon different features of transistor behavior."

    I guess you have to look at the VGS chart of your mosfet to find what voltage range you want to be in a slightly open/closed state.

    I agree and will do so.

    For the record I chose a mosfet vs NPN because of the availability and cost. NPNs are more difficult to find when we are talking about the higher current requirements.

    I did try a smaller value gate resistor R1 but it shorted out my power supply. This is why I went with the larger value gate resistor. R2 is just to keep the input from floating and I could remove C1 I suppose.

    The load is dynamic.
  • BitsBits Posts: 414
    edited 2012-02-22 11:00
    Ahh I apologize, I am now using a smaller R1 (1K) and its not shorting the PS. Can this be due to the (10M) R2? Perhaps I made an error in my testing.
  • LeonLeon Posts: 7,620
    edited 2012-02-22 12:46
    What is the reason for not using PWM?
  • davejamesdavejames Posts: 4,047
    edited 2012-02-22 13:28
    Bits wrote: »
    For the record I chose a mosfet vs NPN because of the availability and cost. NPNs are more difficult to find when we are talking about the higher current requirements.

    FYI...2N3055 - the work horse since the 60's: 15A, 60V NPN that tops out around 115W (w/heat sink)...and they cost $2-ish.
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-02-22 15:11
    All of these can drive a N-mosfet with current control that is set with an external resistor.
    Most a highside with charge pump
    I'm not sure if they all control curent or just shot it off.
    http://www.mouser.com/Semiconductors/Power-Management-ICs/Hot-Swap-Power-Distribution/_/N-wnwuZscv7?P=1z0xtxm

    This one even have the mosfet built-in (-2 version =retry)
    http://www.mouser.com/ProductDetail/Texas-Instruments/TPS2421-1DDA/?qs=sGAEpiMZZMuUQJU%252b7yHKCnF98N99pHTC
  • BitsBits Posts: 414
    edited 2012-02-22 15:38
    Leon wrote: »
    What is the reason for not using PWM?

    Well I think its for a military application and that is specifically what they requested - no PWM.
    davejames wrote: »
    FYI...2N3055 - the work horse since the 60's: 15A, 60V NPN that tops out around 115W (w/heat sink)...and they cost $2-ish.

    This is good to know. I may end up using a NPN transistor.
    tonyp12 wrote: »
    All of these can drive a N-mosfet with current control that is set with an external resistor.
    Most a highside with charge pump
    I'm not sure if they all control curent or just shot it off.
    http://www.mouser.com/Semiconductors/Power-Management-ICs/Hot-Swap-Power-Distribution/_/N-wnwuZscv7?P=1z0xtxm

    I will check the part/s out. I still think that I wont need all this but I am not counting it out completely.
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2012-02-22 15:44
    What do you mean that the load will be dynamic? There is a lack of information that limits the help here to less than two cents worth!

    The circuit in post #5 (the 2nd circuit, delete the first) shows a 1 ohm resistor which I was assuming would be the constant load, maybe a heater? The circuit you have there will regulate the voltage across it and only secondarily the current. If the resistance changes (dynamically or because you switched in another resistor), then the proportionality changes.

    The circuit could work equally well with either a mosfet or bipolar transistor, and either way as a linear circuit it would burn a lot of power. As shown, the maximum power point occurs when 2.5V is across the transistor and 2.5V is across the resistor, the current is 2.5A, and the total power is 12.5W, half in the resistor and half in the mosfet. The maximum current is 5A when the mosfet is all the way turned on, and all 25W is dissipated in the 1Ω resistor and only a residual in the mosfet. If you were doing this with PWM, the mosfet would be either all the way off or all the way on, in either case only residual power would be dissipated in the mosfet. Do you understand those power equations?
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-02-22 16:16
    You are planning to rebuild something complex like this. (does not even show the inner working of the constant power engine)
    If you want the in-rush to be the constant current you could tie timer-pin to gnd ,this one have constant max 6amp and it fast trip at 1.6x the set limit.
    353 x 353 - 15K
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-02-22 16:56
    TPS2421.gif

    You are planning to rebuild something complex like this. (does not even show the inner working of the constant power engine)
    If you don't want power reset you could override the timer (or use a very long time)
    353 x 353 - 15K
  • kwinnkwinn Posts: 8,697
    edited 2012-02-22 17:38
    @Bits,

    You can't control voltage and current independently across a load. They are related by E=I x R(Z) and its derivative equations. You can control the voltage and let the load resistance/impedance determine the current, you can control the current and let the load resistance/impedance determine the voltage, or you can control the power (E x I) and let the load resistance/impedance determine both. It sounds like you may be trying to avoid the noise that comes with PWM by going to a linear regulator. If that is the case and the current and power dissipation is very high you may want to consider using PWM for a pre-regulator and the linear circuit as a final regulator.
  • BitsBits Posts: 414
    edited 2012-02-22 18:22
    What do you mean that the load will be dynamic? There is a lack of information that limits the help here to less than two cents worth!

    I am so sorry. Let me clear things up a bit. The load is dynamic in the sense that as temperature rises the resistance will change some and yes its a heating device. It may be that I am thinking too deeply and need not consider the small details. The mosfet Gate threshold voltage will also change with temperature, please look here.I believe figure 2 in the data sheet will illustrate this change. I am not sure if these things need to be considered and so that is why I say the load is dynamic.
    The circuit in post #5 (the 2nd circuit, delete the first) shows a 1 ohm resistor which I was assuming would be the constant load, maybe a heater? The circuit you have there will regulate the voltage across it and only secondarily the current. If the resistance changes (dynamically or because you switched in another resistor), then the proportionality changes.

    The circuit is working on paper but, I am not convinced that the differentiator circuit is going to function as I expect it to (Post #5). I wanted to someway subtract the gate threshold voltage from V1. My belief is that the "Gate threshold voltage" will change with respect to temperature thus throwing my DAC resolution off. I plan on using a 16 or even 20 bit DAC to control the mosfet gate voltage.
    The circuit could work equally well with either a mosfet or bipolar transistor, and either way as a linear circuit it would burn a lot of power. As shown, the maximum power point occurs when 2.5V is across the transistor and 2.5V is across the resistor, the current is 2.5A, and the total power is 12.5W, half in the resistor and half in the mosfet. The maximum current is 5A when the mosfet is all the way turned on, and all 25W is dissipated in the 1Ω resistor and only a residual in the mosfet. If you were doing this with PWM, the mosfet would be either all the way off or all the way on, in either case only residual power would be dissipated in the mosfet. Do you understand those power equations?

    I totally agree that the circuit will work with all sorts of transistors, mosfets too. And I can agree that the power consumed by the mosfet will be significant. I calculated it as P = I^2 R, inserting the mosfet RDson at 52 mOhms then I can say that if I was to run 8 amps through the mosfet I would get P = 8.5a * 52 mOhms = 3.757 Watts. The heat that is created from the mosfet will be managed with a active heat-sink.

    kwinn wrote: »
    @Bits,

    You can't control voltage and current independently across a load. They are related by E=I x R(Z) and its derivative equations. You can control the voltage and let the load resistance/impedance determine the current, you can control the current and let the load resistance/impedance determine the voltage, or you can control the power (E x I) and let the load resistance/impedance determine both. It sounds like you may be trying to avoid the noise that comes with PWM by going to a linear regulator. If that is the case and the current and power dissipation is very high you may want to consider using PWM for a pre-regulator and the linear circuit as a final regulator.

    I understand this but, I feel that the mosfet has plenty of room to handle the power as a linear device.

    This is my thinking. Total power 5 * 8.5 = 43 Watts. Mosfet takes ~ 4 Watts and the load takes 39 watts.giving a efficiency of 91%. This is really not that bad.
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-02-22 18:30
    >RDson at 52 mOhms
    But are you not adjusting gatevoltage to change this RDson to control current?
    Maybe your rdson is 1ohm at low gate volatges and more heat.
  • BitsBits Posts: 414
    edited 2012-02-22 18:37
    tonyp12 wrote: »
    >RDson at 52 mOhms
    But are you not adjusting gatevoltage to change this RDson to control current?
    Maybe you rdson is 1ohm at low gate volatges and more heat.

    I am using the DAC in conjunction with a Gate threshold voltage source. I am trying to finish up a feedback system or ref voltage source, at this point its being developed as depicted in post #5.

    The RDsOn is constant as far as I am considered since I am operating the mosfet under 20 amps it remains flat.

    What are you thinking?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-02-22 18:44
    Do not worry about the gate threshold voltage. The op-amp will take care of that automatically, as Tracy said. You do need to be concerned about the changing resistance of the load with temperature, though, as that will affect the current, if you're regulating voltage. Are you sure you don't want to regulate temperature instead of current or voltage?

    -Phil
  • BitsBits Posts: 414
    edited 2012-02-22 19:07
    Do not worry about the gate threshold voltage. The op-amp will take care of that automatically, as Tracy said. You do need to be concerned about the changing resistance of the load with temperature, though, as that will affect the current, if you're regulating voltage. Are you sure you don't want to regulate temperature instead of current or voltage?
    -Phil

    What, why?

    I cant believe I made a circuit and cant fully understand it, yet everyone else does. That circuit was made for me to conceptualize things and you guys say it works already?!! OkayI believe you guys but why?

    Bits logic...

    If the feedback circuit subtracts V1 from the low side of R3 then how is that enough voltage to feed into the adder circuit?
    Moreover, if the voltage measures 0 on the low side of R3 (load has max current, voltage is ~0) then the adder circuit is going to be off, right?

    Ahhh ill think about this some.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-02-22 21:52
    I'm not claiming to have examined your circuit well enough to understand all of it -- only to point out that the op-amp will do whatever it can to attain stasis, based upon the feedback it receives. If the MOSFET's operating point changes due to temperature, the op-amp will adjust for that. You do not need to make special accommodation for that aspect of the circuit.

    -Phil
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2012-02-22 22:58
    The first circuits you posted in posts #1 and #2 did not have the transistor in the feedback loop, and they would indeed be sensitive to the temperature dependence of the gate-source voltage.

    You referred to your #5 circuit as a "differentiator". That is the wrong term. The circuit comprised of U1B is a classic differential amplifier circuit with a gain of x1, and it functions to bring whatever voltage is across the 1Ω heater resistor on the high side of the fet over to a matching voltage referenced to ground. So, whatever voltage there is across the power resistor R1 appears at the left end of R7 wrt ground. 1 volt differential in ==> 1 volt single ended out. In your post #5 circuit, that resistor R7 is connected to the non-inverting input of the other op-amp, U1A, and when the voltage there increases, the output of U1A will increase, and that will cause the current in the mosfet and the power resistor to increase, and the voltage across the resistor increases more, which makes the transistor turn on more, and soon the transistor is all the way on. That's the end of it. The circuit has what is called positive feedback and the result of positive feedback is usually a snap action to one rail or the other, not fine level control that I think you want.

    What to do about it? Connect the right end of R7 to the inverting input of U1A instead of to the non-inverting input. Also remove R4 as it complicates the analysis. Leave in R5. Now U1A is a comparator, and there is negative feedback around the loop as a whole. Suppose your DAC produces 2V. There is now 1V at the non-inverting input of the U1A. Reason as follows: Suppose the current through the 1Ω heater happens to be a little less than 2A,. The voltage on the inverting input of U1A will be a little less than 1V, compared to the 1V on the non-inverting input, and that will cause the voltage output of the op-amp/comparator to go up, more positive on the mosfet gate, increasing the current in the mosfet and heater. On the other hand, if the heater current happens to be a little more than 2A, then the inverting input of U1A will be a little above the 1V from the DAC, and that will make the op-amp output go down, decrease the voltage on the mosfet gate, and decrease the current in the heater. The negative feedback will always drive the output toward the point where the voltage across the heater is the same as the voltage from the DAC.
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2012-02-22 23:10
    Another thing, you said, "I calculated it as P = I^2 R, inserting the mosfet RDson at 52 mOhms then I can say that if I was to run 8 amps through the mosfet I would get P = 8.5a * 52 mOhms = 3.757 Watts. The heat that is created from the mosfet will be managed with a active heat-sink."

    That is true, but I was not sure that you realize that the mosfet resistance is only that low and consumes that minimum power when it is fully turned on.

    "The RDsOn is constant as far as I am considered since I am operating the mosfet under 20 amps it remains flat."

    No no no! In a linear circuit like this, the transistor is essentially serving as a variable resistor and in the middle range its effective resistance will be much higher. I gave an example before. Another, with 8 amps flowing through a 1Ω heater and a 12V power supply, the voltage across the transistor has to be 4V, and the power in the transistor is 4V*8A = 32 watts, while the power in the resistor is 64 watts. You could get the same division of voltage and power by substituting a 1/2Ω resistor in place of the mosfet, so it is as if the mosfet has 1/2Ω of resistance at that operating point.
  • BitsBits Posts: 414
    edited 2012-02-23 18:03
    I stand corrected. Thanks for clearing this up. Ill be back with more questions once I get some rest. Its been a hell of a week so far and a few more to come.
Sign In or Register to comment.