# CdS Cell Range

Status
Not open for further replies.

##### Member
I have not had the opportunity to employ as Cds in the manner, but it seems a correct usage or at least a popular one.

The goal is to be able to differentiate bright sun, from clouds, from dark. The typical circuit is a CdS cell-resistor voltage divider connected to a ADC.

If we take a given the Cds Cell in bright sun is 10K and darkness as 100K (just some numbers to work with). What resistor value should be used to achieve the highest range (given 0-5V)? A 10K resistor will be 0.45V to 2.5V. Is there more to be had without burning out the CdS cell?

#### alec_t

##### Well-Known Member
The resistance range of a cell can be around 100:1 (e.g. a few k to nearly 1 meg). Check the datasheets of typical cells.

#### crutschow

##### Well-Known Member
Here's an LTspice simulation for an Rcds variation of 10kΩ to 100k Ω and load resistors of 10kΩ, 25kΩ, 50k, and 100kΩ.
Which looks best to you?

You shouldn't have to worry about burning the CdS for a supply voltage of 5V as long as the load resistor is at least 1kΩ.

#### audioguru

##### Well-Known Member
Years ago, my solar garden lights had a Cds cell to turn the LED on and off. But the Chinese Cds cells had such poor quality that they got sunburned and failed.
Now solar garden lights do not have a Cds, instead they use the solar panel to "see" light or dark.

##### Member
Years ago, my solar garden lights had a Cds cell to turn the LED on and off. But the Chinese Cds cells had such poor quality that they got sunburned and failed.
Now solar garden lights do not have a Cds, instead they use the solar panel to "see" light or dark.

That sounds like two birds with one stone. (1) Get rid of a part that (2) fails anyway.

##### Member
Here's an LTspice simulation for an Rcds variation of 10kΩ to 100k Ω and load resistors of 10kΩ, 25kΩ, 50k, and 100kΩ.
Which looks best to you?

You shouldn't have to worry about burning the CdS for a supply voltage of 5V as long as the load resistor is at least 1kΩ.

View attachment 107845

My assumption (gut feeling) was correct. There isn't a simple way to expand the operating range of the simple CdS-Resistor combination to fill most of the 5V range. At 10K, it uses the lower half, at 100K the upper half, anything in between uses the in between. I can either gain the output with an opamp or raise the pullup voltage on the Cds-Resistor.

#### audioguru

##### Well-Known Member
That sounds like two birds with one stone. (1) Get rid of a part that (2) fails anyway.
But the cheap Chinese solar panels also get sunburned and fail (the plastic face has poor ultraviolet protection). The solar panels with a glass face are fine if they are sealed properly so that rain does not corrode the rear (most solar garden lights are sealed poorly).

#### crutschow

##### Well-Known Member
There isn't a simple way to expand the operating range of the simple CdS-Resistor combination to fill most of the 5V range.
Why do you need to have a 5V range.
Do you really need the full resolution of the ADC for your sensing purposes?

##### Member
Why do you need to have a 5V range.
Do you really need the full resolution of the ADC for your sensing purposes?

Notice I said "most of the 5V range", not all or the full range. I don't think I could get all of it and with variation of the CdS cells probably lose some at the top and bottom anyway. So the target is most. As you notice with the 10k simulation, the range is 0.45V to 2.5V, 2-2.5V of the 5V range. I find it better to get as much as you can when you start. It's easier than realizing later you need more and having to redesign.

#### alec_t

##### Well-Known Member
Many (most?) ADCs require a source impedance of <10k to obtain reasonable accuracy, so you will probably need to buffer the voltage across the cell. If so, the buffer amp can have gain and offset to give a full 0V-5V input range to the ADC.

##### Member
Many (most?) ADCs require a source impedance of <10k to obtain reasonable accuracy, so you will probably need to buffer the voltage across the cell. If so, the buffer amp can have gain and offset to give a full 0V-5V input range to the ADC.
Non-inverting opamp buffer?

Wouldn't most CdS circuits of this configuration then require the voltage to be buffered? Based on my (elementary evaluations) we are talking about resistors in the 1k-10k range and CdS resistance in the 1k-1Meg range, thereby rarely providing impedances <10k.

#### alec_t

##### Well-Known Member
Wouldn't most CdS circuits of this configuration then require the voltage to be buffered?
That would be my approach. Your mileage may differ, depending on what accuracy you need.
we are talking about resistors in the 1k-10k range
Are we? The simulation above is for resistance in the 10k-100k range .

##### Member
Are we? The simulation above is for resistance in the 10k-100k range .

From the simulation, I prefer to eat my sandwiches from the end not from the middle. From your simulation, likely the 10K as it appears to be more linear than the 100k (I haven't had time to do calculations yet to verify). I've received PMs stating a 10K would be the maximum and I should be looking in the 1k-10k range.

#### MikeMl

##### Well-Known Member
Yes, the ADC wants a source impedance of <=10K. Yes, it is more convenient to use a resistive divider that has an output impedence of >10K. Solve the problem by shunting the ADC input to ground with a 0.1 uF capacitor, after all, the clouds do not move that fast...

I have used this trick when sensing 12V battery voltage, where I wanted the two resistors in the divider to be high enough not to provide much leakage to the battery (>~100K). The capacitor holds the voltage at the tap constant while the AD does its dance ( a few tens of micro-sec ). The DC input leakage spec for the AD is ~1uA, which does not load the voltage divider much. Again, the battery voltage changes slooowly.

Besides, you are supposed to use an "anti-aliasing" filter upstream of any ADC input...

Last edited:

##### Member
bypassing the ADC input with a 0.1 uF capacitor
I assume you mean a 0.1uF to ground?

Besides, you are supposed to use an "anti-aliasing" filter upstream of any ADC input...
That's a new rule on me. I'll check into it.

#### MikeMl

Last edited:

##### Member
Hello all,

This project has come back to light. Due to some design changes I will have access to 5VDC and to 12VDC. I was thinking if I connect the CdS/resistor divider to 12VDC and select the resistor to limit the high voltage to 4-4.5V so as to not blow the ADC input. I would like to add some additional protection. But what to use? 4.7V volt zener? or?

Status
Not open for further replies.

Replies
4
Views
1K
Replies
22
Views
4K
Replies
3
Views
5K
Replies
2
Views
719
Replies
7
Views
858