• 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 https://thecustomizewindows com/2017/10/light-measurement-arduino-ldr-lcd/ , how to connect a light sensor to lcd crystal display , Arduino LDR LCD , Arduino LDR KCD , كود اردوينو lcd led ldr , arduino LDR and led , Arduino ldr with lcd , arduino light lcd , arduino light meter , arduino light sensor with lcd
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, 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

  • Arduino Temperature & Humidity Sensor DHT 11 With LCD 1602A

    Create a Arduino Temperature & Humidity Sensor DHT 11 With LCD 1602A Following Few Steps. Circuit Diagram, Code and Helpful Step by Step Guide For Troubleshooting.

  • Arduino : Turn On Particular Color LED Depending On Light/LDR

    With Arduino We an Turn On Particular Color LED Depending On Light/LDR With Simple Circuit and Easy Code. We Can Create The Same Logic With IC too.

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • LDR Reading on TM1637 : Example How To Print Analog Sensor Value

    In Case of LCD, Printing Actually Easy. Here is Example How To Print Analog Sensor Value With Printing LDR Reading on TM637.

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

Get new posts by email:

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 (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

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

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