Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO Based UV Intensity Monitoring System with LCD Display

View and Edit Project In Cirkit DesignerImage of Arduino UNO Based UV Intensity Monitoring System with LCD Display

Circuit Documentation

Summary of the Circuit

This circuit is designed to measure UV intensity using an ML8511 UV sensor and display the results on an LCD screen. The system is powered by a 9V battery and utilizes two Arduino UNO microcontrollers, although only one is actively used in the current configuration. The active Arduino reads the UV sensor data, processes it, and then displays the UV intensity on the LCD screen. The LCD screen is interfaced with the Arduino using I2C communication.

Component List

Arduino UNO

ML8511 Breakout Board

Resistor

LCD screen 16x2 I2C

9V battery

Wiring Details

Arduino UNO

ML8511 Breakout Board

Resistor

LCD screen 16x2 I2C

9V battery

Documented Code

Arduino UNO Code for UV Intensity Measurement and Display

#include <Wire.h>
#include <LiquidCrystal_I2C.h>  // For the LCD I2C

LiquidCrystal_I2C lcd(0x27, 16, 2);  // I2C address for the LCD

int uvSensorPin = A0; // Analog pin for the ML8511 UV sensor
float uvIntensity;

void setup() {
  lcd.begin();  // Initialize the LCD
  lcd.backlight();  // Turn on the back light of LCD
  lcd.setCursor(0, 0);
  lcd.print("UV Intensity:");

  Serial.begin(9600); // Start serial communication for debugging
}

void loop() {
  int uvLevel = analogRead(uvSensorPin);  // Read data from the UV sensor
  float voltage = uvLevel * (5.0 / 1023.0);  // Convert to voltage

  // Calibrate the sensor to UV radiation values
  uvIntensity = map(uvLevel, 0, 1023, 0, 15); // Scale to a simple UV index

  lcd.setCursor(0, 1);  // Second line on the LCD
  lcd.print(uvIntensity);  // Display the UV value

  Serial.print("UV Level: ");
  Serial.println(uvIntensity);  // Debug in serial monitor

  delay(1000);  // Wait for 1 second before the next reading
}

Arduino UNO Placeholder Code (Unused in Current Configuration)

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

This concludes the documentation for the UV intensity measurement circuit. The circuit is designed for educational purposes and provides a practical application of interfacing sensors and displays with a microcontroller.