Arduino UNO-Based Environmental Automation System with Relay Control and Sensor Monitoring
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control various components including LEDs, a servo motor (MG90S), a buzzer, a fan, a water pump, solenoid valves, an LCD display (20x4 with I2C), a soil moisture sensor, and a temperature sensor. The control logic is managed by an Arduino UNO microcontroller, which interfaces with a 4-channel 5V relay module to switch higher power loads. The circuit is powered by a 12V 7Ah battery, and a rocker switch (SPST) is used to control the power flow. The circuit includes current-limiting resistors for the LEDs and utilizes the Arduino's GPIO pins for control signals.
Component List
- LEDs (Red, Orange, Blue): Light Emitting Diodes used as visual indicators.
- Resistors (220 Ohms): Current-limiting resistors for the LEDs.
- Rocker Switch (SPST): Single Pole Single Throw switch used to control the power supply to the circuit.
- Lcd 20x4 i2c: An alphanumeric liquid crystal display with an I2C interface for displaying data.
- MG90S: A micro servo motor used for precise positioning tasks.
- 12v 7ah Battery: A rechargeable battery providing the power source for the circuit.
- Fan: A 5V fan used for cooling purposes.
- Water Pump: A pump used for moving water.
- Plastic Solenoid Valves: Electrically controlled valves for controlling the flow of liquids.
- Arduino UNO: A microcontroller board based on the ATmega328P, used for controlling the various components in the circuit.
- Relay 4 Channel 5v: A 4-channel relay module used for controlling high power devices.
- Temperature Sensor: A sensor used to measure temperature.
- SparkFun Soil Moisture Sensor: A sensor used to detect the moisture level in the soil.
- Buzzer: An electronic buzzer for audible alerts.
Wiring Details
LEDs
- Red, Orange, Blue LEDs: Each LED's anode is connected to a 220 Ohm resistor, and the other end of the resistor is connected to a designated Arduino UNO digital pin. The cathode of each LED is connected to the ground (GND).
Resistors
- 220 Ohm Resistors: Each resistor is connected in series with an LED and to a digital pin on the Arduino UNO for controlling the LED.
Rocker Switch (SPST)
- Rocker Switch (SPST): One terminal is connected to the 12V positive terminal of the battery, and the other terminal is connected to the common (COM) terminals of the relay module and the 5V input of the Arduino UNO.
Lcd 20x4 i2c
- Lcd 20x4 i2c: The GND and 5V pins are connected to the corresponding GND and 5V outputs on the Arduino UNO. The SCA and SCL pins are connected to the A4 and A5 pins on the Arduino UNO, respectively.
MG90S
- MG90S: The VCC and GND pins are connected to the 5V and GND outputs on the Arduino UNO. The SIG pin is connected to the A3 pin on the Arduino UNO.
12v 7ah Battery
- 12v 7ah Battery: The 12V positive terminal is connected to the rocker switch, and the negative terminal is connected to the GND of the Arduino UNO and other components requiring a ground connection.
Fan
- Fan: The 5V and GND pins are connected to the NO3 terminal of the relay module and GND, respectively.
Water Pump
- Water Pump: The VCC and GND pins are connected to the NO4 terminal of the relay module and GND, respectively.
Plastic Solenoid Valves
- Plastic Solenoid Valves: One terminal of each valve is connected to the negative terminal of the battery, and the other terminal is connected to the NO1 and NO2 terminals of the relay module.
Arduino UNO
- Arduino UNO: Utilizes various digital and analog pins to control and monitor the components in the circuit. It is powered by the 5V output from the rocker switch.
Relay 4 Channel 5v
- Relay 4 Channel 5v: The VCC and GND pins are connected to the 5V and GND outputs on the Arduino UNO. The IN1, IN2, IN3, and IN4 pins are connected to the D10, D11, D12, and D13 pins on the Arduino UNO, respectively. The common (COM) terminals are connected to the 5V power supply through the rocker switch.
Temperature Sensor
- Temperature Sensor: The VDD and GND pins are connected to the 5V and GND outputs on the Arduino UNO. The data pin is connected to the A1 pin on the Arduino UNO.
SparkFun Soil Moisture Sensor
- SparkFun Soil Moisture Sensor: The VCC and GND pins are connected to the 5V and GND outputs on the Arduino UNO. The SIG pin is connected to the A0 pin on the Arduino UNO.
Buzzer
- Buzzer: The PIN and GND pins are connected to the A2 pin and GND on the Arduino UNO, respectively.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code is a template and does not contain any functional code. It needs to be populated with the logic to control the components as per the circuit's requirements.