

This document provides a detailed overview of a power management and environmental sensing circuit. The circuit is designed to handle dual power sources, manage power distribution through fuses and circuit breakers, and control power to various devices such as a humidifier, fan, and air quality sensor. It also includes microcontrollers for monitoring and control purposes.
12v 7ah Battery
12v + connected to Fuse (Terminal 1)12v - connected to Charge Controller (Battery Negative)Solar Panel
+ connected to Fuse (Terminal 1)- connected to Charge Controller (Solar Negative)Fuse
Terminal 1 connected to 12v 7ah Battery (12v +) and Solar Panel (+)Terminal 2 connected to Charge Controller (Battery Positive) and Charge Controller (Solar Positive)Circuit Breaker
+ connected to Dual Power Automatic Transfer Switch (+) and Power Inverter (+)- connected to Dual Power Automatic Transfer Switch (-) and Power Inverter (-)Dual Power Automatic Transfer Switch
+ connected to Circuit Breaker (+) and Relay Module 5v-30v (common contact)- connected to Circuit Breaker (-) and Power Outlet (IL) (GND)Charge Controller
Solar Positive connected to Fuse (Terminal 2)Solar Negative connected to Solar Panel (-)Battery Positive connected to Fuse (Terminal 2)Battery Negative connected to 12v 7ah Battery (12v -)Load Positive connected to Power Inverter (+)Load Negative connected to Power Inverter (-)Power Inverter
+ connected to Charge Controller (Load Positive) and Circuit Breaker (+)- connected to Charge Controller (Load Negative) and Circuit Breaker (-)Power Outlet (IL)
N connected to 5V Adapter (AC In 1)L connected to 5V Adapter (AC In 2)GND connected to Dual Power Automatic Transfer Switch (-) and Relay Module 5v-30v (common contact)5V Adapter
AC In 1 connected to Power Outlet (IL) (N)AC In 2 connected to Power Outlet (IL) (L)5V connected to Relay Module 5v-30v (normally closed)GND connected to Relay Module 5v-30v (V-)Arduino UNO
3.3V connected to MQ-5 Gas Sensor (VCC)5V connected to SHT1x-Breakout (VCC) and MQ-5 Gas Sensor (VCC)GND connected to Relay Module 5v-30v (V-)Vin connected to Relay Module 5v-30v (V+)D1 connected to Relay Module 5v-30v (trigger)D2 connected to Relay Module 5v-30v (trigger)D3 connected to Relay Module 5v-30v (trigger)ESP32 (30 pin)
GND connected to MQ-5 Gas Sensor (GND)3V3 connected to MQ-5 Gas Sensor (VCC)TX2 connected to SHT1x-Breakout (DATA)RX2 connected to MQ-5 Gas Sensor (Analog out)D4 connected to MQ-5 Gas Sensor (Analog out)D2 connected to MQ-5 Gas Sensor (Analog out)Humidifier
5V connected to Relay Module 5v-30v (normally closed)GND connected to Relay Module 5v-30v (V-)Fan
5V connected to Relay Module 5v-30v (normally closed)GND connected to Relay Module 5v-30v (V-)Relay Module 5v-30v
common contact connected to Dual Power Automatic Transfer Switch (+)normally open (not connected)normally closed connected to Humidifier (5V), Fan (5V), and PM2.5 Air Quality Sensor (VCC)trigger connected to Arduino UNO (D1, D2, D3)V- connected to 5V Adapter (GND)V+ connected to Arduino UNO (Vin)void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
setup() and loop() functions. These functions need to be populated with the logic to control the relay modules based on sensor inputs and possibly communicate with the ESP32 for more complex tasks.