Wiring and Test

Breakout Assembly

If you are using the breadboard version, you'll need to install some headers

Prepare the header strip:

Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - long pins down

Add the breakout board:

Place the breakout board over the pins so that the short pins poke through the breakout pads

And Solder!

Be sure to solder all 5 pins for reliable electrical contact.

(For tips on soldering, be sure to check out our Guide to Excellent Soldering).
You're done! Check your solder joints visually and continue onto the next steps

Arduino Wiring

You can easily wire this sensor to any microcontroller, we'll be using an Arduino
  • Connect Vin to the power supply, 5V is fine. For 3V microntrollers, connect to 3.3V
  • Connect GND to common power/data ground
  • Connect the SCL pin to the I2C clock SCL pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A5, on a Mega it is also known as digital 21 and on a Leonardo/Micro, digital 3
  • Connect the SDA pin to the I2C data SDA pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A4, on a Mega it is also known as digital 20 and on a Leonardo/Micro, digital 2

Flora Wiring

Connect the sensor to the four top-left pins, GND, SCL, SDA and 3V using alligator clips, soldered wire, or quality conductive stitching

The SI1145 has a fixed I2C address (0x60), you can only connect one sensor per microcontroller!

Download Adafruit_SI1145

To begin reading sensor data, you will need to download Adafruit_SI1145 from our github repository. You can do that by visiting the github repo and manually downloading or, easier, just click this button to download the zip
Rename the uncompressed folder Adafruit_SI1145 and check that the Adafruit_SI1145 folder contains Adafruit_SI1145.cpp and Adafruit_SI1145.h

Place the Adafruit_SI1145 library folder your arduinosketchfolder/libraries/ folder.
You may need to create the libraries subfolder if its your first library. Restart the IDE.

We also have a great tutorial on Arduino library installation at:

Load Demo

Open up File->Examples->Adafruit_SI1145->si1145test and upload to your Arduino wired up to the sensor
Now you can open up the serial console to see the various light levels and UV index printed out.

In this screenshot I pointed a UV LED onto the sensor to simulate a really high UV index of 7. Indoors, expect to get a UV index of well below 1. Even glass windows are excellent at filtering UV light so if you want to measure the actual UV outside point the sensor right at the sun!

The SI1145 is primarily a UV index sensor, but it does have the ability to sense other kinds of light. However, those light levels aren't calibrated in our library. That is to say, unlike our Lux sensor, these are just values based on how much light the sensor sees, and there's no 'units' to them. Still, this might handy if you just want to keep track of light levels.


Proximity Sensing (Breakout Board)

There's also another capability that SiLabs shoved into this chip - a proximity sensor! We haven't done much experimentation with this part of the sensor but it does sort of seem to work. Basically, if you connect an IR LED to the LED pin, the sensor will pulse the LED and measure how much IR light is reflected back. This can be used to do basic proximity sensing. If you are interested in trying out the prox sensor, grab an IR LED and connect the + side to 3V or so, and the - side to the LED pin.

Now re-run the si1145 demo, but with the proximity reading line uncommented!
You can see that by moving my hand in front of the sensor, I bounce more IR light into the proximity sensor and the value goes from 261 up to 361
This guide was first published on Mar 21, 2014. It was last updated on Mar 21, 2014. This page (Wiring and Test) was last updated on Aug 16, 2016.