Mudanças entre as edições de "ESTE: Analog Light Sensor (LDR - Light Dependent Resistor)"

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
Linha 23: Linha 23:
  
 
==Assembly==
 
==Assembly==
[[Arquivo:Leitura_ldr_bb.png|400px|thumb|center|Assembly of the circuit]]
+
[[Arquivo:Leitura_ldr_bb.png|400px|thumb|center|Assembly of the light sensor (LDR) system]]
  
 
==Solutions==
 
==Solutions==

Edição das 18h54min de 15 de setembro de 2015

This experiment is part of this project.

Here we are going to build one experiment to use the ADC and to learn how to use the light sensor (LDR). The LDR is a light sensitive resistor which varies its resistance as the variation in light intensity falling on it. As the light intensity increases (the environment becomes clearer) its resistance decreases to a few tens of ohms, and when the light intensity decreases (the environment becomes darker) its resistance increases for some mega ohms. For starting using this sensor you should have seen the laboraty script “Reading Sensors”. To take the reading output of a light variation, namely the variation of LDR’s resistance, it is necessary to set up a voltage divider, according to the scheme below:

LDR circuit scheme

The reading output may be connected to an Arduino in one of its analog inputs (ADC) and to an oscilloscope to check and calculate the RMS (see more on [Sensor Reading’s script]). The resistance of 10k ohms will not necessarily have this value. The value of this resistance should be as close as possible to the initial resistance of the LDR. If the LDR has an initial resistance of 2k ohms you should opt for a resistor of 2.2k ohms. Here we are going to use a resistor of 10K ohms but you must always check the LDR resistance’s value in order to choose an adequate resistor to you circuit.

Pseudo code

A solution for this experiment is shown and well explained on the [Sensor Reading’s script].

Schematic

Schematic to read a light sensor (LDR)

Part List

  • 1 LDR
  • 1 10k ohm resistor
  • 1 Protoboard
  • 3 copper wires (tinned) or jumpers


Assembly

Assembly of the light sensor (LDR) system

Solutions

Tools

  • AVR GCC and tools
  • Arduino IDE