HOW TO USE: BH1750 LIGHT MODULE-Uncategorized

You are a starter with Dasduino? Or newbie when it comes to electronics? You fancy a specific module, but you don’t know how to use it? Dont’t worry, we have our How To Use series!

How to Use is a series of blog tutorials by soldered where you will find everything you need to  to begin working with your favorite modules. Tutorials include: technical characteristics, operating principles, instructions on how to connect the module with Dasduino and basic code. Everything else is up to you and your imagination.


BH1750 is a digital ambient light sensor ready for I2C communication. You may have noticed that our smartphones are changing the screen backlight depending on the amount of light, but they do it thanks to this sensor. Breakout that you see in the picture below has everything ready to communicate with Dasduino and voltage regulator. To find out more on the light, read this comprehensive tutorial.

Voltage: 3V-5V
Measurement range: 1-65535lx
Resolution: 0.5lx
Dimensions: 14 x 19mm

This IC is very stable and has a small deviation with respect to the light source and the change in temperature. For more, see the datasheet. For an overview of the possibilities see the average intensity of light:

night: 0001 – 00:02;
moonlight: 0.02-0.3;
Cloudy, inside: 5-50;
Cloudy, without, 50-500;
Sunny, inside: 100-1000;
direct sunlight: 1M;

optimal for reading books: 50-60;
standard TV light: 1400.



Let’s look at block diagram of the IC:

Let’s start from the left. The process starts with a photodiode (PD), which has a sensitivity about the sensitivity of the human eye. We intensify this signal with  the operational amplifier (AMP) and convert it from analog to 16-bit digital signal (ADC). The procedure ends with IIC logic that uses an internal oscillator (serves as CLK).

The duration of this process depends on the accuracy of the readings we want. We have three possibilities that give accuracy of 0.5lx, 1 lx or 4LX, and the duration time is in the order of 120ms, 120ms and 16ms. Due to prolonged measurements, some noises can be eliminated (including the 50Hz / 60Hz noise) so we get this accurate results. Otherwise, lux [lx] is the SI unit of measurement of illumination. It is equal to one lumen per square meter, whereas the Candella (symbol: cd) applies as lumen per steradian (cd = lm / sr). It should be mentioned that the resolution of the measurements can be increased to 10k lux, which actually corresponds to the light that gives direct sunlight.




As always, the last paragraph of How To Use series contains example code modules. We will use BH1750 library. You can find help with installing and using the library here, and if this is the first time you use the Arduino IDE, definitely see this tutorial. This is an example of using the library, which in the Serial Monitor prints light in lux every 1 second.

/*                                                                           */
/*                                                                           */
/* (c) 2015 -      */
/* [email protected]                                               */
/*                                                                           */
/*                                                                           */
/* Digital light sensor BH1750 - How To Use tutorial                         */
 * Connection:
 *  VCC - 5V
 *  GND - gnd
 *  SCL - SCL (A5)
 *  SDA - SDA (A4)
 *  ADDR - without connection ili gnd
#include "Wire.h"
#include "BH1750.h"
int lux;
BH1750 luxometer;
void setup(){
void loop() {
  lux = luxometar.readLightLevel();
  Serial.print("Light: ");
  Serial.println(" lx");