SgtWookie's Ltspice Lead-acid Battery model usage ?

Discussion in 'The Projects Forum' started by rolw, Oct 15, 2013.

  1. rolw

    rolw Thread Starter New Member

    Joined:
    Jul 15, 2013
    Messages:
    7
    Location:
    Italy
    Hi all,

    I have 2 problems,

    1) how to set up the simulation correctly

    2) why the prototype (and the simulation) of the charger does not go into trickle mode.

    I used this SgtWookie's batt_SLA model, modified for my battery:

    http://forum.allaboutcircuits.com/attachment.php?attachmentid=24235&d=1288998265

    I took this circuit of a a battery charger from an old EDN article about February 4, 198X.
    It was advertised as:

    "Battery charger snaps from full to trickle" by Kennan C. Herrick ESI Electronics Corp San Francisco, CA

    I first built it and I was not satisfied that it did not go into trickle mode at the end.

    I then decided to simulate it as a ltspice model to try to understand what was the problem.

    1) Problem:
    I am not sure how to set the .pulse or tran or anything else that could:

    -charge the battery from 6V to 7.25V to see why the Q2 transistor does not switch off and stay off until some lower voltage.
    Q2 should give hysteresis to the whole process.

    Q1 is there to limit the charging current to 130mA for the fist part of the charge and that works fine on the prototype.

    On the prototype the charge reaches 6.85V at the battery with I=15mA and Q2 Vbe of 0.6V min. then it stays there forever.

    As I understood Q2 should switch off and a little trickle current go mainly through R7.

    The lead acid battery is a Gel 6V 1.2A.

    ILOAD is there with the idea of discharging the battery first before observing how the charge would go.

    On the model the max V battery is 6.28V with max I charge of 90mA.

    Q2 Vbe is min 0.9V, max 1.06V.

    There are some differences with the prototype but the main thing is Q2 does not go off as in the prototype.

    2) Problem:
    Why Q2 does not switch off ?

    Thanks for all help.

    Attached Files:

  2. Alec_t

    Alec_t Well-Known Member

    Joined:
    Sep 17, 2013
    Messages:
    1,694
    Location:
    Cardiff, Wales
    Post deleted.
    Last edited: Oct 15, 2013
  3. ronv

    ronv Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,238
    Location:
    Tucson AZ.
    The model clamps the battery voltage at 2.133 volts times the number of cells. You can change this in the sub by modifying VCELL to a higher voltage.
  4. Alec_t

    Alec_t Well-Known Member

    Joined:
    Sep 17, 2013
    Messages:
    1,694
    Location:
    Cardiff, Wales
    Of the 130mA, only ~30mA goes through R7 but ~100mA is flowing through the Q2 base-emitter junction! That can't be right?
    Replace the battery model with a 100mF (that's 'm', not 'u') cap and run the sim for 10 sec (not 80000) and you'll see that Q2 does switch off, with hysteresis.
  5. rolw

    rolw Thread Starter New Member

    Joined:
    Jul 15, 2013
    Messages:
    7
    Location:
    Italy
    Well, I thought that VCELL was V Float = 90% of Vbattery which is 2.4V per Cell,

    Is that what is supposed to be set to ?
  6. rolw

    rolw Thread Starter New Member

    Joined:
    Jul 15, 2013
    Messages:
    7
    Location:
    Italy
    According to the original article, 100mA on the base is right with TIP32 .

    I tried your suggestion and went bigger with C2 Cap value and timing.
    I added a further Pulse step to see the hysteresis.

    Can you confirm it is the delay from 20k to 24k on the Ib(Q2) line after the 20 mA load step ?

    V(out)-V(vreg) is Vbe(Q2) light blue trace.

    [​IMG]
    Last edited: Oct 16, 2013
  7. Alec_t

    Alec_t Well-Known Member

    Joined:
    Sep 17, 2013
    Messages:
    1,694
    Location:
    Cardiff, Wales
    Yes, the 20-24k section is where Q2 turns off.
  8. ronv

    ronv Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,238
    Location:
    Tucson AZ.
    Looking at your Vbatt I would try 2.66 volts.
  9. rolw

    rolw Thread Starter New Member

    Joined:
    Jul 15, 2013
    Messages:
    7
    Location:
    Italy
    I assume you mean it was off from 11k and turns on at 24k after a delay from 20K ?

    I now would like to test it with the battery model.

    Any suggestions ?

    Here I tried with some differences:
    Vin = 10.5V
    Vout = 8.6V
    R7 33 ohm
    R4 2k
    R5 4k7

    VCELL = 2.4V

    I can't get Q2 to go off nor any hysteresis.

    Is the batt_SLA.sub a linear model ?

    I don't understand the model at all.

    Would anyone give an explanation of the syntax of the section called:

    * The charge model

    inside batt_SLA.sub ?

    Or at least a link to a manual that describe that kind of working ?

    http://www.4shared.com/download/j3cdxWrk/Picture_3.png?tsid=20131016-142620-745d81f1
    http://www.4shared.com/download/VoF-wNa6/Picture_4.png?tsid=20131016-142646-8d5fadbd
  10. rolw

    rolw Thread Starter New Member

    Joined:
    Jul 15, 2013
    Messages:
    7
    Location:
    Italy
  11. rolw

    rolw Thread Starter New Member

    Joined:
    Jul 15, 2013
    Messages:
    7
    Location:
    Italy
  12. ronv

    ronv Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,238
    Location:
    Tucson AZ.

    The model clamps the votage at 3XVCELL. so if that is lower than your applied voltage the current will not drop enough to kick you into trickle mode,
  13. rolw

    rolw Thread Starter New Member

    Joined:
    Jul 15, 2013
    Messages:
    7
    Location:
    Italy
    here are the batt_sla.sub parameters as I set them:

    .PARAM CELLS=3
    .PARAM VCELL=2.3
    .PARAM CAPAH=1.2
    .PARAM R_SER=50m
    .PARAM SOC=.9
    .PARAM CHEFF=0.75
    .PARAM SELFDC=0.000028
    .PARAM TEMPC=25

    is VCELL the nominal Lead Batt Voltage per Cell ?

    should that not be 2.4V ?


    Thanks
    Last edited: Oct 25, 2013
  14. ronv

    ronv Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,238
    Location:
    Tucson AZ.
    I don't know exactly how the model works either. Maybe SgtWookie can explain it better. I just had the same problem you had where the charge current wouldn't go down low enough because of the clamp voltage. I suppose you could set it higher, I just don't know if there are any side effects.
Similar Threads
Forum Title Date
The Projects Forum SgtWookie's Simple PWM Circuit for a P-Channel driver Sep 11, 2011
The Projects Forum 3rd Party Models in Ltspice Sep 24, 2014
The Projects Forum SCR/Thyristor LTSpice simulation Jun 19, 2014
The Projects Forum RFID TAG reader on LTspice May 29, 2014
The Projects Forum LTSpice simple simulation Mar 23, 2014

Share This Page