Six Ground Symbols and What Each One Promises
Full article on JLCPCB: https://jlcpcb.com/blog/ground-symbols-explained Four ground marks are numbered in IEC 60417: 5017 earth, 5018 functional earth, 5019 protective earth, 5020 chassis. Only 5019, the earth mark inside a circle, may identify a protective earth terminal. Use 5018 there instead and you have not made a drafting slip, you have made a compliance failure. Quick-reference chart of all six ground symbols with their standard numbers The Six Marks Six symbols cover almost every schematic and equipment label. Four are numbered by IEC 60417, which standardises markings placed on equipment; the other two come from IEEE 315, which standardises symbols drawn on diagrams. · 5017, three shrinking bars — earth, general (IEEE 315 clause 3.9.1) · 5018, earth mark under an arc — functional or noiseless earth (3.9.1.1) · 5019, earth mark inside a circle — protective earth (3.9.1.2) · 5020, bar with three angled strokes — chassis or frame (3.9.2) · Triangle, solid or hollow — signal or common ground (clause 3.9.3) · Triangle lettered AGND, DGND or PGND — one named 0 V return among several IEC 60417 and IEEE 315 ground symbols compared side by side Where the Stem Stops One drawing detail separates a correct protective earth mark from the most widely copied error in the industry. In IEC 60417-5019 the vertical stem stops inside the circle and never touches it. The 2011 edition of NFPA 70, the US National Electrical Code, carried an informational note figure for an equipment grounding conductor termination point drawn with the bar touching the circle. Two further tells: the 5017 bars must shorten as they descend, and 5018 never substitutes for 5019. The protective earth symbol, stem stopping short of the circle Net Names Win In every mainstream EDA tool the net name decides what connects, not the picture. Altium states it plainly: the net name determines which net a power port joins, not the style of the symbol. Three ports drawn as Earth, Bar and Signal Ground all land on GND if all three are named GND. To create a genuinely separate return, name it AGND everywhere it belongs, join it to GND at exactly one point with a 0 Ω link or net tie, then run ERC and confirm two nets joined once. The full six-symbol chart, the IEC 60417 versus IEEE 315 mapping and the tool-by-tool net rules for KiCad, Altium and EasyEDA are in the complete guide: Read the full guide
Resistor Types and the Spec Most BOMs Skip
Full article on JLCPCB: https://jlcpcb.com/blog/complete-guide-to-resistor-types Tolerance is a day-one, room-temperature number. TCR is what you actually live with. A ±1% resistor at 200 ppm/°C can move another ±1% across a 50 °C rise, so its real in-circuit accuracy is worse than its label — and TCR is the column most engineers never filter on. Resistor types chart — fixed, variable and non-linear families with their symbols Three Families Every resistor sorts into one of three branches. Fixed types hold a value, judged on tolerance, TCR and power. Variable types expose a wiper, judged on track material and rotational life. Non-linear types are transducers — read the curve, not a tolerance figure. · Carbon film: ±2% to ±5%, TCR −200 to −1000 ppm/°C · Metal film: ±0.1% to ±1%, TCR ±25 to ±100 ppm/°C · Thick film chip: ±1% to ±5%, TCR ±100 to ±200 ppm/°C · Thin film chip: ±0.05% to ±0.5%, TCR ±5 to ±25 ppm/°C · Wirewound: ±0.005% to ±5%, 1 W to 300 W and beyond · Metal foil: ±0.001% to ±0.01%, TCR 0.2 to 2 ppm/°C Classification tree from fixed, variable and non-linear down to each resistor type The 200-Cycle Trap Track material sets the quality, but the specification nobody prints is rotational life. A panel potentiometer is rated for 10,000 to 1,000,000 cycles. A trimmer is often rated for 200. Put a trimmer behind a user-accessible knob and the track wears through inside a year, and a worn track produces a scratchy, intermittent, open-circuit wiper that gets blamed on everything except the pot. Trimmers are set-once parts; a 25-turn cermet trimmer exists to null an offset and then be left alone. Choosing Fast Work five filters in order and you finish choosing between two parts, not twenty. Fix value and tolerance first, rounding to a stocked E-series value under IEC 60063 — E24 for ±5%, E96 for ±1% and tighter. Size power at worst-case I²R and pick a part rated for at least twice it, because ratings are quoted at 70 °C ambient and fall from there. Filter on TCR before tolerance whenever the resistor sets a measured quantity. Surge-exposed inputs get metal oxide or thick film, never thin film. The five-step resistor type selection flowchart The full resistor types chart, all seven fixed families and the application-by-application selection table are in the complete guide: Read the full guide
Power Supply Symbols, Circles and Diamonds
Full article on JLCPCB: https://jlcpcb.com/blog/power-supply-symbols-ultimate-guide A circle, a diamond, and three shrinking horizontal bars. Three power supply symbols, three different meanings, and only one of them is an independent source. Draw a controlled source as a circle and your simulation settles on a completely wrong operating point. Neither that error nor an implicit chassis-to-earth tie trips a design rule check. The power supply symbol chart: DC, AC, source, battery and ground symbols side by side Four Symbol Families Fourteen symbols cover almost every power source you will meet on a schematic, and they sort into four families: sources, batteries, grounds and rail labels. The outline answers the first question before you read a single label. · Circle: independent source. Polarity marks for DC, a sine wave for AC, an arrow for current · Diamond: dependent source, output set by another circuit quantity · Unequal bar pairs: battery. The long thin bar is positive, one pair per cell · Earth ground: three shrinking bars, IEC 60417-5017, IEEE 315 clause 3.9.1 · Chassis ground: one bar with three angled strokes, IEC 60417-5020, clause 3.9.2 · Signal ground: downward triangle, IEEE 315 clause 3.9.3 The four dependent source symbols drawn as diamonds with their controlling variables Why A Diamond The diamond outline is the only visual difference between a controlled source and an independent one. VCVS and CCVS carry polarity marks; VCCS and CCCS carry an arrow. This is how every active device is modelled: a bipolar transistor is a CCCS, a MOSFET is a VCCS, an ideal op-amp is a VCVS, and a current-sense amplifier behaves as a CCVS. One caveat. The diamond is a drafting convention, not a numbered entry in IEC 60617 the way the earth mark is numbered in IEC 60417, so treat it as binding practice but never cite a clause number for it. Earth, chassis and signal ground symbols drawn at equal scale for comparison Three Grounds Earth, chassis and signal ground are three separate nets. IEEE 315 clause 3.9.2 notes explicitly that a chassis may sit at a substantial potential relative to the earth around it, so placing both glyphs on one net without an explicit bond creates a ground loop that shows up as a failed EMC scan rather than a DRC error. AGND, DGND and PGND all reuse the signal ground triangle, and only the label changes. That is what lets a layout tool keep three returns apart and join them at one defined tie point. If you cannot find that tie point, the schematic has a defect. The full 14-symbol chart, the IEC 60617 versus ANSI/IEEE 315 comparison, the four dependent source equations and the symbol-to-footprint table are in the complete guide: Read the full guide
Logic Gate Symbols, ANSI vs IEC
Full article on JLCPCB: https://jlcpcb.com/blog/logic-gate-symbols-guide The same NAND gate appears as a bubbled D-shape in one schematic and a rectangle marked & in the next. Neither is wrong. ANSI/IEEE Std 91-1984 defines both families, so calling the rectangle the non-ANSI form is a review comment worth dropping. What actually flips your output is the bubble. Every logic gate in ANSI distinctive shape and IEC rectangular form, side by side Two Symbol Sets The distinctive shapes came from MIL-STD-806 in the early 1960s and passed into ANSI/IEEE Std 91-1984. IEC 60617-12 standardised the rectangle, which names the function with a qualifying symbol printed inside it rather than by outline. Pick one set per drawing set, and never mix both on a sheet: a reviewer scanning for shapes will skip a rectangle. · AND: flat back, curved nose. IEC qualifier & · OR: curved back, pointed nose. IEC qualifier at least 1 · XOR: OR shape, doubled input line. IEC qualifier =1 · NOT and buffer: triangle, with and without the bubble. IEC qualifier 1 · NAND, NOR, XNOR: the same outlines with an output bubble · Rail range decides the family: 74HC runs 2 V to 6 V, 4000B runs 3 V to 18 V Inversion bubble anatomy, output bubble compared with input bubbles on the same gate Reading The Bubble The small circle is a negation indicator, not decoration. On an output it complements the function, so AND becomes NAND and OR becomes NOR. On an input it marks that pin active LOW, and the gate sees the inverted net. An OR shape with bubbles on both inputs is the same gate as a NAND, because (A · B)' = A' + B'. That De Morgan equivalent is drawn deliberately, so the bubbles line up with active-low net names such as nCS or /OE. A wedge instead of a circle marks an active-low pin without inverting the function. 74HC00 quad 2-input NAND pinout, 14-pin package Symbol To Package One symbol is rarely one part. A 74HC00 quad NAND is U1A to U1D on the schematic and a single SOIC-14 on the layout, sharing one VCC pin and one decoupling capacitor. Tie every unused CMOS input to VCC or GND, because a floating input self-biases, oscillates and raises supply current. Do not assume pin compatibility either: the 74HC02 places its outputs on pins 1, 4, 10 and 13, so it cannot share a 74HC00 footprint. The full ANSI and IEC chart, all eight truth tables, the NAND-only gate counts and the 74xx to 4000-series part lookup are in the complete guide: Read the full guide
ESP32-C3 vs ESP32-S3 - Which One to Pick
Roughly two dollars separates the ESP32-C3 from the ESP32-S3, and that gap decides whether your board can hold a camera frame. The C3 has 400 KB of SRAM and no PSRAM support at all. A single VGA frame or a modest TensorFlow Lite model clears that in one step, so the decision is made before you write any firmware. ESP32-C3-MINI-1 and ESP32-S3-WROOM-1 modules side by side with key specs The Spec Split Both parts run the same radio, so connectivity never breaks the tie. Everything else does. The C3 is a lean single-core RISC-V part built for cost and battery life; the S3 is a dual-core Xtensa LX7 with PSRAM, USB-OTG, and camera and display interfaces. · CPU: single-core RISC-V at 160 MHz vs dual-core Xtensa LX7 at 240 MHz · SRAM: 400 KB vs 512 KB, plus up to 16 MB Octal PSRAM on the S3 only · GPIO: 22 vs 45 · USB: Serial/JTAG only vs native USB-OTG, host and device · AI: none vs 128-bit SIMD vector instructions · Deep sleep: about 5 µA vs about 7 µA · Price: about $3 to $4 vs about $6 to $7 per module Single-core RISC-V and dual-core Xtensa LX7 block diagrams compared The Dual-Band Myth Several ranking articles claim the S3 offers dual-band or 5 GHz Wi-Fi. It does not. Both chips are 2.4 GHz Wi-Fi 4 (802.11 b/g/n) with Bluetooth LE 5.0, with no dual-band, no Wi-Fi 6 and no classic Bluetooth. The same care applies to USB. The C3 does have USB, but only a Serial/JTAG controller for flashing, logging and debugging. It cannot enumerate as a keyboard or mass-storage device, and it cannot act as a host. Full USB-OTG is S3-only. On The Board The two modules are not pin-compatible, so swapping the ESP32-C3-MINI-1 for the larger ESP32-S3-WROOM-1 mid-project means a new footprint. Both need the same RF discipline: keep the antenna zone free of copper on every layer and push it to the board edge, hold a continuous stitched ground plane under the module, and decouple close to the 3V3 pins. Two rules are S3-only, namely short length-matched Octal PSRAM traces, and USB D+/D- routed as a 90 ohm differential pair. The full spec tables, the decision flowchart and the complete PCB layout checklist are in the full comparison: Read the full comparison
PCB Connector Types and How to Choose One
A fine-pitch FFC contact is rated for 0.5 A. A screw terminal block on the same board handles up to 41 A. Both are just "a connector" on the schematic, and choosing from the wrong end of that range is one of the fastest ways to turn a working prototype into a field failure. Quick-reference chart of the main PCB connector types with pitch and mount Three Connector Families Sort by what the connector joins and the catalog collapses into three families: board-to-board, wire-to-board, and I/O. Mounting method is the second axis, through-hole, surface-mount, or press-fit, and it decides your assembly process as much as your circuit does. The numbers that actually shortlist a part: · Pin header/socket: 2.54mm to 1.27mm pitch, 1A to 3A per pin, 25 to 100 cycles · Board-to-board mezzanine: 0.4mm to 2.54mm, 0.5A to 2A per pin, 20 to 50 cycles · Wire-to-board (JST): 1.0mm to 3.96mm, 1A to 5A per pin, 20 to 50 cycles · FFC/FPC: 0.3mm to 1.0mm, 0.5A per contact, 10 to 30 cycles · Edge connector: 0.8mm to 2.54mm, 1A to 3A per contact, 50 to 100+ cycles · Terminal block: 3.5mm to 7.62mm, 10A to 41A, 100 to 500+ cycles · I/O (USB, HDMI, RJ45): standard-defined pitch, 1,500 to 10,000 cycles THT vs SMT vs press-fit connector mounting methods in cross-section Reflow Rating This is the step most connector guides skip. An SMT connector must be explicitly rated for reflow, because not every plastic housing survives the oven peak, and a non-rated body warps and ruins contact alignment. Many are also moisture-sensitive (MSL) parts that need baking if the reel has been exposed to humidity. THT connectors avoid that, but they need drilled holes and a separate hand, wave, or selective soldering step, and that extra operation is what raises your assembly quote at volume. Choose In Order Eliminate, do not browse. Check current and voltage first, sized for peak load rather than average, and split the current across parallel pins if one contact cannot carry it. Fix pitch second: take the coarsest pitch that still fits, because 0.5mm packs contacts tightly but demands accurate automated placement. Count mating cycles third, since an internal link may need only 10 to 30 while a daily-use USB port is rated to 10,000. Add temperature, vibration and IP rating last, and drop anything that fails. Connector pitch compared to scale: 2.54mm, 1.27mm and 0.5mm The full comparison chart, the mounting-method breakdown and the schematic-symbol-to-footprint-to-assembly walkthrough are in the complete guide: Read the full guide
One-Button USB-C PD Voltage Selector with CH224K and CH32V003
Original Instructables article: https://www.instructables.com/One-Button-Based-5-20V-USB-C-PD-Voltage-Selector/ I have worked with the CH224K USB PD sink controller before, a tiny IC that handles the entire PD negotiation for you. My previous build used fixed resistors to set the voltage. This time I wanted something more practical: a single-button selector that cycles through 5V, 9V, 12V, 15V, and 20V with LED indicators for each. The MCU I paired it with is the CH32V003F4P6 — a 32-bit RISC-V chip from WCH that costs about $0.10. How It Works The CH224K handles USB PD negotiation over the CC lines in the USB-C connector. Three configuration pins (CFG1, CFG2, CFG3) tell it which voltage to request from the charger. Drive these with a microcontroller and you can change voltage on the fly. The lookup table: • 5V: CFG1=1, CFG2=X, CFG3=X • 9V: CFG1=0, CFG2=0, CFG3=0 • 12V: CFG1=0, CFG2=0, CFG3=1 • 15V: CFG1=0, CFG2=1, CFG3=1 • 20V: CFG1=0, CFG2=1, CFG3=0 CH224K key features: supports PD 2.0 and 3.0, selectable 5–20V output, built-in CC pull-down resistors, Power Good (PG) output, SOP-10 package. MCU — CH32V003F4P6 The CH32V003F4P6 is a QingKe 32-bit RISC-V MCU at ~$0.10, chosen deliberately so the controller does not cost more than the function it provides. It runs at 48MHz with 16KB flash, 2KB SRAM, and 18 GPIO pins. For this project I use 9 pins: 3 for the CH224K CFG lines, 5 for indicator LEDs, and 1 for the push button. An LM317 linear regulator converts the variable PD rail (5–20V) to a stable 3.3V for the MCU supply. Critical note: set the LM317 potentiometer to 3.3V before soldering the MCU, powering it at an incorrect voltage will destroy the chip. Schematic — CH224K CFG lines, LM317 supply, LEDs Firmware The firmware is minimal C written in WCH's MounRiver Studio. Three lookup arrays map mode index (0–4) to CFG pin states and the active LED pin. On each button press, the code reads the GPIO, applies a 20ms debounce delay, increments the mode index (wrapping at 4), then calls applyMode(). That function clears all LEDs, drives the three CFG pins from the lookup tables, and lights the correct LED. Boot defaults to 5V — the safest starting voltage since every PD charger supports it. Compact 2-layer PCB from JLCPCB — USB-C left, LEDs and button right Testing I brought up the board with a USB meter in series for overcurrent protection. It worked first try. After confirming idle current, I switched to the charger directly and measured all five voltages with a multimeter, each one correct on button press.
PCB Trace Current Carrying Capability
How wide does this trace need to be? Get it wrong, too narrow for the current it carries. And the trace becomes a resistive heater: voltage drop, heat buildup, and eventually an open circuit. IPC-2221 is the standard that gives you the answer.
IPC-2221 Quick Reference
IPC-2221 provides empirical tables relating trace width, copper weight, and current capacity at a target temperature rise. A 10°C rise above ambient is a safe working limit for most designs.
1oz copper (35μm), external trace, 10°C rise:
• 0.5mm → ~0.9A
• 1.0mm → ~1.5A
• 2.0mm → ~2.7A
• 3.0mm → ~3.6A
Internal traces handle roughly 50–60% of the above values for the same width, they are buried in FR4 with no air cooling available.
Copper Weight
Standard PCB copper is 1oz (35μm per layer). Moving to 2oz doubles the cross-section and increases current capacity by roughly 40–50% for the same trace width. Heavy copper (3oz, 4oz+) is used in power converters and motor drives where 10A+ traces are needed. JLCPCB supports copper up to 13oz for specialty power PCBs.
Width vs. current chart — 1oz external traces (IPC-2221)
Layout Rules
Practical rules to follow during layout:
• Add a copper pour on top of high-current traces to double the effective cross-section without widening the routed track
• Use Saturn PCB Design Toolkit or JLCPCB's trace width calculator becausee IPC-2221 formulas are non-trivial to compute by hand
• JLCPCB's standard trace width tolerance is ±20%: a 1mm trace could be 0.8–1.2mm in production
• Always check voltage drop, not just thermal capacity: 2A through 100mm of 1mm 1oz trace drops about 68mV which is significant in low-voltage designs
6 Layer PCB Stackup: What It Is and When to Use It
6-layer PCB cross-section showing layer arrangement A 4-layer board often is not enough when a design mixes dense routing, high-speed signals, and distributed power nets. A 6-layer board gives you two extra routing layers, dedicated power and ground planes, and better EMI shielding, at a modest cost increase over 4-layer. Standard Stackup The most common 6-layer arrangement: • L1 (Top): Signal + components • L2: Ground plane • L3: Signal (inner) • L4: Power plane • L5: Ground plane • L6 (Bottom): Signal + components L1 and L6 each sit directly next to a ground plane, giving every surface trace a clean, unbroken return path. L3 is sandwiched between L2 (ground) and L4 (power), shielded on both sides. Which makes it ideal for high-speed differential pairs or sensitive analog signals. Design Guidelines Tips for 6-layer board design: • Route high-speed signals on L1, L6, or L3, all three have adjacent reference planes • Use L4 as a partial power pour, not a full flood, full flooding between L4 and L5 can create parallel-plane resonance at high frequency • Never route across a split in the reference plane on any layer, return current will detour and radiate • If mixing high-speed digital and switching power on the same board, separate ground pours and stitch them at a single point near the input connector Dielectric layer arrangement and typical thickness values Via Considerations Through-hole vias on a 6-layer board traverse all six layers even if only connecting L1 to L3. The unused stub adds capacitance and degrades signal quality above 1GHz. Options to fix it: • Blind vias (e.g. L1–L2 only) remove the stub entirely for HDI routing • Back-drilled vias eliminate the stub on through-hole vias for critical nets JLCPCB supports blind, buried, and back-drilled vias, check their capabilities page for minimum drill sizes and allowed layer combinations before routing.
How to Route Differential Pairs on a PCB
Differential signaling is used in USB, HDMI, Ethernet, LVDS, and many other high-speed protocols because it rejects common-mode noise far better than single-ended traces. Getting it right on a PCB means more than placing two traces side by side. Impedance Target Both traces in a differential pair must have the same length and the same impedance. A mismatch converts differential signal to common-mode noise, causing jitter and bit errors. Common targets: • USB 2.0: 90Ω differential • USB 3.0 / LVDS: 100Ω differential • Ethernet: 100Ω differential Your PCB manufacturer's stackup calculator gives you the trace width and spacing to hit the target. JLCPCB offers controlled-impedance manufacturing with ±10% tolerance, specify it at the order stage. Routing Rules Practical rules for differential pairs: • Route both traces simultaneously — use the differential pair mode in EasyEDA, KiCad, or Altium • Keep traces tightly coupled: spacing within 3–5× trace width for the full length • Match trace lengths: skew must stay under one unit interval (UI). For USB 2.0 at 480Mbps that is roughly 14mm • If vias are necessary, place them on both traces at the same location • Never route a differential pair over a split or gap in the reference plane • Maintain at least 3× trace width clearance to adjacent single-ended nets Matched-length pair with serpentine length compensation Length Matching Use serpentine meanders to compensate for length skew within a pair. Keep meander amplitude under 3× trace width to avoid adding excess parasitic inductance. Place meanders close to where the skew originates, not all bunched at the end of the route. Most EDA tools have a built-in length-matching tool that handles this automatically.
LM358 Based Simple Waveform Generator
Original Hackster article: https://www.hackster.io/sainisagar7294/lm358-based-simple-waveform-generator-79af29 LM358 waveform generator — square and triangular outputs I needed a quick bench tool to verify small circuits and ICs without spending $50+ on a function generator. So I built one from a single LM358 op-amp for square and triangular waves up to 5kHz, for under $2. Circuit The design uses a Schmitt trigger relaxation oscillator for the square wave. R1 controls the capacitor charge/discharge time and sets the base frequency range. R2 and R3 form a voltage divider that sets the waveform midpoint reference (the ground line). A 100kΩ potentiometer makes frequency variable within the range. A series RC integrator (R4 + C2) converts the square output into a triangular wave. The RC time constant must be larger than the square wave period, otherwise the capacitor does not have enough time to form a clean ramp. Amplitude vs. Frequency The triangular wave amplitude is inversely related to frequency. At low frequencies, the capacitor charges more per half-cycle and gives a larger swing. At high frequencies, it barely charges before polarity flips and the output shrinks. This is inherent to RC integration. Adding a second integrator stage approximates a sine wave, but amplitude drops sharply above 1kHz. For stable sine output, a Wien bridge or Hartley oscillator is the better choice. Schematic — square wave generator with RC integrator Components and PCB Components needed: • LM358 op-amp • Resistors: 180kΩ, 68kΩ, 39kΩ, 220Ω • 100nF capacitor • 100kΩ potentiometer • Dual-rail power supply PCB designed in EasyEDA. Square wave amplitude scales with supply voltage. For a fixed-amplitude triangular output, add a third op-amp gain stage on the output. Gerbers available in the original article, change R1/C1 values to shift the frequency range. PCB prototype — both outputs tested
Li-ion Batteries Got a New Charging Module TP5100
Original Hackster article: https://www.hackster.io/sainisagar7294/li-ion-batteries-got-a-new-charging-module-d04a46 TP5100-based dual-cell Li-ion charging module I am building a portable lab bench power supply that needs two Li-ion cells in series (8.4V total). The problem: standard TP4056 modules only handle a single 4.2V cell. I needed something that could charge both 4.2V single and 8.4V dual packs from a 12V adapter. That is where the TP5100 comes in a switching-mode charger with a single pin to select between 1S and 2S operation. TP5100 Overview The TP5100 is a step-down switching charger running at 400kHz. It accepts 5V–18V input and delivers up to 2A of programmable charging current via an external sense resistor. All protection is built in: input overcurrent, undervoltage, over-temperature, short circuit, and reverse battery. Key specs: • Input: 5V–18V (covers 12V adapters) • Max charging current: 2A (programmable) • Switching frequency: 400kHz • Cell configuration: 1S (4.2V) or 2S (8.4V) via onboard solder pad Charging Phases The IC steps through three phases automatically: Trickle: if the battery is over-discharged below 2.8V, charges at 1/10th of max current until it recovers. Constant current: charges at the set max current until voltage nears the target. Constant voltage: holds at 4.2V (or 8.4V); current tapers to ~0.07C, then terminates. Two onboard LEDs show live charge status. Circuit with 1S/2S selection and sense resistor Compact PCB with separated input/output sections Testing Important: this module does not support balance charging. For 2S packs, use identical cells from the same batch and manufacturer so initial capacities are matched. Results 1S cell pre-charged at 4.1V: ~300mA (CV taper phase). 2S pack: ~500mA. Both are expected since cells were near full. All protection features tested and working.
Fast Charging Module for Lithium Batteries
Original Hackster article: https://www.hackster.io/sainisagar7294/fast-charging-module-for-lithium-batteries-a1eaae IP2312-based 3A fast-charging module The TP4056 is one of the most popular Li-ion charging modules. It is cheap, widely available, and paired with a built-in protection IC. But it uses a linear voltage regulator internally, which means significant heat at higher currents and a practical ceiling of around 450mA before the module gets too hot to handle. I built a custom board around the IP2312, a buck-based charging IC that delivers up to 3A at 94% efficiency. Why IP2312? Unlike the TP4056, the IP2312 uses a built-in buck converter running at 750kHz which means far less heat, far better efficiency. All protection features (overvoltage, undervoltage, over-temperature, trickle charging, short circuit) are packed into the IC itself, so no separate protection chip is needed. Key specs: • Input: 4.5–5.5V via USB-C or solder pads • Max charging current: 3A (set via external resistor) • Default nominal current: 2.1A • Efficiency: 94% at 3.7V/2A • Trickle charge current: 100mA • Standby current: 40µA • Overvoltage cutoff: Vin > 5.6V • Battery voltage support: 4.20V / 4.30V / 4.35V / 4.40V Schematic — buck converter section and filter stage PCB Design I kept the same form factor as the TP4056 board for a drop-in upgrade. Charging current is set by solder pads on the PCB back — left floating, it defaults to 2.1A. The layout follows input-to-output flow to isolate switching transients. The NTC pin is pulled down with a 51kΩ resistor as I am using this as a breakout board. Two status LEDs monitor charging. PCB — same footprint as TP4056, USB-C input Testing I powered up with a 100mA current-limited supply first worked first try. Then charged a 3.9V Li-ion at default settings. Comparison with the same 4.0V battery: • TP4056: 450mA • IP2312: ~1A More than double the charging rate. Heat was minimal at full load, confirming the 94% efficiency claim. All protection features tested normal.
Smallest USB-C PD Controller Using CH224K
Smallest USB-C PD Controller Using CH224K For more info: https://www.hackster.io/sainisagar7294/smallest-usb-c-pd-controller-using-ch224k-135ff8 The smallest USB-C PD controller board Most of the time I am away from my loved stuff, my LAB! I can not carry the big bulky adapter with me having different voltages and all, that’s why I purchased a 65W one, which has USB-C. My adapter supports a lot of changing protocols and one of them is USB-C Power Delivery (PD). My idea is to make a simple PD interfacing device as small as possible so that it can be inserted into small housings. The CH224K The CH224K is a USB-C PD fast-charging protocol receiver chip. It is designed to request higher voltages from a PD adapter without using a microcontroller. It supports USB PD 3.0 (up to 100W) and 5V / 9V / 12V / 15V / 20V with a simple resistor configuration, a built-in internal regulator and protection features. The CH224K handles the entire PD handshake, allowing the board to behave like a smart power jack. Just plug in a USB-C PD adapter, and the required voltage appears at the output. The final PCB is extremely small For a minimal design, voltage is fixed at PCB level, so no frequent switching is required. The configuration resistors are put on the bottom layer so they are easily accessible and we can change the voltage. There are no high-frequency components, making the design electrically quiet and easy to debug. The final PCB is extremely small, making it suitable for embedded use inside enclosures where traditional adapters simply don’t fit. Testing with a 12V source I set the configuration CFG3 to 1, shorted the back pad, plugged the USB-C into my power bank that supports the same voltage, and measured the voltage, it's 12V, pretty accurate. By plugging in a 65W adapter we are able to sweep the voltage 0–20V and then current 0–3A. USB-C PD is no longer just for phones and laptops. With chips like CH224K, designers can finally tap into that ecosystem without complexity. My aim is to reduce the enclosure size and eliminate bulky adapters. #usbpowerdelivery#
Operational Amplifier as DC Amplifier
Operational Amplifier as DC Amplifier For more info: https://www.hackster.io/electroboy001/operational-amplifier-as-dc-amplifier-1041a3 Adjustable op-amp DC amplifier board Operational amplifiers are awesome, they are used to design a lot of circuits. In a previous part we discussed the open-loop gain / comparator feature of an op-amp, and now we will see the use of an operational amplifier to amplify a very small signal with adjustable gain. In the end we will make a DC amplifier which can be tuned easily through the onboard potentiometers. Op-amp configurations and gain There are two types of configurations (inverting and non-inverting) while using the op-amp in closed loop. Both configurations use negative feedback because it helps to minimize the error/noise and increase the overall stability. In the non-inverting configuration the signal is given on the non-inverting terminal and the gain is 1+Rf/Rin. In the inverting configuration the signal is applied on the inverting input, so the output is 180 degrees out of phase and the gain is −Rf/Rin. In closed loop the op-amp tries to minimize the error of the applied input signal, the virtual ground concept. If the inverting terminal is held at ground potential, then the non-inverting terminal is also assumed at ground. A basic DC amplifier working concept Let's take an example where we have a signal of 10mA and we want to amplify it to 1 volt, so a gain factor of 100 is required. Step 1: choose the configuration, here I am choosing non-inverting, which gives 1+Rf/Rin. Step 2: choose Rf and Rin assume Rin = 1k, so we require Rf = 99k for a gain of 100. Step 3: because the op-amp tries to minimize the difference between both input terminals, we give a reference from the non-inverting terminal to ground. This sets a reference line and the input is amplified by the same factor. Adjustable amplifier with selectable gains I made this DC gain amplifier which can be adjusted according to the input applied, and here you will find 3 different modes which set the gain 10x, 50x and 100x, so it is easy to amplify and test any DC signal out from any device. Gain can be selected by switching the jumper to a different position on the PCB. #dcamplifierusingopamp#
DIY Solid State Relay Module
DIY Solid State Relay Module For more info: https://www.hackster.io/electroboy001/diy-solid-state-relay-module-e170f3 DIY solid-state relay (SSR) module Relays are the most useful and stable AC power switching components. The regular size of relays is big because of a mechanical moving actuator and a coil. The main problem is that it takes a lot of current and, due to the mechanical action of actuators, there are sparks between both terminals. Which may cause serious problems like tear down, terminal welding and damaging. But there is one solution to all of these problems known as SSR (solid state relays). They are electronic based switches which can be used for fast switching of AC appliances. These electronic AC switches are known as TRIAC. TRIAC vs SCR A TRIAC is a three-terminal electronic component that conducts current in either direction when triggered. TRIACs differ from SCRs in that they allow current flow in both directions, whereas an SCR can only conduct current in a single direction. The bidirectionality of TRIACs makes them convenient switches for alternating current. Here we use a dedicated TRIAC driver, which helps in switching the TRIAC by AC cycle feedback either zero-voltage switching or random phase shift. Circuit diagram with the MOC3021 TRIAC driver Components: BT136 (SMT package), MOC3021 (TRIAC driver), 10k and 1k resistors, pin headers and screw terminals, and PCB prototypes from JLCPCB. The circuit has a DIAC based optocoupler known as the TRIAC driver, which has an LED and DIAC inside and is triggered with the help of DC voltage to the LED terminal. This provides full insulation of the supply to the mains voltage. SMT-assembled PCB: I used SMT assembly service from JLCPCB, because I want to make the PCB clean and small. It is made for smaller loads under 50 watts per channel only, because I am not using any heatsink. I made the PCB according to the channel selection; the front header can be directly used with the microcontroller. A total of 4 channels are there which can be used separately with different GPIO pins. Working SSR connected to an AC load: This solid-state relay works in the same manner as mechanical sugar-cube relays, but this time we have only two terminals. When there is no trigger on the Gate pin, the TRIAC output resistance is in Mega-ohms, which switches off the appliances connected to it. This module works fine on +5 volts and consumes just 10mA of current, which is way lesser than old mechanical relays. #solidstaterelaymodule#
1.5V Alkaline Battery SOC Measurement Technique
1.5V Alkaline Battery SOC Measurement Technique: For more info: https://www.hackster.io/sainisagar7294/1-5v-alkaline-battery-soc-measurement-technique-972b51 1.5V alkaline battery SoC measurement setup: There are a lot of fuel gauges and battery chargers available for 3.7V lithium batteries, but when it comes to lower 1.5–1.2V batteries, there are very limited circuits and dedicated ICs. I want to estimate the battery life, but how is it possible with these non-rechargeable batteries? Unlike Li-ion batteries, alkaline batteries have a pretty flat voltage curve that depends on the load. The best possible and simplest one is estimation through voltage, but in combination with a load. The two-step SoC approach: ● Voltage-based SoC (for long-term reference) ● ΔI (current difference) under two loads (for accuracy) This approach is very low-cost and easy to implement, and suitable for all kinds of 1.5V alkaline batteries. But the cell-to-cell chemistry is not in our hands, so there may be an accuracy of 90–92% only. With only voltage measurement, we can reach an accuracy of ±70–80%, so we need more information than voltage alone. Instead of directly computing internal resistance, we observe how current collapses under different loads. I use two known load resistors, 22 Ω and 9.7 Ω; the values are not random at full swing they produce ΔI greater than 80 mA for better resolution. Fresh battery has high current difference; in weak battery currents converge then ΔI collapses. Circuit diagram just 4 components Components: a P-channel MOSFET, Arduino Nano, 2× 1.5V battery (one discharged to 50%), 9.7 Ω and 22 Ω resistors, and a power source. Just with 4 components you can build this circuit, and all the computations are done with the MCU. First the open-circuit voltage is measured by the Arduino's 10-bit ADC, then the 22 Ω load is turned on briefly, then the 9.7 Ω load; after that the computation is done on ΔI, and SoC is estimated. Results Test 1: discharged battery Test 2: fully charged one This project shows that you don’t need a fuel-gauge IC to estimate alkaline battery SoC accurately. By combining intelligent load switching, current measurement, and a little empirical modeling, we can build a low-cost alkaline battery SOC measurement tool. Still, if you need a proper SoC with 95–99% accuracy, then go for a fuel-gauge IC solution. #alkalinebatterySOC#
Arduino Nano Sized CH32V003 Dev Board
In the past few months I had designed my own development boards in order to get max out of them, nowadays I am working on CH32V003F4P6 by WCH, and I was very amazed by the features and performance this microcontroller gives. Why I switched to this one from arduino is because this is a 32-bit RISC-V microcontroller that costs around $0.10 yes, ten cents that makes it one of the cheapest 32-bit MCUs you can get. But you know Arduino is love and that's why I designed a complete custom dev board around this chip in the Arduino Nano form factor style.
I designed the PCB in EasyEDA, keeping the board size compact to match the Arduino Nano form factor. The layout prioritizes clean power distribution in 2 layers only. Then poured the ground plane on both sides for a low-impedance ground return path. The design files are open-source in EasyEDA format, so you can modify the layout and order PCBs from JLCPCB in just $2.
Unlike Arduino, the CH32V003 uses WCH's own toolchain. You need MounRiver Studio, which is a free Eclipse-based IDE. It comes with preconfigured RISC-V GCC compiler so no additional toolchain setup is required.
#ch32v003#
I Built a 100W Stereo Class-D Amplifier Using TPA3221
I am a fan of audio technology as it is cleared from most of my articles. I always try some new ICs or audio related things here. And today is the time for class D amplifiers. I made a subwoofer speaker that can handle upto 200W in stereo but I don’t have any good amplifier system that I can directly fit into my car. And that thing brings me towards TPA3221 IC. For the same price, anyone can get cheap Bluetooth speakers. But they distort at half volume, the bass rolls off a cliff. I want to drive my TP3221 amplifier directly from the car battery in this case.
So that it can actually push real power into real speakers, with clean audio and proper engineering behind it. The goal was simple: a compact, high-efficiency stereo amplifier that can deliver 100W per channel into 4-ohm speakers. Just a clean analog-in, speaker-out power amplifier that I could pair with any source. In this article, I will walk you through the full design. Schematic and PCB layout with a real-world audio test and listening demo, check out the YouTube video linked with this project.
Testing and Results
For the full audio test you can refer to the video attached here. I have tried music playback, frequency sweep, bass response, and real listening impressions with actual speakers. Audio quality is one of those things that does not translate well to text. You need to hear it. What I can say here at moderate listening levels, the amplifier is dead silent. No hiss, no hum, no audible switching noise. The closed-loop feedback does its job and the sound is noticeably cleaner than open-loop Class-D designs I have tried before.
#audio# #amplifier# pc #pcbdesign#
Handheld accurate sound level dB meter
Because I am a sound lover, and in recent times I have done a lot of research on audio-related products. But I am always curious to measure the sound performance in terms of dB(A). In that way, when the amplifier is in steady state, I can measure the total output noise due to the surroundings. Because decibels are a logarithmic scale, it usually starts from a very light value, and it can also measure very high values. I have many options, as someone on the internet says, there are phone apps that claim to measure sound levels, but let's be honest, a phone microphone is designed for voice calls, not calibrated acoustic measurement. So if you want to measure actual sound output, there are professional sound level meters, but they start at a couple of hundred dollars. But I wanted something in between a handheld dB meter that's actually accurate and battery-friendly. When I was searching the web, I came across the DFRobot Gravity Analog Sound Level Meter. This little board has a professional-grade MEMS microphone with proper signal conditioning. It has an A-weighting filter and a beautifully simple analog output. The voltage coming out is linearly proportional to decibels. So, no complex DSP, no FFT, just read an analog pin and multiply. I paired it with my own designed Arduino from JLCPCB and a 0.96" OLED display, and that’s how I got myself a proper handheld dB meter. How the Code Works: Because the sensitivity and conversions are based on ADC and they work on a reference. If that reference voltage is stable the readings are accurate. Arduino's 5V rail can vary from 4.6V to 5.2V depending on the host. And when running on battery, over the time as the battery discharges, there will be variations. To eliminate this issue, we used the `readVcc() function which takes the reference from the internal 1.1V bandgap of Arduino. This gives us the true supply voltage in millivolts, which we use in the dB calculation. Raw sensor readings can be noisy. The code uses a circular buffer of 10 samples to compute a running average. This smooths out spikes while still responding quickly to changes (10 samples x 125ms = 1.25 seconds of averaging). Here is how the ADC conversion is done: A perfectly linear 0.6V-to-2.6V range mapping to 30-130 dBA. No lookup tables, no polynomial curve fitting, no complex calibration. Just multiply by 50. That's it. 0.6V = 30 dBA, 2.6V = 130 dBA. dbValue = (analogRead(A0) / 1024.0) \* Vref \* 50.0; Testing and Working: I have tested the output in different scenarios, and it is working perfectly. Best to pair it directly with the Arduino with a soldering connection; a loose one may give you noise. Testing with Songs: Testing during conversation: #PCB# #SOUND# #DBMETER#
DIY Current Meter using a Ferrite Core and Hall Sensor
I built a DC ammeter using a toroidal ferrite core and a Hall Effect sensor (WSH130NL). The idea is, when current flows through a wire around a toroidal core, it creates a magnetic field inside the core. For AC measurements we can just use a secondary winding and get a pretty good step down transformer producing an effective voltage which can be converted into current values. But with a DC steady signal we have to measure the magnetic flux in a different manner. Overall now with this approach we get an isolated current measurement. And by choosing the right number of windings, you can adjust the sensitivity and resolution of your ammeter to suit your needs. The same can be converted later with the help of a PCB provided by JLCPCB. As I got my MCU dev board fabricated from there in a $2 price. See the full article with code from here: https://www.hackster.io/sainisagar7294/diy-current-meter-using-a-ferrite-core-and-hall-sensor-4a91aa
How Does It Work?
When current passes through a conductor coiled around a toroidal ferrite core, it generates a magnetic field within the core. Due to the ferrite’s high permeability, the magnetic field is largely confined inside the core. By placing a Hall Effect sensor in the air gap, the sensor is positioned directly in the path of the magnetic flux. It then generates a voltage proportional to the magnetic field passing through it.
Components Required
WSH130NL Hall Effect Sensor
Toroidal Ferrite Core
Enamelled Copper Wire
10K Ohm Resistor
0.1uF Capacitor
Arduino Uno/Nano
16x2 LCD Display I2C
Building the DC Ammeter - Step by Step
The toroidal ferrite core is the heart of this ammeter. You can salvage one from an old power supply, a common-mode choke, or buy one online. The size doesn't matter too much, but a larger core gives you more room to wind wires.
Cutting the Air Gap:
This is the most critical and tricky step. We need to cut a small gap in the toroid where the Hall sensor will sit.
Winding the Toroid:
I used 10 turns of 24 AWG enamelled copper wire on a ferrite core. More windings mean a stronger magnetic field for the same current.
Placing the Hall Effect Sensor:
You can place the sensor, make sure it is flat in the middle of the gap, then secure it using hot glue and some tape. The orientation decides the polarity, but it doesn't matter even in this case because the steady state sensor readings are common mode by VDD/2.
Arduino Code:
The Arduino's 10-bit ADC gives us 1024 steps across 0-5V, which translates to approximately 4.88mV per step.
How to Calibrate:
Upload the code to your Arduino with SENSITIVITY set to 0 initially
With no current flowing, write down value of V_OFFSET.
Pass a known current of say 1A and note the voltage.
Pass another known current of 3A, note the voltage
Update the V_OFFSET and SENSITIVITY defines in the code
Working:
At 0A:
At 1A:
At 2A:
At: 3A:
#HallEffect# #PCB# #currentmeter# #powermeter# #Arduino#
Charging the 12V LEAD ACID Beast with Beauty
Charging the 12V LEAD ACID Beast with Beauty
If you own a motorcycle, you already know the pain. I was little out of station for a couple of weeks and when I came home and gave a push to my bike, there was nothing. The battery is dead. Lead-acid batteries self-discharge over time, and if you don't ride often enough, the battery just slowly dies on you. Buying a new battery every few months is not an option. So, I used to charge manually on a workstation which costs me time and money. Even though most of them are using just a transformer with a rectifier, no regulation, no protection, just brute force current being dumped into the battery. But I am an electronics engineer and that’s how I decided to give a try to lead acid battery charging.
The one that actually understands how to charge a battery properly. With trickle charge for deeply discharged batteries, constant current for bulk charging, over-charge for topping it off, and float charge to keep it maintained without overcharging. The whole charging profile, done right. That's where the CN3767 comes in. It's a dedicated 12V lead-acid battery charger controller IC from Consonance Electronics that does everything I just described. I have designed a PCB in EasyEDA and fabricated it from JLCPCB and tested out the final prototype.
PCB Design
You can download the Gerber files along with BOM and CPL from here. I have used JLCPCB for manufacturing because their services are available in a wide domain with reasonable prices. And because I have designed the PCB in easyEDA online which has an integration with JLCPCB. At least this can give me a peace of mind over the files.
Testing & Results: I set up a DC bench power supply set to 18V and took a 12V/7Ah lead-acid motorcycle battery. For monitoring put the multimeter on battery terminals, current clamp on charge line. There may be drop in wires and across device so the voltage at power supply and battery end may vary.
Constant Current (CC) Mode Test:
With the battery at around 12V, I connected the charger. The red CHRG LED immediately lit up, confirming the charger entered the charging state. The current stayed rock-steady at approximately 1A throughout the CC phase. That's the CN3767 doing its job, regulating the current via the sense resistor feedback loop.
Constant Voltage (CV) Mode Test:
As the battery voltage approached 14.8V, I observed the transition to over-charge mode. The voltage locked at 14.8V and current started tapering down from 1A. This is the critical phase where the charger is topping off the battery. The voltage holds steady while the current gradually decreases as the battery reaches full capacity.
Outro: Building a proper battery charger is not that hard when you have the right IC. The CN3767 takes care of the entire charging algorithm. Even though I am going to sell some pieces to my motorcycle repair shop, so everyone who needs a proper solution can get this design. I will increase the rating to maybe 3A in CC mode for faster charging. Motorcycle batteries can easily handle up to 5A. We have seen that the transition from CC to CV mode is smooth, the regulation voltages are accurate, and the LED indicators give clear feedback on the charging state. The best part? That MPPT input means I can slap a small solar panel on the bike someday and have a self-maintaining battery system. Charging the beast with beauty, indeed.
#PCB#