Build a UV light detector with an Si1145 sensor

In this article we create a UV display project, we will use a Si1145 sensor which is connected to an LCD keypad shield and an Arduino Uno

The Si1145/46/47 is a low-power, reflectance-based, infrared proximity, ultraviolet (UV) index, and ambient light sensor with I2C digital interface and programmableevent interrupt output. This touchless sensor IC includes an analog-to-digital converter, integrated high-sensitivity visible and infrared photodiodes, digital signal processor, and one, two, or three integrated infrared LED drivers with fifteen selectable drive levels. The Si1145/46/47 offers excellent performance under a wide dynamic range and a variety of light sources including direct sunlight. The Si1145/46/47 can also work under dark glass covers.

The photodiode response and associated digital conversion circuitry provide excellent immunity to artificial light flicker noise and natural light flutter noise. With two or more LEDs, the Si1146/47 is capable of supporting multiple-axis proximity motion detection. The Si1145/46/47 devices are provided in a 10-lead 2×2 mm QFN package and are capable of operation from 1.71 to 3.6 V over the –40 to +85 °C temperature range.


Parts List

name Link
Arduino Uno UNO R3 CH340G/ATmega328P, compatible for Arduino UNO
Si1145 breakout SI1145 UV IR Visible Sensor I2C GY1145 Light Breakout Board Module
LCD keypad shield  1PCS LCD Keypad Shield LCD 1602 Module Display For Arduino
connecting wire Free shipping Dupont line 120pcs 20cm male to male + male to female and female to female jumper wire



arduino and lcd keypad shield and Si1145

arduino and lcd keypad shield and Si1145



This example requires the Adafruit Si1145 library, you can add this via the library manager or download from

#include <Wire.h>
#include <LiquidCrystal.h>
#include "Adafruit_SI1145.h"
Adafruit_SI1145 uv = Adafruit_SI1145();
//setup for the LCD keypad shield
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
void setup() 
  Serial.println("Adafruit SI1145 test");
  if (! uv.begin()) {
    Serial.println("Didn't find Si1145");
    while (1);
  //init LCD
  //line 1 - temperature
  lcd.print("SI1145 test");
void loop() 
  //display readings on lcd  
  lcd.print("Vis: ");
  float UVindex = uv.readUV();
  UVindex /= 100.0;  
  lcd.print("UV: ");