README.md
# HL-52S V1.0 two-channel relay module
A runnable tscircuit reconstruction of the **hero photograph** in [Quartz Components MOD-QC0518](https://quartzcomponents.com/products/2-channel-relay-module-with-optocoupler-protection-5v?variant=35137766523033), using JLCPCB-imported components throughout.
## Run
From this directory:
```sh
bun install
bun run dev
bun run build
bun run typecheck
```
`index.circuit.tsx` contains the circuit, placement, board geometry, and silkscreen. `components/` contains the actual CLI-generated JLCPCB imports and their original imported CAD models. All **18 placed physical component instances** use the nine imported part types below, with exact EasyEDA footprints selected by the importer. The main circuit uses no custom component footprints or CAD models. Mounting holes, isolation slots, and board silkscreen remain reconstructed board features. Placements were adjusted to accommodate the imported footprints.
## Bill of materials
| References | Qty | Component | JLCPCB part |
| --- | ---: | --- | --- |
| K1, K2 | 2 | Songle SRD-05VDC-SL-C, 5 V relay | [C35449](https://jlcpcb.com/partdetail/C35449) |
| J1, J2 | 2 | KF301-5.0-3P, three-position terminal, 5.00 mm pitch | [C474882](https://jlcpcb.com/partdetail/C474882) |
| U1, U2 | 2 | Sharp PC817X3CSP9F optocoupler | [C41807](https://jlcpcb.com/partdetail/C41807) |
| Q1, Q2 | 2 | S8050 J3Y NPN transistor, SOT-23 | [C2146](https://jlcpcb.com/partdetail/C2146) |
| D1, D2 | 2 | LL4148 switching diode | [C9808](https://jlcpcb.com/partdetail/C9808) |
| R1–R4 | 4 | 0805W8F1001T5E, 1 kΩ resistor, 0805 | [C17513](https://jlcpcb.com/partdetail/C17513) |
| DS1, DS2 | 2 | NCD0805R1 red LED, 0805 | [C84256](https://jlcpcb.com/partdetail/C84256) |
| JPOWER | 1 | B-2100S03P-A110, 1×3 male header, 2.54 mm | [C124376](https://jlcpcb.com/partdetail/C124376) |
| JIN | 1 | B-2100S04P-A110, 1×4 male header, 2.54 mm | [C124378](https://jlcpcb.com/partdetail/C124378) |
The VCC–JDVCC shunt is an external removable accessory; it is not included as a modeled component. Catalog imports were checked. Live stock, pricing, and assembly availability were not assessed.
All 3D model URLs point to the original hosted JLCPCB assets so `tsci build --site` can load them. The relay and terminal URLs serve byte-identical copies of the downloaded models; their footprints and CAD geometry are unchanged.
## Dimensions and fidelity
| Feature | Model value | Evidence |
| --- | --- | --- |
| Board | 50 × 38 × 1.6 mm | Nominal reconstruction; not dimensioned by Quartz |
| Mounting holes | Four Ø3 mm | Photo estimate |
| Hole-center spacing | 44 × 32 mm | Assumed grid; centers at (±22, ±16) mm |
| Input / power header pitch | 2.54 mm | Imported header footprints |
| Terminal pitch | 5.00 mm | Imported C474882 footprint |
The listing provides photographs, but no dimensioned drawing, official netlist, schematic, PCB source, or manufacturing files. Board dimensions, hole positions, component locations, outline details, slot geometry, silkscreen size/position, and PCB thickness are reconstructed. **Exact mechanical interchangeability cannot be guaranteed.** Measure an actual sample before using these coordinates for an enclosure or mating assembly. Imported library geometry establishes the selected catalog components, not the dimensions of the photographed Quartz assembly.

The standalone [mechanical drawing](mechanical.svg) records the nominal outline, hole grid, edge offsets, and selected component pitches in millimeters.
Quartz's gallery mixes revisions: the hero image shows **HL-52S V1.0 / SONGLE SRD-05VDC-SL-C**, while other images show TONGLING and HONG WEI parts and different markings. This project follows the hero appearance; the isolation slots use the available underside image as a guide. The visible batch text `258540` is reproduced for appearance. Original imported component CAD is retained, so component colors and markings may differ from the product photograph.
The [Songle SRD manufacturer drawing](https://datasheet.lcsc.com/datasheet/pdf/9ddfe54b7529126320ff1ddcabf6bab7.pdf) and [Sharp PC817 datasheet](https://global.sharp/products/device/lineup/data/pdf/datasheet/PC817XxNSZ1B_e.pdf) support component identification and pin functions. The complete module topology is inferred from the photos and conventional HL-52S circuitry; it is not an official Quartz netlist. The selected driver, resistor, diode, and optocoupler parts and the PCB routing remain reconstruction choices.
## Connectors
View the PCB from above, with terminals at the left, headers at the right, and +Y toward the board's upper edge. Pin order is listed from **+Y to −Y**:
| Connector | Pin order |
| --- | --- |
| JIN, four-pin input | VCC, IN2, IN1, GND |
| JPOWER, three-pin supply | GND, VCC, JDVCC |
The inputs are active low. An external removable shunt bridges **VCC–JDVCC** to share logic and relay-coil power. With the shunt removed, VCC and JDVCC are separate supply nets: VCC feeds the input LED/opto circuits and JDVCC feeds the relay driver/coil circuits. Removing the shunt does not select active-high operation. Both header GND pins connect to the module's relay-side GND in this reconstruction.
## Validation limits
The design is a reconstructed engineering model, not a validated replacement for the commercial PCB. It has not undergone manufacturing, load, thermal, insulation, or mains testing. Relay case ratings do not establish the current or voltage capability of the reconstructed board, traces, connectors, or isolation geometry.