A 45×40 mm four-key capacitive touch panel using a TTP224C controller, touch electrodes, four red LEDs with 220 Ω resistors, filtering/tuning capacitors, and host/indicator wire-land connectors.
Version
1.1.0
License
unset
Stars
0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone hrithik18k/smart-switch-touch # download the package files into ./smart-switch-touch
tsci add hrithik18k/smart-switch-touch # add it to your project as @tsci/hrithik18k.smart-switch-touch
In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
# Four-key Wi-Fi switch touch panel
This 45 × 40 mm, two-layer, 1.6 mm PCB is a 3.3 V touch and status panel for a separate Wi-Fi controller. The faceplate side is **Bottom** in tscircuit. All populated parts are assembled on **Top**.
```text
Viewed from the touch side
1 2
3 4
```
The solder-mask-covered electrodes are 12 × 12 mm on 27 mm horizontal and 22 mm vertical center spacing. Each red reverse-mount LED shines through a centered 2 mm non-plated hole. Align the translucent faceplate icons with these holes. Keep the panel-to-cover air gap small and consistent. Check the lens-to-cover fit with the chosen PCB and LED height tolerances and give the dome local relief if needed. Use mechanical edge retention to mount the panel.
## Host connection
J1 is a row of six plated solder-wire lands on 2.54 mm pitch. The labels are on the component side.
| Pin | Signal | Connect to |
| --- | --- | --- |
| 1 | 3V3 | Regulated 3.3 V from host |
| 2 | GND | Host ground |
| 3 | OUT1 | GPIO for upper-left key |
| 4 | OUT2 | GPIO for upper-right key |
| 5 | OUT3 | GPIO for lower-left key |
| 6 | OUT4 | GPIO for lower-right key |
Each output is active-high and momentary. The TTP224 uses fast response, multi-key operation, and its default unlimited key duration. The host should wait through the approximately 0.5 s startup calibration, then act on each rising edge once and rearm at release. Use the host's switch state for relay control and Wi-Fi synchronization. Power this panel from an isolated low-voltage host supply when used in a mains switch assembly.
J2 is the separate LED-control row. Use push-pull 3.3 V GPIO outputs and update them from the host's load state, including Wi-Fi changes. Drive an input high to turn its LED on, or low to turn it off. Each channel has a 220 Ω series resistor and draws about 6 mA at a 2.0 V LED forward drop. J1 and J2 share ground.
| J2 pin | Signal | Function |
| --- | --- | --- |
| 1 | LED1 | Upper-left status |
| 2 | LED2 | Upper-right status |
| 3 | LED3 | Lower-left status |
| 4 | LED4 | Lower-right status |
| 5 | GND | Common ground |
## Assembly and bring-up
| Ref | Qty fitted | Part | JLCPCB |
| --- | ---: | --- | --- |
| U1 | 1 | Tontek TTP224C-BSBN, SSOP-16 | [C2890350, Extended](https://jlcpcb.com/partdetail/Tontek_DesignTech-4_IC/C2890350) |
| C1 | 1 | Yageo 100 nF X7R, 0603 | [C14663, Basic](https://jlcpcb.com/partdetail/C14663) |
| D1–D4 | 4 | Ekinglux E6Q1206URAC1UDA red reverse-mount LED | [C375579, Extended](https://jlcpcb.com/partdetail/C375579) |
| R1–R4 | 4 | Uni-Royal 220 Ω, 0603 | [C22962, Basic](https://jlcpcb.com/partdetail/C22962) |
| C2–C5 | 0 | Optional Samsung 10 pF C0G, 0603 | [C1634, Basic](https://jlcpcb.com/partdetail/C1634) |
Start with C2–C5 unpopulated for maximum initial sensitivity. Fit tuning capacitors only if testing with the actual cover shows a need to reduce sensitivity. E1–E4, the optical holes, J1, and J2 are PCB features. In the assembly preview, confirm the LED lens faces into the opening and its cathode matches the straight silkscreen bar. Check live stock and assembly pricing when ordering.
Bench validation is pending. With the production cover fitted, check light alignment and brightness, then test short taps and sustained touches at the centers and edges. Switch the LEDs, Wi-Fi, and relays during this test to check for false triggers and crosstalk.
[Tontek TTP224C-BSBN datasheet](https://www.tontek.com.tw/uploads/product/247/TTP224C-BSBN_V1.0_EN.pdf) · [Ekinglux LED datasheet](https://jlcpcb.com/api/file/downloadByFileSystemAccessId/8757961524105764864)
## Rebuild
With Bun and the tscircuit CLI installed, run `bun install --frozen-lockfile` and `tsci build index.circuit.tsx`. Run `tsci check shorts dist/index/circuit.json` after building.