Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino Leonardo Environmental Monitoring System with Relay-Controlled Watering

Image of Arduino Leonardo Environmental Monitoring System with Relay-Controlled Watering

Circuit Documentation

Summary of the Circuit

This circuit is designed to interface various sensors and actuators with an Arduino Leonardo microcontroller. The sensors include a DHT11 temperature and humidity sensor, an Adafruit BMP180 barometric pressure sensor, a Light Dependent Resistor (LDR) for light sensing, and a capacitive soil moisture sensor. Actuators in the circuit include a fan, a water pump, and a relay module for controlling high-power devices. An OLED display is also included for data visualization. The circuit is powered by a 4xAA battery pack. The Arduino Leonardo facilitates data acquisition from the sensors and controls the actuators based on the sensor inputs.

Component List

Arduino Leonardo (Rev3b)

  • Microcontroller board based on the ATmega32u4
  • Provides digital and analog I/O pins
  • Features USB connectivity for programming and communication

DHT11

  • Digital temperature and humidity sensor
  • Provides a calibrated digital output

Adafruit BMP180

  • Digital barometric pressure sensor
  • Also provides temperature measurements
  • Uses I2C interface for communication

LDR (Light Dependent Resistor)

  • Changes resistance based on the light intensity
  • Used for light sensing applications

Fan

  • Electric fan for cooling or air circulation
  • Powered by 5V supply

NPN-Transistor

  • Bipolar junction transistor used as a switch or amplifier
  • Controls the fan operation in this circuit

Capacitive Soil Moisture Sensor V1.2

  • Measures the moisture content in soil
  • Provides analog output

Relay module 1 channel

  • Electrically operated switch
  • Allows for controlling high-power devices with low-power signals

4xAA Battery Pack

  • Provides power to the circuit
  • Holds 4 AA batteries connected in series

Water Pump

  • Electric pump for moving water
  • Controlled by the relay module

OLED 1.3"

  • Small display for showing data
  • Uses I2C interface for communication

Wiring Details

Arduino Leonardo (Rev3b)

  • 5V connected to DHT11, Adafruit BMP180, LDR, NPN-Transistor base, Capacitive Soil Moisture Sensor, Relay module, OLED display
  • GND connected to DHT11, Adafruit BMP180, LDR, Capacitive Soil Moisture Sensor, Fan, OLED display, Relay module, 4xAA battery pack NEG, Water Pump
  • D2/SDA connected to DHT11 sensor data pin
  • SCL connected to Adafruit BMP180 and OLED display for I2C clock
  • SDA connected to Adafruit BMP180 and OLED display for I2C data
  • A0 connected to LDR analog output
  • D4/A6 connected to Relay module signal pin
  • A1 connected to Capacitive Soil Moisture Sensor analog output
  • D9 PWM/A9 connected to NPN-Transistor collector

DHT11

  • 5V and GND for power supply
  • S for data output connected to Arduino Leonardo D2/SDA

Adafruit BMP180

  • +5V and GND for power supply
  • SCL and SDA for I2C communication with Arduino Leonardo

LDR

  • VCC and GND for power supply
  • A0 for analog light intensity output connected to Arduino Leonardo A0

Fan

  • 5V and GND for power supply
  • Controlled by NPN-Transistor

NPN-Transistor

  • B connected to Arduino Leonardo 5V
  • C connected to Arduino Leonardo D9 PWM/A9
  • E connected to Fan 5V

Capacitive Soil Moisture Sensor V1.2

  • VCC and GND for power supply
  • AOUT for analog moisture level output connected to Arduino Leonardo A1

Relay module 1 channel

  • 5V and GND for power supply
  • S for signal input connected to Arduino Leonardo D4/A6
  • NC normally closed contact connected to Water Pump VCC
  • COM common contact connected to 4xAA battery pack POS

4xAA Battery Pack

  • POS and NEG for power supply
  • NEG connected to Arduino Leonardo GND
  • POS connected to Relay module COM

Water Pump

  • VCC and GND for power supply
  • VCC connected to Relay module NC

OLED 1.3"

  • GND and VCC for power supply
  • SCL and SDA for I2C communication with Arduino Leonardo

Documented Code

No code was provided for the microcontroller. The documentation of the code would typically include descriptions of the functions, algorithms, and logic used to read sensor data, control actuators, and display information on the OLED screen. It would also include setup and loop functions for the Arduino sketch, along with any necessary library imports and global variable definitions.