How To Connect The Sensor To The Lighting Bh1750 Arduino | Hi-Tech




How to connect the sensor to the lighting BH1750 Arduino

At this time, connect a digital 16-bit light sensor BH1750 (light meter), implemented on the GY-302 module for Arduino.

How to connect the sensor to the lighting BH1750 Arduino

You will need:

- Arduino; - GY-302 module with digital light sensor BH1750; - Personal Computer.

Instruction how to connect the sensor to the lighting bh1750 arduino

Step 1:

Consider the GY-302 module BH1750 sensor. BH1750 sensor is a digital 16-bit digital light sensor that specifies the range of its dimensions: from 1 to 65,535 lux. BH1750 sensor sensitive to visible light and substantially not influenced infrared radiation, i.e. It responds to the same spectral range as the human eye. As a result, these sensors are widely used in modern electronic equipment - mobile devices, cameras, systems "smart House" and many others. Connecting module is made via two-wire I2C interface and is powered by +5 volts. I2C interface to Arduino boards implemented on analog pinah A4 and A5, which are responsible for the SDA (data line) and SCL (bus clock), respectively. Conclusion ADDR GY-302 module can be left not connected or connected to ground.

Wiring BH1750-light sensor to the Arduino

Step 2:

We will not delve into the intricacies of the implementation of the interface BH1750 sensor interaction with the Arduino, and use of the finished library. You can download it here: Unpack the downloaded archive into the directory with the development environment "Arduino IDE / libraries". We write here is a sketch and upload it to the Arduino. In the sketch we every 100 ms is read from the sensor readings BH1750 illumination in lux, and outputs the data to the serial port.

Sketch with light sensor BH1750

Step 3:

Lighting BH1750 connect the sensor to the Arduino on the scheme shown above. Connect the Arduino board to the computer. Start the development environment and open the Arduino IDE serial monitor shortcut "Ctrl + Shift + M" or via the menu "Instruments". The serial port monitor run of illumination values ​​with our BH1750 sensor. Aim the sensor at the light source, and then close it from the light, and you will see how the readings change.

Light sensor and Arduino BH1750 in