# NFC reader box

Wall box for a Waveshare ESP32-S3-DEV-KIT-N8R8 and an Elechouse PN532 NFC Module V3.
Outer size 70 × 80 × 15.3 mm (W × H × D). USB-C cable exits the left wall.

## Files

| File | What it is |
|---|---|
| `nfc_box_base.stl` | Back shell. Print back-down. |
| `nfc_box_lid.stl` | Front cover, already flipped. Print face-down. |
| `nfc_box_led_lens.stl` | Lens for the LED window. Print flat side down in natural or clear PETG/PLA. |
| `nfc_reader_box.scad` | OpenSCAD source. All sizes are parameters at the top (box size, `usb_side`, tolerances, pin size). |
| `nfc_box_preview.png` | Renders of the box. |

## Printing

PLA or PETG, 0.2 mm layers, no supports. Avoid carbon-fibre or metal-filled filament: it weakens NFC reading.

## Parts

- 4 × M3 × 8 pan-head screws (side walls into the lid blocks, thread-forming into 2.5 mm pilots)
- Double-sided foam mounting tape (e.g. 3M VHB) to fix the base to the wall
- 4 short wires between the boards, soldered directly (Dupont plugs do not fit)
- No screws for the boards: the ESP32 sits on 4 pins, the PN532 in 4 corner guides, and posts on the lid hold both down

## Assembly

1. Stick the base to the wall.
2. Drop the PN532 into its guides, antenna side out, header edge up.
3. Set the ESP32 on its pins, components out, USB-C on the left. Wires run behind the board.
4. Press the lens into the recess on the inside of the lid (or glue in a 9.6 mm square of 0.3–0.5 mm clear sheet; avoid superglue, it fogs clear plastic).
5. Put the lid on and fit the 4 side screws.
6. Plug in the USB-C cable.

## Fit adjustments (in the .scad file)

- Board loose or tight on the pins: change `esp_pin_d` (default 1.7 mm for the 2.0 mm holes).
- Lid does not close flat: lower `nfc_front_clr` slightly or sand the NFC posts.
- Lid fit too tight or loose: change `tol`.
- A dab of black nail polish or tape over the ESP32's red power LED keeps it from showing in the window.
