In many electronic applications, especially those involving sensing and control, the LM339 comparator circuit is a flexible and crucial device.
A Light Dependent Resistor LDR, resistors, an LED and the LM339 quad comparator IC allow us to build an easy yet functional circuit that can monitor light levels and offer visual feedback depending on the surrounding lighting conditions.
The LDR functions as a light sensor in this circuit, adjusting its resistance in response to the amount of light it receives.
We can produce a voltage that changes with light levels by using preset to build a voltage divider with a fixed resistor.
This voltage is compared by the IC LM339 to a reference voltage that is established by a resistor.
The comparator produces a signal that may power an LED, lighting it to show the change in light conditions when the light intensity surpasses a predetermined threshold.
The concepts of voltage comparison, analog sensing and signal output are explained in this simple to assemble system, which also serves as a fundamental idea in electronics.
Whether employed in simple light activated devices or as a component for complex systems, the IC LM339 LDR comparator circuit is a prime example of how simple parts may be combined to produce useful and instructive electronic applications.
Circuit Working:
Parts List:
Component | Value | Quantity |
---|---|---|
Resistor 1/4 watt | 33k | 1 |
Resistor 1/4 watt | 330Ω | 1 |
Preset | 10k | 1 |
LDR | 1 | |
IC | LM339 | 1 |
LED | 5mm, 20mA | 1 |
The IC LM339, a quad comparator, is used in Building an LDR Comparator Circuit.
Only one of the four internal comparators is used in this circuit.
It uses a controlled DC source of 5V to function.
A LDR, a photo-sensitive component that adjusts its resistance in response to light intensity, serves as the light detecting element.
There is less resistance when there is more light.
In this circuit, resistor R1 creates a voltage divider, and pin 4 is linked to the LDR.
A low output at pin 3 results from the LDRs resistance decreasing in response to light, which raises the voltage at pin 4.
At pin 5, we further add a variable resistor.
The voltage at pin 5 increases when the variable resistor VR1 is set to a low resistance.
It is tuned for low light intensity because the inverting terminal pin 4 requires a low input signal to stay below the voltage at pin 5 for a greater output.
The LDRs resistance drops with increased light exposure, raising the voltage at the output.
Every time the voltage at the inverting input rises over or falls below the threshold voltage specified at the non-inverting input, the comparator output flips states.
When the LDR is dark, the LED illuminates.
Formulas:
The following are the main formulas needed to construct an LDR comparator circuit using the LM339 IC:
Voltage Divider Formula:
To determine the voltage that the LDR and resistor R1 create at pin 4 (the inverting input):
Vpin4 = RLDR / RLDR + R1 × VCC
where,
- Vpin4 is the voltage at pin 4.
- RLDR is the resistance of the LDR which varies with light intensity
- R1 is 33k fixed resistor.
- VCC is 5V supply voltage
Voltage at Pin 5 (Non-inverting Input):
The location of the variable resistor VR1 determines the voltage at pin 5:
Vpin5 = R2 / R1 + R2 × VCC
where,
- R2 is the resistance set by the VR1 preset.
LED Current Calculation:
To calculate the current through the LED (if used at pin 2):
ILED = VCC − VLED / R2
where,
- LED is the forward voltage of the LED which is around 2V for standard LEDs.
- R2 is 330Ω current limiting resistor for the LED.
These formulas are used to calculate the circuits required voltage levels and current flows, which will guarantee that the LDR Comparator Circuit with the IC LM339 operates as intended.
The sensitivity of the light detector may be fine-tuned by using the variable resistor VR1.
How to Build:
For Building an LDR Comparator Circuit using IC LM339 follow the below mentioned steps for connections:
- Assemble all the components as shown in the above circuit diagram.
- Connect pin 2 of IC LM339 to +5V positive supply through LED and resistor R2 330Ω.
- Connect pin 3 of IC LM339 to +5V positive supply.
- Connect pin 4 of IC LM339 to the junction of resistor R1 33k and to one end of LDR and other end of LDR to GND.
- Connect pin 5 of IC LM339 to center leg of VR1 preset, 2nd leg to +5V positive supply and 3rd leg to GND.
- Connect pin 12 of of IC LM339 to GND.
Conclusion:
In conclusion, the LM339 IC based Simple LDR Comparator Circuit successfully illustrates the concepts of voltage comparison and light detection.
This circuit offers a dependable way to detect ambient light levels by utilizing the properties of the LDR and adjustable resistors.
The output is a flexible option for light-sensitive projects as it can be readily modified to fit a variety of uses, like turning on an LED or if required relay or buzzer.
In addition to improving comprehension of electronic components, this design lays the groundwork for increasingly intricate sensing systems.
References:
Photocell comparator circuit using LM339
Leave a Reply