|
Soldering Iron Kit |
Making a Digital Light Measuring Meter
While working on a home automation project on light, the light intensity unit- lux (lumens per square) comes to my mind. Summarizing, while light output is expressed in lumens, light intensity is measured in terms of lumens per square meter or lux. Both the units are different from each other. Let’s have a basic idea about them.
Lumens (Lm) are the unit of measurement we use to quantify the amount of visible light the human eye can see. The luminous flux of a particular light source is measured in lumens. You may have noticed the lumens output printed on led bulbs available in market. More the lumens more will be the light intensity, spreading power and vice versa.
Lux is simply the unit of measure used to describe the number of lumens falling on a square foot (foot candles) or square meter (lux) of a surface. This project is sponsored by PCBWAY.com, china based PCB manufacturer, you can avail the services of this manufacturer at any place of the world at any time in reasonable prices.
LUX measuring sensor:
BH1750FVI is a digital Ambient Light Sensor IC for I2 C bus interface. This IC is the most suitable to obtain the ambient light data for adjusting LCD and Keypad backlight power of Mobile phone. It is possible to detect wide range at High resolution ( 1 - 65535 lux ). Which proves the 16bit interface of this IC.
Extra Features:
Low Current by power down function
Low Current by power down function
Small measurement variation (+/- 20%)
The influence of infrared is very small.
It is possible to select 2 type of I2 C slave-address.
BH1750 address and modes:
ADD pin is used to set sensor I2C address. If it has voltage greater or equal to 0.7VCC voltage (e.g. you've connected it to VCC) the sensor address will be 0x5C. In other case (if ADD voltage less than 0.7 * VCC) the sensor address will be 0x23 (by default).
0x23 (most common) (if ADD pin had < 0.7VCC voltage)
0x5C (if ADD pin had > 0.7VCC voltage)
BH1750 has six different measurement modes. They are divided in two groups; continuous and one-time measurements. In continuous mode, sensor continuously measures lightness value. In one-time mode the sensor makes only one measurement and then goes into Power Down mode.
Each mode, has three different precisions:
By default, the library uses Continuous High-Resolution Mode, but you can set any other mode, by passing it to BH1750.begin() or BH1750.configure() functions.
[!] Remember, if you use One-Time mode, your sensor will go to Power Down mode each time, when it completes a measurement and you've read it.
Components required:
1) BH1750 sensor
2) Arduino NANO/UNO
3) 12C LCD 16X2
4) Connecting wires
5) Battery
6) Custom PCB (PCBWAY)
Circuit diagram:
Both the sensor and screen works on 12c scheme, so microcontroller need different 12c address to work with these devices. The code explains the everything about circuit behaviour. All the circuit can be powered using 9v battery. Uno/Nano has 3.3volt, 5volt voltage regulators to operate the sensor and LCD simultaneously.
Connections:
VCC to 3V3 or 5V
GND to GND
SCL to A5
SDA to A4
ADD to (not connected) or GND
PCB files:
I updated the circuit and turn the schematics into PCB, You can download this PCB shield from here. All the components can be attached to the headers given on PCB and after uploading the code, attaching the battery our project is ready to go.
I always order my files from PCBWAY.COM, They offer different types of PCBs such as Rigid, single layer, double layer, multilayer PCBs with high quality, and reasonable price. They also offer a broad spectrum of assembly, design, and CNC/3D printing services across five factories. Sign-up using this link and get free new user PCB coupons.
Code:
// Full mode list:
// BH1750_CONTINUOUS_LOW_RES_MODE
// BH1750_CONTINUOUS_HIGH_RES_MODE (default)
// BH1750_CONTINUOUS_HIGH_RES_MODE_2
// BH1750_ONE_TIME_LOW_RES_MODE
// BH1750_ONE_TIME_HIGH_RES_MODE
// BH1750_ONE_TIME_HIGH_RES_MODE_2
#include <BH1750.h>
#include <Wire.h> // Library for I2C communication
#include <LiquidCrystal_I2C.h> // Library for LCD
BH1750 lightMeter;
LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2);
void setup() {
Wire.begin();
lightMeter.begin();
lcd.init();
lcd.backlight();
lcd.setCursor(0,0);
lcd.print("BH1750 Test");
lcd.setCursor(0,1);
lcd.print("Please wait...");
delay(3000);
lcd.clear();
}
void loop() {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Light Intensity ");
lcd.setCursor(5, 1);
float lux = lightMeter.readLightLevel();
lcd.print(lux);
lcd.print(" Lux");
delay(2000);
}
Libraries used:
In the above given Arduino program, 2external libraries are used. Which can be installed from manage libraries section under tools menu. Wire is a basic and very common library used to setup a communication between I2C devices.
BH1750 and LiquidCrstal_I2C are the two libraries which can be downloaded from Arduino IDE.
Working:
You can measure the light intensity of outside/inside then make a desirable code for your electronics to behave as per it changes. Comparing this with an LDR is quite easy. But in LDR an analog system works which is not too much accurate as digital.
LDR resistance depends on light and gives a non-linear curve, it cannot measure intensity after a level, because resistance decreases too much after that. Don't forget to Sign-up on PCBWAY.com to get 1st service in free.
Making a Digital Light Measuring Meter
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(3)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Manoj kumar
- STK4141 Amplifier is hidden GOLD Analog audio amplifiers are very powerful enough to make a high noise with stable quality factor. I ...
- MPPT Solar LIPO Battery Charger I was just charging my Li-ion battery manually with my IP2312 charger, the high current version I ha...
- DIY Portable Power Supply Whenever I am travelling from one place to another, I used to keep my electronics with me. And somet...
- I made a Nano USB HUB I want to use the USB hub internally in my laptop but the available ones are very bulky and do not s...
- I made an ARDUINO NANO Clone Board I made a series of Arduino Atmega328 boards and every new version has something new. We always learn...
- Arduino Got Pro Max upgrade!! I am aware of sensors, modules and integrated circuit used with microcontrollers like Arduino. And I...
- Minimal Component tester using Arduino You might know component tester and its different versions made by many hobbyists. Today I have made...
- Making a Digital Light Measuring Meter While working on a home automation project on light, the light intensity unit- lux (lumens per squar...
- IR Jammer circuit using NE555 timer I am working on IR protocol in university research Centre and then an idea of IR jammer comes into m...
- Variable Current/Voltage DC power supply To power up electronics circuits or while testing different voltage-ampere/power ranges are required...
- PCB soldering reflow hot Plate! A good Idea? let’s talk about soldering in a new and easy method. Because I am working with SMT components and st...
- Non-contact Infrared temperature sensor using Arduino Hello guys, I want to make my own most accurate temperature meter. When coming to the high temperatu...
- Arduino serial Programmer CH340N There are lot of programmer boards that are compatible with Arduino. But the cheapest and smaller on...
- My own Arduino Nano Microcontroller board Here is my new Arduino Nano board, This looks better with C-type and one step above compatible drive...
- 50Watts Audio Amplifier using TDA7265 Home theaters and speaker systems are very popular due to Bass songs, releasing everyday and I am ve...
-
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
154 1 1 -
-