gokul/flex-led-wristband
A flexible, rechargeable touch wristband PCB with MCP73831 Li-ion charging, switched 3.0 V regulation, ATtiny402 control, TTP223 capacitive touch sensing, and six charlieplexed red LEDs plus power/charge indicators.
- Version
- 0.0.3
- License
- unset
- Stars
- 0
README.md
# Flex LED wristband
A 90 × 32 mm two-layer flex PCB with a 30 × 30 mm bottom stiffener on the controller island, six evenly spaced red LEDs, capacitive touch, and a rechargeable-battery interface. Designed with tscircuit 0.0.3003 and its local @tscircuit/capacity-autorouter 0.0.999 (tscircuit/tscircuit-autorouter). Schematics use automatic sections without schX or schY.
**Status: JLCPCB-oriented prototype fabrication release (v0.0.3), pending factory CAM approval and hardware testing.** Battery, strap, enclosure, and a charging/programming fixture are external. Use the corrected assembly placement file with the pin-1/cathode drawing; JLCPCB supplier rotations still need assembly-preview review.
## Hardware
- ATtiny402-SSN, SOIC-8; UPDI retained for programming.
- Six LTST-C190KRKT red LEDs, charlieplexed through three 330 Ω resistors. Each active path contains two resistors. At 3 V and approximately 2 V LED drop, peak current is approximately 1.5 mA; multiplexing lowers average current.
- MCP1700T-3002E/TT regulates the logic/LED supply to 3.0 V.
- TTP223-BA6 touch controller, active-high momentary output. The 5 mm electrode is covered and has no paste opening.
- MCP73831T-2ACI/OT 4.2 V lithium-ion charger, 20 kΩ programming resistor for 50 mA nominal charge current.
- JS102011SAQN physical power switch; green power LED and red charging LED aligned at the right of the controller island.
- 100 nF local MCU/touch decoupling; 4.7 µF charger and regulator capacitors.
## Connections and operation
| Contact | Function |
| --- | --- |
| BAT+ / BAT− | Protected 1S 3.7 V nominal / 4.2 V full LiPo pack, with wire strain relief |
| 5V / GND | Regulated 5 V charging fixture; check polarity before connecting |
| UPDI / VCC / GND | Programmer data, regulated 3 V target reference, and ground |
Use a protected cell whose manufacturer permits at least 50 mA charging (for example, a suitably specified 100–150 mAh pack). The PCB does not replace cell protection and has no battery-temperature sensor. **Switch OFF during charging**, and charge off the wrist: this charger has no load-sharing circuit. Do not attach raw USB wiring or an unprotected cell. The battery stays flat in a rigid enclosure supported by the strap.
Power the target from the board during programming; use a 3 V-compatible UPDI programmer and do not drive VCC from a second supply. Keep PA0 configured as UPDI. Program at a clock permitted at 3 V (e.g. 5 MHz).
MCU connections: PA6 → RA → A; PA7 → RB → B; PA1 → RC → C; PA2 ← touch Q. PA3 is unused. LED anode/cathode pairs are D1 A/B, D2 B/A, D3 A/C, D4 C/A, D5 B/C, D6 C/B. Firmware must set all three LED pins high-impedance before selecting each source/sink pair. Avoid enabling their pull-ups. Hardware and touch sensitivity need bench validation before wear.
## Fabrication
Read `FABRICATION.txt` before ordering. Use `dist/jlcpcb-fabrication.zip` for bare-board CAM review: it contains copper, coverlay openings, paste, silk, outline, drill files and JLCPCB-named stiffeners. Use `dist/assembly-bom.csv`, `dist/assembly-placement.csv`, `dist/assembly-orientation.csv` and `dist/assembly.svg` for assembly review. The generic exporter ZIP/CSV is retained as raw output; the corrected placement file fixes SW1’s physical centre. Use the Gerber outline as the fabrication outline; the PCB preview can also display the rectangular bounding box.
The switch footprint originates from KiCad's `Button_Switch_SMD.pretty/SW_SPDT_CK-JS102011SAQN.kicad_mod`. Its line-segment courtyard was joined into an equivalent closed polygon because the current converter emits invalid two-point courtyard polygons. No DRC checks were disabled. Source attribution is in `THIRD_PARTY.txt`.
## Rebuild
```sh
bun install
bun run typecheck
bunx tsci build index.tsx --disable-parts-engine --svgs --3d
bunx tsci export dist/index/circuit.json -f gerbers -o /absolute/output/gerbers.zip
```
Part numbers are explicit. Automatic parts lookup is disabled in the board source and during the verified local build because the public search service returned unrelated parts; no mismatched imports are included.
## Checks and qualification
See `VALIDATION.txt` and `dist/manufacturing-checks.json` for results. `FOOTPRINT_REVIEW.txt` records manufacturer pinouts and land patterns; `BRINGUP.txt` is the unperformed prototype test procedure. `scripts/release.py` independently parses Gerbers, checks coverlay web and via separation, verifies supported vias and generates release/assembly files. Rerun it after any export. Firmware is not included; the board needs firmware implementing the pin mapping and charlieplex scanning above before it can display patterns. The 3D preview uses generic package models, including an approximate switch body.