A Simple Technique to Measure the Light Intensity Using Arduino and LDR

Post on 18-Aug-2015

10 views 0 download

Transcript of A Simple Technique to Measure the Light Intensity Using Arduino and LDR

A Simple Technique to Measure the Light Intensity using Arduino and LDRby realfinetime realestate|in transistor at10:34 http://www.learnerswings.com/2014/08/a-simple-techniqe-to-measre-light.html!e ha"e alrea#y seen the $ircit to %rn &n an '() )ring )ay an# %rn &ff the *ame at +ight ,sing ')- an# .$ /40. 1ere we will measre the light intensity aron# light sensor sing an ar#ino mega. $ircit is simple an# is #one as shown in the following #iagram.$onnections are #one as shown in the circit #iagram. $ollector pin of transistor is gi"en to the analog pin 2 30 4 of ar#ino to get an analog "ale forlight intensity. /5 for the wor6ing of transistor is spplie# from /5 pin of ar#ino. 7ron# for the circit is gi"en from the 7n# pin of 3r#ino. 8inot #iagramof .$/40 is gi"en at the left si#e top in the #iagram.Transistor - .$ /40 is the transistor se# here. 9t is an +8+ transistor an# is sitable for small operations.5V - +ormally spplie# from 3r#ino.R1 -%his is a crrent limiting resistor. 9t helps to switch the transistor between &+ an# &:: states by controlling the crrent throgh -1 an# hence throghthe base of transistor. 9f that resistor is not connecte#; there is a possibility that; base crrent will always remain high becase; ')- alone cannot resist the crrent consi#erably to trn off the transistor.R2 -9t is a pll #own resistor. 9t will gron# the base; if there is no e 0?// "ariable to store the "ale coming from the sensor"oi# setp24 @*erial.begin2AB004?C"oi# loop24 @// rea# the "ale from the sensor:sensor5ale > analog-ea#2sensor8in4? *erial.println2sensor5ale4?#elay21004? C9f ploa#ing is sccessfll; open yor serial monitor. )onDt forget to change the ba# rate to AB00. $hange the light intensity aron# ')- by some metho#s. *erial monitor will print the "ale of "arying light intensity.