Battery Simulation

Discussion in 'General Electronics Chat' started by adex44yrs, Dec 7, 2011.

  1. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    Hello,

    I am try to design a battery simulation to test a lead acid battery charger. My design is similar to one found here: http://www.accelinstruments.com/Applications/TS200/Battery-Simulator-AppNote.html (figure 2A). Other than I used MOSFETs instead of the BJT and alot PMOS is connected in collected parallel (the current sink).

    I am having some of problems which I can't really figure out why. The charger will turn on for few seconds and then turns off without then repeat the cycle. Any help please?
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You really need to post a schematic of your current circuit, and show the part numbers and values that you actually used.

    Simply saying "It's just like this only different" does not help us a lot, I'm afraid. In order to get a real picture of what is happening on your end, we really need an accurate schematic.
     
  3. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    I am sorry about that guys. This is the schematic of the design
     
    • dia.jpg
      dia.jpg
      File size:
      125.1 KB
      Views:
      136
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, AM1 - is that an ammeter display on your SPICE program?

    And VG1 - that's representing your battery charger?

    So, what's VS1?

    You realize that T8 is an N-ch power MOSFET that is installed with its' drain towards a 40v supply; and if VG1 is lower than (40v -0.7v) then the body diode of the MOSFET will conduct, right? That means only T8, R4 and AM1 are between the 40v supply, and VS1. If VS1 is your charger, then it will have the 40v supply backfed into it.

    The gates of T1-T7 and T9-T12 are not referenced to their source terminals. This can result in the Vgs limits of ±20v being exceeded by a large margin, which will destroy them.

    I am curious why you didn't use N-ch power MOSFETs for T1-T7 and T9-T12?

    [eta]
    On the OPA445 - I'm not certain what package you are using. Quiescent power dissipation can be rather high in that IC depending on supply voltage; you really need to pay attention to that. In your simulation, you show +40v and -9v being used for the power rails; with a quiescent current of 4.2mA, that's ~206mW without doing anything.

    Various OPA445 items were talked about in this thread:
    http://forum.allaboutcircuits.com/showthread.php?t=58827
     
    Last edited: Dec 7, 2011
  5. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    AM is the ammeter display

    VG1 Represent my battery charger and VS1 is my input voltage so that the charger will turn on. The charger will not turn on without an input voltage. T8 is an N_Ch mosfet and it will not turn on for the most part. It is there as a safety measure if there is a problem with the charger.

    I used the p-ch power mosfet for T1-T7 and T9-T12 to act as current sink when the charger is charging the virtual battery. To dissipate the current as heat.

    The virtual battery will be used on a 48V charger that means I need high voltage op amp. The battery would be fully charged around 56-58v which explains OPA445AP

    What do you mean exactly by not referencing the source terminal on T1-T7 and T9-T12?

    Thanks for helping
     
    Last edited: Dec 7, 2011
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Is VS1 really 40V?

    If it is, and you really have the MOSFET T8 connected as shown, then you will have maximum current flowing through the body diode to your charger regardless of the gate voltage.

    And since the positive rail of the OPA445 seems to be 40v, the Vgs limits of ALL of the MOSFETs can be exceeded at some point, destroying them.

    That's fairly standard.

    OK, would you describe how it is supposed to be controlled if there is a problem with the charger? There really is not very much in the way of feedback. I don't know why you are using 50W 6.8v Zeners for Z1 and Z2. You are clamping the input voltages to U2, but the output voltage can be nearly anywhere within the common mode range.

    You've kind of made it hard on yourself, as Vgs really should range from 0v to -10v for P-ch MOSFETs, and you must always reference the voltage on the gate to the source terminal or you will burn up lots of MOSFETs.

    You would have been better off to use N-ch MOSFETs for the current sink (T1-T7 and T9-T12), and limit Vgs from 0v to ~12v or so.

    If VS1 can be reduced to about 1v above the chargers' minimum startup voltage (say, ~10v), then T8 can simply be used as a diode; connecting the gate to the source terminal. The load would need to be off when T8 is conducting. Once the charger begins to output current, the load needs to turn on.
    [eta]
    OK, I see you're using the charger for 48v supplies; didn't know that before.

    In the datasheet, you will see an absolute maximum specification for MOSFETs for Vgs; which is the voltage on the gate referenced to the source terminal. Most of the time, this is ±20v; although you may see more or less than that for some MOSFETs. If you exceed the Vgs limits, you will destroy the MOSFET.

    I've worked up a model of your circuit using Linear Technology's LTSpice. It does not work very well.

    One of the reasons for that is the inputs for U2 are swapped.

    Right now, there is no apparent reason for anything on the noninverting (+) input of U2 except for a pot. You have three switches, three pots, an opamp, a couple of caps and a Zener - I can't figure out what you were trying to do with them, as it does not make sense electrically.
     
  7. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    I assume I am not able to clearly explain the objective of what I am trying to do.Here is what I am trying to do. I am design a virtual battery lead acid to test to test a lead acid battery charger.

    The aim of the circuit I have so far is to simulate a real lead acid battery.

    This is how I expect the circuit to work if all things are working the they I expect them.

    When a charger is connected to the virtual battery, it should start to charge the virtual battery at the maximum current rating of the battery charger. When the switch is closed(sw3) the voltage should start increasing and hence the current from the charger should start decreasing.This gives the the two important stages required in charging a lead acid battery. (constant current and topping charge) Hence that explains the presence of the caps. Switch sw1 is there just for future reference should I sometimes later want to use the same virtual battery to test a 36 volt battery charger.

    The zener diodes are there as a protector to the opamp.

    The problem now is my virtual battery doesn't accept the charge so the charger thinks it is fully charge and then moves to the third stage of charging (float charge).

    The attached file is the updated version.

    I really appreciate your help.
     
    • diag.jpg
      diag.jpg
      File size:
      124.9 KB
      Views:
      61
  8. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    I assume this is a source follower configuration with a p-ch mosfet arranged in parallel. I am not sure how to ensure Vgs is within the specified range.
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I see.

    What is the current output of the charger?
    Because if it's putting out ~15A, and the voltage at the P-ch drains is ~40v, you're dissipating 60W in each MOSFET.

    While that might not seem like a lot, and the IRF9540 is rated for 140W, you have to keep in mind that the 140W rating is if you can keep the temperature of the case at 25°C.

    Now, if you can keep the case @ 25°C, you'll note that RθCS for Case-to-Sink, Flat, Greased Surface is 0.5°C/W, and RθJC for Junction-to-Case is max 1.1°C/W.

    So, if you add those two up, you have 1.6°C/W, multiply by 60 Watts, and that's a 96°C rise - then you add in ambient, and you wind up with 96+25 = 121°C

    You need to de-rate 0.91W/°C rise over 25°C. 140W - .91*96 = 140 - 87.36 = 52.64 Watts.

    That could be quite confusing, so I'll refer you to Chuck McManis' page on MOSFET current ratings:
    http://mcmanis.com/chuck/robotics/projects/esc2/FET-power.html
    That page is an excellent resource, and I highly recommend it. It puts MOSFET current/power ratings into layman's terms, so you can really appreciate what they mean.

    You have quite a power dissipation problem, as you're trying to get rid of all that power using just MOSFETs. I have no idea what your heat sink looks like, or what your actual current output of your charger is. If it's more than about 15A and your MOSFET heat sinking is not adequate, your MOSFETs are increasing in resistance rapidly, causing your charger output to rise suddenly and cut off.

    Does that about describe what you are seeing?
     
  10. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    Thank you so much.

    That is what I am seeing in my simulation but in real life, The p-ch mosfet don't even come before the battery charger shuts off. This is the problem that I have been trying to solve. I think, which I may be wrong, the battery charger assume my virtual battery is full charger then it goes to floating charge state.

    I got this with another simulation software though which gives me some hope that there is something wrong with my circuit. If you think of any way I could rectify the problem, I will be very helpful.
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Maybe you missed this:

    I don't know how it is working at all in your simulator.

    P3's wiper needs to connect to the inverting (-) input of U2.
    The R1/R2 junction needs to connect to the noninverting (+) input of U2.
     
  12. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    I just tried what you said and I found the output of U2 to be negative with respect to common ground. That I think will not turn on the charger.

    This is what I an thinking: Should I change T1-T7 and T9-T12 to n-ch mosfet and replace T-8 with a diode?
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    That would be a good move.

    However, you really should give us an idea of how much current this charger will output, and how you are planning on getting rid of all of the heat that will be dissipated in the MOSFETs. You may need to go to liquid cooling, as it's pretty hard to control the temp of a heat sink - even when cooled with a fan or fans.

    Chilled water flowing through a small block of copper will get rid of a lot of heat, very quickly - and you could adjust the water flow by monitoring the output temp with something like an LM35; it's output voltage increases as the temp goes up - use that with a driver to control a valve.

    Actually, all you would have to do is remove the connection from T8's gate to the opamp, and then connect T8's gate to its' source terminal - you would then have a diode.
     
  14. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    The charger I am trying to test is rated Output: 48Vdc, 17/13A

    Right now I just have a big heat sink and a thinking of a fan Haven't really thought about the best cooling for the system. I will include that one I get the prototype working.

    Thank for your help
     
  15. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    Are you saying I should connect the gate of T8 to the source or the drain??

    The drain connected to to the input voltage??
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    One problem you may be encountering is the response time of the circuit.

    The gates of the MOSFETs are more or less like small capacitors, and you are charging/discharging them via a 10k resistor. I don't know offhand what kind of time it would take to get the gates charged through it, but I'm sure it'll take a while.

    Meanwhile, I have no way to know what kind of response time your charger has. If it's a current feedback type switching regulator, it will have a VERY fast response time. Since there is only a very small amount of capacitance at the drains of the MOSFETs, you will likely have a very fast-rising voltage there; so fast that the charger hits it's "charged" level before there is a response from the load.

    You should try adding several large caps from the junction of R4/R5/R2 to ground in order to slow that rise time and act as a small battery. Add a bleeder resistor or two across these caps so they will discharge when you shut down power.

    Adding caps there will mean a big start-up load on your 40v supply. I suggest that you use four 1157 auto bulbs (brake/tail light bulbs) in series with the diode to charge the cap(s). Incandescent bulbs have an interesting characteristic; when they are at operating temperature (very hot), the filaments have a high reistance; as they cool, the resistance drops. When the filaments are cold, the have a very low resistance. This means that the cap charging time will be much less than it would be if you used a fixed resistance; and you will also have a visual indication that the caps are being charged.
     
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I'm saying to connect the gate of T8 to the source of T8.

    In your schematic, you have T8 as an N-ch MOSFET, and you have it connected upside-down; you have the source terminal connected to +40v, and the drain to R4. This means that the body diode will conduct when the voltage on the source is higher than the drain.

    If you look at the datasheet for that MOSFET, you will see the body diode.
     
  18. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    I have replaced the p-ch mosfets with n-ch. I tried to replace connect the gate to the source of T8 like you said. It worked well but I stayed at the same constant current. So I replaced returned to the original ideal of connecting the gate to the output of the opamp. It worked great order my simulation software giving (simulation error) I will try and wire it up tomorrow and see what happens.

    This is the schematics

    Thanks
     
    • diag.jpg
      diag.jpg
      File size:
      163.4 KB
      Views:
      56
  19. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Wait a minute - now you have Q1 through Q9 installed upside-down!

    The body diodes are conducting, which is why you are seeing them sinking current.

    Now Q10 is turned right-side up, but the body diode won't conduct that way, and you don't have the gate wired to the source terminal.
     
  20. adex44yrs

    Thread Starter New Member

    Dec 7, 2011
    12
    0
    I just tried wiring the virtual battery and I am having some issues with the Q10. It starts conducting without a battery. Could you show a visual of how Q10 is connected. Without Q10 working properly there will be not output voltage to the charger so it wont turn on.
     
    Last edited: Dec 8, 2011
Loading...