started adjustable resistor project
[physical.git] / power / 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 attached 12V Lead-Acid
36 battery. Lead-acid battery in turn provides high current when needed
37 as well as power in portable situations or when mains electricity is
38 not available.
39
40 [[file:make.png]]
41
42 Power supply provides about 13 Volts and 5 Volts simultaneously.
43
44 !!!WARNING!!! I use USB-A connectors for power output, but IT IS NOT
45 COMPATIBLE WITH USB DEVICES AND POSSIBLY WITH EXISTING USB CABLES.
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:connector%20terminal/USB%20hack.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]]
58 protocol. Power supply simply passively links all data wires together
59 but does not participate in communication.
60
61 Power supply uses 3D printed body with lots of holes, for fanless
62 cooling.
63
64 [[file:body%20and%20covers/body,%201.png]]
65
66 Various modules are realized on top of prototype PCBs that slide into
67 dedicated rails within the body.
68
69 [[file:body%20and%20covers/body,%202.png]]
70
71 Like this:
72
73 [[file:make,%202.png]]
74
75 When cover is closed, it blocks PCB movement:
76
77 [[file:body%20and%20covers/cover.png]]
78
79 There is still some empty space inside, so why not add dummy cover on
80 top that can be replaced later with add-on functionality/expansion
81 board/terminal :)
82
83 [[file:body%20and%20covers/cover%20cover.png]]
84
85 Download:
86 + [[file:body%20and%20covers/body.stl][Body STL file]]
87 + [[file:body%20and%20covers/cover.stl][Big cover STL file]]
88 + [[file:body%20and%20covers/cover%20cover.stl][Small dummy cover on top, STL file]]
89 + [[file:body%20and%20covers/body%20and%20covers.FCStd][Body and covers FreeCAD project]]
90
91 * Transformer and AC to DC converter
92
93 This is where high voltage from mains electricity enters the system.
94
95 Schematic:
96 [[file:transformer%20and%20AC%20DC%20converter%20board/schematic.png]]
97
98 For safety I kept high voltage section as minimal as possible. That
99 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
100 glue]] for extra safety and isolation on PCB.
101
102 Power on/off switch operates on already reduced voltage of about 30
103 volts. Power switch is located on [[id:c9a69490-f920-4a31-b32e-b101bfc3d01b][indicator panel]].
104
105 [[file:transformer%20and%20AC%20DC%20converter%20board/make,%201.png]]
106
107 DC current of about 30 volts is then routed to [[id:65d68227-4bf2-4c4f-b4d3-c390bc6a9c34][Main board]].
108
109 [[file:transformer%20and%20AC%20DC%20converter%20board/make,%202.png]]
110
111 [[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]].
112
113 * Main board
114 :PROPERTIES:
115 :ID:       65d68227-4bf2-4c4f-b4d3-c390bc6a9c34
116 :END:
117
118 This is logically main board because it appears to be central hub that
119 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
120 voltage converters]].
121
122 [[file:main%20board/main%20board,%201.png]]
123
124 High-level schematic of entire device:
125 [[file:main%20board/schematic.png]]
126
127 As seen from schematic, ~30 volts DC from transformer board is routed
128 into first step-down converter that reduces it to about 15V. Reduced
129 voltage is then directed to [[id:afc22d23-9bc4-421c-9cac-e0ce34bd36bc][Current limiter circuit]]. Current limiter
130 loses about 2 volts. Now we have current and voltage limited power at
131 about 13 volts. This power is used to charge connected 12V Lead-Acid
132 battery. Also the same power is routed to [[id:e33940bd-652f-4ec0-b53b-1c03e16941c8][connector terminal]] to be
133 consumed by connected devices.
134
135 As seen from this schematic, device is not meant to provide high
136 current for long periods of time. Instead it gets comparatively
137 limited current to charge the battery and feed devices with low
138 current requirements. Occasional current spikes are backed up by
139 battery that stays in use-changing mode.
140
141 Also about 13V output voltage is approximate and depends on connected
142 battery charge level.
143
144 Second Step-Down converter reduces voltage even further to quite
145 precisely 5V DC. This resulting voltage is also routed to [[id:e33940bd-652f-4ec0-b53b-1c03e16941c8][connector
146 terminal]].
147
148 Both 13V and 5V lines are also routed to [[id:c9a69490-f920-4a31-b32e-b101bfc3d01b][indicator panel]] for
149 monitoring.
150
151 There is single on/off switch. In off position, it disconnects battery
152 and transformer from the system effectively powering everything down.
153
154 On schematic above, some wires are annotated with numbers from 1
155 to 13. This corresponds to output pins on the board.
156
157 [[file:main%20board/main%20board,%202.png]]
158 * Current limiter
159 :PROPERTIES:
160 :ID:       afc22d23-9bc4-421c-9cac-e0ce34bd36bc
161 :END:
162
163 Schematic:
164 [[file:current%20limiter/schematic.png]]
165
166 Simple LM317 based current limiter is used. I used 4.7 ohm
167 resistor. It provides about 265 milliamps of current. See [[http://www.reuk.co.uk/wordpress/electric-circuit/lm317-current-calculator/][calculator]].
168
169 [[file:current%20limiter/current%20limiter,%201.png]]
170
171 Thermal paste below and UV hardening glue on top is used to attach
172 LM317 to the heatsink. There is also jumper-like solution on top
173 right. This is handy to attach multimeter tap to verify/monitor
174 current during initial device calibration.
175
176 If attached battery is really empty, significant voltage drop can
177 occur in LM317. Heatsink is needed to dissipate that power.
178
179 [[file:current%20limiter/current%20limiter,%202.png]]
180
181 Note: resistor gets hot too.
182
183 * Indicator panel
184 :PROPERTIES:
185 :ID:       c9a69490-f920-4a31-b32e-b101bfc3d01b
186 :END:
187
188 [[file:indicator%20panel/indicator%20panel,%201.png]]
189
190 Basically 2 digital DC voltmeters and main on/off switch.
191
192 [[file:indicator%20panel/indicator%20panel,%202.png]]
193
194 Download:
195
196 [[file:indicator%20panel/indicator%20panel.png]]
197
198 + [[file:indicator%20panel/indicator%20panel.stl][STL file]]
199 + [[file:indicator%20panel/indicator%20panel.FCStd][FreeCAD project]]
200
201 * Connector terminal
202 :PROPERTIES:
203 :ID:       e33940bd-652f-4ec0-b53b-1c03e16941c8
204 :END:
205
206 Schematic:
207 [[file:connector%20terminal/schematic.png]]
208
209 As seen above, most of the USB connectors are used to deliver dual
210 power output and 1-wire data connectivity, except one on the bottom
211 right. This is used to attach 12V battery. Some capacitors are thrown
212 in as well to stabilize against smaller current spikes.
213
214 Electrically schematic is realized using smaller prototype PCBs.
215
216 [[file:connector%20terminal/make,%201.png]]
217
218
219 Those PCBs are wired to central small PCB that acts as a hub:
220
221 [[file:connector%20terminal/make,%202.png]]
222
223 PCBs are held together by being sandwiched between front panel:
224
225 [[file:connector%20terminal/front%20panel.png]]
226
227 and smaller back-end plate:
228
229 [[file:connector%20terminal/back%20panel.png]]
230
231 Result:
232
233 [[file:connector%20terminal/make,%203.png]]
234
235
236 Download:
237 + [[file:connector%20terminal/front%20panel.stl][front panel STL]]
238 + [[file:connector%20terminal/back%20panel.stl][back panel STL]]
239 + [[file:connector%20terminal/connector%20terminal.FCStd][FreeCAD project]]
240
241 * Calibration
242
243 Since device uses adjustable step-down modules, these need to be
244 calibrated to provide correct output voltage. It is important that
245 battery receives proper charging voltage otherwise either no charging
246 occurs or battery starts gassing out and gets destroyed.
247
248 See here for more details: https://www.powerstream.com/SLA.htm
249
250 -----
251
252 Happy building! :)