Summary of chipKIT Project 4: Digital light meter
Summary: A digital light meter using a chipKIT Uno32, Digilent chipKIT Basic I/O Shield, and a BH1750FVI digital light sensor measures illumination in Lux, foot-candles, and watts/m^2. The BH1750 communicates via I2C (ADDR default 0x23), outputs a 16-bit value convertible to Lux (divide by 1.2), and is powered from the I/O shield. The project displays readings on the shield OLED, updates every 3 seconds by default, and uses simple conversions Lux/10.764 for foot-candles and Lux/683.002 for watts/m^2.
Parts used in the Digital light meter:
- chipKIT Uno32 board
- chipKIT Basic I/O Shield
- BH1750FVI digital light sensor
- Breadboard
- Jumper wires
A light meter is used to measure the intensity of illumination in a given area. It is widely used in schools, warehouses, factories, hospitals, office buildings, museums, art-galleries, parking garages, stadiums, and many more, to measure and maintain proper lighting levels. The intensity of illumination is usually expressed in Lux or foot-candles. As the 4th project in our chipKIT tutorial series, today we are going to build a digital light meter using the chipKIT Uno32 board and the BH1750 digital light sensor. This project uses Digilent’s chipKIT Basic I/O shield for displaying the measured light intensity in Lux, foot-candles, and Watts/m^2 units.

What do we need?
In order to build this project, we will need the following things.
- chipKIT Uno32 board
- chipKIT Basic I/O Shield
- BH1750FVI digital light sensor
- Breadboard with a few jumper wires

This project uses the BH1750FVI sensor (datasheet) to measure the intensity of surrounding light. BH1750FVI is a calibrated digital sensor IC that converts the incident light intensity into a 16-bit digital number (0-65535). The 16-bit output can be converted to Lux by simply dividing it by 1.2. Thus it can measure the maximum ambient light intensity of 65535/1.2 = 54612 Lux. The spectral response function of the sensor is approximately close to that of the human eye. The sensor supports the I2C interface. The 7-bit I2C address of the sensor can be set to 0×23 by grounding the ADDR pin, and to 0x5C by connecting ADDR to VCC. It is grounded by default through a pull-down resistor on board.
Circuit setup
The setup for this project is very simple. The JP6 and JP8 header jumpers on the Uno32 board are placed in the RG3 and RG2 position in order to use the A4 and A5 pins pins for I2C operation. The chipKIT I/O shield is then inserted on the top the Uno32 board. The BH1750FVI sensor board is plugged into the breadboard and is powered through the 3.3V power supply from the I/O shield. The SDA and SCL signal lines are connected to the analog input pins A4 and A5, respectively.

The following picture shows the complete setup of this project.

chipKIT sketch
A firmware has been developed to display the measured light intensity on the OLED screen of the I/O shield. The display portion of the sketch uses the chipKIT I/O Shield library provided by Digilent. The light intensity is displayed in Lux, foot-candles, and watts/m^2 computed at the center of the visible spectrum, which is ~555nm. The following equations are used to convert Lux into foot-candles and watts/m^2.
Foot-candles = Lux/10.764
Watts/m^2 = Lux/683.002 (At ~555 nm wavelength)
Download the complete project sketch
Output
Upload the light meter sketch (download link provided above) to your Uno32 board and your light meter is ready to rock. Now you have your own device to check if you have a proper illumination level at your work space. You can move the sensor to face at multiple directions to see the differences in the lighting level in those directions. The measurement is set to refresh in every 3 seconds but you can modify it in the sketch to take samples at faster rates.


- What does the BH1750FVI output represent?
The BH1750FVI outputs a 16-bit digital number (0-65535) proportional to incident light intensity. - How is Lux calculated from the BH1750FVI reading?
Convert the 16-bit output to Lux by dividing the reading by 1.2. - What is the maximum measurable Lux with this sensor?
The maximum measurable ambient light is 65535 divided by 1.2, which equals 54612 Lux. - Which pins are used for I2C connection on the Uno32 for this project?
A4 is used for SDA and A5 is used for SCL after placing JP6 and JP8 jumpers in RG3 and RG2 positions. - What are the I2C addresses of the BH1750FVI?
The 7-bit I2C address is 0x23 when ADDR is grounded (default) and 0x5C when ADDR is tied to VCC. - How are foot-candles and watts per square meter calculated?
Foot-candles = Lux / 10.764. Watts/m^2 = Lux / 683.002 (at ~555 nm). - How often does the project update measurements by default?
The measurement refresh is set to every 3 seconds by default but can be modified in the sketch. - How is the BH1750FVI powered in this setup?
The sensor board is powered through the 3.3V power supply from the chipKIT Basic I/O Shield.