PhotoTransistor vs CdS for ambient light measurement with Propellor
tomcrawford
Posts: 1,129
I seem to remember somewhere a discussion of measuring ambient light using a Propellor. Charge a capacitor and watch it discharge through a resistance which varies with light. There was, if I remember correctly, a reason to use a phototransistor rather than a CdS photo resistor. If some kind soul would reply with a pointer to that thread, I would be forever grateful. tc
Comments
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/light-to-frequency/List/0/SortField/4/ProductID/783/Default.aspx
The devices integrate a photodiode and op-amp, which give much more repeatable results over temperature, and they're easy to use with both BASIC Stamps and Propellers.
-Phil
As Leon said, the CdS aren't ROHS compliant. I think this is the main reason for the switch.
I use LEDs as photo sensors.
LEDs act as current sources developing a few uA of current depending on the intensity of the light on it.
1. The Prop first discharges the capacitor to 0V by setting the pin to an output and driving it low. Usually a few mS or so depending on the value of the capacitor.
2. Set the Prop pin to an input an start counting the time it takes to read a "1" on the pin.
The rate the voltage builds is quite linear depending on the intensity.
This basic concept works even better using the Sigma Delta AtoD method described elsewhere.
Duane J
Yes, LEDs are basically PV cells with exotic semiconductor materials which have the ability to produce much more voltage than silicon.
But, to be technical about it, the developed voltage is independent of the applied light intensity, assuming the meter has infinite input resistance. The voltage is basically dependent on the color of the photons to which the semiconductor is sensitive and independent of the intensity.
OK, OK, we don't have perfect meters as they do consume a bit of current and there is some leakage current in the LED itself, or any other Photovoltaic device. which limits the voltage reading. The problem is this voltage is not particularly proportional to the applied light intensity.
Current mode is directly dependent on the applied light intensity. The more photons captured the higher the resultant current. In the circuit I posted the capacitor charging rate is directly proportional to this light intensity.
As a practical mater, it's helpful that the visible colored LED sensor can develop develop more voltage than silicon (0.55V) so one doesn't need an OpAmp in the circuit to get the voltage high enough to hit the trip point of the Prop pin.
Ya, I like LEDs as light sensors.
Duane J
Do you have a circuit that would let the LED also be used to emit light?
I think it would be cool to have a dual use LED that acts as both input and output.
Yes, it can be used both as a sensor and an LED.
Of course, not at the same time. %^)
In the circuit published make the resister divider using lower values and offset enough to allow the 3.3V high on the pin able to cause forward conduction through the LED.
If you use a blue LED, which is capable of generating a bit more than 2V, with the cathode grounded and series resister to the pin is the simplest.
Duane J