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

This Article Has Been Shared 374 Times!

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

  • 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

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

  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023
  • What is a Data Mesh? January 25, 2023
  • What is Vehicular Ad-Hoc Network? January 24, 2023
  • Difference Between Panel Light, COB Light, Track Light January 21, 2023

About This Article

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

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT