Want to charge a lead battery from a solar panel, and run some load on the battery occasionally. Want to monitor the load, and the charge of the panel.
\section{Chip Hunting}
Sorting by cheapest buck boost regulators, I've found a micrel chip, MIC4680, which is a simple buck reg. It can be adjustable, so I will take advantage of that with another slide pot, and use it to charge different battery types. These regs are ~\$2. The next realistic option I see is around 5-6 which are the true buck/boost switching regs.
Not sure how I will handle overcurrent. Probably a fuse, or ptc. Too much current will blow the fuse. Don't do that.
Let's start building the board.
\subsection{Board considerations}
Input will be any number of solar cells, in series and or parallel. They will go to the vreg. The vreg will go to the battery, which in turn will have a load, of a micro (probably a nano on sleep mode). But actually, I might want a micro that can operate at up to 14 volts... So a nano might not work. Looks like there is a high voltage PIC and Atmega, but the Atmega is obsolete :/
So cheapest is the Pic16. Might try that. It can handle up to 15 volts, which should be safe, with the regulator offering a float voltage (but only a float voltage. Unfortunately, the AVR was up to 18v...)
Unfortunateyl the PIC is eprom (i.e. UV erasable) only or One time programmed OTP only. Ugh.
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:
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.
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.
Want to charge a lead battery from a solar panel, and run some load on the battery occasionally. Want to monitor the load, and the charge of the panel.
\section{Chip Hunting}
Sorting by cheapest buck boost regulators, I've found a micrel chip, MIC4680, which is a simple buck reg. It can be adjustable, so I will take advantage of that with another slide pot, and use it to charge different battery types. These regs are ~\$2. The next realistic option I see is around 5-6 which are the true buck/boost switching regs.
Looking at the Mic4680, I want at least 10mA of current passing through to the device downstream, in order to be around 70\% efficient. Looking at the different graphs for output voltage: greatest efficiency is at 12V for low currents. As you lower output voltage, you need more current for equal efficiency. Good for my needs.
Not sure how I will handle overcurrent. Probably a fuse, or ptc. Too much current will blow the fuse. Don't do that.
Let's start building the board.
\subsection{Board considerations}
Input will be any number of solar cells, in series and or parallel. They will go to the vreg. The vreg will go to the battery, which in turn will have a load, of a micro (probably a nano on sleep mode). But actually, I might want a micro that can operate at up to 14 volts... So a nano might not work. Looks like there is a high voltage PIC and Atmega, but the Atmega is obsolete :/
So cheapest is the Pic16. Might try that. It can handle up to 15 volts, which should be safe, with the regulator offering a float voltage (but only a float voltage. Unfortunately, the AVR was up to 18v...)
Unfortunateyl the PIC is eprom (i.e. UV erasable) only or One time programmed OTP only. Ugh. There is another atmega, which is more expensive, but fully programmable. Let's run with that.
The atmega406, programs through JTAG on PortB. Page 70 for jtag pinouts. It is a LQFP so a board will be needed, but I don't enjoy breadboarding anyways, (microcontrollers).
So this chip has an internal regulator, and can run off a wide range of voltages. What is lowest current usage? The data sheet in page 225 mentions the following:
\begin{itemize}
\item Active 1.2mA
\item idle 270uA
\item ADC Noise Reduction 220 uA
\item Power-save 35uA
\item Power-down 20uA
\item Power-off 1.5uA
\end{itemize}
Based on this, I'm thinking we can only run code when necessary and hopefully get somewhere between the 35uA and the 1.2mA with sleep states.
\textbf{RECAP}
Solar to vreg to battery, to low power micro with built in vreg with breakouts for pins so I can think of some sensor to attach. Since I do surveillance work, I think a motion sensor would be a good start. We will want to have something switch on and off a low power motion sensor. https://www.futurlec.com/PIR\_Sensors.shtml has a low power pir (relatively cheap) sensor. 50uA. That might be someplace to start. Though I know that these sensors need an external light sensor, or software magic to avoid false alarms. Breakouts for Vcc, Gnd. Breakouts for all pins. Slide pot for vreg (to use other batteries). Fuse to limit current. Switch on shutdown of vreg, for manual shutdown of power.
Note that I will also have the capability to log this with the battery station. Which I will do in house. I think that is enough. I don't want to worry too much about the PIR. Anything else I'm forgetting...?
The connectors I used on the battery station that had a perfect fit for my standard two pin blue screw terminals was the following:
Want to charge a lead battery from a solar panel, and run some load on the battery occasionally. Want to monitor the load, and the charge of the panel.
\section{Chip Hunting}
Sorting by cheapest buck boost regulators, I've found a micrel chip, MIC4680, which is a simple buck reg. It can be adjustable, so I will take advantage of that with another slide pot, and use it to charge different battery types. These regs are ~\$2. The next realistic option I see is around 5-6 which are the true buck/boost switching regs.
Not sure how I will handle overcurrent. Probably a fuse, or ptc. Too much current will blow the fuse. Don't do that.
Let's start building the board.
\subsection{Board considerations}
Input will be any number of solar cells, in series and or parallel. They will go to the vreg. The vreg will go to the battery, which in turn will have a load, of a micro (probably a nano on sleep mode). But actually, I might want a micro that can operate at up to 14 volts... So a nano might not work. Looks like there is a high voltage PIC and Atmega, but the Atmega is obsolete :/
So cheapest is the Pic16. Might try that. It can handle up to 15 volts, which should be safe, with the regulator offering a float voltage (but only a float voltage. Unfortunately, the AVR was up to 18v...)
Unfortunateyl the PIC is eprom (i.e. UV erasable) only or One time programmed OTP only. Ugh.
F 2 "Package_QFP:LQFP-48_7x7mm_P0.5mm" H 7550 3950 50 0001 C CIN
F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2548-8-bit-AVR-Microcontroller-Battery-Management-ATmega406_Datasheet.pdf" H 7550 3950 50 0001 C CNN
(net_class Default "This is the default net class."
(clearance 0.254)
(trace_width 0.254)
(via_dia 0.6858)
(via_drill 0.3302)
(uvia_dia 0.6858)
(uvia_drill 0.3302)
)
(gr_text "FABRICATION NOTES\n\n1. THIS IS A 2 LAYER BOARD. \n2. EXTERNAL LAYERS SHALL HAVE 1 OZ COPPER.\n3. MATERIAL: FR4 AND 0.062 INCH +/- 10% THICK.\n4. BOARDS SHALL BE ROHS COMPLIANT. \n5. MANUFACTURE IN ACCORDANCE WITH IPC-6012 CLASS 2\n6. MASK: BOTH SIDES OF THE BOARD SHALL HAVE \n SOLDER MASK (ANY COLOR) OVER BARE COPPER. \n7. SILK: BOTH SIDES OF THE BOARD SHALL HAVE \n WHITE SILKSCREEN. DO NOT PLACE SILK OVER BARE COPPER.\n8. FINISH: ENIG.\n9. MINIMUM TRACE WIDTH - 0.006 INCH.\n MINIMUM SPACE - 0.006 INCH.\n MINIMUM HOLE DIA - 0.013 INCH. \n10. MAX HOLE PLACEMENT TOLERANCE OF +/- 0.003 INCH.\n11. MAX HOLE DIAMETER TOLERANCE OF +/- 0.003 INCH AFTER PLATING." (at 113.4872 93.2688) (layer Dwgs.User)
F 2 "Package_QFP:LQFP-48_7x7mm_P0.5mm" H 7550 3950 50 0001 C CIN
F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2548-8-bit-AVR-Microcontroller-Battery-Management-ATmega406_Datasheet.pdf" H 7550 3950 50 0001 C CNN
<script>!function(){functiono(n,i){if(n&&i)for(varrini)i.hasOwnProperty(r)&&(void0===n[r]?n[r]=i[r]:n[r].constructor===Object&&i[r].constructor===Object?o(n[r],i[r]):n[r]=i[r])}try{varn=decodeURIComponent("");if(n.length>0&&window.JSON&&"function"==typeofwindow.JSON.parse){vari=JSON.parse(n);void0!==window.BOOMR_config?o(window.BOOMR_config,i):window.BOOMR_config=i}}catch(r){window.console&&"function"==typeofwindow.console.error&&console.error("mPulse: Could not parse configuration",r)}}();</script>
<tdclass="entry"align="left"valign="top"width="80%"headers="d2659e29 ">Test Clock (clock signal from the <spanclass="ph">Atmel-ICE</span> into the target device).</td>
<tdclass="entry"align="left"valign="top"width="80%"headers="d2659e29 ">Test Mode Select (control signal from the <spanclass="ph">Atmel-ICE</span> into the target device).</td>
<tdclass="entry"align="left"valign="top"width="80%"headers="d2659e29 ">Test Data In (data transmitted from the <spanclass="ph">Atmel-ICE</span> into the target device).</td>
<tdclass="entry"align="left"valign="top"width="80%"headers="d2659e29 ">Ground. Both must be connected to ensure that the <spanclass="ph">Atmel-ICE</span> and the target device share the same ground
reference.</td>
</tr>
</tbody>
</table>
</div>
<divclass="p">
<divclass="note tip"id="GUID-27BF3A3E-B61E-485F-8816-EBB7F5642827__GUID-90633520-0AC7-4879-B1E5-B3D962BB674E"><spanclass="tiptitle">Tip:</span> Remember to include a
\item test conformal coating on an arduino and one without. test temperature changes over time. Need some temperature sensors to test variuos points (e.g. vreg, micro) and try different things (high intensive cpu usage, vs. high power draw from vreg to something).
\item steak electronics sticker. i guess from psprint for now
\item self hosted data loggers, using mysql and grafana
\item test conformal coating on an arduino and one without. test temperature changes over time. Need some temperature sensors to test variuos points (e.g. vreg, micro) and try different things (high intensive cpu usage, vs. high power draw from vreg to something).
\item steak electronics sticker. i guess from psprint for now
\item self hosted data loggers, using mysql and grafana
\item fix bay 3 camera angle. (orange ladder / laptop)
\item install 6 inch cable on bay 1 camera (orange ladder)
\item install foscam in bay three, facing bay 4, to outside of bay 4. Get it higher up this time. I don't like leaving a cable out there, but I don't see doing conduit at this time...? Or should I do conduit... Maybe if it's feasible? Need conduit mounts... and hardware... edit: will need bolts, good drill bit, and nuts, to fasten camera. it's going to have to hang under top of container, or on top. use electric line powered drill - big ladder
\item put axis in bay three, possibly outlet in wall, clean up the camera, it's a bit messy
\item new outlet upstairs behind server. Do this after 3pm. NOT PRIORITY
\item take inventory of parts purchased, and discuss getting cable for door locks (will need to send email if we don't have cable already)
\end{itemize}
MAIN LIST:
\begin{itemize}
\item Move Bay 4 modector to outside wall, or maybe just closer to wall will be good enough, facing the walkway (I'd like to have it out of view).
\item Install other one camera that are remaining fro previous work. Needs sheathing.
\item door access controls, research and buy parts
\item rfid, research and have them buy parts
\item two new cameras outside. Need wiring first, then have them buy cameras and emclosures.
\item Cameras to watch tank install project waiting to hear back from jbemiller
\item need cable covers for bay 2 axis cam, and box, or a POE adapter
\item adjust front door camera down
\item Modectors in other bays, 1, 2, 3 (two in 3)
\item Consider modectors for outside, near cameras later. They will just be an alarm, perhaps on a camera as mocord, but not nodect or modect. Otherwise, they will be on their own section as an alarm.
\item Map install somewhere (where?)
\item check existing doors for lock and rfid brand
\item dashcams for trucks?
\item Build outdoor enclosure - on hold. May use for motion dector
\item Cable covers for bay 2 camera
\item discuss camera in office first floor, is that wanted on front door? (first do rfid and door access controls)
\item fix bay 3 camera angle. (orange ladder / laptop), and mount case (screws)
\item install 6 inch cable on bay 1 camera (orange ladder)
\item install foscam in bay three, facing bay 4, to outside of bay 4. Get it higher up this time. I don't like leaving a cable out there, but I don't see doing conduit at this time...? Or should I do conduit... Maybe if it's feasible? Need conduit mounts... and hardware... edit: will need bolts, good drill bit, and nuts, to fasten camera. it's going to have to hang under top of container, or on top. use electric line powered drill - big ladder
\item put axis in bay three, possibly outlet in wall, clean up the camera, it's a bit messy
\item new outlet upstairs behind server. Do this after 3pm. NOT PRIORITY
\item take inventory of parts purchased, and discuss getting cable for door locks (will need to send email if we don't have cable already)
\end{itemize}
MAIN LIST:
\begin{itemize}
\item Move Bay 4 modector to outside wall, or maybe just closer to wall will be good enough, facing the walkway (I'd like to have it out of view).
\item Install other one camera that are remaining fro previous work. Needs sheathing.
\item door access controls, research and buy parts
\item rfid, research and have them buy parts
\item two new cameras outside. Need wiring first, then have them buy cameras and emclosures.
\item Cameras to watch tank install project waiting to hear back from jbemiller
\item need cable covers for bay 2 axis cam, and box, or a POE adapter
\item adjust front door camera down
\item Modectors in other bays, 1, 2, 3 (two in 3)
\item Consider modectors for outside, near cameras later. They will just be an alarm, perhaps on a camera as mocord, but not nodect or modect. Otherwise, they will be on their own section as an alarm.
\item Map install somewhere (where?)
\item check existing doors for lock and rfid brand
\item dashcams for trucks?
\item Build outdoor enclosure - on hold. May use for motion dector
\item Cable covers for bay 2 camera
\item discuss camera in office first floor, is that wanted on front door? (first do rfid and door access controls)
\item get power strip to replace one I personally brought for bay 4.
\item buy surge protectorss = ethernet, microcenter, for two spots, after server, and after bay 2
\item commtank needs poe adapters for cameras. needs 1 at the moment
\item buy hammond boxes for outdoor wiring, waterproof. need to hold wires, maybe motion detector...
\item put axis in bay three, possibly outlet in wall, clean up the camera, it's a bit messy
\item new outlet upstairs behind server. Do this after 3pm. NOT PRIORITY
\item take inventory of parts purchased, and discuss getting cable for door locks (will need to send email if we don't have cable already)
\end{itemize}
MAIN LIST:
\begin{itemize}
\item Move Bay 4 modector to outside wall, or maybe just closer to wall will be good enough, facing the walkway (I'd like to have it out of view).
\item Install other one camera that are remaining fro previous work. Needs sheathing.
\item door access controls, research and buy parts
\item rfid for tool rooms, research and have them buy parts
\item two new cameras outside. Need wiring first, then have them buy cameras and emclosures.
\item Cameras to watch tank install project waiting to hear back from jbemiller
\item need cable covers for bay 2 axis cam, and box, or a POE adapter
\item adjust front door camera down
\item Modectors in other bays, 1, 2, 3 (two in 3)
\item Consider modectors for outside, near cameras later. They will just be an alarm, perhaps on a camera as mocord, but not nodect or modect. Otherwise, they will be on their own section as an alarm.
\item Map install somewhere (where?)
\item check existing doors for lock and rfid brand
\item dashcams for trucks?
\item Build outdoor enclosure - on hold. May use for motion dector
\item discuss camera in office first floor, is that wanted on front door? (first do rfid and door access controls)
\item get power strip to replace one I personally brought for bay 4.
\item buy surge protectorss = ethernet, microcenter, for two spots, after server, and after bay 2
\item commtank needs poe adapters for cameras. needs 1 at the moment
\item buy hammond boxes for outdoor wiring, waterproof. need to hold wires, maybe motion detector...
\item Setup email alerts for Kevin's home cctv
\item possibly conduit to bay 2 camera axis
\item conduit for wire that goes to container. have it wrap around back? Need to do in mild, but not summer weather (as bees in container)
\item get conduit hardware for steel container (bolts)
\item get metal drilling bit, for drilling into container
\item bring jigsaw for bay 3 camera
\item adjust cameras in bay 4, move foscam, to right end. add axis to middle. Have them looking opposite each other.
\item make and install motion detectors.
\item Point Mechanic bay 2 old analog camera down slightly. It is pointed too far up.
\item new outlet upstairs behind server. Do this after 3pm. NOT PRIORITY
\item bring wood bits to ctank, so can put hole in above rfid door sensor
\item measure door opening, to see whether 11/32 or 5/8ths on upstairs first bay and bay 4.
\end{itemize}
MAIN LIST:
\begin{itemize}
\item Move Bay 4 modector to outside wall, or maybe just closer to wall will be good enough, facing the walkway (I'd like to have it out of view).
\item Install other one camera that are remaining fro previous work. Needs sheathing.
\item door access controls, research and buy parts
\item rfid for tool rooms, research and have them buy parts
\item two new cameras outside. Need wiring first, then have them buy cameras and emclosures.
\item Cameras to watch tank install project waiting to hear back from jbemiller
\item need cable covers for bay 2 axis cam, and box, or a POE adapter
\item adjust front door camera down
\item Modectors in other bays, 1, 2, 3 (two in 3)
\item Consider modectors for outside, near cameras later. They will just be an alarm, perhaps on a camera as mocord, but not nodect or modect. Otherwise, they will be on their own section as an alarm.
\item Map install somewhere (where?)
\item check existing doors for lock and rfid brand
\item dashcams for trucks?
\item Build outdoor enclosure - on hold. May use for motion dector
\item discuss camera in office first floor, is that wanted on front door? (first do rfid and door access controls)
\item get power strip to replace one I personally brought for bay 4.
\item buy surge protectorss = ethernet, microcenter, for two spots, after server, and after bay 2
\item commtank needs poe adapters for cameras. needs 1 at the moment
\item buy hammond boxes for outdoor wiring, waterproof. need to hold wires, maybe motion detector...
\item Setup email alerts for Kevin's home cctv
\item possibly conduit to bay 2 camera axis
\item conduit for wire that goes to container. have it wrap around back? Need to do in mild, but not summer weather (as bees in container)
\item get conduit hardware for steel container (bolts)
\item get metal drilling bit, for drilling into container
\item bring jigsaw for bay 3 camera
\item adjust cameras in bay 4, move foscam, to right end. add axis to middle. Have them looking opposite each other.
\item make and install motion detectors.
\item Point Mechanic bay 2 old analog camera down slightly. It is pointed too far up.
\item new outlet upstairs behind server. Do this after 3pm. NOT PRIORITY
\item bring wood bits to ctank, so can put hole in above rfid door sensor
\item measure door opening, to see whether 11/32 or 5/8ths on upstairs first bay and bay 4.
\end{itemize}
MAIN LIST:
\begin{itemize}
\item fuses for all cameras
\item replace all electrical boxes with larger boxes, so there is enough room for everything.
\item Move Bay 4 modector to outside wall, or maybe just closer to wall will be good enough, facing the walkway (I'd like to have it out of view).
\item Install other one camera that are remaining fro previous work. Needs sheathing.
\item door access controls, research and buy parts
\item rfid for tool rooms, research and have them buy parts
\item two new cameras outside. Need wiring first, then have them buy cameras and emclosures.
\item Cameras to watch tank install project waiting to hear back from jbemiller
\item need cable covers for bay 2 axis cam, and box, or a POE adapter
\item adjust front door camera down
\item Modectors in other bays, 1, 2, 3 (two in 3)
\item Consider modectors for outside, near cameras later. They will just be an alarm, perhaps on a camera as mocord, but not nodect or modect. Otherwise, they will be on their own section as an alarm.
\item Map install somewhere (where?)
\item check existing doors for lock and rfid brand
\item dashcams for trucks?
\item Build outdoor enclosure - on hold. May use for motion dector
\item discuss camera in office first floor, is that wanted on front door? (first do rfid and door access controls)
\item get power strip to replace one I personally brought for bay 4.
\item buy surge protectorss = ethernet, microcenter, for two spots, after server, and after bay 2
\item commtank needs poe adapters for cameras. needs 1 at the moment
\item buy hammond boxes for outdoor wiring, waterproof. need to hold wires, maybe motion detector...
\item Setup email alerts for Kevin's home cctv
\item possibly conduit to bay 2 camera axis
\item conduit for wire that goes to container. have it wrap around back? Need to do in mild, but not summer weather (as bees in container)
\item get conduit hardware for steel container (bolts)
\item get metal drilling bit, for drilling into container
\item bring jigsaw for bay 3 camera
\item adjust cameras in bay 4, move foscam, to right end. add axis to middle. Have them looking opposite each other.
\item make and install motion detectors.
\item Point Mechanic bay 2 old analog camera down slightly. It is pointed too far up.
\@writefile{lof}{\contentsline{figure}{\numberline{1}{\ignorespaces Cut out with pliers and reuse parts.\relax}}{6}}
\@writefile{lof}{\contentsline{figure}{\numberline{1}{\ignorespaces Cut out with pliers and reuse parts.\relax}}{6}}
\@writefile{toc}{\contentsline{subsubsection}{\numberline{2.3.1}Ripped off by temperature sensors}{6}}
\@writefile{toc}{\contentsline{subsubsection}{\numberline{2.3.1}Ripped off by temperature sensors}{7}}
\@writefile{lof}{\contentsline{figure}{\numberline{2}{\ignorespaces technoblogy has an article on using a micro with an external thermocouple\relax}}{7}}
\@writefile{lof}{\contentsline{figure}{\numberline{2}{\ignorespaces technoblogy has an article on using a micro with an external thermocouple\relax}}{7}}
@ -226,6 +226,27 @@ On the subject of boms, I have made two. The LT portion is complex, and requires
Looks like the SOD323, diode / SC-73 package is near the 0805 package in size. SOD323 is slightly smaller, but not by much. They are probably interchangeable in practice.
Looks like the SOD323, diode / SC-73 package is near the 0805 package in size. SOD323 is slightly smaller, but not by much. They are probably interchangeable in practice.
\section{PCB Build and Test Notes}
I built the PCB. There were a few errors which I've put in the TODO file, but nothing show stopping. There will be a rev2 pcb. A few notes:
On the LT1512, if you float the voltage divider, and Feedback pin, the device will short out. My power supply continually is saving me on this.
For the voltage divider, you don't actually see the float voltage, between R1, and R2 of the divider, I don't think. The voltage, however does rise, above the divider, where the Vsw pin is. What you do see is the 1.24 reference, or some voltage near it.
What I'm seeing now, is if you connect a scope probe to the lt charge pin, (pin which charges the battery) you can adjust the divider and see the voltage rise. That must be the float voltage. Meanwhile, the feedback pin, which is downstream of the charge pin, has always about 1.24 or so.
So seems to work well. For a while, I misunderstood how the voltage divider was supposed to work, and spent a few hours double checking the divider values. I had wired the switches wrong in rev 1, but that was not the issue. The issue was my expectation to see the voltage between the divider actually be the float voltage, when that float voltage was above the divider. Must be some transistor math doing a calculation on the voltage divider.
With the 0.2 ohm resistor (in typical application first page of LT1512 data sheet), I had changed it to a 1ohm. That was still not enough, and I instead substituted in a 10ohm. This limits charging to 10mA. The 1 ohm resistor seemed to have some issue of high float voltages causing thermal runway... Maybe a 5 ohm resistor can be used for 20mA charging. This was only on high float voltages. With the 1 Nicd, I was able to do 80-100mA of charging, without issue. But once float is around 5-6 volts you start to get issues with the current growing exponentially from the main PSU, and the LT1512 chip overheating. (At \$8 each, a melted chip is to be avoided).
\subsection{Current usage, and Solar Project}
This project is a descendant of the solar battery charger project. I'm going to restart that project with some of these components, but might use the LT1372, or some other more efficient regulator. No current limiting should be necessary, given that I will use small solar panels (though current limit, might need to be in consideration).
The INA169 draws about 90uA when measuring the 10mA of current going through for a 6V lead battery.
\@writefile{lof}{\contentsline{figure}{\numberline{1}{\ignorespaces Cut out with pliers and reuse parts.\relax}}{6}}
\@writefile{toc}{\contentsline{subsubsection}{\numberline{2.3.1}Ripped off by temperature sensors}{7}}
\@writefile{lof}{\contentsline{figure}{\numberline{2}{\ignorespaces technoblogy has an article on using a micro with an external thermocouple\relax}}{7}}
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:
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.
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.
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)
\subsection{Current monitor}
I considered doing an (high side) op amp with external resistors per AN1322 microchip app note, but decided to go instead with a current monitor, ala ina169. There are a number of INA chips being advertised. Adafruit, for example sells the INA219 and there are many articles
about other current sense in the same family. There is the shunt
resistor value, and the gain resistor to set. I will use based off of the adafruit example, as well as the ti example a 1ohm shunt (for up to 1A readings, seems as you decrease the shunt you get more capacity in amperage to read), with a 1K gain resistor, which TI gives as an example in a table. That means voltage will equal current.
For the inductor
see lt data sheet for details.
must not be series resistance greater than 0.1 ohms.
\subsection{PCB Revision - Modular Parts}
I decided to route out some of the pcb, so I can possibly reuse the temperature sensor and perhaps the lithium battery charger. This was on revision 2. I got the first revision already made after a marathon one Sunday morning from 8-2pm. Here's how it is routed out.
\includegraphics{../pics/modular_reusable.jpg}
\captionof{figure}{Cut out with pliers and reuse parts.}
\subsubsection{Ripped off by temperature sensors}
The community around Arduino advertises the LM35, advertises the MAX6675. The latter is \$10 in one off quantity (\$5 from ebay), the former isn't cheap either, at \$2.00 about. Though the LM35 has a much more limited range. The LM35 is great as it's extremely simple to use (power and read voltage which converts directly to temperature).
I'll have to find an alternative for the MAX6675. At \$10 it's just stupid. A micro can do temperature as well. Maybe \$5 would be acceptable, but \$10 is not. How big are your pockets?
\captionof{figure}{technoblogy has an article on using a micro with an external thermocouple}
Cheapest thermocouple on Digikey, is a digilent (they just import) thermocouple at \$10. Next is a DFRobot (chinese adafruit) at \$30 with a module included. Thermocouples are not cheap! Onto ebay.\footnote{Thermocouples: I forgot how they work today. I've read of them before but haven't used them much (have seen them in toasters. Now that I know they are worth \$5-10 I'm going to start retrieving them from broken toasters). When two dissimilar metals are put together, and then the metals are heated, you can get a voltage across them. This voltage can be read with an ADC. This phenomenon has a name, but the name is not important. Names just add another thing you need to remember. Bad idea. (OK, I remembered it, now I can fool myself into feeling intelligent - seebeck effect. Now let me go count my hertz, and volts, and teslas...) Wikipedia calls it the thermoelectric effect.}
After some research I decided to go with the Digilent probe. The cheapest used probe on ebay is \$10. I don't want the new ones from US, which is only \$5 cheaper.
\section{Bom Notes}
I should try to get rid of some expensive items where possible.
\vspace{0.2in}
tantalum is \$1. Try a ceramic.
MAX6675 is \$10.
Slide pot is just for fun. That can be removed.
\vspace{0.2in}
On the subject of boms, I have made two. The LT portion is complex, and requires its own bom. The rest of the items are on a different bom. I keep some things in stock so a few items have been omitted.
\subsubsection{SOD323 (diode) is equal to 0805}
Looks like the SOD323, diode / SC-73 package is near the 0805 package in size. SOD323 is slightly smaller, but not by much. They are probably interchangeable in practice.
\section{PCB Build and Test Notes}
I built the PCB. There were a few errors which I've put in the TODO file, but nothing show stopping. There will be a rev2 pcb. A few notes:
On the LT1512, if you float the voltage divider, and Feedback pin, the device will short out. My power supply continually is saving me on this.
For the voltage divider, you don't actually see the float voltage, between R1, and R2 of the divider, I don't think. The voltage, however does rise, above the divider, where the Vsw pin is. What you do see is the 1.24 reference, or some voltage near it.
What I'm seeing now, is if you connect a scope probe to the lt charge pin, (pin which charges the battery) you can adjust the divider and see the voltage rise. That must be the float voltage. Meanwhile, the feedback pin, which is downstream of the charge pin, has always about 1.24 or so.
So seems to work well. For a while, I misunderstood how the voltage divider was supposed to work, and spent a few hours double checking the divider values. I had wired the switches wrong in rev 1, but that was not the issue. The issue was my expectation to see the voltage between the divider actually be the float voltage, when that float voltage was above the divider. Must be some transistor math doing a calculation on the voltage divider.
With the 0.2 ohm resistor (in typical application first page of LT1512 data sheet), I had changed it to a 1ohm. That was still not enough, and I instead substituted in a 10ohm. This limits charging to 10mA. The 1 ohm resistor seemed to have some issue of high float voltages causing thermal runway... Maybe a 5 ohm resistor can be used for 20mA charging. This was only on high float voltages. With the 1 Nicd, I was able to do 80-100mA of charging, without issue. But once float is around 5-6 volts you start to get issues with the current growing exponentially from the main PSU, and the LT1512 chip overheating. (At \$8 each, a melted chip is to be avoided).
\subsection{Current usage, and Solar Project}
This project is a descendant of the solar battery charger project. I'm going to restart that project with some of these components, but might use the LT1372, or some other more efficient regulator. No current limiting should be necessary, given that I will use small solar panels (though current limit, might need to be in consideration).
The INA169 draws about 90uA when measuring the 10mA of current going through for a 6V lead battery.
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:
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.
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.
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)
\subsection{Current monitor}
I considered doing an (high side) op amp with external resistors per AN1322 microchip app note, but decided to go instead with a current monitor, ala ina169. There are a number of INA chips being advertised. Adafruit, for example sells the INA219 and there are many articles
about other current sense in the same family. There is the shunt
resistor value, and the gain resistor to set. I will use based off of the adafruit example, as well as the ti example a 1ohm shunt (for up to 1A readings, seems as you decrease the shunt you get more capacity in amperage to read), with a 1K gain resistor, which TI gives as an example in a table. That means voltage will equal current.
For the inductor
see lt data sheet for details.
must not be series resistance greater than 0.1 ohms.
\subsection{PCB Revision - Modular Parts}
I decided to route out some of the pcb, so I can possibly reuse the temperature sensor and perhaps the lithium battery charger. This was on revision 2. I got the first revision already made after a marathon one Sunday morning from 8-2pm. Here's how it is routed out.
\includegraphics{../pics/modular_reusable.jpg}
\captionof{figure}{Cut out with pliers and reuse parts.}
\subsubsection{Ripped off by temperature sensors}
The community around Arduino advertises the LM35, advertises the MAX6675. The latter is \$10 in one off quantity (\$5 from ebay), the former isn't cheap either, at \$2.00 about. Though the LM35 has a much more limited range. The LM35 is great as it's extremely simple to use (power and read voltage which converts directly to temperature).
I'll have to find an alternative for the MAX6675. At \$10 it's just stupid. A micro can do temperature as well. Maybe \$5 would be acceptable, but \$10 is not. How big are your pockets?
\captionof{figure}{technoblogy has an article on using a micro with an external thermocouple}
Cheapest thermocouple on Digikey, is a digilent (they just import) thermocouple at \$10. Next is a DFRobot (chinese adafruit) at \$30 with a module included. Thermocouples are not cheap! Onto ebay.\footnote{Thermocouples: I forgot how they work today. I've read of them before but haven't used them much (have seen them in toasters. Now that I know they are worth \$5-10 I'm going to start retrieving them from broken toasters). When two dissimilar metals are put together, and then the metals are heated, you can get a voltage across them. This voltage can be read with an ADC. This phenomenon has a name, but the name is not important. Names just add another thing you need to remember. Bad idea. (OK, I remembered it, now I can fool myself into feeling intelligent - seebeck effect. Now let me go count my hertz, and volts, and teslas...) Wikipedia calls it the thermoelectric effect.}
After some research I decided to go with the Digilent probe. The cheapest used probe on ebay is \$10. I don't want the new ones from US, which is only \$5 cheaper.
\section{Bom Notes}
I should try to get rid of some expensive items where possible.
\vspace{0.2in}
tantalum is \$1. Try a ceramic.
MAX6675 is \$10.
Slide pot is just for fun. That can be removed.
\vspace{0.2in}
On the subject of boms, I have made two. The LT portion is complex, and requires its own bom. The rest of the items are on a different bom. I keep some things in stock so a few items have been omitted.
\subsubsection{SOD323 (diode) is equal to 0805}
Looks like the SOD323, diode / SC-73 package is near the 0805 package in size. SOD323 is slightly smaller, but not by much. They are probably interchangeable in practice.
\section{PCB Build and Test Notes}
I built the PCB. There were a few errors which I've put in the TODO file, but nothing show stopping. There will be a rev2 pcb. A few notes:
On the LT1512, if you float the voltage divider, and Feedback pin, the device will short out. My power supply continually is saving me on this.
For the voltage divider, you don't actually see the float voltage, between R1, and R2 of the divider, I don't think. The voltage, however does rise, above the divider, where the Vsw pin is. What you do see is the 1.24 reference, or some voltage near it.
What I'm seeing now, is if you connect a scope probe to the lt charge pin, (pin which charges the battery) you can adjust the divider and see the voltage rise. That must be the float voltage. Meanwhile, the feedback pin, which is downstream of the charge pin, has always about 1.24 or so.
So seems to work well. For a while, I misunderstood how the voltage divider was supposed to work, and spent a few hours double checking the divider values. I had wired the switches wrong in rev 1, but that was not the issue. The issue was my expectation to see the voltage between the divider actually be the float voltage, when that float voltage was above the divider. Must be some transistor math doing a calculation on the voltage divider.
With the 0.2 ohm resistor (in typical application first page of LT1512 data sheet), I had changed it to a 1ohm. That was still not enough, and I instead substituted in a 10ohm. This limits charging to 10mA. The 1 ohm resistor seemed to have some issue of high float voltages causing thermal runway... Maybe a 5 ohm resistor can be used for 20mA charging. This was only on high float voltages. With the 1 Nicd, I was able to do 80-100mA of charging, without issue. But once float is around 5-6 volts you start to get issues with the current growing exponentially from the main PSU, and the LT1512 chip overheating. (At \$8 each, a melted chip is to be avoided).
\subsection{Current usage, and Solar Project}
This project is a descendant of the solar battery charger project. I'm going to restart that project with some of these components, but might use the LT1372, or some other more efficient regulator. No current limiting should be necessary, given that I will use small solar panels (though current limit, might need to be in consideration).
The INA169 draws about 90uA when measuring the 10mA of current going through for a 6V lead battery.