
\documentclass[11pt]{article}
%Gummi|065|=)
\usepackage{graphicx}
\usepackage{caption}
\title{\textbf{BatteryMonitorBoard}}
\author{Steak Electronics}
\date{}
\begin{document}

\maketitle

\tableofcontents

\section{Overview}

\section{Chip Hunting}
Need to find a chip for battery charging. Some sheets have been saved. I looked at TI primarily. Though considered one AD/LTC. BQ2954 is out of the question as its too complex in its application circuit. THe BQ2000 is a 8 pin DIP and seems like a good start. That will cover nicad/nimh, and lithium batteries.

Though the BQ2000 is a bit of a mess as well. Data sheet has a complex circuit. There is a simpler one here:
http://www.ti.com/lit/pdf/sluu007
and
https://electronics.stackexchange.com/questions/95970/how-to-use-battery-charge-controller-bq2002n
Regardless of the contents of that post, the fact is, the chip requires a lot of stuff.

https://www.st.com/content/ccc/resource/technical/document/datasheet/df/b9/e6/5b/ec/92/45/ed/CD00132951.pdf/files/CD00132951.pdf/jcr:content/translations/en.CD00132951.pdf
This chip: stc4054, is extremely simple. Limited to 1 lithium cell (so only 4.2 volts max) but application circuit is lean, and it has a shutdown pin, so you can turn off the charger. Price is the cheapest as well, at 1.50 for 1.

That looks hopeful. Why not multiple?
Need to remember to be careful of 4.1 lithium batteries. Most chargers are 4.2, and its easy to forget that there is a difference.

MCP73826 is another reasonable option. Slightly more complex, but not by much.
RT9526A is also simple. Let's start with the st chip.

Looks like the voltage on that pin should be between 1.2 and 2.4 in order to turn it off. Below 1.2 it is on, and monitoring current. Above 1.2 but below 2.4 it is off. above 2.4 it's putting 35ua into the battery. I think.

Also like the LTC1734, which is lithium / nicad. But expensive at 3-4 dollars. Don't see any lead acid battery chargers on digi that aren't being obsoleted. There's not one. I did see some on manufacturer's pages though. Just not here.

There is one microchip one (lead acid) based on a pic. App circuit is complex.
AN1015 is the app note.

So need a lead, and nicd charger still.

Tomorrow I'd like to look at maxim. I see this:

https://www.maximintegrated.com/en/products/power/battery-management/MAX1772.html
But the application circuit is too much for what I want to deal with.
Seems lead acid battery chargers are not as common as they must've been before.

Onsemi is only lithium batteries.

Mouser has only universal chargers, no lead. But universal includes lead.
let's check linear. LT1510 is an 8 pin simple device. Though it's nicad and lithium only. It says it can do lead in table, but not in datasheet.
lt1510 would work for nicad. data sheet figure 6 has a circuit for nicad.

What about lead?
lt1513 does the three main types: nicd,li-ion,lead
At a cost of \$10.
At digi, the bq2031 is the only lead battery chip (not multi type) that is in production. Not much choice. EDIT: actually that is not
recommended for new designs either.

http://www.eevblog.com/forum/beginners/mc34063-battery-charger/msg1378671/\#msg1378671
Here he uses a boost regulator to power a battery. Essentially just setting the voltage.
http://www.eevblog.com/forum/projects/switching-lead-acid-battery-charger-ic/msg806972/\#msg806972
Here is some better advice.
quote:
\begin{verbatim}
I'd recommend just float charging. It takes only a little longer
 and is easier on the batteries. You will need to limit the initial
 charge current to about 0.1 C (so 2 A for a 20 AH battery). The
 easiest way to do this is a constant current/ constant voltage
 power supply. Set the current limit to the desired charge current,
 and the voltage to the float voltage (13.8 V adjusted for
 temperature if needed). The voltage on the battery will slowly
 increase over time until it reaches ~13.8 V, then the current will
 slowly drop over time until it reaches nearly zero. At that point, 
the battery is fully charged and you can either remove the charger
 or just leave it on.
\end{verbatim}
Which is what I did with my solar battery charger, and it worked well. So I suppose there is no need for anything more than a vreg for lead batteries. This time I will go to the recommended 13.8 instead of what I had before (around 12) and I will do the same trickle charge method. Simple. Done.

May use 1512 instead. \$5 in 150 quantity. Hm...
\$10 in single.
That would cover lead, nicad.
Will need jumpers on R1 and R2 depending on what battery type. According to data sheet, li-ion the divider is a float voltage. In nicd, it is a top limit.

OK, i've decided:

\subsection{Part Selection Summary}

LT1512, and STC4054.
For starters, I will use stc as lithium and lt as nicad / lead.

this will avoid the worry of jumpers, and what not. Later I can be flexible.

Now onto other parts. I need some way to monitor the current, and of course a voltage tap.

Where to put current sense? I think before the battery.

I should put some jumpers in, so I can isolate everything though. I dont' want to mix circuits at the start. So isolate the charger from the op amp and sense, at first.

Let's go with the basic differential op amp in microchip an1332. I need a vreg supply (linear) at 15.5 volts, for the op amp, so it's above the lead battery voltage. Simplest two switchers I see are lm2577 or the mk3608. The mk is easier to use.

With that we have:
\begin{itemize}
\item Battery charger x 2
\item voltage monitor x 2
\item current monitor x 2
\item ethernet (using off the shelf enc modules for now, but maybe
  on board later).
\item microcontroller (nano)
\item temperature monitor (something like max6675 looks nice. can put on board, without difficulty).
  \item additional taps into adc, and some op amps and current shunts not populated to be used as extra current - voltage converters. At least two. Put on modular schematic.
  
  \end{itemize}
I also want a general current and voltage monitor. I want
to be able to watch the load on a battery, and record that as well...
Perhaps that will be separate. I might want to grab some off the shelf
current / voltage monitoring stuff, or just throw a few op amps with breakouts on the board.

Let's build.

Keep all schematics modular!

\textbf{A note on lt1512 tuning}
\begin{verbatim}
How this is tuned:
The V divider on Feedback pin
determines float voltage.
The R downstream of I_feedback 
(after 24 ohm resistor)
determines current (100mV / R)
See data sheet for more details.

Put Simply: Set float voltage on r divider
and make sure current resistor is high enough
to be low current.
\end{verbatim}

\textbf{Calculating LT1512 vdivider}
\begin{verbatim}
Example calculation for R1:
R1 = (R2(Vbat - 1.245) )\ (1.245+R2(0.3uA))
with default R2 at 12,400
Desired Vbat float of 13.8 (lead)
(13.8 - 1.245) * 12400 == 155682
1.245 + (12400 * .000003) == .03720 + 1.245 == 1.2822
155682/1.2822 == 121417

It would be evil for them to put 0.3uA and
expect you to convert that to 0.000003A
But that's what they did. At least they
give an example to check.

Five zeros on that.
\end{verbatim}
Based on the vdivider, what you are seeing is for high voltages, with R2 being the recommended 12.4K, is R1 150K at ~13, R1 220K at ~9V.

Some more notes
\begin{verbatim}
checking the given example:
41200 * (8.2 - 1.245)  286546

41200 * 0.000003 + 1.245 == 1.3605 


lowest possible value (1.3V charge)
(1.3 - 1.245 ) * 12400 == 682 
(12400 * .000003 ) + 1.245 == 1.28
682 / 1.28 == 532

so lowest resistor value must be 500 about...
\end{verbatim}
Lowest resistor would be 536. (e48 resistor)
Variable resistor would be



\end{document}

