added cover for welding wire
[physical.git] / misc / 12V Lead-Acid battery changer and terminal / index.org
1 #+TITLE: Battery charger and dual power supply unit
2 #+AUTHOR: Svjatoslav Agejenko
3 #+LANGUAGE: en
4
5 * (document settings) :noexport:
6 ** use dark style for TWBS-HTML exporter
7 #+HTML_HEAD: <link href="https://bootswatch.com/3/darkly/bootstrap.min.css" rel="stylesheet">
8 #+HTML_HEAD: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
9 #+HTML_HEAD: <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
10 #+HTML_HEAD: <style type="text/css">
11 #+HTML_HEAD:   footer {background-color: #111 !important;}
12 #+HTML_HEAD:   pre {background-color: #111; color: #ccc;}
13 #+HTML_HEAD: </style>
14
15 * General
16 + DISCLAIMER: I DO ELECTRONICS AND 3D DESIGN SOLELY AS A HOBBY. THERE
17   COULD BE ERRORS THAT CAN RESULT IN ALL KINDS OF DAMAGE. USE THESE
18   DESIGNS AT YOUR OWN RISK.
19
20 + This design is released under Creative Commons Zero (CC0) license.
21
22 + Authors:
23   - Svjatoslav Agejenko
24     - Homepage: https://svjatoslav.eu
25     - Email: [[mailto://svjatoslav@svjatoslav.eu][svjatoslav@svjatoslav.eu]]
26
27   - Valeria Agejenko
28
29 + See also:
30   - [[../../index.html][Other physical projects in this repository]]
31   - [[https://www.svjatoslav.eu/projects/][Other projects hosted at svjatoslav.eu]]
32
33 * Project description
34 I needed dual voltage power supply for my lab that runs on mains
35 electricity (wall power) and slowly charges (use-changing) attached
36 12V Lead-Acid battery. Lead-acid battery in turn provides high current
37 when needed as well as power in portable situations or when mains
38 electricity is not available.
39
40 [[file:make.png]]
41
42 Power supply provides about 13 Volts and 5 Volts simultaneously.
43
44 *!!!WARNING!!!* [[../alternative%20USB%20layout/][Alternative and incompatible USB wiring/layout]] is
45 being used here.
46
47 *Normal USB devices and cables should not be plugged in! It would
48 damage device/cable and likely power supply.*
49
50 I found USB-A connectors to be easily available, cheap, reliable and
51 functional, so I re-purposed connector for my own needs but I'm using
52 totally incompatible electrical wiring.
53
54 [[file:../alternative%20USB%20layout/schematic.png]]
55
56 As seen, it has dual voltage output. Additionally one wire is
57 dedicated to data transmission and can be used with [[https://en.wikipedia.org/wiki/1-Wire][1-Wire]] protocol
58
59 1-Wire data router/hub is really simple. Power supply simply passively
60 links all data wires together.
61
62 Power supply uses 3D printed body with lots of holes, for fanless
63 cooling.
64
65 [[file:body%20and%20covers/body,%201.png]]
66
67 Various modules are realized on top of prototype PCBs that slide into
68 dedicated rails within the body.
69
70 [[file:body%20and%20covers/body,%202.png]]
71
72 Like this:
73
74 [[file:make,%202.png]]
75
76 When cover is closed, it blocks PCB movement:
77
78 [[file:body%20and%20covers/cover.png]]
79
80 There is still some empty space inside, so why not add dummy cover on
81 top that can be replaced later with add-on functionality/expansion
82 board/terminal :)
83
84 [[file:body%20and%20covers/cover%20cover.png]]
85
86 Download:
87 + [[file:body%20and%20covers/body.stl][Body STL file]]
88 + [[file:body%20and%20covers/cover.stl][Big cover STL file]]
89 + [[file:body%20and%20covers/cover%20cover.stl][Small dummy cover on top, STL file]]
90 + [[file:body%20and%20covers/body%20and%20covers.FCStd][Body and covers FreeCAD project]]
91
92 * Transformer and AC to DC converter
93
94 This is where high voltage from mains electricity enters the system.
95
96 Schematic:
97 [[file:transformer%20and%20AC%20DC%20converter%20board/schematic.png]]
98
99 For safety I kept high voltage section as minimal as possible. That
100 is, wall plug runs straight into transformer. Also I used [[https://www.amazon.de/gp/product/B07VGQKM3G/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1][UV hardening
101 glue]] for extra safety and isolation on PCB.
102
103 Power on/off switch operates on already reduced voltage of about 30
104 volts. Power switch is located on [[id:c9a69490-f920-4a31-b32e-b101bfc3d01b][indicator panel]].
105
106 [[file:transformer%20and%20AC%20DC%20converter%20board/make,%201.png]]
107
108 DC current of about 30 volts is then routed to [[id:65d68227-4bf2-4c4f-b4d3-c390bc6a9c34][Main board]].
109
110 [[file:transformer%20and%20AC%20DC%20converter%20board/make,%202.png]]
111
112 [[https://www.amazon.de/gp/product/B07RLQH5TR/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1][Single sided prototype PCB is used]].
113
114 * Main board
115 :PROPERTIES:
116 :ID:       65d68227-4bf2-4c4f-b4d3-c390bc6a9c34
117 :END:
118
119 This is logically main board because it appears to be central hub that
120 connects all components. It also houses 2 [[https://www.amazon.de/gp/product/B072MQYJ93/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1][adjustable DC-DC Step Down
121 voltage converters]].
122
123 [[file:main%20board/main%20board,%201.png]]
124
125 High-level schematic of entire device:
126 [[file:main%20board/schematic.png]]
127
128 As seen from schematic, ~30 volts DC from transformer board is routed
129 into first step-down converter that reduces it to about 15V. Reduced
130 voltage is then directed to [[id:afc22d23-9bc4-421c-9cac-e0ce34bd36bc][Current limiter circuit]]. Current limiter
131 loses about 2 volts. Now we have current and voltage limited power at
132 about 13 volts. This power is used to charge connected 12V Lead-Acid
133 battery. Also the same power is routed to [[id:e33940bd-652f-4ec0-b53b-1c03e16941c8][connector terminal]] to be
134 consumed by connected devices.
135
136 As seen from this schematic, device is not meant to provide high
137 current for long periods of time. Instead it gets comparatively
138 limited current to charge the battery and feed devices with low
139 current requirements. Occasional current spikes are backed up by
140 battery that stays in use-changing mode.
141
142 Also about 13V output voltage is approximate and depends on connected
143 battery charge level.
144
145 Second Step-Down converter reduces voltage even further to quite
146 precisely 5V DC. This resulting voltage is also routed to [[id:e33940bd-652f-4ec0-b53b-1c03e16941c8][connector
147 terminal]].
148
149 Both 13V and 5V lines are also routed to [[id:c9a69490-f920-4a31-b32e-b101bfc3d01b][indicator panel]] for
150 monitoring.
151
152 There is single on/off switch. In off position, it disconnects battery
153 and transformer from the system effectively powering everything down.
154
155 On schematic above, some wires are annotated with numbers from 1
156 to 13. This corresponds to output pins on the board.
157
158 [[file:main%20board/main%20board,%202.png]]
159 * Current limiter
160 :PROPERTIES:
161 :ID:       afc22d23-9bc4-421c-9cac-e0ce34bd36bc
162 :END:
163
164 Schematic:
165 [[file:current%20limiter/schematic.png]]
166
167 Simple LM317 based current limiter is used. I used 4.7 ohm
168 resistor. It provides about 265 milliamps of current. See [[http://www.reuk.co.uk/wordpress/electric-circuit/lm317-current-calculator/][calculator]].
169
170 [[file:current%20limiter/current%20limiter,%201.png]]
171
172 Thermal paste below and UV hardening glue on top is used to attach
173 LM317 to the heatsink. There is also jumper-like solution on top
174 right. This is handy to attach multimeter tap to verify/monitor
175 current during initial device calibration.
176
177 If attached battery is really empty, significant voltage drop can
178 occur in LM317. Heatsink is needed to dissipate that power.
179
180 [[file:current%20limiter/current%20limiter,%202.png]]
181
182 Note: resistor gets hot too.
183
184 * Indicator panel
185 :PROPERTIES:
186 :ID:       c9a69490-f920-4a31-b32e-b101bfc3d01b
187 :END:
188
189 [[file:indicator%20panel/indicator%20panel,%201.png]]
190
191 Basically 2 digital DC voltmeters and main on/off switch.
192
193 [[file:indicator%20panel/indicator%20panel,%202.png]]
194
195 Download:
196
197 [[file:indicator%20panel/indicator%20panel.png]]
198
199 + [[file:indicator%20panel/indicator%20panel.stl][STL file]]
200 + [[file:indicator%20panel/indicator%20panel.FCStd][FreeCAD project]]
201
202 * Connector terminal
203 :PROPERTIES:
204 :ID:       e33940bd-652f-4ec0-b53b-1c03e16941c8
205 :END:
206
207 Schematic:
208 [[file:connector%20terminal/schematic.png]]
209
210 As seen above, most of the USB connectors are used to deliver dual
211 power output and 1-wire data connectivity, except one on the bottom
212 right. This is used to attach 12V battery. Some capacitors are thrown
213 in as well to stabilize against smaller current spikes.
214
215 Electrically schematic is realized using smaller prototype PCBs.
216
217 [[file:connector%20terminal/make,%201.png]]
218
219
220 Those PCBs are wired to central small PCB that acts as a hub:
221
222 [[file:connector%20terminal/make,%202.png]]
223
224 PCBs are held together by being sandwiched between front panel:
225
226 [[file:connector%20terminal/front%20panel.png]]
227
228 and smaller back-end plate:
229
230 [[file:connector%20terminal/back%20panel.png]]
231
232 Result:
233
234 [[file:connector%20terminal/make,%203.png]]
235
236
237 Download:
238 + [[file:connector%20terminal/front%20panel.stl][front panel STL]]
239 + [[file:connector%20terminal/back%20panel.stl][back panel STL]]
240 + [[file:connector%20terminal/connector%20terminal.FCStd][FreeCAD project]]
241
242 * Calibration
243
244 Since device uses adjustable step-down modules, these need to be
245 calibrated to provide correct output voltage. It is important that
246 battery receives proper charging voltage otherwise either no charging
247 occurs or battery starts gassing out and gets destroyed.
248
249 See here for more details: https://www.powerstream.com/SLA.htm
250
251 -----
252
253 Happy building! :)