Difference between revisions of "Mcu 0137-SLA-charge-controller"
|Line 31:||Line 31:|
Revision as of 09:50, 23 July 2019
For me this charge controller is part of a bigger project, but since it should work fine as a stand-alone solution I thought I'd put it here for the world to see and use.
I will be using the 8-pin 8-bit ATtiny84 for this design.
This charge controller aims to do the following:
- use battery voltage sensing to detect whether the charging circuit should be activated or not.
- use a fixed charge current in combination with an LM317 to regulate charge current
- set final charge voltage using a trimpot
- enter sleep mode on the microcontroller to save power when the battery is charged.
- signal charge state with an LED
- use a boost converter to allow charging from low input voltages (e.g. 5V from a USB port).
The first version of the charge controller schematic:
After breadboarding, this was the first prototype on perfboard of the SLA battery charger circuit.
The next step will be to work out the following features:
- choosing a more powerful FET to controller higher charge currents
- minimise current draw when not charging (hopefully less than a few uA's)
Sizing the Charge Controller FET Q1
N-channel FETs Q2 and Q4 are just for switching the P-channel FETs to ground, so they can be low-power 2N7000 or BS138. The FET Q3 is used to switch on the voltage-divider network to sample the battery voltage and with the two resistors in series we'll see only a few mA's running through Q3, so no worries there as well. However, P-channel FET Q1 is the one that is the one that will be applying the charge current (as regulated by the LM317) to the battery.
For low-power charging we can suffice with a BS250, but what exactly is the threshold, how is this defined and what other components can we use in order to increase the charge current?
The datasheet for the BS250 P-channel FET rates it for a maximum continuous current power dissipation of 230mA or 700mW, whichever comes first. So let's do the math. Charging a battery up to a maximum voltage of say 14V and not use more power than 700mW will mean a maximum charge current of 0.7 / 14 = 0.05, which is 50mA. This means we will need to size the feedback resistor for the LM317 accordingly. It doesn't matter that the BS250 can handle up 230mA, as we have already reached the maximum power at 50mA. This mainly has to do with the power handling capabilities inside the FET and the specific packaging that this FET is encased in (Google TO-92 for more information).
(how to size the LM317 feedback resistor... link here?)
This means that if we want to use a higher charge current than 50mA we will need a different FET for Q1.
Let's look at other FETs that might help us if we desire a higher charge current. First up is the LP0701 P-Channel FET, also in a TO-92 package.
The datasheet for the LM0701 doesn't have the maximum power dissipation listed under 'Absolute Maximum Ratings' (where we would normally find this value), but there is a graph showing the 'Maximum Rated Safe Operating Area'. If we use this FET we can see that for 14V we can run about 80mA through it (about 1.12 Watt). But we're also running quickly into an area where the TO-92 package itself is not really capable of dissipating that much power. Yes, we can put a small heatsink around the package, but ideally we need a different package, such as the TO-220 to be able to handle the heat better.
Let's look at another candidate, the IRF9540. This FET is in a TO-220 package and it can handle up to 50W.
(to be continued..)