Direct sunlight sensor

Oct 29, 2015 40 Replies

I want to make something to detect whether there's direct sunlight shining on particular place. I thought the obvious approach would be to use a pair of light dependent resistors (LDR) - one located where it will definitely be in direct sunlight (when the sun is shining) and another that is at the location to be tested. Compare the resistances, and the result should be clear enough.



But this means that at least one LDR will be in direct sunlight for extended periods, and I can find nothing in the datasheets to indicate whether the devices will survive that. My concern is UV degradation of the encapsulation material.



I can put them behind glass, which will provide some protection, but even then, they'll have to survive some UV.



Anyone have experience of this?



Sylvia.


UV camera lens filters? Expensive at up to $20 a pop each for new ones. Cut up a pair of polarising sunglasses? Maybe free if you already have an old pair. PH

Perhaps you can use a small solar cell as the transducer? These should survive direct sunlight during some decades.

Some time ago we even purchased a calibrated one, which could be used for absolute measurements. I had a quick look but was unable to dig up more details on it...

Pere

Use a photodiode. Cheaper, better, more reliable, multiple sources. For direct sunlight, something like an Everlight PD204-6C (19 cents in qty 10) would work fine.

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net

Automotive auto-lights on features often rely on a light sensor on the dash which incorporates a UV filter.

They may be LDR's or photodiodes, but either should work.

Are you attempting to discriminate between "direct sunlight" and diffues sunlight i.e. some cloud obscuration? If so I suspect the LDR's may disappoint you.

More between direct sunlight, and shadowed.

The project is to control a pivot-arm awning so that it extends only as far as is required to prevent direct sunlight entering a window. The window is almost exactly west facing, so the required extension varies from none at all during half the day, to fully extended towards sunset.

I'm intending to put one sensor just below the window. The awning will then extend until the sensor is in shadow, plus a bit. As the sun moves[*] across the sky, the sensor will again be exposed, at which time the awning will be extended further.

Eventually the other sensor will indicate that there's no longer any direct sunlight anyway, and the awning will be retracted.

Sylvia.

[*] Anyone wanting to point out that it's really the Earth that moves will be ignored.

The air conditioning in my 2001 Toyota uses a sensor in the top of the dash, near the bottom of the windshield, to determine how hard to work; more sun = A/C works harder. I have seen similar sensors in other cars, starting in the early 00s.

The service manual says it's a photodiode and implies that the ECU biases it with +5 V and expects to see 0 to +5 V in return; lower voltages for more light on the sensor.

The reason I mention it is that for automotive, the design life these days is probably 10+ years, and whatever it costs gets multiplied by a volume of 10 to 16 million or so (in the US). So there are probably good reasons why they picked a photodiode.

Matt Roberds

Be able to get them cheap from the wreckers all ready to go given their service availability. Test data should give you an idea of their biasing.

Xeno

[snip]

Interesting idea. My home office windows face west and the HOA rules prohibit awnings. But I have interior (louvered) shutters that would benefit from such an automatic control. ...Jim Thompson

| James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

I once inadvertently made a sunlight detector. I needed a simple photo-switch to turn on some LEDs when it got dark, and I made one from parts in my junk box - an LDR and a LM3900. I had the LDR connected between the positive supply and one of the LM3900 inputs, and I figured that I did not need any additional series resistance.

Although the original was used successfully indoors for years I was wrong! I later made another one, which I mounted on an outside wall. This worked for a few months, but then failed, when with the change of seasons, the LDR got exposed to direct sunlight. The resistance of the LDR went so low that the current into the LM3900 input was enough to destroy it.

Due to the one-time nature of this detection, I won't recommend it.

For a fixed installation like this, you dont really need a sensor at all. The suns location is completely calculable, all you need is the date/time and location.

Get the time from a local clock or net server, set the location, and you can do the geometry from the sun azimuth and altitude to get the angles for control.

I abhor microprocessors... the world is ANALOG O>:-}

I like stand-alone systems. I'm the one responsible for the "limp-home" ignition system in GM products. Those dumb-asses initially wanted your car to drop dead if the timing failed and your car's emissions went up. ...Jim Thompson

| James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

I confess that my planned implementation includes a PIC. There are some issues to be dealt with - people walking in front of the sensor, intermittent sunlight due to clouds, and the rapid changes that occur as the sun intersects the extended plane of the wall. No doubt these could all be handled using analogue circuitry, but using a PIC will make life simpler - particularly as I have much more experience with software than I do electronics.

Sylvia.

Get the time from a local clock or net server, set the location, and you can do the geometry from the sun azimuth and altitude to get the angles for control. =============================================================

Build in a gps receiver and you've got time, date, location, and direction; it's completely automatic, except for height above ground, I guess, if you want to fine-tune those first and last few minutes of sunlight. They sell those little gps usb receivers for what, under $40 qty 1, so cost to build one into a moderate volume product has to be under $10. You could even add a temp sensor so it automatically stays closed below some threshold to get solar heat in winter.

----- Regards, Carl Ijames

Except for a cloudy day >:-} ...Jim Thompson

| James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Our cars use those sensors for lighting control but I don't think the HVAC is tied in. A thermostat would seem to work better.

But if it's winter you won't be extending it anyway, cloudy or not, so you won't be "wrong". I guess you could argue extending it on a cloudy summer day would be a waste, but I'm sure there would be a manual override if you felt that strongly.

----- Regards, Carl Ijames

Except for a cloudy day >:-}

...Jim Thompson

| James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Arizona weather can be weird... like it'e rained the last few days... very unusual. ...Jim Thompson

| James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required