started adjustable resistor project
[physical.git] / power / 12V Lead-Acid battery changer and terminal / index.html
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <title>Battery charger and dual power supply unit</title>
5 <!-- 2020-07-12 Sun 02:52 -->
6 <meta charset="utf-8">
7 <meta name="viewport" content="width=device-width, initial-scale=1">
8 <meta name="generator" content="Org-mode">
9 <meta name="author" content="Svjatoslav Agejenko">
10 <link href="https://bootswatch.com/3/darkly/bootstrap.min.css" rel="stylesheet">
11 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
12 <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
13 <style type="text/css">
14 footer {background-color: #111 !important;}
15 pre {background-color: #111; color: #ccc;}
16 </style>
17 <style type="text/css">
18 /* org mode styles on top of twbs */
19
20 html {
21     position: relative;
22     min-height: 100%;
23 }
24
25 body {
26     font-size: 18px;
27     margin-bottom: 105px;
28 }
29
30 footer {
31     position: absolute;
32     bottom: 0;
33     width: 100%;
34     height: 101px;
35     background-color: #f5f5f5;
36 }
37
38 footer > div {
39     padding: 10px;
40 }
41
42 footer p {
43     margin: 0 0 5px;
44     text-align: center;
45     font-size: 16px;
46 }
47
48 #table-of-contents {
49     margin-top: 20px;
50     margin-bottom: 20px;
51 }
52
53 blockquote p {
54     font-size: 18px;
55 }
56
57 pre {
58     font-size: 16px;
59 }
60
61 .footpara {
62     display: inline-block;
63 }
64
65 figcaption {
66   font-size: 16px;
67   color: #666;
68   font-style: italic;
69   padding-bottom: 15px;
70 }
71
72 /* from twbs docs */
73
74 .bs-docs-sidebar.affix {
75     position: static;
76 }
77 @media (min-width: 768px) {
78     .bs-docs-sidebar {
79         padding-left: 20px;
80     }
81 }
82
83 /* All levels of nav */
84 .bs-docs-sidebar .nav > li > a {
85     display: block;
86     padding: 4px 20px;
87     font-size: 14px;
88     font-weight: 500;
89     color: #999;
90 }
91 .bs-docs-sidebar .nav > li > a:hover,
92 .bs-docs-sidebar .nav > li > a:focus {
93     padding-left: 19px;
94     color: #A1283B;
95     text-decoration: none;
96     background-color: transparent;
97     border-left: 1px solid #A1283B;
98 }
99 .bs-docs-sidebar .nav > .active > a,
100 .bs-docs-sidebar .nav > .active:hover > a,
101 .bs-docs-sidebar .nav > .active:focus > a {
102     padding-left: 18px;
103     font-weight: bold;
104     color: #A1283B;
105     background-color: transparent;
106     border-left: 2px solid #A1283B;
107 }
108
109 /* Nav: second level (shown on .active) */
110 .bs-docs-sidebar .nav .nav {
111     display: none; /* Hide by default, but at >768px, show it */
112     padding-bottom: 10px;
113 }
114 .bs-docs-sidebar .nav .nav > li > a {
115     padding-top: 1px;
116     padding-bottom: 1px;
117     padding-left: 30px;
118     font-size: 12px;
119     font-weight: normal;
120 }
121 .bs-docs-sidebar .nav .nav > li > a:hover,
122 .bs-docs-sidebar .nav .nav > li > a:focus {
123     padding-left: 29px;
124 }
125 .bs-docs-sidebar .nav .nav > .active > a,
126 .bs-docs-sidebar .nav .nav > .active:hover > a,
127 .bs-docs-sidebar .nav .nav > .active:focus > a {
128     padding-left: 28px;
129     font-weight: 500;
130 }
131
132 /* Nav: third level (shown on .active) */
133 .bs-docs-sidebar .nav .nav .nav {
134     padding-bottom: 10px;
135 }
136 .bs-docs-sidebar .nav .nav .nav > li > a {
137     padding-top: 1px;
138     padding-bottom: 1px;
139     padding-left: 40px;
140     font-size: 12px;
141     font-weight: normal;
142 }
143 .bs-docs-sidebar .nav .nav .nav > li > a:hover,
144 .bs-docs-sidebar .nav .nav .nav > li > a:focus {
145     padding-left: 39px;
146 }
147 .bs-docs-sidebar .nav .nav .nav > .active > a,
148 .bs-docs-sidebar .nav .nav .nav > .active:hover > a,
149 .bs-docs-sidebar .nav .nav .nav > .active:focus > a {
150     padding-left: 38px;
151     font-weight: 500;
152 }
153
154 /* Show and affix the side nav when space allows it */
155 @media (min-width: 992px) {
156     .bs-docs-sidebar .nav > .active > ul {
157         display: block;
158     }
159     /* Widen the fixed sidebar */
160     .bs-docs-sidebar.affix,
161     .bs-docs-sidebar.affix-bottom {
162         width: 213px;
163     }
164     .bs-docs-sidebar.affix {
165         position: fixed; /* Undo the static from mobile first approach */
166         top: 20px;
167     }
168     .bs-docs-sidebar.affix-bottom {
169         position: absolute; /* Undo the static from mobile first approach */
170     }
171     .bs-docs-sidebar.affix .bs-docs-sidenav,.bs-docs-sidebar.affix-bottom .bs-docs-sidenav {
172         margin-top: 0;
173         margin-bottom: 0
174     }
175 }
176 @media (min-width: 1200px) {
177     /* Widen the fixed sidebar again */
178     .bs-docs-sidebar.affix-bottom,
179     .bs-docs-sidebar.affix {
180         width: 263px;
181     }
182 }
183 </style>
184 <script type="text/javascript">
185 $(function() {
186     'use strict';
187
188     $('.bs-docs-sidebar li').first().addClass('active');
189
190     $(document.body).scrollspy({target: '.bs-docs-sidebar'});
191
192     $('.bs-docs-sidebar').affix();
193 });
194 </script>
195 </head>
196 <body>
197 <div id="content" class="container">
198 <div class="row"><div class="col-md-9"><h1 class="title">Battery charger and dual power supply unit</h1>
199
200 <div id="outline-container-sec-1" class="outline-2">
201 <h2 id="sec-1"><span class="section-number-2">1</span> General</h2>
202 <div class="outline-text-2" id="text-1">
203 <ul class="org-ul">
204 <li>DISCLAIMER: I DO ELECTRONICS AND 3D DESIGN SOLELY AS A HOBBY. THERE
205 COULD BE ERRORS THAT CAN RESULT IN ALL KINDS OF DAMAGE. USE THESE
206 DESIGNS AT YOUR OWN RISK.
207 </li>
208
209 <li>This design is released under Creative Commons Zero (CC0) license.
210 </li>
211
212 <li>Authors:
213 <ul class="org-ul">
214 <li>Svjatoslav Agejenko
215 <ul class="org-ul">
216 <li>Homepage: <a href="https://svjatoslav.eu">https://svjatoslav.eu</a>
217 </li>
218 <li>Email: <a href="mailto://svjatoslav@svjatoslav.eu">svjatoslav@svjatoslav.eu</a>
219 </li>
220 </ul>
221 </li>
222
223 <li>Valeria Agejenko
224 </li>
225 </ul>
226 </li>
227
228 <li>See also:
229 <ul class="org-ul">
230 <li><a href="../../index.html">Other physical projects in this repository</a>
231 </li>
232 <li><a href="https://www.svjatoslav.eu/projects/">Other projects hosted at svjatoslav.eu</a>
233 </li>
234 </ul>
235 </li>
236 </ul>
237 </div>
238 </div>
239
240 <div id="outline-container-sec-2" class="outline-2">
241 <h2 id="sec-2"><span class="section-number-2">2</span> Project description</h2>
242 <div class="outline-text-2" id="text-2">
243 <p>
244 I needed dual voltage power supply for my lab that runs on mains
245 electricity (wall power) and slowly charges attached 12V Lead-Acid
246 battery. Lead-acid battery in turn provides high current when needed
247 as well as power in portable situations or when mains electricity is
248 not available.
249 </p>
250
251
252 <figure>
253 <p><img src="make.png" class="img-responsive" alt="make.png">
254 </p>
255 </figure>
256
257 <p>
258 Power supply provides about 13 Volts and 5 Volts simultaneously.
259 </p>
260
261 <p>
262 !!!WARNING!!! I use USB-A connectors for power output, but IT IS NOT
263 COMPATIBLE WITH USB DEVICES AND POSSIBLY WITH EXISTING USB CABLES.
264 </p>
265
266 <p>
267 Normal USB devices and cables should not be plugged in! It would
268 damage device/cable and likely power supply.
269 </p>
270
271 <p>
272 I found USB-A connectors to be easily available, cheap, reliable and
273 functional, so I re-purposed connector for my own needs but I'm using
274 totally incompatible electrical wiring.
275 </p>
276
277
278 <figure>
279 <p><img src="connector%20terminal/USB%20hack.png" class="img-responsive" alt="USB%20hack.png">
280 </p>
281 </figure>
282
283 <p>
284 As seen, it has dual voltage output. Additionally one wire is
285 dedicated to data transmission and can be used with <a href="https://en.wikipedia.org/wiki/1-Wire">1-wire</a>
286 protocol. Power supply simply passively links all data wires together
287 but does not participate in communication.
288 </p>
289
290 <p>
291 Power supply uses 3D printed body with lots of holes, for fanless
292 cooling.
293 </p>
294
295
296 <figure>
297 <p><img src="body%20and%20covers/body,%201.png" class="img-responsive" alt="body,%201.png">
298 </p>
299 </figure>
300
301 <p>
302 Various modules are realized on top of prototype PCBs that slide into
303 dedicated rails within the body.
304 </p>
305
306
307 <figure>
308 <p><img src="body%20and%20covers/body,%202.png" class="img-responsive" alt="body,%202.png">
309 </p>
310 </figure>
311
312 <p>
313 Like this:
314 </p>
315
316
317 <figure>
318 <p><img src="make,%202.png" class="img-responsive" alt="make,%202.png">
319 </p>
320 </figure>
321
322 <p>
323 When cover is closed, it blocks PCB movement:
324 </p>
325
326
327 <figure>
328 <p><img src="body%20and%20covers/cover.png" class="img-responsive" alt="cover.png">
329 </p>
330 </figure>
331
332 <p>
333 There is still some empty space inside, so why not add dummy cover on
334 top that can be replaced later with add-on functionality/expansion
335 board/terminal :)
336 </p>
337
338
339 <figure>
340 <p><img src="body%20and%20covers/cover%20cover.png" class="img-responsive" alt="cover%20cover.png">
341 </p>
342 </figure>
343
344 <p>
345 Download:
346 </p>
347 <ul class="org-ul">
348 <li><a href="body%20and%20covers/body.stl">Body STL file</a>
349 </li>
350 <li><a href="body%20and%20covers/cover.stl">Big cover STL file</a>
351 </li>
352 <li><a href="body%20and%20covers/cover%20cover.stl">Small dummy cover on top, STL file</a>
353 </li>
354 <li><a href="body%20and%20covers/body%20and%20covers.FCStd">Body and covers FreeCAD project</a>
355 </li>
356 </ul>
357 </div>
358 </div>
359
360 <div id="outline-container-sec-3" class="outline-2">
361 <h2 id="sec-3"><span class="section-number-2">3</span> Transformer and AC to DC converter</h2>
362 <div class="outline-text-2" id="text-3">
363 <p>
364 This is where high voltage from mains electricity enters the system.
365 </p>
366
367 <p>
368 Schematic:
369 <img src="transformer%20and%20AC%20DC%20converter%20board/schematic.png" class="img-responsive" alt="schematic.png">
370 </p>
371
372 <p>
373 For safety I kept high voltage section as minimal as possible. That
374 is, wall plug runs straight into transformer. Also I used <a href="https://www.amazon.de/gp/product/B07VGQKM3G/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&amp;psc=1">UV hardening
375 glue</a> for extra safety and isolation on PCB.
376 </p>
377
378 <p>
379 Power on/off switch operates on already reduced voltage of about 30
380 volts. Power switch is located on <a href="#sec-6">indicator panel</a>.
381 </p>
382
383
384 <figure>
385 <p><img src="transformer%20and%20AC%20DC%20converter%20board/make,%201.png" class="img-responsive" alt="make,%201.png">
386 </p>
387 </figure>
388
389 <p>
390 DC current of about 30 volts is then routed to <a href="#sec-4">Main board</a>.
391 </p>
392
393
394 <figure>
395 <p><img src="transformer%20and%20AC%20DC%20converter%20board/make,%202.png" class="img-responsive" alt="make,%202.png">
396 </p>
397 </figure>
398
399 <p>
400 <a href="https://www.amazon.de/gp/product/B07RLQH5TR/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&amp;psc=1">Single sided prototype PCB is used</a>.
401 </p>
402 </div>
403 </div>
404
405 <div id="outline-container-sec-4" class="outline-2">
406 <h2 id="sec-4"><a id="ID-65d68227-4bf2-4c4f-b4d3-c390bc6a9c34" name="ID-65d68227-4bf2-4c4f-b4d3-c390bc6a9c34"></a><span class="section-number-2">4</span> Main board</h2>
407 <div class="outline-text-2" id="text-4">
408 <p>
409 This is logically main board because it appears to be central hub that
410 connects all components. It also houses 2 <a href="https://www.amazon.de/gp/product/B072MQYJ93/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&amp;psc=1">adjustable DC-DC Step Down
411 voltage converters</a>.
412 </p>
413
414
415 <figure>
416 <p><img src="main%20board/main%20board,%201.png" class="img-responsive" alt="main%20board,%201.png">
417 </p>
418 </figure>
419
420 <p>
421 High-level schematic of entire device:
422 <img src="main%20board/schematic.png" class="img-responsive" alt="schematic.png">
423 </p>
424
425 <p>
426 As seen from schematic, ~30 volts DC from transformer board is routed
427 into first step-down converter that reduces it to about 15V. Reduced
428 voltage is then directed to <a href="#sec-5">Current limiter circuit</a>. Current limiter
429 loses about 2 volts. Now we have current and voltage limited power at
430 about 13 volts. This power is used to charge connected 12V Lead-Acid
431 battery. Also the same power is routed to <a href="#sec-7">connector terminal</a> to be
432 consumed by connected devices.
433 </p>
434
435 <p>
436 As seen from this schematic, device is not meant to provide high
437 current for long periods of time. Instead it gets comparatively
438 limited current to charge the battery and feed devices with low
439 current requirements. Occasional current spikes are backed up by
440 battery that stays in use-changing mode.
441 </p>
442
443 <p>
444 Also about 13V output voltage is approximate and depends on connected
445 battery charge level.
446 </p>
447
448 <p>
449 Second Step-Down converter reduces voltage even further to quite
450 precisely 5V DC. This resulting voltage is also routed to <a href="#sec-7">connector
451 terminal</a>.
452 </p>
453
454 <p>
455 Both 13V and 5V lines are also routed to <a href="#sec-6">indicator panel</a> for
456 monitoring.
457 </p>
458
459 <p>
460 There is single on/off switch. In off position, it disconnects battery
461 and transformer from the system effectively powering everything down.
462 </p>
463
464 <p>
465 On schematic above, some wires are annotated with numbers from 1
466 to 13. This corresponds to output pins on the board.
467 </p>
468
469
470 <figure>
471 <p><img src="main%20board/main%20board,%202.png" class="img-responsive" alt="main%20board,%202.png">
472 </p>
473 </figure>
474 </div>
475 </div>
476 <div id="outline-container-sec-5" class="outline-2">
477 <h2 id="sec-5"><a id="ID-afc22d23-9bc4-421c-9cac-e0ce34bd36bc" name="ID-afc22d23-9bc4-421c-9cac-e0ce34bd36bc"></a><span class="section-number-2">5</span> Current limiter</h2>
478 <div class="outline-text-2" id="text-5">
479 <p>
480 Schematic:
481 <img src="current%20limiter/schematic.png" class="img-responsive" alt="schematic.png">
482 </p>
483
484 <p>
485 Simple LM317 based current limiter is used. I used 4.7 ohm
486 resistor. It provides about 265 milliamps of current. See <a href="http://www.reuk.co.uk/wordpress/electric-circuit/lm317-current-calculator/">calculator</a>.
487 </p>
488
489
490 <figure>
491 <p><img src="current%20limiter/current%20limiter,%201.png" class="img-responsive" alt="current%20limiter,%201.png">
492 </p>
493 </figure>
494
495 <p>
496 Thermal paste below and UV hardening glue on top is used to attach
497 LM317 to the heatsink. There is also jumper-like solution on top
498 right. This is handy to attach multimeter tap to verify/monitor
499 current during initial device calibration.
500 </p>
501
502 <p>
503 If attached battery is really empty, significant voltage drop can
504 occur in LM317. Heatsink is needed to dissipate that power.
505 </p>
506
507
508 <figure>
509 <p><img src="current%20limiter/current%20limiter,%202.png" class="img-responsive" alt="current%20limiter,%202.png">
510 </p>
511 </figure>
512
513 <p>
514 Note: resistor gets hot too.
515 </p>
516 </div>
517 </div>
518
519 <div id="outline-container-sec-6" class="outline-2">
520 <h2 id="sec-6"><a id="ID-c9a69490-f920-4a31-b32e-b101bfc3d01b" name="ID-c9a69490-f920-4a31-b32e-b101bfc3d01b"></a><span class="section-number-2">6</span> Indicator panel</h2>
521 <div class="outline-text-2" id="text-6">
522
523 <figure>
524 <p><img src="indicator%20panel/indicator%20panel,%201.png" class="img-responsive" alt="indicator%20panel,%201.png">
525 </p>
526 </figure>
527
528 <p>
529 Basically 2 digital DC voltmeters and main on/off switch.
530 </p>
531
532
533 <figure>
534 <p><img src="indicator%20panel/indicator%20panel,%202.png" class="img-responsive" alt="indicator%20panel,%202.png">
535 </p>
536 </figure>
537
538 <p>
539 Download:
540 </p>
541
542
543 <figure>
544 <p><img src="indicator%20panel/indicator%20panel.png" class="img-responsive" alt="indicator%20panel.png">
545 </p>
546 </figure>
547
548 <ul class="org-ul">
549 <li><a href="indicator%20panel/indicator%20panel.stl">STL file</a>
550 </li>
551 <li><a href="indicator%20panel/indicator%20panel.FCStd">FreeCAD project</a>
552 </li>
553 </ul>
554 </div>
555 </div>
556
557 <div id="outline-container-sec-7" class="outline-2">
558 <h2 id="sec-7"><a id="ID-e33940bd-652f-4ec0-b53b-1c03e16941c8" name="ID-e33940bd-652f-4ec0-b53b-1c03e16941c8"></a><span class="section-number-2">7</span> Connector terminal</h2>
559 <div class="outline-text-2" id="text-7">
560 <p>
561 Schematic:
562 <img src="connector%20terminal/schematic.png" class="img-responsive" alt="schematic.png">
563 </p>
564
565 <p>
566 As seen above, most of the USB connectors are used to deliver dual
567 power output and 1-wire data connectivity, except one on the bottom
568 right. This is used to attach 12V battery. Some capacitors are thrown
569 in as well to stabilize against smaller current spikes.
570 </p>
571
572 <p>
573 Electrically schematic is realized using smaller prototype PCBs.
574 </p>
575
576
577 <figure>
578 <p><img src="connector%20terminal/make,%201.png" class="img-responsive" alt="make,%201.png">
579 </p>
580 </figure>
581
582
583 <p>
584 Those PCBs are wired to central small PCB that acts as a hub:
585 </p>
586
587
588 <figure>
589 <p><img src="connector%20terminal/make,%202.png" class="img-responsive" alt="make,%202.png">
590 </p>
591 </figure>
592
593 <p>
594 PCBs are held together by being sandwiched between front panel:
595 </p>
596
597
598 <figure>
599 <p><img src="connector%20terminal/front%20panel.png" class="img-responsive" alt="front%20panel.png">
600 </p>
601 </figure>
602
603 <p>
604 and smaller back-end plate:
605 </p>
606
607
608 <figure>
609 <p><img src="connector%20terminal/back%20panel.png" class="img-responsive" alt="back%20panel.png">
610 </p>
611 </figure>
612
613 <p>
614 Result:
615 </p>
616
617
618 <figure>
619 <p><img src="connector%20terminal/make,%203.png" class="img-responsive" alt="make,%203.png">
620 </p>
621 </figure>
622
623
624 <p>
625 Download:
626 </p>
627 <ul class="org-ul">
628 <li><a href="connector%20terminal/front%20panel.stl">front panel STL</a>
629 </li>
630 <li><a href="connector%20terminal/back%20panel.stl">back panel STL</a>
631 </li>
632 <li><a href="connector%20terminal/connector%20terminal.FCStd">FreeCAD project</a>
633 </li>
634 </ul>
635 </div>
636 </div>
637
638 <div id="outline-container-sec-8" class="outline-2">
639 <h2 id="sec-8"><span class="section-number-2">8</span> Calibration</h2>
640 <div class="outline-text-2" id="text-8">
641 <p>
642 Since device uses adjustable step-down modules, these need to be
643 calibrated to provide correct output voltage. It is important that
644 battery receives proper charging voltage otherwise either no charging
645 occurs or battery starts gassing out and gets destroyed.
646 </p>
647
648 <p>
649 See here for more details: <a href="https://www.powerstream.com/SLA.htm">https://www.powerstream.com/SLA.htm</a>
650 </p>
651
652 <hr >
653
654 <p>
655 Happy building! :)
656 </p>
657 </div>
658 </div>
659 </div><div class="col-md-3"><nav id="table-of-contents">
660 <div id="text-table-of-contents" class="bs-docs-sidebar">
661 <ul class="nav">
662 <li><a href="#sec-1">1. General</a></li>
663 <li><a href="#sec-2">2. Project description</a></li>
664 <li><a href="#sec-3">3. Transformer and AC to DC converter</a></li>
665 <li><a href="#sec-4">4. Main board</a></li>
666 <li><a href="#sec-5">5. Current limiter</a></li>
667 <li><a href="#sec-6">6. Indicator panel</a></li>
668 <li><a href="#sec-7">7. Connector terminal</a></li>
669 <li><a href="#sec-8">8. Calibration</a></li>
670 </ul>
671 </div>
672 </nav>
673 </div></div></div>
674 <footer id="postamble" class="">
675 <div><p class="author">Author: Svjatoslav Agejenko</p>
676 <p class="date">Created: 2020-07-12 Sun 02:52</p>
677 <p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 26.1 (<a href="http://orgmode.org">Org-mode</a> 9.1.9)</p>
678 </div>
679 </footer>
680 </body>
681 </html>