Files
docs/wiring_diagram.md
2026-05-03 23:20:16 -07:00

139 lines
5.8 KiB
Markdown

# Wiring Diagrams for Dual PN532 NFC System
## ESP32-C3 Super Mini Pinout Reference
```
ESP32-C3 Super Mini
┌─────────────────┐
│ [USB-C] │
│ │
3V3 ●──┤ 3V3 GND ├──● GND
GND ●──┤ GND D0 ├──● GPIO0
D1 ●──┤ D1 D1 ├──● GPIO1
D2 ●──┤ D2 D2 ├──● GPIO2
D3 ●──┤ D3 D3 ├──● GPIO3
D4 ●──┤ D4 D4 ├──● GPIO4
D5 ●──┤ D5 D5 ├──● GPIO5
D6 ●──┤ D6 D6 ├──● GPIO6
D7 ●──┤ D7 D7 ├──● GPIO7
D8 ●──┤ D8 D8 ├──● GPIO8
D9 ●──┤ D9 D9 ├──● GPIO9
D10 ●──┤ D10 D10 ├──● GPIO10
└─────────────────┘
```
## Listener Module Wiring
### ESP32-C3 to PN532 (I2C Mode)
```
ESP32-C3 Super Mini PN532 Module
┌─────────────────┐ ┌─────────────┐
│ │ │ │
│ 3V3 ────┼─────────┤ VCC │
│ GND ────┼─────────┤ GND │
│ GPIO8 (SDA) ────┼─────────┤ SDA │
│ GPIO9 (SCL) ────┼─────────┤ SCL │
│ GPIO10 ────┼─────────┤ LED (opt) │
│ │ │ │
└─────────────────┘ └─────────────┘
```
### PN532 DIP Switch Configuration (I2C Mode)
```
Switch 1: OFF (I2C mode)
Switch 2: OFF (I2C mode)
```
## Emulator Module Wiring
### ESP32-C3 to PN532 (I2C Mode)
```
ESP32-C3 Super Mini PN532 Module
┌─────────────────┐ ┌─────────────┐
│ │ │ │
│ 3V3 ────┼─────────┤ VCC │
│ GND ────┼─────────┤ GND │
│ GPIO8 (SDA) ────┼─────────┤ SDA │
│ GPIO9 (SCL) ────┼─────────┤ SCL │
│ │ │ │
└─────────────────┘ └─────────────┘
```
### ESP32-C3 to SD Card Module (SPI Mode)
```
ESP32-C3 Super Mini SD Card Module
┌─────────────────┐ ┌─────────────┐
│ │ │ │
│ 3V3 ────┼─────────┤ VCC │
│ GND ────┼─────────┤ GND │
│ GPIO10 (CS) ────┼─────────┤ CS │
│ GPIO6 (MOSI)────┼─────────┤ MOSI │
│ GPIO5 (MISO)────┼─────────┤ MISO │
│ GPIO4 (SCK) ────┼─────────┤ SCK │
│ GPIO2 ────┼─────────┤ LED (opt) │
│ │ │ │
└─────────────────┘ └─────────────┘
```
## Complete Emulator Module Wiring
```
ESP32-C3 Super Mini
┌─────────────────┐
│ │
PN532 VCC ──┤ 3V3 │
SD Card VCC ──┤ │
│ │
PN532 GND ──┤ GND │
SD Card GND ──┤ │
│ │
│ D2 ├── LED (Status)
│ D4 ├── SD Card SCK
│ D5 ├── SD Card MISO
│ D6 ├── SD Card MOSI
│ D8 ├── PN532 SDA
│ D9 ├── PN532 SCL
│ D10 ├── SD Card CS
│ │
└─────────────────┘
```
## Power Considerations
- **Voltage**: Both PN532 and SD card modules operate at 3.3V
- **Current**: ESP32-C3 can provide sufficient current for both modules
- **Power Supply**: Use quality USB cable or external 3.3V supply for stable operation
## Troubleshooting
### I2C Issues
- Check SDA/SCL connections
- Verify pull-up resistors (usually built into modules)
- Ensure PN532 DIP switches are set correctly
### SD Card Issues
- Verify SPI connections
- Check SD card formatting (FAT32 recommended)
- Ensure proper power supply
### Communication Issues
- Check ESP-NOW channel settings
- Verify both modules are powered and programmed correctly
- Monitor serial output for pairing status
## LED Status Indicators
### Listener Module (GPIO10)
- **3 quick blinks**: System startup
- **5 quick blinks**: Successfully paired with emulator
- **Solid ON**: NFC tag detected
- **Single blink every 500ms**: PN532 error
### Emulator Module (GPIO2)
- **3 quick blinks**: System startup
- **5 quick blinks**: Successfully paired with listener
- **Solid ON**: Emulating NFC tag
- **Single blink every 500ms**: PN532 error