Circuit Documentation
Summary of the Circuit
This circuit is designed to interface an ESP32 microcontroller with various sensors, power management modules, and actuators. The ESP32 is responsible for controlling relays that in turn manage power to several fans. Additionally, the circuit includes a BMP280 sensor for atmospheric pressure and temperature measurements, and an RHT03 sensor for humidity and temperature readings. Power is supplied to the circuit through a combination of a solar panel, a 5V power supply, and a 12V battery, with step-down buck converters regulating the voltage. An ESP32-CAM module is also included for image capture capabilities.
Component List
ESP32 (30 pin)
- Microcontroller with WiFi and Bluetooth capabilities.
- 30 GPIO pins including analog inputs, SPI, I2C, UART, DAC, and touch sensors.
Solar Panel
- Provides power from solar energy.
- Has positive (Vcc) and negative (Gnd) terminals.
Step down Buck Converter (x2)
- Voltage regulators that step down input voltage to a lower output voltage.
- Each has input (IN +, IN - GND) and output (OUT +, OUT - GND) terminals.
POWER SUPPLY 5V 5AMP
- Converts 220V AC to 5V DC power.
- Outputs 12V-24V DC and has ground terminals.
12V Battery (mini)
- Provides 12V DC power.
- Has positive (+) and negative (-) terminals.
BMP280
- Sensor for measuring atmospheric pressure and temperature.
- Communicates over I2C or SPI.
Humidity and Temperature Sensor (RHT03)
- Measures humidity and temperature.
- Outputs data via a single data signal line.
Fan (x3)
- 5V fans used for cooling.
- Each fan has a 5V and GND connection.
Relay 4 Channel 5v
- 4-channel relay module for controlling high power devices.
- Each channel has an input (IN), common (COM), normally open (NO), and normally closed (NC) terminal.
Relay module 1 channel
- Single-channel relay for controlling power to devices.
- Has signal (S), 5V, GND, normally open (NO), common (COM), and normally closed (NC) terminals.
ESP32 - CAM
- Camera module with an ESP32 microcontroller.
- Includes SD card interface, camera interface, and GPIO pins.
Wiring Details
ESP32 (30 pin)
- D26 connected to Relay 4 Channel 5v IN4
- D27 connected to Relay 4 Channel 5v IN3
- D14 connected to Relay 4 Channel 5v IN2
- D12 connected to Relay 4 Channel 5v IN1
- D21 connected to BMP280 SDO
- D19 connected to BMP280 CSB
- D18 connected to BMP280 SDA
- D5 connected to BMP280 SCL
- D15 connected to Humidity and Temperature Sensor (RHT03) Data-signal
- GND connected to common ground net
- 3V3 connected to common 3.3V net
Solar Panel
- GND connected to POWER SUPPLY 5V 5AMP 220V Negative Pole (AC)
- VCC connected to POWER SUPPLY 5V 5AMP 220V Positive Pole (AC)
Step down Buck Converter
- IN + connected to POWER SUPPLY 5V 5AMP 12V-24V Output (DC)
- IN - GND connected to POWER SUPPLY 5V 5AMP GND (DC)
- OUT + connected to Relay 4 Channel 5v VCC
- OUT - GND connected to Relay 4 Channel 5v GND
POWER SUPPLY 5V 5AMP
- 220V Positive Pole (AC) connected to Solar Panel VCC
- 220V Negative Pole (AC) connected to Solar Panel GND
- GND (DC) connected to Step down Buck Converter IN - GND
- 12V-24V Output (DC) connected to Step down Buck Converter IN +
12V Battery (mini)
- connected to Step down Buck Converter OUT +
- connected to Step down Buck Converter OUT - GND
BMP280
- SDO connected to ESP32 D21
- CSB connected to ESP32 D19
- SDA connected to ESP32 D18
- SCL connected to ESP32 D5
- GND connected to common ground net
- VCC connected to common 3.3V net
Humidity and Temperature Sensor (RHT03)
- Data-signal connected to ESP32 D15
- Vcc connected to common 3.3V net
- GND 1 and GND 2 connected to common ground net
Fan (x3)
- Each fan's GND connected to Relay 4 Channel 5v NOx (where x is the relay channel number)
- Each fan's 5V connected to Relay 4 Channel 5v COMx
Relay 4 Channel 5v
- IN1 to IN4 connected to ESP32 D12, D14, D27, and D26 respectively
- VCC connected to Step down Buck Converter OUT +
- GND connected to Step down Buck Converter OUT - GND
- NOx and COMx connected to corresponding fans (where x is the relay channel number)
Relay module 1 channel
- NO connected to Relay 4 Channel 5v COM1
- COM connected to Relay 4 Channel 5v NO1
ESP32 - CAM
- GND connected to common ground net
- VCC connected to common 3.3V net
Documented Code
No code was provided for the microcontrollers in the circuit. The documentation of the code would typically include details on the initialization of peripherals, the main control loop, interrupt service routines, and any communication protocols used. It would also include comments explaining the purpose and functionality of different parts of the code. Since no code is available, this section cannot be completed.