LDR alternative

I use LDR's for day night sensing. They work really well but do not have a long operating life.

I have been trying alternatives, photo diodes and photo transistors, which I see in all sorts of commercial equipment.

The units work, but at twilight there is no sensitivity so I get night time operation in evening and morning which I want to fix.

The commercial units work to a much better sensitivity in low light.

I could do with some advice on how to get low light sensitivity from a reliable light sensor.

Thanks
 

Dippy

Moderator
Mark,
LDRs can have a very long operational life when used correctly.
(And assuming you haven't bought the cheapest anonymous things on the planet. Buy cheap, pay twice).
It is often the associated electronics which causes the problem.
Like any resistive device (e.g. resistor or thermistor) they can get hot if you run too much current through.
Post your schematic.

I wouldn't use photo-transistors but photodiodes can give excellent results - again, as long you use them correctly.
When I were a lad I'd just shove things in without much thought or calculation.
For photodiodes you can use them in a reverse biased way or even as a photovoltaic way. You need an op-amp.

There are also options of ready-made light sensors that can output a voltage or a pulse-stream.

What is the application?
Does it need micro-power for battery operation?
Give us some details.
And don't forget to post your LDR schematic as someone might be able to sort your problem in 30 seconds.
 
The LDR's are the encapsulated ones from Farnell, I have tried several types for reliability, they are mounted externally, but under cover.

When faulty they no longer go high resistance, so will go to 100-200k in darkness but not higher (normally they would go to meg ohms), so the unit will not go to night time mode and then requires a visit to site.

The circuit is simple using a 10 K resistor as in the manual and an ADC pin, on the 18 project board.

The boards are mains powered for light and alarm switching of external equipment.

I would prefer to use a picaxe only answer with out more circuits if possible.
 

Dippy

Moderator
Part Number?

I've used various ones from Farnell that have lasted years and , as far as I know, are still working.
(Outdoors behind perspex window).
amybe you have something odd in your circuit?

Is there any visible sign of corrosion/degradation?
Have you removed them from PCB to double-check?

Maybe you have some genuinely faulty devices.. contact Farnell.
If you have an account , and it's not your fault for failure, they'll replace FOC.

If you don't want any extra electronics and power is no problem then check out:-
http://uk.farnell.com/ams/tsl260r-lf/photodiode-sensor-l-volts/dp/1182349
or similar.

I've used them (when they used to be TAOS) and they worked fine, for me, over many years.

What is your skill/experience level?
 
This has happened over several years so not a faulty batch.

No sign of corrosion or breach of the encapsulation on the faulty ones.

I usehttp://cpc.farnell.com/advanced-photonix/norps-12/light-dependent-resistor/dp/RE05272 and http://http://cpc.farnell.com/advanced-photonix/nsl-4960/light-dependent-resistor/dp/RE05275.

I have had both fail, the only thing I can think is the direct light. They do not fail straight away 12 months to 3 years

In trying to find an alternative I have tried the 3 pin device as well, got it to work fine, but again could not get low light sensitivity. Tried it with and with out 10 K resistors on ADC.

My skill level is limited by ability, so low.
 

Dippy

Moderator
Ah, very long periods in sunlight... I was under the impression we were talking about failure after a few weeks or months.

It could be UV/sunlight degradation over prolonged periods.
These failures have been reported.

Can it get very hot? Long periods of direct sun and the internal power dissipation might add up. They aren't very tough wrt temperature.

Maybe it's a accumulation of both?

So, perhaps you could shield it with some translucent acrylic (I did). Any light attenuation (within reason) will simply shift your thresholds.

If you can't do the extra electronics for a semiconductor sensor (which would need protecting) then maybe a light shield is your easiest option.
 

rossko57

Senior Member
Shift from megohms to few hundred kilohms can happen with damp, spiders, dirt, etc. on circuitry external to the LDR itself. It's not clear how well protected the rest of the circuit is.
 
Thanks, the answer is that there is not a replacement for the LDR.

Shame I hoped for a modern answer that I had not heard of.

The LDR's are fitted in a 20 or 25 mm conduit end box which makes mounting and connection really tidy.

Rossko57 the measurements are the faulty LDR once it has been replaced.

The circuits are indoor, in a panel as there is mains switching, LEDs and timing pots etc.

Thanks for your help.
 

rq3

Senior Member
I use LDR's for day night sensing. They work really well but do not have a long operating life.

I have been trying alternatives, photo diodes and photo transistors, which I see in all sorts of commercial equipment.

The units work, but at twilight there is no sensitivity so I get night time operation in evening and morning which I want to fix.

The commercial units work to a much better sensitivity in low light.

I could do with some advice on how to get low light sensitivity from a reliable light sensor.

Thanks
A very old, and surprisingly little used, technique is to use an LED not only as a light source but as a photodiode. With proper reverse bias and ADC technique, a red LED can detect the reflection from your hand at 2 meters under shop fluorescent lighting.

Rip
 

matchbox

Senior Member
I have found that phototransiors are the best replacement for LDR's in outside direct UV exposure. LRD's are lucky to last a month in an Australian summer on a solar tracker. Where as i have Phototransistor that have lasted over 4 years.
The main issue with a phototransistor, is the case becomes opaque from UV over the years. I still find the level of resolution a phototransistor has, adequate for dask and dawn usage. I think its more an issue of picaxes not having high enough resolution.
An idea to reference dusk from dawn is to store light levels into two variables and compare them over a period of time to see if the light is rising or falling.
 

AllyCat

Senior Member
Hi,

the answer is that there is not a replacement for the LDR.
IMHO that's unlikely, but you might need to use somewhat different circuitry.

The CPC link doesn't appear to quote the sensitivity, but it's probably similar to the "classic" ORP12. That has a resistance of about 300 kohms at 1 Lux, which is probably approximately what you've been using. A photodiode like the BPW34 has a reverse photo-leakage current of around 100 nA at 1 Lux, which should be sufficiently above its maximum thermal leakage current, at least up to perhaps 50 degrees C. 100 nA corresponds to 1 mV across 10 kohms, whilst the PICaxe READADC10 command resolves down to 2 mV (with the FVR reference set to 2 volts). So not quite "good enough", but you could probably increase the resistor to, say, 47 kohms in practice. At the mV level you just might need to consider thermo-electric effects in the circuit.

Alternatively, the ST-7L phototransistor (to which the LED022 phototransistor sold by Rev Ed is said to be similar) conducts a nominal current of about 4 uA at 1 Lux, which could be an ADC10-bit value of around 20 across 10 kohms. The actual sensistivity will have a considerable range (maybe as high as 40 : 1 according to the data sheet) but that could be "calibrated" within the PICaxe. Note that although the LED022 has a "peak" response in the IR range (as do most silicon junctions) it still has adequate sensitivity in the visible range.

However, if you want a "fail safe" design (i.e. one that always activates in zero light level), then using the photoelectric effect might be better (because that must be zero in darkness). It will need a "large area" sensor, either a specialised photodiode, or maybe a small PV (solar) panel. Perhaps even a panel from a "Pound Shop" solar garden light. They are usually Amorphous Silicon which do suffer "ageing" effects (perhaps by a factor of a half, or so) but being deposited behind glass could help the general "environmental" issues such as UV. Amorphous silicon also has its peak response in the visible part of the spectrum (as do LDRs).

Cheers, Alan.
 

Dippy

Moderator
I already suggested a photodiode in reverse bias of photoelectric mode but the OP doesn't want to do it.
There are superior replacements for LDRs but it requires a little extra.

Re the linked LDR: If you pick uo the part number on CPC you can go to the Farnell site and pick up the datasheet.

My 'gut feeling' about photoelectric is that, true, you have zero in darkness but as the light level falls the small 'solar cell' is so weedy that you would need to buffer the voltage to get a consistent ADC reading. Again, electronics which the OP doesn't want or isn't comfortable with.

I had good results with the TAOS sensor for twilight, far better than LDR for twilight, but had to be mounted sensibly and protected with a diffuser.

Some kind of diffuser or old-fashioned 'invercone' will spread the light and give some protection. It will also give a wider angle for a wider range of mounting/application. Proper light (lux) meters use this method (photodiode) but shouldn't be left for long periods in sunlight - according to the instructions in mine.
A little bit of shrouding could keep direct sunlight off the sensor, it just requires a bit of trial.

Anyway, the main options have been given so maybe the OP could do some bench tests. Reliability tests are a separate problem but the greater the protection the longer the life. And the sensor needs a wide dynamic range to provide general-purpose settings in general-purpose applications.
 

Flenser

Senior Member
you would need to buffer the voltage to get a consistent ADC reading
I tested a small 3cm x 3cm amorphous silicon on glass solar cell that comes in a AU$3 solar garden light. It has 4 segments so produces up to 0.7V per segment at noon in bright summer sunlight.

Attached is a chart of the open circuit voltage measured with a logging DMM as the sun went down this evening. The section between 20:50 and 21:15 is artifiically high because at 20:50 I turned the lights on in the house and effected the readings I was taking outside. At 21:15 I noticed what was happening and turned the lights off in the house.
Solar Cell.jpg

I could easlily read a newspaper outside at 20:40. I could still read it at 20:50. I could not read it at 21:15. The voltage after 21:15 is 80mV so to sense darkness with this solar cell you need the resolution to be able to measure a voltage as it drops below about 200mV on its way down to 80mV. With the default reference voltages and a 5V supply READADC10 give you a resolution of 5mV so identifying darkness with a small solar cell seems doable.

Updated: The input impedence of the PICACE ADC will be less that that of the DMM. As the solar cell is acting as a constant current device I expect the voltages we see generated across the ADC input impedence are going to be lower than the figures I got with a DMM.
 
Last edited:

JBrookes

Member
The classic solution to photodetection is the "transimpedance amplifier" configuration. This simple circuit cpmpensates for the internal capacitance of the photodiode, used in a non-PV
connection. I am pretty sure a phototransuistor with its gate ignored would work, but a very workable PD is the BPW34. Google "transimpedance amplifier," "electrooptical.net" for more info.
Mark Johnson in the UK has written the best work on this: "Photodetection and Measurement."
The above is the ultimate circuit, but since just an op-amp, not difficult to do.
 

Hemi345

Senior Member
Have a look at this article on Mouser's blog:

http://www.mouser.com/blog/seeing-the-light-a-circuit-for-interfacing-with-ambient-light-sensors
 

Flenser

Senior Member
Some kind of diffuser or old-fashioned 'invercone' will spread the light and give some protection.
Another way to avoid most of the UV should be to simply point the sensor down, instead of up. At the time of day we are talking about the Sun is down so the amount of light we get reflected from the ground will be less than we get reflected from the sky but that doesn't mean that you won't be able calibrate the software to match the LDR getting less light. Quick and simple to test too.
 
Top