Week 2 - LDR

Week 2: Implementation of LDR in a circuit


In the second lecture of Physical Computing we were introduced to a new component a Light Dependent Resistor (LDR). "An LDR is a component that has a variable resistance that changes with the light intensity that falls upon it. This allows them to be used in light sensing circuits." (How an LDR (Light Dependent Resistor) Works, 2014). A number of different applications for an LDR include:

Lighting Switch

An LDR can be used to automatically turn a light at a certain light level. An example of this could be street lamps or a garden light.

Camera shutter control

Another example of how an LDR is used could be to control a camera's shutter control. The LDR would be used to measure the light intensity which then adjusts the camera shutter speed.

Arduino 

To see how the LDR worked using our Arduino we set up a circuit which allowed us to measure the output of the LDR. To measure this we set up the following circuit on our bread board and Arduino:



Diagram of the Arduino shows a visual representation of how the circuit looked and the second shows the circuit digram for the following circuit. When the light level decreases the resistance of the LDR increases. As this resistance increases in relation to the other Resistor, which has a fixed resistance, it causes the voltage dropped across the LDR to also increase.
Image of Circuit: 







































Once I completed this circuit I managed to add an LED to the circuit which is controlled by the LDR. To do this I added a second resistor to control the voltage to the LED and then wired the LED into the Arduino to complete the circuit.
I then coded the LED into the original code to allow the LED to turn on if the sensorValue was lower than a particular value and turn off if the sensorValue was higher than a specified value. This resulted in the LED turning on if the LDR was covered and off if the LDR was exposed to light.

Photos of circuit: 













































Further Learning: 

Before the next session of Physical Computing I am planning to research into how an LDR component can be used in different circuits. This will hopefully give me some further inspiration into what I could create for my final project for Physical Computing.

References: 

How an LDR (Light Dependent Resistor) Works (2014) Available at: https://www.kitronik.co.uk/blog/how-an-ldr-light-dependent-resistor-works/ (Accessed: 18/02/19)









     



To see this happening I create a simple program to measure the resistance of the LDR and output this value into the Serial Monitor within the Arduino program. This is the code I used to print the information to the Serial Monitor:














Screenshot of code: 






Comments

Popular posts from this blog

Week 3 - Servo and Potentiometer

Week 1 - Introduction Session