ESP32 Weather Station Schematics
Wiring Diagram
ESP32 Pin Connections
ESP32 Development Board
┌─────────────────────────────────────┐
│ │
│ 3V3 ──┐ │
│ GND ──┼───┐ │
│ GPIO2 ──┘ │ │
│ │ │
│ GPIO4 ──────┼─── DHT11 Sensor │
│ │ ┌─────┐ │
│ GPIO21 ─────┼───│ SDA │ │
│ │ │ │ │
│ GPIO22 ─────┼───│ SCL │ │
│ │ └─────┘ │
│ GPIO34 ─────┼─── Rain Sensor │
│ │ │
│ GPIO35 ─────┼─── LDR │
│ │
│ VIN ──┐ │
│ GND ──┼───┐ │
│ │ │ │
└─────────┘ │ │
│ │
▼ ▼
Power Supply Status LED
Detailed Component Connections
DHT11 Temperature & Humidity Sensor
DHT11 Sensor
┌───────┐
│ 1 │─── +3.3V
│ 2 │─── GPIO4 (Data)
│ 3 │─── (Not Connected)
│ 4 │─── GND
└───────┘
Pinout (front view):
┌─────────┐
│ • • • │ ← Pins 1-4
└─────────┘
BMP180 Pressure Sensor (I2C)
BMP180 Sensor
┌─────────────┐
│ VIN ─────┼─── +3.3V
│ GND ─────┼─── GND
│ SDA ─────┼─── GPIO21
│ SCL ─────┼─── GPIO22
└─────────────┘
Rain Sensor Module
Rain Sensor Module
┌─────────────┐
│ VCC ───────┼─── +3.3V
│ GND ───────┼─── GND
│ AO ───────┼─── GPIO34 (Analog)
│ DO ───────┼─── (Not Connected)
└─────────────┘
LDR (Light Dependent Resistor)
LDR Circuit
┌─────────┐ ┌─────────┐
│ 3.3V │ │ │
│ │ │ LDR │
│ ┌─────┼────┼─────┐ │
│ │ │ │ │ │
│ ▼ │ │ ▼ │
│ 10kΩ │ │ │
│ Resistor│ │ │
│ │ │ │ │
│ └─────┼────┼─────┐ │
│ │ │ │ │
│ GND │ │ │ │
└─────────┘ │ GPIO35│ │
│ │ │
└───────┼───┘
│
GND
LED Status Indicator
LED Circuit
┌─────┐ ┌─────────┐
│3.3V │ │ │
│ │ │ LED │
│ ┌───┼────┼─────┐ │
│ │ │ │ │ │
│ ▼ │ │ ▼ │
│220Ω │ │ │
│Res │ │ │
│ │ │ │ │
│ └───┼────┼─────┐ │
│ │ │ │ │
│GPIO2│ │ │ │
└─────┼────┼─────┼───┘
│ │ │
└────┼─────┘
│
GND
Complete Circuit Schematic
+3.3V
│
├───────────────────┐
│ │
│ ▼
│ ┌─────────┐
│ │ DHT11 │
│ │ Sensor │
│ └─────┬───┘
│ │
│ ▼
│ GPIO4
│ │
│ │
│ │
│ ▼
│ GPIO21
│ │
│ ▼
│ ┌─────────┐
│ │ BMP180 │
│ │ Sensor │
│ └─────┬───┘
│ │
│ ▼
│ GPIO22
│ │
│ │
│ │
│ ▼
│ GPIO34
│ │
│ ▼
│ ┌─────────┐
│ │ Rain │
│ │ Sensor │
│ └─────┬───┘
│ │
│ │
│ │
│ │
│ ▼
│ GPIO35
│ │
│ ▼
│ ┌─────────┐
│ │ LDR │
│ │ Circuit │
│ └─────┬───┘
│ │
│ │
│ │
│ ▼
│ GPIO2
│ │
│ ▼
│ ┌─────────┐
│ │ LED │
│ │ Circuit │
│ └─────┬───┘
│ │
│ │
│ ▼
│ ┌─────────┐
│ │ LCD │
│ │Display │
│ │ (I2C) │
│ └─────┬───┘
│ │
│ │
│ ▼
│ ┌─────────┐
└───────────────────┤ GND │
└─────────┘
Power Distribution
Power Supply (USB 5V or External 5V)
┌─────────────────────────────────────┐
│ │
│ +3.3V ──────────────────────────────┼─── DHT11 VCC
│ (from ESP32 regulator) │
│ ├─── BMP180 VCC
│ ├─── Rain Sensor VCC
│ └─── LDR Circuit VCC
│ │
│ GND ────────────────────────────────┼─── All GND connections
│ │
└─────────────────────────────────────┘
Bill of Materials
Components Required
- ESP32 Development Board - 1x
- DHT11 Temperature & Humidity Sensor - 1x
- BMP180 Pressure Sensor - 1x
- Rain Sensor Module - 1x
- LDR (Light Dependent Resistor) - 1x
- LED (5mm, any color) - 1x
- Resistors:
- 220Ω (for LED) - 1x
- 10kΩ (for LDR pull-down) - 1x
- Breadboard - 1x
- Jumper Wires - Multiple
Optional Components
- External Power Supply (5V, 1A) - For standalone operation
- Project Enclosure - For protection
- PCB - For permanent installation
Assembly Instructions
Step 1: Power Connections
- Connect ESP32 to USB power
- Verify 3.3V output from ESP32
- Connect all VCC pins to appropriate power sources
Step 2: I2C Bus Setup
- Connect GPIO21 to all SDA pins
- Connect GPIO22 to all SCL pins
- Add pull-up resistors if needed (usually built-in to modules)
Step 3: Digital Sensors
- Connect DHT11 data pin to GPIO4
- Connect LED circuit to GPIO2
- Connect LDR circuit to GPIO35
Step 4: Analog Sensors
- Connect rain sensor analog output to GPIO34
- Ensure proper grounding for analog circuits
Step 5: Testing
- Test each sensor individually
- Verify LCD display operation
- Check MQTT connectivity
- Validate complete system operation
Troubleshooting Guide
Common Issues
- I2C Communication: Check SDA/SCL connections and addresses
- Power Issues: Verify voltage levels and current capacity
- Sensor Readings: Check pin assignments and wiring
- LCD Display: Verify I2C address (usually 0x27)
Measurement Points
- 3.3V Rail: Should be stable at 3.3V
- I2C Signals: Should show clear clock and data transitions
- Analog Inputs: Should vary with sensor changes
- Digital Inputs: Should show clear HIGH/LOW states