Sensor for sunlight

What type of sensor would be the best to differentiate between cloudy and bright sun? Anything below cloudy, ie. dusk, dawn or night can also be considered ‘cloudy’.

A brightness sensor.

use two LDRs. One to handle very bright light, one for low light conditions.

knut_ny:
use two LDRs. One to handle very bright light, one for low light conditions.

Can you elaborate on your thinking here? I don’t need to know the “amount” of ambient light. Just that it is more or less bright than ‘x’. I was thinking CdS cell because I have one on hand (somewhere), but wasn’t sure if it would still show a max reading on a cloudy day (ie., too sensitive or washed out by too much light).

The best approach is to get an LDR and experiment, to see what readings you get under different lighting conditions. You will probably be happy with just one.

LDRs resistance will vary from MOhms (dark) to few hundres Ohms (sunlight).
Thats why I suggest two LRDs with different resistors (eg 100k and 1k) to be able
to guess illumination with a decent precision.

Any photodiode... There's an order of magnitude difference between sun and overcast.

A small sealed solar cell from a garden light might last longer outside than an LDR.
Use a (~4k7) resistor between +solar cell and Arduino analogue input to protect the pin.
The solar cell could otherwise phantom-power the Arduino when the Arduino is off.
Leo..