Pages

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial


Now, We hope that you have assembled all your material. Also don't forget to remove all the LED which you attached to Port 1 of microcontroller and the switches you had attached to the Port 2 of microcontroller. Lets start:

1. Place Your LM324 IC just below the 8051 Microcontroller leave some gap but not too much because in furhter chapters we are going to use that space below the LM324 IC.
Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

2. Now connect the 4th Pin of LM324 Ic to VCC +5v. See the pin diagram given in Chapter 5.3 for details.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

3. Now connect 11nth pin of LM324 IC to Gnd. See the Chapter 5.3 for circuit diagram description.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

4. Here is the closer look of the connection. You can tally it with your breadboard setup.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

5. Now take your 10k POT(Potentiometer) and place it in the same way as show in the below image. Some pot may look different but they have 3 legs so you don't have to worry about the placements as it does not have polarity. Just make sure the middle one is connected to the input. 

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

6. After placing it, it would look something like this. Don't get confused with the connections.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

7. Connect the first pin of LM324 with the VCC of breadboard as shown in the below image.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

8. Now connect the third pin of POT to the Gnd of breadboard. See the following Image for the reference.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

9. Now connect the third pin of potentiometer to the third pin of the LM324 IC. It is the input for LM324 IC to compare the values.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

10. From above it will look similar to the following image. Try to make the connections clean.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

11. Now take the LDR(Light Depended Resistor) and bend and cut the legs as show in the following image.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

12. Place it on the breadboard as shown in the following picture. Again here we are reminding you not to leave too much too small space between these because we are going to use the space in future tutorials.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

13. Now take your 10k resistor and connect it to the first pin of LDR(Light Dependent Resistor) and put it in the VCC like show in the following image. LDR doesn't have polarity. So it does not matter where you connect the resistor to which side of LDR(Light Depended Resistor).

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board


14. Now connect the other end of the LDR(Light Depended Resistor) to Gnd of breadboard. See the following image to compare your breadboard setup.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

15. Now connect the second pin of LM324 IC with the LDR(Light Depended Resistor) in the following way. Make sure that the other end is connected before the resistor. This will form a potential divider circuit. Double cross check it with the following image. As if you do not do it properly the circuit won't work.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

16. Now take a blue LED and bend and cut the legs as show in the following image. This is just to make our circuit look beautiful.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

17. Now place it just in front of LDR  but leave a small gap between the two. This gap will be used to block or unblock the path. The light coming out from the LED will be emitted directly on the LDR. The output resistance of the LDR will change due to which the potential divider circuit will be activated and LED will blink. (Note : We have not used resistor here, since the blue led is capable to handle voltage of over +5V if you are using other color, make sure you use a resistor of value 270 ohm else the led will get damaged.
If you have difficulty differentiating between anode and cathode, the look at the led, the flat large surface is cathode and the the leg with thing surface is Anode) 

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

18. Now connect the anode of Blue LED to the +5v of the breadboard. This will be the power supply for the LED.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

19. Now connect the cathode of LED to the Gnd of Breadboard, This will eventually power up our blue LED.  Also connect an LED on the 1st pin of LM324 Comparator IC such that the cathode of LED to the 1st pin of LM324 comparator IC and other end of the LED to the +5v of Bread Board,

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

20. Now Give Power supply to the breadboard by attaching battery. Take a screw driver and start rotating the screw driver such that the LED which is connected to the Pin 1 of LM324 Comparator IC will turn on. The actual logic is to first note down the voltage level of LDR when the light falls. Then note down the Voltage when the light doesn't falls. Now add both the voltages and divide it by two:

Voltage when light falls + Voltage when light doesn't falls
------------------------------------------------------------------------
2

and then set the value of potentiometer two the calculated answer. 
To measure the voltage, set your multimeter to voltage mode and select the voltage level to 20 and then place the one probe on ground terminal and other terminal on the 2nd pin of LM324 IC since it is connected with the LDR. To measure the voltage of potentiometer simply put the probe on 3rd pin of LM324 IC. If you still have problem using multimeter, see the Basics chapter to know about using the multimeter.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

21. After setting the voltage level of the LM324, there will be a point where the LED will be turned off. It will be by default in OFF mode.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

22. Now try blocking the path of LDR and LED you will see that the LED which was connected to the Pin no 1 of the LM324 IC will glow.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

23. And it will eventually turn off when the blocked path is unblocked. That's it this is how sensors work. Most of the sensor will work in the same way. The game is all about potential divider circuit.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

24. The circuit will look something like shown in the below image.

Chapter 5.4 - Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board - Practical Tutorial
Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board

We have covered the basic Interfacing LM324 Comparator IC with LDR(Light Dependent Resistor) Sensor on Bread Board and we hope that you have clearly understood the whole concept. Now the next chapter is the output video. Yes there in no programming involved in this Chapter but hey, don't take out the setup. We will teach you how to use a sensor and connect it to microcontroller via LM324 comparator IC and then the microcontroller will react to the data which will given by the sensor. Meanwhile you can jump to the next sub chapter and tally your output with the output video of our bread board setup.

Go8051 Tutorial

Go8051.com is a medium for hobbyist and enthusiasts to learn 8051 microcontroller from scratch on bread board.

No comments:

Post a Comment

Stuck Somewhere ? Comment Your Queries and Experts will Guide You.