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

Arduino-Controlled UV LED Sterilization System with Dual UV Sensors

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled UV LED Sterilization System with Dual UV Sensors

Circuit Documentation

Summary

This circuit is designed to control a set of UV LEDs using an Arduino UNO. The UV LEDs are powered through a constant current regulator and are monitored by UV light sensors. The process is initiated by a push button and continues until the UV sensors detect a desired UV level. During the operation, an indicator LED is lit, and upon completion, a green LED is turned on while the UV LEDs are turned off.

Component List

  1. Adafruit GUVA-S12SD UV Light Sensor

    • Pins: 5V, Out, GND
    • Description: UV light sensor to measure UV intensity.
  2. 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: Microcontroller to control the circuit.
  3. Ultraviolet (UV-C) 275nm Seoul Viosys LED Module

    • Pins: +, -
    • Description: UV-C LED module for emitting UV light.
  4. FemtoBuck LED Driver

    • Pins: GND, VIN, CTRL_CH1, OUT+, OUT-
    • Description: Constant current LED driver.
  5. 12v Battery

    • Pins: -, +
    • Description: Power source for the circuit.
  6. LED: Two Pin (green)

    • Pins: cathode, anode
    • Description: Green indicator LED.
  7. LED: Two Pin (orange)

    • Pins: cathode, anode
    • Description: Orange indicator LED.
  8. Resistor (200 Ohms)

    • Pins: pin1, pin2
    • Description: Resistor with 200 Ohms resistance.
  9. Resistor (10k Ohms)

    • Pins: pin1, pin2
    • Description: Resistor with 10k Ohms resistance.
  10. Limit switch

    • Pins: C, NO, NC
    • Description: Switch to control the circuit.
  11. Momentary Push Button Switch

    • Pins: 1, 3, 2, 4
    • Description: Button to start the process.

Wiring Details

Adafruit GUVA-S12SD UV Light Sensor

Arduino UNO

Ultraviolet (UV-C) 275nm Seoul Viosys LED Module

FemtoBuck LED Driver

12v Battery

LED: Two Pin (green)

LED: Two Pin (orange)

Resistor (200 Ohms)

Resistor (10k Ohms)

Limit switch

Momentary Push Button Switch

Code Documentation

/*
 * This Arduino sketch controls a set of UV LEDs via a constant current regulator.
 * The UV LEDs remain powered until the UV sensor achieves a desired value.
 * While the UV LEDs are powered on, an indicator LED is lit.
 * When the process is complete, a green LED is powered, and the UV LEDs are turned off.
 * The process is started with the push of a button.
 */

const int uvSensorPin1 = A1; // UV sensor 1 output
const int uvSensorPin2 = A2; // UV sensor 2 output
const int uvLEDPin = 9;      // UV LED control pin
const int indicatorLEDPin = 3; // Indicator LED pin
const int greenLEDPin = 4;   // Green LED pin
const int buttonPin = 2;     // Button pin
const int desiredUVLevel = 500; // Desired UV sensor value

void setup() {
  pinMode(uvLEDPin, OUTPUT);
  pinMode(indicatorLEDPin, OUTPUT);
  pinMode(greenLEDPin, OUTPUT);
  pinMode(buttonPin, INPUT);
  digitalWrite(uvLEDPin, LOW);
  digitalWrite(indicatorLEDPin, LOW);
  digitalWrite(greenLEDPin, LOW);
}

void loop() {
  if (digitalRead(buttonPin) == HIGH) {
    digitalWrite(uvLEDPin, HIGH);
    digitalWrite(indicatorLEDPin, HIGH);
    while (analogRead(uvSensorPin1) < desiredUVLevel &&
           analogRead(uvSensorPin2) < desiredUVLevel) {
      // Wait until the desired UV level is reached
    }
    digitalWrite(uvLEDPin, LOW);
    digitalWrite(indicatorLEDPin, LOW);
    digitalWrite(greenLEDPin, HIGH);
  }
}

This code initializes the pins and sets the initial state of the LEDs to LOW. When the button is pressed, the UV LEDs and the indicator LED are turned on. The system then waits until the UV sensors detect the desired UV level. Once the desired level is reached, the UV LEDs and the indicator LED are turned off, and the green LED is turned on to indicate the completion of the process.