ldr sensor

Light Dependent Resistor | LDR sensor | LDR Working


LDR sensor is very simple and most easy to use as a beginner. It is the best sensor to start working with the analog value with any microcontroller LDR stands for the light-dependent resistor.


  • The sensor is available very easily in the market and in various version. The one I’m demonstrating is the simplest one available and most common. Visit its projects for more applications.
  • It comes with DIGITAL output only (the version I have). Along with this, it also comes with a push button with is provided on-board, which is used to switch the output of the sensor.
ldr sensor
  • The sensor is prone to behave or give false readings in daylight or direct sunlight, i.e., if you want to measure intensity of light in open daylight then it may be difficult as the results may vary highly.
  • The LDR or Light dependent Resistor can be replaced according to the need of the user for better range of the values.


  • There is no such high advantage of ldr sensor but the nominal ones. Firstly, it can be used in various projects due to its simplicity and flexible voltage operating range.
  • Secondly, it has a physical switch to switch the output between the output of the two Op-Amps. This is good in times of instant change of digital values if required.
  • Thirdly, you can replace the LDR according to the requirement and your choice, as it can be de-soldered and soldered easily.


  • The main disadvantage of ldrsensor is the bulky structure. Due to the big size of the sensor it needs a space to be placed which compromises the space to other components in compact projects.
  • Secondly, the version which I have pf the sensor doesn’t have analog output. In the schematic, I have added from my side, you can add a separate wire for this.

LDR Sensor Price & Availability:

  • The sensor is cheap due to its simple schematic and easily available in the market both offline and online. The version available may vary from mine (attached above). Some of the online websites are given below which I recommend you to buy from:


LDR Sensor Schematic
  • The PCB of the LDR sensor is very simple and similar to other sensor as discussed in previous articles. The only difference could be of a push button.
  • It is built out of LM358 IC, which is a Low-Power Dual Operational-Amplifier. It is used in various sensors like Ir sensor which is also very popular and is also included in basic electronics series.
  • The main advantage of this sensor is that you can change the Light dependent Resistor according to your need. Also, you can turn the output of the sensor with the pushbutton provided on-board.
  • The Analog values are available in few versions of the sensor only. The one which I am demonstrating do not have analog output pin. But the schematic above will have it.

LDR Sensor Working

  • The working of this sensor is very simple and can be easily used with all microcontrollers. The main component of this sensor is LDR, which can be changed in any case of damage unlike other sensors.
  • The ldr working is depend on sunlight. sensor also uses an LM358 Op-Amp to amplify the voltage, or we can say that it acts more like a comparator in this circuit.
ldr working
  • In the above circuit you can clearly see that both op-Amp are giving individual and opposing outputs to both pins of the push switch while the middle one is the final output pin.
  • You can easily switch between the outputs to the microcontroller in case of the digital values. There will not be any effect on the analog values as it depends purely on Light dependent Resistor and power supply.
  • The LED which is provided on-board gives the status of the final output which is given out to any microcontroller. But the analog output always remains the same.



Q. What is the resistance range of the LDR sensor ?

Well, it’s totally depended on the version of the sensor you have. Normally it has ranged from 100 Ω to 10 MΩ.

Q. Which IC is used in ldr sensor?

The one which I have uses LM358, but many others also use the LM393 Dual Voltage Comparator. The working of both ICs is similar to compare the voltages on both inputs (Inverting & Non-Inverting) & give the Output.

Q. Is analog value usefulin ldr sensor?

Well, again it totally depends on the requirement and usage of the sensor which you need or want. But analog value only values when you want the task to be done in reference to light, but if you are using LASER Diode then digital is useful over analog. Same for detecting day-night or light on-off.

Spread the love, Share this post with friends

Leave a Reply

Your email address will not be published. Required fields are marked *