Sensor – BH1750 – Lichtintensiteit sensor

Hardware

bh1750 - gy-302 licht module bovenkant

BESTELLEN

This is a BH1750 light intensity sensor breakout board with a 16 bit AD converter built-in which can directly output a digital signal, there is no need for complicated calculations. This is a more acurate and easier to use version of the simple LDR which only outputs a voltage that needs to be calculated in order to obtain meaningful data. With the BH1750 Light Sensor intensity can be directly measured by the luxmeter, without needing to make calculations. The data which is output by this sensor is directly output in Lux (Lx). When objects which are lighted in homogeneous get the 1 lx luminous flux in one square meter ,their light intensity is 1lx. Sometimes to take good advantage of the illuminant, you can add a reflector to the illuminant.So that there will be more luminous flux in some directions and it can increase the ilumination of the target surface.

For example:
Night: 0.001–0.02;
moonlightnight:0.02–0.3;
cloudy indoor:5–50;
cloudy outdoor:50–500;
Sunny indoor:100–1000;
under the sunlight in summer afternoon: about 10*6 power;
reading books for intensity of illumination:50–60;
home video standard intensity of illumination:1400.

Properties:

  • I2C bus Interface
  • Spectral responsibility is approximately human eye response
  • Illuminance to Digital Converter
  • Wide range and High resolution. ( 1 – 65535 lx )
  • Low Current by power down function
  • 50Hz / 60Hz Light noise reject-function
  • Light source dependency is little. ( ex. Incandescent Lamp. Fluorescent Lamp. Halogen Lamp. White LED. Sun Light)
  • It is possible to select 2 type of I2C slave-address
  • Adjustable measurement result for influence of optical window
  • Small measurement variation (+/- 20%)
  • The influence of infrared is very small
  • Operating Voltage: 3.3V-5V
  • Dimensions: 0.85*0.63*0.13″(21*16*3.3mm)

Pinout

BH1750 Pin (bovenkant en van links naar rechts):Functie
1ADDR
2SDA (Serial Data)
3SDL (Serial Clock)
4GND
5VCC (3.3v - 5v)

Er zijn ook andere varianten zoals de BH1750FVI, deze heeft wel een andere pinout!

bh1750fvi licht module bovenkant

Arduino

Wat heb je nodig?

1) BH1750 (Gy-302) bibliotheek

Sluit de lichtsensor module aan volgens onderstaand overzicht:

Arduino BH1750 schema

BH1750 pin (bovenkant en van links naar rechts):Arduino pin:
2 - SDA (Serial Data)A4
3 - SDL (Serial Clock)A5
4 - GNDGND
5 - VCC (3.3v - 5v)+5v

Script

Sluit de lichtsensor module aan zoals hierboven aangegeven.

Het resultaat

arduino bh1750 console output


Een ander script zonder gebruik van een “extra” bibliotheek:

Resultaat:

Bron

Arduino Library

BH1750 (GY-302)

An Arduino library for digital light sensor breakout boards containing the BH1750FVI IC.
– The board uses I2C for communication.
– 2 pins are required to interface to the device.

Download @ Github

Arduino library bh1750 (gedownload op 2015-06-25)

Raspberry Pi

Sluit de lichtsensor module aan volgens onderstaand overzicht:

Raspberry BH1750 schema

Ps. Altijd de pinout van je Raspberry Pi controleren, deze kan verschillen per versie.


Script

Wat heb je nodig?

1) I2C bus gebruiken op de Raspberry Pi

Met onderstaande Python code kan de Bh1750 module uitgelezen worden, maak een bestand aan genaamd bh1750.py met deze inhoud:

Bron

En start dit bestand met het commando:  sudo python bh1750.py

Output:

raspberry bh1750 output

Schema

Teardown

GEEN GEGEVENS

Datasheet

Fritzing

Downloads

GEEN GEGEVENS