• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Light Measurement With Arduino, LDR and LCD

By Abhishek Ghosh October 25, 2017 8:57 pm Updated on October 25, 2017

Light Measurement With Arduino, LDR and LCD

Advertisement

Normally in photography we use light meter. Unfortunately, good light meter is not cheap. It is difficult to measure in light in Lux but possible to measure in some units although exactly Lux. That possibly able to deliver an idea about intensity of light. Here is How To on Light Measurement With Arduino, LDR and LCD. We have basic guides around LDR with Arduino., however that is far from meeting a basic need.

 

Light Measurement With Arduino, LDR and LCD

 

The basic circuit diagram of Arduino with LCD is like we described in our guide on how to setup Arduino with 1602A LCD Display. Circuit diagram is easy if you followed our previous guide on 1602A LCD Display Arduino Connection :

Light-Measurement-With-Arduino-LDR-LCD

All we have done for the circuit is adding one LDR and 10K Ohm resister. We added three jumpers to three empty columns on the breadboard. Then connected GND of Arduino to one leg of LDR. Arduino’s A0 pin at the middle column where another leg of LDR and one leg of 10K Phd resistor inserted. Remaining one got connected to 5v of Arduino and the 10K Ohm resistor.

Advertisement

---

In our case equation to calculate Resistance of LDR, is [R-LDR =(R1 (Vin – Vout))/ Vout], where R1 = 10,000 Ohms, Vin = 5.0 Vdc, Vout = Output voltage from potential Divider, [Vout = Reading * (Vin / 1024)].

It will be extremely wrong to claim it as LUX. It is just a measurable unit.

 

Principle of Light Measurement With Arduino, LDR and LCD

 

The analog input pin of Arduino is capable of receiving the signal and printing the voltage on LCD. Omitting many steps, analog pin can send a value between 0-1023 to the Arduino. You’ll get total 1024 values. From V=IR, we can change the potential drop across the LDR and to limit the current, we used 10K Ohm resistor. Let us watch the video of our end result :

 

Code of Light Measurement With Arduino

 

A very basic version of the thing is :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11 , 12);
void setup() {
  lcd.begin(16, 2);
  lcd.setCursor(0,1);
  lcd.write("LIGHT: ");
}
void loop() {
  int sensorValue = analogRead(A0);
  lcd.setCursor(7,1);
  lcd.print(sensorValue);
  delay(100);
}

You can see here that someone asking for measuring as Lux:

Vim
1
https://forum.arduino.cc/index.php?topic=141815.0

Slightly advanced from that discussion is :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11 , 12);
float RLDR;                  
float Vout;                  
float Lux;
void setup() {
  lcd.begin(16, 2);
  lcd.setCursor(0,1);
  lcd.write("LIGHT: ");
}
void loop() {
  int sensorValue = analogRead(A0);
  Vout = (sensorValue * 0.0048828125);
  RLDR = (10000.0 * (5 - Vout))/Vout;    
  Lux = (RLDR/500);  
  lcd.setCursor(7,1);
  lcd.print(Lux);
  delay(100);
}

Basically I wrongly closed the Arduino IDE without saving the exact sketch. I had to re-write and test the code (never do that mistake – save on Github as gist when a code is bug free), not always you can recall and get this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11 , 12);
float RLDR;                  
float Vout;                  
float Lux;
void setup() {
  lcd.begin(16, 2);
}
void loop() {
int sensorValue = analogRead(A0);
  Vout = (sensorValue * 0.0048828125);
  RLDR = (10000.0 * (5 - Vout))/Vout;    
  Lux = (RLDR/500);  
  lcd.clear();
lcd.setCursor(0, 0);
lcd.print("LIGHT : ");
lcd.print(Lux);
delay(100);
lcd.setCursor(0, 1);
if ((Lux >= 0) && (Lux <= 5))
{
  lcd.print("DARK");
}
else if ((Lux > 5) && (Lux <= 14))
{
  lcd.print("DIM");
}
else if ((Lux > 14) && (Lux <= 50))
{
  lcd.print("BRIGHT");
}
else
{
  lcd.print("VERY BRIGHT");
}
  
delay(500);  
}

Tagged With Arduino LDR KCD , Arduino LDR LCD , what is analog value in arduino light measurement , arduino lux meter ldr , arduino light sensor with lcd , arduino light meter , arduino light lcd , Arduino ldr with lcd , arduino ldr et lcd , arduino LDR and led

This Article Has Been Shared 854 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Light Measurement With Arduino, LDR and LCD

  • Methods and Components To Build Electronic Circuits

    We Have Discussed Some Details On Methods and Components To Build Electronic Circuits Which Are Needed To Create Ammeter Electronic Projects.

  • Arduino Vacuum Tube Stereo Preamp : Parts & Circuit Diagram

    Although The Developer Retired It, All Parts, Circuit Diagrams Is Available. Let Us Discuss About Arduino Vacuum Tube Stereo Preamp Thing.

  • Securing Jumper Wire Connections : Prototyping Daugterboard

    Securing Jumper Wire Connections Is An Important Part Of Breadboard Wiring. Prototyping Daugterboard (Prototyping Shield) Can Help Securing.

  • Arduino Multifunction Shield (HCARDU0085) : Features

    Arduino Multifunction Shield Has 4 Digit 7 Segment LED Display, 4 SMD LED, 10K Potentiometer, 3 Push Buttons, Buzzer And Lot of Interfaces.

  • Arduino Fingerprint Scanner Module GT-511C3, GT-511C1R

    Here is Arduino Fingerprint Scanner Module GT-511C3 or GT-511C1R Buying Guide and Basic Details On Unknown Matters Around Fingerprint Scanner.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (20K Followers)
  • Twitter (4.9k Followers)
  • Facebook (5.8k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.2k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Arduino : Independently Blink Multiple LED January 18, 2021
  • What is a Loosely Coupled System? January 17, 2021
  • How To Repack Installed Software on Debian/Ubuntu January 16, 2021
  • Components of Agile Software Development January 15, 2021
  • What is Conway’s Law? January 14, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "Light Measurement With Arduino, LDR and LCD," in The Customize Windows, October 25, 2017, January 18, 2021, https://thecustomizewindows.com/2017/10/light-measurement-arduino-ldr-lcd/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2021 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy