Introduction: Digital Light Sensor Using LM358
Sensors make working with any project fun and simple to do, there exist 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 the 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 design your own light sensor, which could be used as a day and night switch or as a part of a security system.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Bill of Materials
Here is a list of what you will need to get started with instructable,
- LM358 IC
- 10K Pot
- 330 Ohm Resistor
- 10K Resistor
- PCB (Optional)
- Connecting Wires
- 5v Power Supply
- Soldering Iron
- Soldering Wire
- Soldering Flux
- Multimeter (Optional)
Step 2: Circuit Sketch
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.
The signal can be fed to the microcontroller via the Pin 1 of the LM358 IC.
Step 3: LDR
The LDR is an 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 a light is an incident on it the resistivity decreases, thereby generating a signal across the non-inverting terminal of the Op-amp.
Step 4: Sensitivity Calibration
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 screwdriver (plastic one recommends), until the LED turns off.
Step 5: TADAAAA!! the Output
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. In the next instructable, I will show you how to build a pressure sensor.
If you have any queries, feel free to leave a comment below or PM me and I would try to help you.