krishnax12/ip2312-fast-charging-module
This circuit implements a USB-C powered, IP2312-based 1-cell lithium battery fast charger with integrated power input, inductor, capacitors, resistors, charge and standby LEDs, and voltage/current monitoring components.
- Version
- 0.1.3
- License
- GPL-3.0
- Stars
- 0
dist/index.cjs
'use strict';
var jsxRuntime = require('react/jsx-runtime');
/**
* IP2312 1-cell lithium battery fast charger
*
* Based on Sagar Saini's GPL-3.0 project:
* https://www.instructables.com/Fast-Charging-Module-for-Lithium-Batteries/
*
* Board outline, placement, values, and LCSC references are taken from the
* published Gerber, CPL, BOM, and schematic files dated 2024-02-08.
*/
const Ip2312 = () => (jsxRuntime.jsx("chip", { name: "U1", manufacturerPartNumber: "IP2312-4V35", footprint: "jlcpcb:C605433", supplierPartNumbers: { jlcpcb: ["C605433"] }, pcbX: 1.397, pcbY: 1.523, pcbRotation: 180, pinLabels: {
pin1: "CHARGE_LED",
pin2: "TEST",
pin3: "STANDBY_LED",
pin4: "NTC",
pin5: "BAT",
pin6: "ICHG",
pin7: "SW",
pin8: "VIN",
pin9: "EP",
} }));
const UsbCInput = () => (jsxRuntime.jsx("chip", { name: "U3", manufacturerPartNumber: "TYPE-C-16PF", footprint: "jlcpcb:C2835121", supplierPartNumbers: { jlcpcb: ["C2835121"] }, cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=c50ce21ae3b941ce8eeb9bccc6cdef41&pn=C2835121",
rotationOffset: { x: 0, y: 0, z: 180 },
positionOffset: { x: -2.15, y: 0, z: 0 },
}, pcbX: -8.893, pcbY: 0.043, pcbRotation: 270, allowOffBoard: true, pinLabels: {
pin1: "SBU1",
pin2: "CC1",
pin3: "DN2",
pin4: "DP1",
pin5: "DN1",
pin6: "DP2",
pin7: "SBU2",
pin8: "CC2",
pin9: "GND1",
pin10: "VBUS1",
pin11: "VBUS2",
pin12: "GND2",
pin13: "SHIELD1",
pin14: "SHIELD2",
pin15: "SHIELD3",
pin16: "SHIELD4",
} }));
const TerminalPad = (props) => (jsxRuntime.jsx("chip", { name: props.name, pcbX: props.pcbX, pcbY: props.pcbY, pinLabels: { pin1: props.label }, allowOffBoard: true, footprint: jsxRuntime.jsx("footprint", { children: jsxRuntime.jsx("platedhole", { shape: "circular_hole_with_rect_pad", holeDiameter: "1.1mm", rectPadWidth: "2.5mm", rectPadHeight: "2.5mm", rectBorderRadius: "0.15mm", portHints: ["pin1"] }) }) }));
const CurrentSelectJumper = (props) => (jsxRuntime.jsx("solderjumper", { name: props.name, pinLabels: { 1: "CC", 2: "SELECT" }, pcbX: props.pcbX, pcbY: -3.427, pcbRotation: 90, layer: "bottom", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("smtpad", { shape: "rect", width: "1.8mm", height: "1.8mm", pcbX: -1.27, layer: "bottom", portHints: ["pin1"] }), jsxRuntime.jsx("smtpad", { shape: "rect", width: "1.8mm", height: "1.8mm", pcbX: 1.27, layer: "bottom", portHints: ["pin2"] })] }) }));
var index_circuit = () => (jsxRuntime.jsxs("board", { width: "25.654mm", height: "17.018mm", solderMaskColor: "purple", autorouter: { groupMode: "subcircuit" }, placementDrcChecksDisabled: true, children: [jsxRuntime.jsx("net", { name: "VCC", isPowerNet: true }), jsxRuntime.jsx("net", { name: "VBAT", isPowerNet: true }), jsxRuntime.jsx("net", { name: "GND", isGroundNet: true }), jsxRuntime.jsx("net", { name: "CC" }), jsxRuntime.jsx("net", { name: "SW" }), jsxRuntime.jsx("net", { name: "CHARGE_LED" }), jsxRuntime.jsx("net", { name: "STANDBY_LED" }), jsxRuntime.jsx(UsbCInput, {}), jsxRuntime.jsx(Ip2312, {}), jsxRuntime.jsx("inductor", { name: "L1", inductance: "2.2uH", footprint: "jlcpcb:C385252", supplierPartNumbers: { jlcpcb: ["C385252"] }, pcbX: 8.387, pcbY: -0.127, pcbRotation: 270 }), jsxRuntime.jsx("capacitor", { name: "C1", capacitance: "22uF", footprint: "jlcpcb:C59461", pcbX: -3.553, pcbY: 5.203, pcbRotation: 180 }), jsxRuntime.jsx("capacitor", { name: "C2", capacitance: "10uF", footprint: "jlcpcb:C96446", pcbX: -3.303, pcbY: 3.173, pcbRotation: 180 }), jsxRuntime.jsx("capacitor", { name: "C3", capacitance: "10uF", footprint: "jlcpcb:C96446", pcbX: 2.037, pcbY: 6.603, pcbRotation: 180 }), jsxRuntime.jsx("capacitor", { name: "C4", capacitance: "22uF", footprint: "jlcpcb:C59461", pcbX: 7.997, pcbY: 6.603, pcbRotation: 90 }), jsxRuntime.jsx("capacitor", { name: "C5", capacitance: "22uF", footprint: "jlcpcb:C59461", pcbX: 2.917, pcbY: -3.427, pcbRotation: 180 }), jsxRuntime.jsx("resistor", { name: "R1", resistance: "51k", footprint: "jlcpcb:C23196", pcbX: -0.503, pcbY: 6.733, pcbRotation: 270 }), jsxRuntime.jsx("resistor", { name: "R2", resistance: "47k", footprint: "jlcpcb:C25819", pcbX: 3.047, pcbY: -6.477, pcbRotation: 90 }), jsxRuntime.jsx("resistor", { name: "R3", resistance: "91k", footprint: "jlcpcb:C23265", pcbX: 0.507, pcbY: -6.477, pcbRotation: 90 }), jsxRuntime.jsx("resistor", { name: "R4", resistance: "130k", footprint: "jlcpcb:C22795", pcbX: -2.033, pcbY: -6.477, pcbRotation: 90 }), jsxRuntime.jsx("resistor", { name: "R5", resistance: "1", footprint: "jlcpcb:C22936", pcbX: -3.303, pcbY: 1.393 }), jsxRuntime.jsx("resistor", { name: "R6", resistance: "1k", footprint: "jlcpcb:C3017736", pcbX: 5.457, pcbY: 7.5 }), jsxRuntime.jsx("resistor", { name: "R7", resistance: "100", footprint: "0603", pcbX: -7.113, pcbY: -7.617, pcbRotation: 180 }), jsxRuntime.jsx("resistor", { name: "R8", resistance: "100", footprint: "0603", pcbX: -7.243, pcbY: 7.623, pcbRotation: 180 }), jsxRuntime.jsx("resistor", { name: "R9", resistance: "1", footprint: "jlcpcb:C22936", pcbX: 5.457, pcbY: 6.093 }), jsxRuntime.jsx("led", { name: "LED1", color: "red", footprint: "jlcpcb:C965799", pinLabels: { pin1: "cathode", pin2: "anode" }, pcbX: -7.113, pcbY: -5.967 }), jsxRuntime.jsx("led", { name: "LED2", color: "red", footprint: "jlcpcb:C965799", pinLabels: { pin1: "cathode", pin2: "anode" }, pcbX: -7.243, pcbY: 5.973, pcbRotation: 180 }), jsxRuntime.jsx(CurrentSelectJumper, { name: "HDR1", pcbX: -2.033 }), jsxRuntime.jsx(CurrentSelectJumper, { name: "HDR2", pcbX: 0.507 }), jsxRuntime.jsx(CurrentSelectJumper, { name: "HDR3", pcbX: 3.047 }), jsxRuntime.jsx(TerminalPad, { name: "H1", label: "VBAT", pcbX: 11.557, pcbY: 6.983 }), jsxRuntime.jsx(TerminalPad, { name: "H2", label: "GND", pcbX: -11.553, pcbY: -7.237 }), jsxRuntime.jsx(TerminalPad, { name: "H3", label: "VCC", pcbX: -11.553, pcbY: 7.243 }), jsxRuntime.jsx(TerminalPad, { name: "H4", label: "GND", pcbX: 11.557, pcbY: -7.107 }), jsxRuntime.jsx("silkscreentext", { text: "VIN", pcbX: -10.2, pcbY: 5.4, pcbRotation: 90, fontSize: "1mm" }), jsxRuntime.jsx("silkscreentext", { text: "GND", pcbX: -10.2, pcbY: -5.3, pcbRotation: 90, fontSize: "1mm" }), jsxRuntime.jsx("silkscreentext", { text: "VBAT", pcbX: 10.2, pcbY: 5.1, pcbRotation: 90, fontSize: "1mm" }), jsxRuntime.jsx("silkscreentext", { text: "GND", pcbX: 10.2, pcbY: -5.1, pcbRotation: 90, fontSize: "1mm" }), jsxRuntime.jsx("silkscreentext", { text: "IP2312", pcbX: 0.8, pcbY: -1.6, fontSize: "0.9mm" }), jsxRuntime.jsx("trace", { from: ".U3 > .VBUS1", to: "net.VCC" }), jsxRuntime.jsx("trace", { from: ".U3 > .VBUS2", to: "net.VCC" }), jsxRuntime.jsx("trace", { from: ".U3 > .GND1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".U3 > .GND2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".U3 > .SHIELD1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".U3 > .SHIELD2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".U3 > .SHIELD3", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".U3 > .SHIELD4", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".U1 > .VIN", to: "net.VCC" }), jsxRuntime.jsx("trace", { from: ".U1 > .EP", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".U1 > .BAT", to: ".R9 > .pin1" }), jsxRuntime.jsx("trace", { from: ".R9 > .pin2", to: "net.VBAT" }), jsxRuntime.jsx("trace", { from: ".U1 > .SW", to: "net.SW" }), jsxRuntime.jsx("trace", { from: ".L1 > .pin1", to: "net.SW" }), jsxRuntime.jsx("trace", { from: ".L1 > .pin2", to: "net.VBAT" }), jsxRuntime.jsx("trace", { from: ".U1 > .ICHG", to: "net.CC" }), jsxRuntime.jsx("trace", { from: ".U1 > .NTC", to: ".R1 > .pin1" }), jsxRuntime.jsx("trace", { from: ".R1 > .pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".U1 > .TEST", to: ".R6 > .pin1" }), jsxRuntime.jsx("trace", { from: ".R6 > .pin2", to: "net.VBAT" }), jsxRuntime.jsx("trace", { from: ".U1 > .CHARGE_LED", to: "net.CHARGE_LED" }), jsxRuntime.jsx("trace", { from: ".U1 > .STANDBY_LED", to: "net.STANDBY_LED" }), jsxRuntime.jsx("trace", { from: ".R5 > .pin1", to: "net.VCC" }), jsxRuntime.jsx("trace", { from: ".R5 > .pin2", to: ".C2 > .pin1" }), jsxRuntime.jsx("trace", { from: ".C2 > .pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".C1 > .pin1", to: "net.VCC" }), jsxRuntime.jsx("trace", { from: ".C1 > .pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".C3 > .pin1", to: "net.VCC" }), jsxRuntime.jsx("trace", { from: ".C3 > .pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".C4 > .pin1", to: "net.VBAT" }), jsxRuntime.jsx("trace", { from: ".C4 > .pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".C5 > .pin1", to: "net.VBAT" }), jsxRuntime.jsx("trace", { from: ".C5 > .pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "net.STANDBY_LED", to: ".R7 > .pin1" }), jsxRuntime.jsx("trace", { from: ".R7 > .pin2", to: ".LED1 > .anode" }), jsxRuntime.jsx("trace", { from: ".LED1 > .cathode", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "net.CHARGE_LED", to: ".R8 > .pin1" }), jsxRuntime.jsx("trace", { from: ".R8 > .pin2", to: ".LED2 > .anode" }), jsxRuntime.jsx("trace", { from: ".LED2 > .cathode", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".R4 > .pin1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".R4 > .pin2", to: ".HDR1 > .SELECT" }), jsxRuntime.jsx("trace", { from: ".HDR1 > .CC", to: "net.CC" }), jsxRuntime.jsx("trace", { from: ".R3 > .pin1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".R3 > .pin2", to: ".HDR2 > .SELECT" }), jsxRuntime.jsx("trace", { from: ".HDR2 > .CC", to: "net.CC" }), jsxRuntime.jsx("trace", { from: ".R2 > .pin1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".R2 > .pin2", to: ".HDR3 > .SELECT" }), jsxRuntime.jsx("trace", { from: ".HDR3 > .CC", to: "net.CC" }), jsxRuntime.jsx("trace", { from: ".H1 > .VBAT", to: "net.VBAT" }), jsxRuntime.jsx("trace", { from: ".H2 > .GND", to: "net.GND" }), jsxRuntime.jsx("trace", { from: ".H3 > .VCC", to: "net.VCC" }), jsxRuntime.jsx("trace", { from: ".H4 > .GND", to: "net.GND" })] }));
module.exports = index_circuit;