Arduino Mega 2560-Based Smart Environmental Monitoring System with LCD Display and Stepper Motor Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to monitor and control environmental conditions using an Arduino Mega 2560 microcontroller. It includes sensors for temperature, humidity, and water level, as well as a stepper motor for vent control, LEDs for status indication, and a fan for temperature regulation. The system operates in different states (DISABLED, IDLE, ERROR, RUNNING) based on sensor readings and user inputs.
Component List
ULN 2003
- Description: Darlington transistor array used for driving the stepper motor.
- Pins: IN1, IN2, IN3, IN4, IN5, IN6, IN7, GND, +, COIL1, COIL2, COIL3, COIL4, COIL5
28BYJ-48 Stepper Motor
- Description: Stepper motor used for vent control.
- Pins: BLUE, PINK, YELLOW, ORANGE, RED
DS1307 RTC (Wokwi Compatible)
- Description: Real-time clock module for timekeeping.
- Pins: GND, 5V, SDA, SCL, SQW
Water Level Sensor
- Description: Sensor to measure water level.
- Pins: SIG, VCC, GND
Arduino Mega 2560
- Description: Microcontroller used to control the entire system.
- Pins: IOREF, RESET, 3V3, 5V, GND, VIN, A0-A15, D0-D53, AREF, SDA, SCL
DC Motor
- Description: Motor used for fan control.
- Pins: pin 1, pin 2
LED: Two Pin (green)
- Description: Green LED for status indication.
- Pins: cathode, anode
LED: Two Pin (yellow)
- Description: Yellow LED for status indication.
- Pins: cathode, anode
LED: Two Pin (red)
- Description: Red LED for status indication.
- Pins: cathode, anode
LED: Two Pin (blue)
- Description: Blue LED for status indication.
- Pins: cathode, anode
Resistor (220 Ohms)
- Description: Resistor used for current limiting.
- Pins: pin1, pin2
MB102 Breadboard Power Supply Module 3.3V/5V
- Description: Power supply module for providing 3.3V and 5V.
- Pins: VCC, GND, 3.3V, 5V
LCD Display (16 pin)
- Description: LCD display for showing sensor readings and system status.
- Pins: VSS, VDD, VO, RS, R_W, E, DB0-DB7, A, K
L293D
- Description: Motor driver IC for controlling the DC motor.
- Pins: Enable 1,2, Input 1, Output 1, GND, Output 2, Input 2, VCC2, VCC1, Input 4, Output 4, Output 3, Input 3, Enable 3,4
DHT11 Humidity and Temperature Sensor
- Description: Sensor for measuring temperature and humidity.
- Pins: VDD, DATA, NULL, GND
Rotary Potentiometer (10k Ohms)
- Description: Potentiometer for adjusting vent position.
- Pins: leg1, wiper, leg2
Pushbutton
- Description: Pushbutton for user input.
- Pins: Pin 2, Pin 1, Pin 3, Pin 4
Resistor (10k Ohms)
- Description: Resistor used for pull-up configuration.
- Pins: pin1, pin2
Wiring Details
ULN 2003
- IN1: Connected to Arduino Mega 2560 D13 PWM
- IN2: Connected to Arduino Mega 2560 D12 PWM
- IN3: Connected to Arduino Mega 2560 D11 PWM
- IN4: Connected to Arduino Mega 2560 D10 PWM
- COIL1: Connected to 28BYJ-48 Stepper Motor BLUE
- COIL2: Connected to 28BYJ-48 Stepper Motor PINK
- COIL3: Connected to 28BYJ-48 Stepper Motor YELLOW
- COIL4: Connected to 28BYJ-48 Stepper Motor ORANGE
- COIL5: Connected to 28BYJ-48 Stepper Motor RED
28BYJ-48 Stepper Motor
- BLUE: Connected to ULN 2003 COIL1
- PINK: Connected to ULN 2003 COIL2
- YELLOW: Connected to ULN 2003 COIL3
- ORANGE: Connected to ULN 2003 COIL4
- RED: Connected to ULN 2003 COIL5
DS1307 RTC (Wokwi Compatible)
- GND: Connected to MB102 Breadboard Power Supply Module GND
- 5V: Connected to MB102 Breadboard Power Supply Module VCC
- SDA: Connected to Arduino Mega 2560 D20/SDA
- SCL: Connected to Arduino Mega 2560 D21/SCL
- SQW: Connected to Arduino Mega 2560 D53
Water Level Sensor
- SIG: Connected to Arduino Mega 2560 A0
- VCC: Connected to MB102 Breadboard Power Supply Module VCC
- GND: Connected to MB102 Breadboard Power Supply Module GND
Arduino Mega 2560
- 5V: Connected to MB102 Breadboard Power Supply Module VCC
- GND: Connected to MB102 Breadboard Power Supply Module GND
- A0: Connected to Water Level Sensor SIG
- A1: Connected to Rotary Potentiometer wiper
- D2 PWM: Connected to Pushbutton Pin 1
- D3 PWM: Connected to Pushbutton Pin 1
- D4 PWM: Connected to Pushbutton Pin 1
- D7 PWM: Connected to L293D Enable 3,4
- D10 PWM: Connected to ULN 2003 IN4
- D11 PWM: Connected to ULN 2003 IN3
- D12 PWM: Connected to ULN 2003 IN2
- D13 PWM: Connected to ULN 2003 IN1
- D20/SDA: Connected to DS1307 RTC SDA
- D21/SCL: Connected to DS1307 RTC SCL
- D22: Connected to L293D Input 3
- D23: Connected to L293D Input 4
- D24: Connected to LCD Display RS
- D25: Connected to LCD Display E
- D26: Connected to LCD Display DB4
- D27: Connected to LCD Display DB5
- D28: Connected to LCD Display DB6
- D29: Connected to LCD Display DB7
- D40: Connected to LED: Two Pin (blue) anode
- D41: Connected to LED: Two Pin (red) anode
- D42: Connected to LED: Two Pin (green) anode
- D43: Connected to LED: Two Pin (yellow) anode
- D52: Connected to DHT11 Humidity and Temperature Sensor DATA
- D53: Connected to DS1307 RTC SQW
DC Motor
- pin 1: Connected to L293D Output 3
- pin 2: Connected to L293D Output 4
LED: Two Pin (green)
- anode: Connected to Arduino Mega 2560 D42
- cathode: Connected to Resistor pin1
LED: Two Pin (yellow)
- anode: Connected to Arduino Mega 2560 D43
- cathode: Connected to Resistor pin1
LED: Two Pin (red)
- anode: Connected to Arduino Mega 2560 D41
- cathode: Connected to Resistor pin1
LED: Two Pin (blue)
- anode: Connected to Arduino Mega 2560 D40
- cathode: Connected to Resistor pin1
Resistor (220 Ohms)
- pin1: Connected to LED cathode
- pin2: Connected to MB102 Breadboard Power Supply Module GND
MB102 Breadboard Power Supply Module 3.3V/5V
- VCC: Connected to various components requiring 5V