BH1750 Light Sensor with Arduino and Oled display and Nokia 5110 LCD

(Last Updated On: February 20, 2022)

BH1750 light sensor with Arduino:

Light Intensity Sensor BH1750 is the sensor that is commonly used in mobile phones to control the screen brightness according to the environment lighting. BH1750 sensor can accurately measure the LUX value. 

In this article, we will discuss how to build a sensitive and accurate light meter. We are going to use the BH1750 sensor with outputs illuminance in the Lux SI unit. We will get the data of the luminance when the light will fall on the sensor. When we place a finger on the sensor the luminance will decrease and when we remove the finger from the sensor the luminance will increase. By reading this article you will be able to interface the BH1750 sensor with the Arduino and OLED display.


Amazon Links:

BH1570 Light Sensor

Arduino Uno

SH1106 Oled display

Nokia 5110 LCD display

Other Tools and Components:

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!



BH1750 Light Sensor:

BH1750 Light Sensor

BH1750 Features:

  • Power Supply: 2.4V-3.6V (typically 3.0V)
  • 0.12mA is equal to the Less current consumption
  • The measuring range of the light sensor is 1-65535lx
  • I2C is bus Communication
  • Accuracy in this sensor +/-20%
  • It has a built-in A/D converter. This converter is for converting analog illuminance in the digital data.
  • A very small effect of IR radiation
  • IR radiations put very less effect on the sensor’s result.
  • It is highly responsive.


Pin Connection: 

  • VCC pin can be connected with 2.4V to 3.6Vots. Normally it’s connected with 3.3v pin of the Arduino or other 3.3 volts compatible controller boards like ESP32 and ESP8266.
  • GND is connected with controller board ground pin.
  • SCL stands for the Serial Clock Line which is used to provide a clock pulse for I2C communication.
  • SDA stands for Serial Data Address, which is used to transfer the data through I2C communication.
  • ADDR is the Device address pin and it is used to select the address when more than two modules are connected.

Applications of LUX Sensor:

  • BH1750 adjusts brightness in mobile phones.
  • Cars headlights turn ON/OFF control based on surrounding lighting conditions.
  • It controls the brightness of Display screens.

Now we will discuss how to connect the Arduino with the light sensor BH1750. For this project we will require:

  • Arduino board
  • BH1750 Light Sensor


Interfacing BH1750 Light Sensor with Arduino:

BH1750 Light Sensor

  • Connect the SDA pin of the BH1750 with the Arduino analog pin A4
  • Connect the SCL pin of the BH1750 with the Arduino analog pin A5
  • Connect the VCC of the bBH1750 with the 5V
  • Connect the ground pin of the sensor with the ground of the Arduino
  • Connect the ADDR pin of the BH1750 with the ground of the Arduino

Now for programming first of all we will install BH1750 library. First we will click on the sketch Menu then click on the include library and select the manage library.

BH1750 Light Sensor

Then we will write BH1750 in the search box, you will see multiple results, but select the one as shown in the picture below.

BH1750 Light Sensor

After installing the library we will upload the following code:

BH1750 Light Sensor Arduino Code:

BH1750 Light Sensor with Oled display and Arduino:

Now if we want to show the sensor data on the OLED display we will perform the following steps:

  • Connect the SDA of both the OLED display and BH1750 Light Sensor with the analog pin A4 of the Arduino.
  • Connect the SCL pin of both the OLED and BH1750 Light Sensor with the analog pin A5 of the Arduino.
  • Connect the VCC of both OLED and BH1750 with the 5V of the Arduino.
  • Connect the ground of both OLED and BH1750 with the ground of the Arduino

BH1750 Light Sensor



BH1750 Light Sensor with Oled display and Arduino Code:

After uploading the code to the Arduino we will be able to see the output of the BH1750 sensor on the OLED display. The intensity of the sensor can be changed by placing the finger on the sensor.


BH1750 sensor interfacing with the Nokia 5110 LCD:

As we have already discussed, how to connect the BH1750 sensor with the Arduino. Now we will connect this sensor with the Nokia 5110 LCD. In order to build this light meter, we are going to need: Arduino UNO, BH1750 sensor, and Nokia 5110 LCD display. Now will connect the BH1750 sensor and Nokia 5110 LCD with the Arduino.

  • Connect the VCC of the BH1750 with the 5V of the Arduino
  • Connect the GND of the BH1750 with the ground of the Arduino
  • Connect the SCL of the BH1750 to the analog pin A5 of the Arduino
  • Connect the SDA of the BH1750 to the analog pin A4 of the Arduino
  • Now we will connect the VCC of the Nokia 5110 with 3.3v
  • Connect the ground of the LCD with the ground of the Arduino
  • Connect the led out pin to the ground if we want LCD backlight and if we not want LCD backlight hen we should connect this pin with the 5V
  • Connect the SCE pin of the display with the digital pin 11 of the Arduino
  • Connect the RST pin of the display with the digital pin 12 of the Arduino
  • Connect the D/C pin of the display with the digital pin 10 of the Arduino
  • Connect the DN pin of the display with the digital pin 9 of the Arduino
  • Connect the SCLK pin of the display with the digital pin 8 of the Arduino

BH1750 Light Sensor

After connecting the LCD and BH1750 sensor with the Arduino we will upload the code.


BH1750 Sensor and Nokia 5110 LCD Arduino Code:

After uploading the code to the Arduino we will be able to see the output of the sensor on the Nokia display.

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

%d bloggers like this: