Charging Battery through MOSFET

Discussion in 'The Projects Forum' started by Leorenzo, Oct 26, 2013.

  1. Leorenzo

    Thread Starter New Member

    Sep 21, 2013
    27
    6
    Hello!
    I am building a charging and discharging circuit for battery characterization. I need to be able to control the charging and discharging of the battery (which is replace with capacitor in the simulation to mimic charging and discharging of battery (C1) ) through a microcontroller.

    link of schematic : http://s16.postimg.org/562fl19kl/Batt_Discharge_Charge.png

    I'm wondering if the circuit that I made is alright (I still dont mind about the power dissipation in the components right now which I will be doing after I make a correct circuit topology)

    The battery is used as an external supply for charging

    My Problems are:


    • Do I need to amplify the current input to the MOSFET through the use of BJT or not? what I did in the circuit is just an example of my version of with and without BJT (on discharge and charge circuit).

    • The discharging circuit is fine however the charging doesn't work. I think it's due to the presence of battery at source terminal which affects Vgs. However, I don't know any configuration to fix it.


    I hope you guys take your time to look through my post. Thanks! :)
     
  2. cornishlad

    Member

    Jul 31, 2013
    196
    25
    I probably missed something important....but how could the discharge circuit work if the C was not charged ? However the main point is that there is absolutely no similarity between the charging of a capacitor and a battery.
     
  3. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    A few quick notes, R5 through R7 are shorted and thus useless. You need a logic-level mosfet in the discharge circuit if you want to drive it directly from the uC. You need a high-side driver in the charging circuit if you insist on the n-channel mosfet, or simply use a p-channel one.
     
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    There is a lot wrong...

    During charging, there needs to be a "current-limiter" in the path from the power supply to the battery + terminal. Most batteries have a specified maximum charging current spec. Look it up for your battery. You will need a "current regulator" circuit.

    The best way to measure battery capacity in Ah is to discharge the battery into a "constant-current sink", adjusted to some known current, say 1A. Then the capacity of the battery can simply be determined from how long it takes to discharge to some cutoff level. Multiply time in h by the (constant) discharge current and you have the battery capacity in Ah.
     
  5. Leorenzo

    Thread Starter New Member

    Sep 21, 2013
    27
    6
    @cornishlad
    it's because the capacitor is always charged and I manually open the connection from the charging circuit for it to stop. Then I discharge it and it works fine. hmm.any suggestions on how to simulate charging and discharging?

    @kubeek
    hmm.I'm using those resistors to limit the discharge current with Rt = 0.33Ω.
    I looked up hi-side switching but it deals with other complex components. I guess I might try P-Channel then.

    @MikeML
    sorry if there's a lot of mistakes :D. The charging current is alright since it will be coming from laboratory power supply which is limited only to 3A which is beyond the 9A charging current of battery.

    The way I measure the capacity now is to see how long is the data logged on an excel file which tells me batteries with atleast similar capacity since i'll be checking a lot of batteries and needs to pair them up right.
     
  6. Leorenzo

    Thread Starter New Member

    Sep 21, 2013
    27
    6
    Hello again!
    I've managed to make the charging circuit work in the simulation through the use of a P-Channel Logic Level Mosfet. Here is the circuit:
    [​IMG]
    I've just read about P-Channel Mosfet and I don't know if what I think about it is right. Does Mosfet is switched on if the input to the gate is 0V? and vice versa? that's why I put an inverting BJT there.
     
  7. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    You still need to have some means of limiting the charging current. The transistor is rated for whopping 90mA of current, so if you don´t limit it you will have a roasted transistor in a brief moment.
     
  8. tindel

    Active Member

    Sep 16, 2012
    568
    193
    Looks like the new circuit will work. [Edit- kubeek is right, you need to limit the charge current] What kind of battery are you trying to 'control' charge/discharge of? What exactly are you trying to control? Are you trying to control the charge and discharge current? If so, you need to include feedback somewhere.
     
  9. Leorenzo

    Thread Starter New Member

    Sep 21, 2013
    27
    6
    Ooops sorry for the current problem as I was at the moment not concerned about the dissipation and is only after circuit topology but I will make sure to keep that in mind in fabricating it. I guess TIP31 is alright? although it's overkill but at least it's safe? and I have stocks here :D

    I'm charging/discharging a Li-ion Battery with charge votlage of 4.2V and charhr current of 9A. the charging supply is 12V (coming from a supply limited to 3A) so that the battery will charge faster and I have on my code that once the voltage reaches 4.2, it will stop charging so I guess it's alright?

    Hmm no. I'm not controlling the current. I just measure the time it takes to fully charge/discharge since I'll be paralleling 3 batteries and would like to pair up batteries with similar characteristics/capacity.
     
  10. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,813
    1,105
    Charging lithium batteries without using a precise charging regime is DANGEROUS, and can result in fire or explosion. Visit www.batteryuniversity.com and check what you should be doing.
     
  11. Leorenzo

    Thread Starter New Member

    Sep 21, 2013
    27
    6
    Thanks for the link Alec! I've just done reading it. :)
    And thank you also for everyone who reply in my thread. I guess I'll give my circuit a shot and hope for the best. :D
     
  12. Leorenzo

    Thread Starter New Member

    Sep 21, 2013
    27
    6
    Hello!
    I am now facing another problem. Any suggestion as to why does the battery still keeps charging even if the input to the charging circuit is 0 logic? I still haven't tried it in a real circuit and only on isis simulation.

    Thanks again for your help!:)
     
  13. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Please post the whole schematic, but I think that if you got the P channel fet in there you need logic 1 to turn charging off.
    Or actually depending on the mosfet you may need to get close to the 12V to turn it off.
     
  14. Leorenzo

    Thread Starter New Member

    Sep 21, 2013
    27
    6
    Yes! Thanks again!
    It really was due to the 12V power supply charger that causes the problem!Since you mention about the input must approach 12V to properly turn it off, I tried changing it to 4.2V which is the real charging voltage that I will be using anyway. :)

    Although I'm not sure I know why. Maybe due to the Vgs involve which I was not able to satisfy?
     
  15. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Here is the right way to use a PFET as a high side switch driven from a 3.3V MCU port.

    It is slow turning off, but good enough for your application.
     
Loading...