Documented alternative USB layout.
[physical.git] / misc / 12V Lead-Acid battery changer and terminal / index.org
index afa4e0d..d14cca2 100644 (file)
@@ -1,4 +1,4 @@
-#+TITLE: 12V Lead-Acid battery changer and terminal
+#+TITLE: Battery charger and dual power supply unit
 #+AUTHOR: Svjatoslav Agejenko
 #+LANGUAGE: en
 
 #+AUTHOR: Svjatoslav Agejenko
 #+LANGUAGE: en
 
   COULD BE ERRORS THAT CAN RESULT IN ALL KINDS OF DAMAGE. USE THESE
   DESIGNS AT YOUR OWN RISK.
 
   COULD BE ERRORS THAT CAN RESULT IN ALL KINDS OF DAMAGE. USE THESE
   DESIGNS AT YOUR OWN RISK.
 
-+ Author:
++ This design is released under Creative Commons Zero (CC0) license.
+
++ Authors:
   - Svjatoslav Agejenko
   - Svjatoslav Agejenko
-  - Homepage: https://svjatoslav.eu
-  - Email: [[mailto://svjatoslav@svjatoslav.eu][svjatoslav@svjatoslav.eu]]
+    - Homepage: https://svjatoslav.eu
+    - Email: [[mailto://svjatoslav@svjatoslav.eu][svjatoslav@svjatoslav.eu]]
+
+  - Valeria Agejenko
 
 + See also:
   - [[../../index.html][Other physical projects in this repository]]
   - [[https://www.svjatoslav.eu/projects/][Other projects hosted at svjatoslav.eu]]
 
 * Project description
 
 + See also:
   - [[../../index.html][Other physical projects in this repository]]
   - [[https://www.svjatoslav.eu/projects/][Other projects hosted at svjatoslav.eu]]
 
 * Project description
+I needed dual voltage power supply for my lab that runs on mains
+electricity (wall power) and slowly charges (use-changing) attached
+12V Lead-Acid battery. Lead-acid battery in turn provides high current
+when needed as well as power in portable situations or when mains
+electricity is not available.
+
 [[file:make.png]]
 
 [[file:make.png]]
 
+Power supply provides about 13 Volts and 5 Volts simultaneously.
+
+*!!!WARNING!!!* [[../alternative%20USB%20layout/][Alternative and incompatible USB wiring/layout]] is
+being used here.
+
+*Normal USB devices and cables should not be plugged in! It would
+damage device/cable and likely power supply.*
+
+I found USB-A connectors to be easily available, cheap, reliable and
+functional, so I re-purposed connector for my own needs but I'm using
+totally incompatible electrical wiring.
+
+[[file:../alternative%20USB%20layout/schematic.png]]
+
+As seen, it has dual voltage output. Additionally one wire is
+dedicated to data transmission and can be used with [[https://en.wikipedia.org/wiki/1-Wire][1-Wire]] protocol
+
+1-Wire data router/hub is really simple. Power supply simply passively
+links all data wires together.
+
+Power supply uses 3D printed body with lots of holes, for fanless
+cooling.
+
+[[file:body%20and%20covers/body,%201.png]]
+
+Various modules are realized on top of prototype PCBs that slide into
+dedicated rails within the body.
+
+[[file:body%20and%20covers/body,%202.png]]
+
+Like this:
+
 [[file:make,%202.png]]
 
 [[file:make,%202.png]]
 
-Simple charger and terminal (front-end) for 12V lead-acid battery.
+When cover is closed, it blocks PCB movement:
+
+[[file:body%20and%20covers/cover.png]]
+
+There is still some empty space inside, so why not add dummy cover on
+top that can be replaced later with add-on functionality/expansion
+board/terminal :)
+
+[[file:body%20and%20covers/cover%20cover.png]]
+
+Download:
++ [[file:body%20and%20covers/body.stl][Body STL file]]
++ [[file:body%20and%20covers/cover.stl][Big cover STL file]]
++ [[file:body%20and%20covers/cover%20cover.stl][Small dummy cover on top, STL file]]
++ [[file:body%20and%20covers/body%20and%20covers.FCStd][Body and covers FreeCAD project]]
+
+* Transformer and AC to DC converter
+
+This is where high voltage from mains electricity enters the system.
+
+Schematic:
+[[file:transformer%20and%20AC%20DC%20converter%20board/schematic.png]]
+
+For safety I kept high voltage section as minimal as possible. That
+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
+glue]] for extra safety and isolation on PCB.
+
+Power on/off switch operates on already reduced voltage of about 30
+volts. Power switch is located on [[id:c9a69490-f920-4a31-b32e-b101bfc3d01b][indicator panel]].
+
+[[file:transformer%20and%20AC%20DC%20converter%20board/make,%201.png]]
+
+DC current of about 30 volts is then routed to [[id:65d68227-4bf2-4c4f-b4d3-c390bc6a9c34][Main board]].
+
+[[file:transformer%20and%20AC%20DC%20converter%20board/make,%202.png]]
+
+[[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]].
+
+* Main board
+:PROPERTIES:
+:ID:       65d68227-4bf2-4c4f-b4d3-c390bc6a9c34
+:END:
+
+This is logically main board because it appears to be central hub that
+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
+voltage converters]].
+
+[[file:main%20board/main%20board,%201.png]]
+
+High-level schematic of entire device:
+[[file:main%20board/schematic.png]]
+
+As seen from schematic, ~30 volts DC from transformer board is routed
+into first step-down converter that reduces it to about 15V. Reduced
+voltage is then directed to [[id:afc22d23-9bc4-421c-9cac-e0ce34bd36bc][Current limiter circuit]]. Current limiter
+loses about 2 volts. Now we have current and voltage limited power at
+about 13 volts. This power is used to charge connected 12V Lead-Acid
+battery. Also the same power is routed to [[id:e33940bd-652f-4ec0-b53b-1c03e16941c8][connector terminal]] to be
+consumed by connected devices.
+
+As seen from this schematic, device is not meant to provide high
+current for long periods of time. Instead it gets comparatively
+limited current to charge the battery and feed devices with low
+current requirements. Occasional current spikes are backed up by
+battery that stays in use-changing mode.
+
+Also about 13V output voltage is approximate and depends on connected
+battery charge level.
+
+Second Step-Down converter reduces voltage even further to quite
+precisely 5V DC. This resulting voltage is also routed to [[id:e33940bd-652f-4ec0-b53b-1c03e16941c8][connector
+terminal]].
+
+Both 13V and 5V lines are also routed to [[id:c9a69490-f920-4a31-b32e-b101bfc3d01b][indicator panel]] for
+monitoring.
+
+There is single on/off switch. In off position, it disconnects battery
+and transformer from the system effectively powering everything down.
+
+On schematic above, some wires are annotated with numbers from 1
+to 13. This corresponds to output pins on the board.
+
+[[file:main%20board/main%20board,%202.png]]
+* Current limiter
+:PROPERTIES:
+:ID:       afc22d23-9bc4-421c-9cac-e0ce34bd36bc
+:END:
+
+Schematic:
+[[file:current%20limiter/schematic.png]]
+
+Simple LM317 based current limiter is used. I used 4.7 ohm
+resistor. It provides about 265 milliamps of current. See [[http://www.reuk.co.uk/wordpress/electric-circuit/lm317-current-calculator/][calculator]].
+
+[[file:current%20limiter/current%20limiter,%201.png]]
+
+Thermal paste below and UV hardening glue on top is used to attach
+LM317 to the heatsink. There is also jumper-like solution on top
+right. This is handy to attach multimeter tap to verify/monitor
+current during initial device calibration.
+
+If attached battery is really empty, significant voltage drop can
+occur in LM317. Heatsink is needed to dissipate that power.
+
+[[file:current%20limiter/current%20limiter,%202.png]]
+
+Note: resistor gets hot too.
+
+* Indicator panel
+:PROPERTIES:
+:ID:       c9a69490-f920-4a31-b32e-b101bfc3d01b
+:END:
+
+[[file:indicator%20panel/indicator%20panel,%201.png]]
+
+Basically 2 digital DC voltmeters and main on/off switch.
+
+[[file:indicator%20panel/indicator%20panel,%202.png]]
+
+Download:
+
+[[file:indicator%20panel/indicator%20panel.png]]
+
++ [[file:indicator%20panel/indicator%20panel.stl][STL file]]
++ [[file:indicator%20panel/indicator%20panel.FCStd][FreeCAD project]]
+
+* Connector terminal
+:PROPERTIES:
+:ID:       e33940bd-652f-4ec0-b53b-1c03e16941c8
+:END:
+
+Schematic:
+[[file:connector%20terminal/schematic.png]]
+
+As seen above, most of the USB connectors are used to deliver dual
+power output and 1-wire data connectivity, except one on the bottom
+right. This is used to attach 12V battery. Some capacitors are thrown
+in as well to stabilize against smaller current spikes.
+
+Electrically schematic is realized using smaller prototype PCBs.
+
+[[file:connector%20terminal/make,%201.png]]
+
 
 
-Idea is to distribute power from rechargeable 12V battery to various
-appliances (soldering iron, radio transmitters, etc..) while also
-providing use-charging in the background.
+Those PCBs are wired to central small PCB that acts as a hub:
 
 
-Single on/off button disconnects battery and up-step voltage source
-from front panel terminal connectors.
+[[file:connector%20terminal/make,%202.png]]
 
 
-[[https://www.amazon.de/gp/product/B07G4KWV6S/ref=ppx_yo_dt_b_asin_title_o08_s01?ie=UTF8&psc=1][Tecnoiot MT3608]] voltage up-step is used. 3V DC external power supply
-is used to feed voltage up-step. Up-step is tuned to ~14.4 V.
+PCBs are held together by being sandwiched between front panel:
 
 
-[[file:schematic.png]]
+[[file:connector%20terminal/front%20panel.png]]
 
 
-Current design is rather of blog (experience sharing) value. It has
-quite some drawbacks:
+and smaller back-end plate:
 
 
-- Warning: Circuit has dangerous instability. Requires low voltage
-  ~3V but relatively high current external power supply. Using
-  higher voltage but low current power supply could easily lead to
-  situation where step-up generated load pushes power supply output
-  voltage down too much. This leads to too much power being lost
-  within power supply and easily leads to power supply overheating!
+[[file:connector%20terminal/back%20panel.png]]
 
 
-- There is no dedicated current limiter. 3V external power supply
-  and up-step are acting as current limiters.
+Result:
 
 
-- While RCA connectors do work as DC power connectors, but are not
-  intended to be used this way and are not very reliable.
+[[file:connector%20terminal/make,%203.png]]
 
 
-- Voltage up-step provided output is not very clean. Extra capacitors
-  and induction coils could be added to remove high frequency noise in
-  the voltage.
 
 
-- Metallic and shielded body would be helpful to reduce
-  electromagnetic/radio noise generated by step-up.
+Download:
++ [[file:connector%20terminal/front%20panel.stl][front panel STL]]
++ [[file:connector%20terminal/back%20panel.stl][back panel STL]]
++ [[file:connector%20terminal/connector%20terminal.FCStd][FreeCAD project]]
 
 
-* Body
+* Calibration
 
 
-[[file:body.png]]
+Since device uses adjustable step-down modules, these need to be
+calibrated to provide correct output voltage. It is important that
+battery receives proper charging voltage otherwise either no charging
+occurs or battery starts gassing out and gets destroyed.
 
 
-[[file:cover.png]]
+See here for more details: https://www.powerstream.com/SLA.htm
 
 
+-----
 
 
-+ Download:
-  + [[file:body%20and%20cover.FCStd][body and cover FreeCAD file]]
-  + [[file:body.stl][body in STL format]]
-  + [[file:cover.stl][cover in STL format]]
+Happy building! :)