Introduction: Adafruit SI1145 UV/Visible Light/Infrared Sensor - Arduino and LCD

This project uses an Adafruit SI1145 UV/Visible Light/Infrared sensor to calculate the current UV rating. UV isn’t sensed directly. Rather, it is calculated as a function of the visible light and infrared readings. When I tested it outside, it was accurate based on the the UV reading from weather.com. I envisioned the project with a "steampunk" theme - a device that an airship captain would need when the UV exposure on the deck would require application or reapplication of sunblock.

Step 1: Gather Necessary Materials

Hardware/Software Required

Step 2: Configuration of Hardware

Solder UV sensor
Connect Arduino to USB port on computer

Connect LCD display to Arduino

  • LCD RS pin – digital pin 12
  • LCD Enable pin – digital pin 11
  • LCD D4 – digital pin 5
  • LCD D5 pin – digital pin 4
  • LCD D6 pin – digital pin 3
  • LCD D7 pin – digital pin 2

Connect UV sensor module to Arduino. (Adafruit's page on the sensor includes a nice tutorial including wiring pics).

  • VIN to power supply – 5V or 3V. I set the sensor to use 3.3V so that the 5V can be used by the LCD screen
  • GND to ground.
  • SCL on sensor to SCL on Arduino - pin A5.
  • SDA on sensor to SDA on Arduino – pin A4.

Wire a 10k potentiometer to +5V and Ground with output to LCD pin 3

Wire a 220 ohm resister to power the backlight of the display, pin 15 to 5V and Pin 16 to Ground.

Step 3: Add Code to Arduino to Take UV Readings

The attached file includes the code for the Arduino which will initialize the sensor and take UV readings.

Step 4: Troubleshooting (if Necessary)

I used battery packs to power the Arduino because a 5V power adapter gave it too much power - the display became distorted.

You can view the initialization of the sensor from the serial display in the Arduino. A minor tweak in the code can allow you to check readings on the serial display as well. Change "lcd.print" to "serial.print."

Enjoy!