# ESP32-WROOM-32E Pinout Comparison

## RF_Module Library vs Our Custom Library

### Key Differences Found:

**RF_Module Library (Standard KiCad):**
- Pin 1: GND ✓
- Pin 2: VDD ✓
- Pin 3: EN (separate numbered pin)
- GPIO naming: IO34, IO35, IO32, etc.
- Total: 39 pins

**Our Custom Library (Midea_ESP):**
- Pin 1: GND ✓ (just fixed)
- Pin 2: VDD ✓ (just fixed)
- EN: Separate pin (not numbered as pin 3)
- GPIO naming: GPIO34, GPIO35, GPIO32, etc.
- Total: 45+ pins (includes all GPIO pins)

### Pin Mapping Reference

| RF_Module Pin | RF_Module Name | Our Library Pin | Our Library Name | Function |
|---------------|----------------|-----------------|------------------|----------|
| 1 | GND | 1 | GND | Ground |
| 2 | VDD | 2 | VDD | Power (3.3V) |
| 3 | EN | EN | EN | Enable |
| 4 | SENSOR_VP | - | - | Sensor (not used) |
| 5 | SENSOR_VN | - | - | Sensor (not used) |
| 6 | IO34 | 5 | GPIO32 | GPIO (input only) |
| 7 | IO35 | 6 | GPIO33 | GPIO (input only) |
| 8 | IO32 | 5 | GPIO32 | GPIO (bidirectional) |
| 9 | IO33 | 6 | GPIO33 | GPIO (bidirectional) |
| 10 | IO25 | 7 | GPIO25 | GPIO (bidirectional) |
| 11 | IO26 | 8 | GPIO26 | GPIO (bidirectional) |
| 12 | IO27 | 9 | GPIO27 | GPIO (bidirectional) |
| 13 | IO14 | 16 | GPIO14 | GPIO (bidirectional) |
| 14 | IO12 | 17 | GPIO12 | GPIO (bidirectional) |
| 15 | GND | 4 | GND | Ground |
| 16 | IO13 | 18 | GPIO13 | GPIO (bidirectional) |
| 23 | IO15 | 24 | GPIO15 | GPIO (bidirectional) |
| 24 | IO2 | 25 | GPIO2 | GPIO (bidirectional) |
| 25 | IO0 | 26 | GPIO0 | GPIO (bidirectional) |
| 26 | IO4 | 30 | GPIO4 | GPIO (bidirectional) |
| 27 | IO16 | 31 | GPIO16 | GPIO (bidirectional) |
| 28 | IO17 | 32 | GPIO17 | GPIO (bidirectional) |
| 29 | IO5 | 35 | GPIO5 | GPIO (bidirectional) |
| 30 | IO18 | 36 | GPIO18 | GPIO (bidirectional) |
| 31 | IO19 | 37 | GPIO19 | GPIO (bidirectional) |
| 33 | IO21 | 39 | GPIO21 | GPIO (bidirectional) |
| 34 | RXD0/IO3 | 41 | GPIO3 | UART0 RX |
| 35 | TXD0/IO1 | 43 | GPIO1 | UART0 TX |
| 36 | IO22 | 44 | GPIO22 | GPIO (bidirectional) |
| 37 | IO23 | 45 | GPIO23 | GPIO (bidirectional) |
| 38 | GND | 40 | GND | Ground |
| 39 | GND | - | - | Ground (additional) |

### Important Notes:

1. **Pin 1 and Pin 2 are correct** in both libraries:
   - Pin 1: GND ✓
   - Pin 2: VDD ✓

2. **EN Pin:**
   - RF_Module: Pin 3
   - Our library: Separate EN pin (not numbered)
   - Both are correct, just different representation

3. **GPIO Naming:**
   - RF_Module uses: IO34, IO35, IO32, etc.
   - Our library uses: GPIO34, GPIO35, GPIO32, etc.
   - Both refer to the same physical pins

4. **VDD Pins:**
   - RF_Module shows: Pin 2 only (simplified)
   - Our library shows: Pins 2, 3, 14, 21, 22, 27, 28, 33, 42 (all VDD pins)
   - Our library is more complete for power distribution

5. **GND Pins:**
   - RF_Module shows: Pins 1, 15, 38, 39
   - Our library shows: Pins 1, 4, 13, 15, 20, 23, 26, 29, 34, 38, 40 (all GND pins)
   - Our library is more complete for ground distribution

### Recommendation:

**For our design, we should:**
- ✅ Keep using our custom library (more complete pin representation)
- ✅ Ensure Pin 1 = GND and Pin 2 = VDD (already fixed)
- ✅ Use GPIO naming (GPIO17, GPIO16, etc.) as it's more standard in ESP32 documentation
- ✅ Include all VDD and GND pins for proper power distribution

### Power Pin Verification:

**VDD Pins (per datasheet and RF_Module):**
- Pin 2: VDD ✓
- Additional VDD pins: 3, 14, 21, 22, 27, 28, 33, 42 (our library includes all)

**GND Pins (per datasheet and RF_Module):**
- Pin 1: GND ✓
- Additional GND pins: 4, 13, 15, 20, 23, 26, 29, 34, 38, 40 (our library includes all)

### Conclusion:

Our custom library is **more complete** than the RF_Module library for PCB design because:
1. Shows all VDD pins (needed for proper decoupling)
2. Shows all GND pins (needed for proper grounding)
3. Uses standard GPIO naming convention
4. Matches the physical pinout more accurately

The RF_Module library is simplified for schematic representation, while our library is better for detailed PCB design.


