Introduction: Digtial Light Sensor
Sensors make working with any project fun and simple to do, there exists thousands of sensors and we get the choice to choose the right sensor for our projects or needs. But nothing is better than designing your own DIY sensors to work with a wide range of micro-controllers so you have the exact design you need for your project.
This instructable will be a part of a series of instructables in which I show you how to build sensors compatible with most microcontroller you can find. In the last two instructables I showed you how to how to make a tilt sensor,vibration sensor and how to make a Touch sensor.
In this instructable I'm going to show you How to to design your own light sensor, which could be used as a day and night switch or as a part of a security system.
Step 1: Tools and Components
Here is a list of what you will need to get started with instructable,
Step 2: Circuit
The circuit is based on LM358 IC which is an OP-AMP with an operating voltage range of 3v to 32v which is suitable to work with most micro-controllers of logic level 5V or 3.3V. The LDR is connected to the non inverting terminal of the op-amp and each time light is detected by the circuit it generates a High pule across the output and the LED turns ON.
Signal can be fed to the microcontroller via the Pin 1 of the LM358 IC.
Step 3: LDR
The LDR is a electronic component whose resistivity changes as light is incident on it. When no light is incident on it the LDR offers Highest resistance and when light is incident on it the resistivity decreases, thereby generating a signal across the non inverting terminal of the Op-amp.
Step 4: Senstivity
The sensitivity of the circuit can be changed by varying the 10K pot, if the LED remains on even when no light is detected, you should change the pot with a screw driver (plastic one recommends), until the LED turns off.
Step 5: Going Further
After you have tried it out on a breadboard you could build it on a PCB or as an Arduino shield, for the spring you should use single strand wire. If you would like me to write a code for your microcontroller feel free to PM me.
In the next instructable I will show you how to build a pressure sensor.