Arduino-Controlled Environmental Monitoring and Automation System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit is designed to interface various sensors and actuators with an Arduino UNO microcontroller. The circuit includes a USB driver circuit for a fogger atomizer, a 12V single-channel relay for controlling power to the atomizer, a humidifier, an MQ-135 air quality sensor, a KY-015 DHT11 temperature and humidity sensor, an HC-SR04 ultrasonic distance sensor, two gearmotors with an L298N motor driver for motion control, and an MKE-M07 LCD1602 I2C module for display purposes. The Arduino UNO serves as the central processing unit, reading sensor data, controlling the relay, driving the motors, and updating the display.
Component List
USB Driver Circuit Fogger Atomizer
- Pins:
+,- - Description: Drives the fogger atomizer.
12V Single Channel Relay
- Pins:
NC,COM,NO,IN,GND,VCC - Description: Controls the power to the atomizer and humidifier.
Humidifier
- Pins:
GND,5V - Description: Adds moisture to the air.
MQ-135 Sensor Air Quality
- Pins:
VCC,GND,A0,D0 - Description: Measures the quality of the air.
KY-015 DHT11
- Pins:
5V,S,GND - Description: Measures temperature and humidity.
HC-SR04 Ultrasonic Sensor
- Pins:
VCC,TRIG,ECHO,GND - Description: Measures distance via ultrasonic waves.
Gearmotor DC Wheels (Right and Left)
- Pins:
PIN1,PIN2 - Description: Provides motion to the wheels.
L298N DC Motor Driver
- Pins:
OUT1,OUT2,12V,GND,5V,OUT3,OUT4,5V-ENA-JMP-I,5V-ENA-JMP-O,+5V-J1,+5V-J2,ENA,IN1,IN2,IN3,IN4,ENB - Description: Drives the gearmotors for the wheels.
Arduino UNO
- Pins:
UNUSED,IOREF,Reset,3.3V,5V,GND,Vin,A0,A1,A2,A3,A4,A5,SCL,SDA,AREF,D13,D12,D11,D10,D9,D8,D7,D6,D5,D4,D3,D2,D1,D0 - Description: The main controller for the circuit.
MKE-M07 LCD1602 I2C
- Pins:
GND,5V,SDA,SCL - Description: Displays information such as sensor readings.
Wiring Details
USB Driver Circuit Fogger Atomizer
+connected to 12V Single Channel RelayCOM-connected to 12V Single Channel RelayNOand HumidifierGND
12V Single Channel Relay
NCnot connectedCOMconnected to USB Driver Circuit Fogger Atomizer+NOconnected to USB Driver Circuit Fogger Atomizer-INconnected to Arduino UNOD9GNDcommon groundVCCcommon 5V supply
Humidifier
5Vconnected to USB Driver Circuit Fogger Atomizer+GNDconnected to USB Driver Circuit Fogger Atomizer-
MQ-135 Sensor Air Quality
VCCcommon 5V supplyGNDcommon groundA0connected to Arduino UNOA0D0not connected
KY-015 DHT11
5Vcommon 5V supplySnot connectedGNDcommon ground
HC-SR04 Ultrasonic Sensor
VCCcommon 5V supplyTRIGconnected to Arduino UNOD3ECHOconnected to Arduino UNOD4GNDcommon ground
Gearmotor DC Wheels Right
PIN1connected to L298N DC Motor DriverOUT3PIN2connected to L298N DC Motor DriverOUT4
Gearmotor DC Wheels Left
PIN1connected to L298N DC Motor DriverOUT2PIN2connected to L298N DC Motor DriverOUT1
L298N DC Motor Driver
OUT1,OUT2,OUT3,OUT4connected to Gearmotors12Vnot connectedGNDcommon ground5Vcommon 5V supply5V-ENA-JMP-I,5V-ENA-JMP-O,+5V-J1,+5V-J2,ENA,IN1,IN2,IN3,IN4,ENBnot connected
Arduino UNO
5Vcommon 5V supplyGNDcommon groundA0connected to MQ-135 Sensor Air QualityA0A4connected to MKE-M07 LCD1602 I2CSDAA5connected to MKE-M07 LCD1602 I2CSCLD3connected to HC-SR04 Ultrasonic SensorTRIGD4connected to HC-SR04 Ultrasonic SensorECHOD9connected to 12V Single Channel RelayIN
MKE-M07 LCD1602 I2C
GNDcommon ground5Vcommon 5V supplySDAconnected to Arduino UNOA4SCLconnected to Arduino UNOA5
Documented Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
The provided code is a template for the Arduino UNO microcontroller. The setup() function is called once when the microcontroller is powered on or reset. It is used to initialize the pins and set the initial state of the circuit. The loop() function is called repeatedly and contains the main logic of the program. This is where the microcontroller will read sensor data, control actuators, and update the display. The actual implementation details need to be filled in based on the specific requirements of the circuit's operation.