Initial report by Diane Thomas 09 Oct 2005
(definition from Wikipedia) A photoresistor is an electronic component whose resistance decreases with increasing incident light intensity. It can also be called a light-dependent resistor (LDR), or photoconductor.
Physical changes (wikipedia) A photoresistor is made of a high-resistance semiconductor. If light falling on the device is of high enough frequency, photons absorbed by the semiconductor give bound electrons enough energy to jump into the conduction band. The resulting free electron (and its hole partner) conduct electricity, thereby lowering resistance.
So--lots of light = lots of conductivity: less light = less conductivity.
The photocell variable resistor on hand in the shop (jameco part no. 120299 (?) (vary from 0-100k.) Data shows the response and decay time varies a little between them. (All are available through Jameco electronics.)
- Applications include: auto-focus lenses, exposure meters, contrast controls for TVs, dimmer or light switches, flame detectors, electronic toys, street lamp switches, optocouplers
- Generate variable signal based on detection of light levels
- Operating temperature: -30 degreeC to +70 degreeC
- Cadmium Sulfide (CDS)
- Soldering: 230 degreeC for 3 seconds • Rating 350Vp, 400mW
- Resistance: 1M ohms (dark); 12k ohms (light)
- Size: 0.37" x 0.43"
- Lead Spacing: 0.30"
- Lead Length: 1.44"
The data sheet assumes tungsten light source (color temp. 2856k), so I'm assuming a the graph demonstrates a gradual or subtitle light change. The graph measures voltage after incident light after 10 seconds. (that's a pretty long time) The pic appears to return values closer to .5 sec after event.
Typical Behavior There is a note about "light history conditions" (...cells exposed to light (100 to 500 lux) for one to two hours. --do the cells respond to "training"? -- test reflect an evening out of response to laser beam. test was twice terminated early due to waning laser power.
Pin Descriptions / Microcontroller Connections There are only 2 leads on the photocell: one to the pic (porta.0) and power. And a resister to ground and photocell pin to even out resistance values.
Testing for optimal pull-down resistor value: Serial data (DEC)
The 1k ohm yields the best range for the shop photocell. (the model # for photocell on hand in shop-?/ Jameco offers a small variety of resistor values in the photocell family.--not printed on device)
Application: Thru-Beam Sensor The photocell paired with a pointer laser makes a thru-beam sensor. The Thru-beam can be use to detect if a body has crossed into an area; a passing body interrupts the laser beam aimed at the photocell and the light intensity drops (resistance value of the photocell increases). The micro-controller is programmed to trigger an event when input from the photocell drops below a determined value.
That "a body has crossed a line" is not enough information to know if as event should be triggered: in a public space, most people will pass through and be on their way in less time than it takes to initiate an event.
In order to know (or come somewhere near knowing) if a person is lingering inside site boundaries a specific area needs to be isolated: possible path-ways a person might travel must be plotted; time (t) it takes a typical person to enter and exit the site (if they do not mean to stop) must to be estimated.
'set photocell pin for input 'if photocell goes low, trigger the relays ' make test LED HIGH if resistance drops (trigger event -- make array calculations) 'This is the initial test code for the Though-beam sensor. '3 things--: '1) photocell seems to acclimate to the intensity of the laser, ' electron activity falls off some.*see light history 'note above. ' intitial evaluation of "700 in DEC" would have to be lowered. '2) lasers bout in ChinaTown have a very short life span--10 minutes. (tried two types) '3) evaluating laser consistency burns out eye balls. define ADC_CLOCK 3 define ADC_BITS 10 Define ADC_SAMPLEUS 20 define osc 4 ADCvar var word PCell var porta.0 TestBlink var portc.4 output testblink ADCON1 = %10000010 TRISA = %11111111 Tx var portc.6 high testblink 'testblink 2 times --stop pause 200 low testblink pause 200 high testblink pause 200 low testblink pause 200 main: pcell = adcvar adcin 0, adcvar serout2 tx, 16468,["adcvar = ", dec adcvar, 10,13] pause 200 if adcvar > 700 then 'if photocell light is blocked and voltage drops- high testblink 'test light goes HIGH if beam is broken else low testblink endif goto main 'keep reading Pcell pin
An alternative to the through-beam would be video tracking: detecting change---moments of less change-- as incidents to trigger an event.)
Questions: A photoelectric device can be either intrinsic or extrinsic. In intrinsic devices, the only available electrons are in the valence band, and hence the photon must have enough energy to excite the electron across the entire bandgap. Extrinsic devices have impurities added, which have a ground state energy closer to the conduction band - since the electrons don't have as far to jump, lower energy photons (i.e. longer wavelengths and lower frequencies) are sufficient to trigger the device.
Is the Jameco photocell intrinsic or extrinsic? Would one fit this application better than the other? -