Difference between revisions of "GY-30 Digital Light Intensity Measuring Module"

From Wiki
Jump to: navigation, search
(Experimental Procedures for Arduino)
(Experimental Procedures for Arduino)
Line 58: Line 58:
 
[[File:GY-302_3.jpg]]
 
[[File:GY-302_3.jpg]]
 
<br>
 
<br>
 
== '''Experimental Procedures for Arduino''' ==
 
'''Step 1:''' Connect the circuit:
 
{| class="wikitable"
 
|-
 
|GY-302
 
|Sunfounder Uno
 
|-
 
|VCC
 
|VCC
 
|-
 
|GND
 
|GND
 
|-
 
|SDA
 
|A4
 
|-
 
|SCL
 
|A5
 
|-
 
|ADDR
 
|
 
|}
 
  
 
== '''Principle''' ==
 
== '''Principle''' ==

Revision as of 09:53, 15 October 2019

Introduction

BH1750FVI is a digital Ambient Light intensity Sensor IC for I2 C bus interface, and this kind of IC can adjust the background light of LCD and keyboard according to the intensity data of the collected light. It is possible to detect a wide range of changes of light intensity with high resolution. (1lx-65535lx)
GY-30 1.jpg
Applications
Mobile phone, LCD TV, Note PC, Portable game machine, Digital camera, Digital video camera, Car navigation, PDA, LCD display.

Features

  • I2C BI (f / s mode supporting)
  • Spectral responsibility close to human eye distinguish
  • Luminance to digital converter
  • Wide range and high resolution (1 - 65535 lx)
  • Low current by power down function
  • 50Hz / 60Hz Light noise reject-function
  • 1.8V Logic input interface
  • no need of any exterior component
  • Dependency on the light source is little (ex. incandescent lamp, fluorescent lamp, halogen lamp, white LED, Sun Light)
  • It is possible to select 2 type of I2 C slave-address
  • Adjustable measurement result for influence of optical window(It is possible to detect min. 0.11lx, max. 100000lx by using this function.)
  • Small measurement variation (+/- 20%)
  • The influence of infrared is very small

Introduction of Pins

Pin Introduction
GND Connected to the cathode of the power supply
ADD IIC address pin
SDA I²C data
SCL I²C clock
VCC Connected to the anode of the power supply (3~5v)

Principle

BH1750FVI is possible to change sensor sensitivity. And it is possible to cancel the optical window influence by changing sensor sensitivity from default to 2 times.

Sensor sensitivity is shifted by changing the value of MTreg (measurement time register). MTreg value has to set 2 times if target of sensor sensitivity is 2 times. Measurement time is also set 2 times when MTreg value is changed from default to 2 times.

Procedure for changing target sensor sensitivity to 2 times.
Please change Mtreg from “0100_01010” (default) to “1000_1010” (default * 2).

GY-302 3.jpg

Principle

BH1750FVI
BH1750FVI is a digital ambient light sensing IC produced by Japan ROHM semiconductor. Built-in 16-bit analog-to-digital converter can directly output a digital signal without complex calculations. This is a more sophisticated version easy to use a simple resistor to get valid data by calculating voltage. This ambient light sensor can measure objects directly by photometer. The unit of light intensity is lumens "lx". When an object is exposed to uniform light, it can obtain the luminous flux of 1lx per square meter with 1lx light intensity. Sometimes in order to make full use of the light source, you can add a light source reflection device. In this way, more luminous flux can be obtained in some directions to increase the brightness of the illuminated surface.
GY-30 2.jpg
Luminance, also known as light intensity and luminous rate, refers to the brightness of a surface that can be expressed in L. L refers to a luminous flux reflected from a surface or the luminous intensity per projection area of a surface facing light in a certain direction. Indicating the brightness of the luminous surface, in the unit of Kendra / square meter is the ratio of the luminous intensity of the luminous surface in the specified direction to the area of the luminous surface perpendicular to the specified direction.
For a diffused scattering surface, although the light intensity and luminous flux in each direction are different, the brightness in all directions is equal. The phosphor screen of the TV is similar to this kind of diffused surface, so looking at the image from all directions has the same brightness sense. Different objects have different reflection or absorption coefficients to light.

Experimental Procedures for Arduino

Step 1: Connect the circuit:
GY-30 3.jpg

#include <Wire.h>

// GY-30

// BH1750FVI

// in ADDR 'L' mode 7bit addr

#define ADDR 0b0100011

// addr 'H' mode

// #define ADDR 0b1011100

void setup() {

// put your setup code here, to run once:

Serial.begin(9600);

while (!Serial) {

; // wait for serial port to connect. Needed for Leonardo only

}

Wire.begin();

Wire.beginTransmission(ADDR);

Wire.write(0b00000001);

Wire.endTransmission();

}

void loop() {

// put your main code here, to run repeatedly:

int val = 0;

// reset

Wire.beginTransmission(ADDR);

Wire.write(0b00000111);

Wire.endTransmission();

Wire.beginTransmission(ADDR);

Wire.write(0b00100000);

Wire.endTransmission();

// typical read delay 120ms

delay(120);

Wire.requestFrom(ADDR, 2); // 2byte every time

for (val = 0; Wire.available() >= 1; ) {

char c = Wire.read();

//Serial.println(c, HEX);

val = (val << 8) + (c & 0xFF);

}

val = val / 1.2;

Serial.print("lx: ");

Serial.println(val);

Serial.println("OK");

delay(100);

}

GY-30 4.jpg