The light dependent resistor (LDR) that I use in MintyTime, Excelitas Tech VT93N2, has been discontinued by the manufacturer. I'm having trouble finding a comparably priced (e.g. < $0.50 @ 100+) replacement part. It's been suggested to me that I should consider/investigate using a photo-diode (photo-detector,) like this one, as a replacement part. Here is a snippet from my schematics where the LDR is used:

enter image description here

The LDR plugs into the SENSE_IN and SENSE_OUT nets. The SENSE_IN and SENSE_OUT nets then go to I/O pins on my ATTiny2313 micro-controller. SENSE_IN goes to an analog comparator input and SENSE_OUT goes to a digital I/O pin that I use to "turn on" the voltage divider formed by the LDR and fixed 22kOhm resistor when I want to take a reading (to save some power by not driving the divider constantly.) I'm only trying to detect two ambient light states anyway "dark" and "normal" so that I can dim the LEDs when it's dark.

On to the question(s).

If I use a photo-diode (like the one I've linked to) by plug in the anode into SENSE_OUT and the cathode into SENSE_IN should it be software / hardware compatible with an LDR as I've described its use in my application? My gut says yes, but I haven't used photo-diodes before, and I thought I remembered something about them only responding to intentional signaling (like IR) rather than light levels. Can you recommend a different one that is more appropriate / cheaper for my needs?

Alternatively, are there actually more widely available low-cost LDRs and I've just managed to overlook them in my searches at the major suppliers (e.g. Mouser, Digikey, and Newark)?

Whatever I do, I'll obviously have to buy a few and try it out.


2 Answers 2


(1) Digikey still advertises LDRs here <-- link update May 2022.
[Optical Sensors - Photo Detectors - CdS Cells]

(2) A phototransistor would probably do a good job in your application. Diode with gain effectively.

Product page here
[Optical Sensors - Phototransistors]

Digikey cheapest - 14c each in 100's - pricing here

Many more types available.

  • \$\begingroup\$ What are you searching for at Digikey? Light Dependent Resistor and LDR both turn up nothing obvious to me... also isn't the phototransistor you linked for IR wavelengths rather than visible light - what's your rationale? \$\endgroup\$
    – vicatcu
    Mar 5, 2012 at 18:54
  • \$\begingroup\$ @vicatcu - Looks like they're under "Sensors, Transducers > Optical - Photo Detectors - CdS Photoconductive Cells (Ambient Light)" \$\endgroup\$ Mar 5, 2012 at 23:29
  • \$\begingroup\$ search.digikey.com/us/en/cat/sensors-transducers/… \$\endgroup\$
    – Russell McMahon
    Mar 6, 2012 at 1:20

Use a phototransistor. They work great, are easier to use than photodiodes because they include their own amplifier, but they are sensitive to a different spectrum than the CdS photocell. You will have to experiment with the best value for "R16". Phototransistors and photodiodes are sensitive to infrared light and the black ones are filtered to block visible light.

https://www.onsemi.com/pub/Collateral/AN-3005-D.PDF "Design Fundamentals for Phototransistor Circuits" explains.

Here's a part that has filtering to specifically replace CdS. http://octopart.com/njl7502l-njr-8319307


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.