# How fast is a photo-resistor?

**URL:** <https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162>\
**Category:** Factual Questions\
**Created:** [January 27, 2011, 10:03am UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162 "2011-01-27T10:03:01Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pann](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@Pann](https://boards.straightdope.com/u/Pann)\
**Post date:** [January 27, 2011, 10:03am UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/1 "2011-01-27T10:03:01Z")

</div>

Ok, this is one of those obscure questions that if it were asked of 100 average people, 100 of those people probably wouldn’t know. So I turn to the Dope, because I’m sure someone here knows the answer.

I’m building a project that involves using photoresistors to detect the brightness and angle of a light. I’ve programmed it to take a reading of the ambient light when it is first powered up before the light is turned on so I can compensate for any background lighting.

This works well until the ambient light changes. The sun comes out from behind a cloud, the sun goes behind a cloud, someone with a white shirt walks in front of the sensors, etc. Anytime the ambient light changes it plays hell with my readings and I have to reboot.

I’m thinking of turning off the light every 1 second or so and recalibrating based on the ambient light at that second, then turning back on the light.

Now for the question: How much time would it take to do this? Would the photoresistor be able to accurately read the ambient light the instant the light is turned off, or would it take some time for the resistance to change?

I would like to be able to turn the light off and then back on so quickly that it is hardly detectable by human eyes. But if the photoresistor can’t adjust that fast, I can turn the light off for a longer amount of time.

Any knowledge in this area would be appreciated.

---

<div class="post-metadata">

**Author:** ![Squink](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Squink](https://boards.straightdope.com/u/Squink)\
**Post date:** [January 27, 2011, 11:10am UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/2 "2011-01-27T11:10:40Z")

</div>

Your basic cadmium sulfide photo-resistor is a slow beast. It’ll take [a tenth of a second or so](http://www.electronicsarea.com/photoresistor.asp) to recognize a change in light intensity.  
If you need speed, go with a [photodiode](http://en.wikipedia.org/wiki/Photodiode).

---

<div class="post-metadata">

**Author:** ![MobiusStripes](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@MobiusStripes](https://boards.straightdope.com/u/MobiusStripes)\
**Post date:** [January 27, 2011, 12:42pm UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/3 "2011-01-27T12:42:04Z")

</div>

Are you accepting alternate solutions from unqualified posters?

My thought: time average the input. Don’t look at a single momentary reading, just the average over the last 5 minutes (or whatever time period works best for you). That should eliminate the spikes that are fouling up your reading.

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [January 27, 2011, 1:26pm UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/4 "2011-01-27T13:26:31Z")

</div>

As **Squink** said, photoresistors are fairly slow to react. Also, even though you can cut power to your light fairly quickly, it won’t stop emitting light immediately. How long it continues to emit light depends on what type of light you are using. You may need to rather noticeably interrupt your light source for this to work reliably.

Ambient light generally doesn’t change too quickly. I think what you need here isn’t speed, but instead I think you need a second photoresistor just to detect the ambient light. Can you orient a second photoresistor so that it catches the ambient light without picking up the light you are trying to measure (or any reflections of it off of nearby walls or objects)?

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [January 27, 2011, 1:30pm UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/5 "2011-01-27T13:30:35Z")

</div>

What about a photovoltaic cell? Reason I suggest this is that I saw a prototype anti-collision device for light planes a number of years ago, and surprisingly, it used an array of small solar cells (yes) as the detectors - it worked by detecting the flashing wing lights from other aircraft, in daylight (so it was reacting to very small, very rapid changes in incident light).

---

<div class="post-metadata">

**Author:** ![johnpost](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@johnpost](https://boards.straightdope.com/u/johnpost)\
**Post date:** [January 27, 2011, 1:58pm UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/6 "2011-01-27T13:58:37Z")

</div>

as suggested use one (or more) sensor for only ambient light, it is the easy way. it is the answer that came to mind as i read your OP.

---

<div class="post-metadata">

**Author:** ![Pann](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@Pann](https://boards.straightdope.com/u/Pann)\
**Post date:** [January 27, 2011, 4:38pm UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/7 "2011-01-27T16:38:16Z")

</div>

> [@Squink](#):
>
> Your basic cadmium sulfide photo-resistor is a slow beast. It’ll take [a tenth of a second or so](http://www.electronicsarea.com/photoresistor.asp) to recognize a change in light intensity.  
> If you need speed, go with a [photodiode](http://en.wikipedia.org/wiki/Photodiode).

Thank you. Turning off the light for 2/10th’s of a second or so and recalibrating will definitely work for my application.

> [@engineer\_comp\_geek](#):
>
> As **Squink** said, photoresistors are fairly slow to react. Also, even though you can cut power to your light fairly quickly, it won’t stop emitting light immediately. How long it continues to emit light depends on what type of light you are using. You may need to rather noticeably interrupt your light source for this to work reliably.
> 
> Ambient light generally doesn’t change too quickly. I think what you need here isn’t speed, but instead I think you need a second photoresistor just to detect the ambient light. Can you orient a second photoresistor so that it catches the ambient light without picking up the light you are trying to measure (or any reflections of it off of nearby walls or objects)?

My first thought of how to solve this was also another photoresistor. Unfortunately this proved to be ineffective because small changes in the background lighting skew my reading and a photoresist or oriented away from the light I need to detect won’t pick this up. For example, someone with a white shirt walks by and the amount of light received is increased.

> [@Mangetout](#):
>
> What about a photovoltaic cell? Reason I suggest this is that I saw a prototype anti-collision device for light planes a number of years ago, and surprisingly, it used an array of small solar cells (yes) as the detectors - it worked by detecting the flashing wing lights from other aircraft, in daylight (so it was reacting to very small, very rapid changes in incident light).

I would love to use something more elaborate than photoresistors, but they are the only thing I have laying around. This is one of those projects that I’m building just because the idea hit me and no other reason. Photoresistors are the only thing I have that will detect light. I would most likely lose interest by the time I ordered a photo-diode or a photovoltaic cell and waited for it to arrive.  
Anyway, thanks for the answers and suggestions everyone. I’m going to reprogram to shut the light down for about 1/4 second, long enough for the light to completely stop emitting and the photo-resistor to adjust.

---

<div class="post-metadata">

**Author:** ![Kevbo](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@Kevbo](https://boards.straightdope.com/u/Kevbo)\
**Post date:** [January 27, 2011, 7:08pm UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/8 "2011-01-27T19:08:30Z")

</div>

> [@Squink](#):
>
> Your basic cadmium sulfide photo-resistor is a slow beast. It’ll take [a tenth of a second or so](http://www.electronicsarea.com/photoresistor.asp) to recognize a change in light intensity.  
> If you need speed, go with a [photodiode](http://en.wikipedia.org/wiki/Photodiode).

Hmm. In a former life, I became a hero when I fixed a problem in a circuit using these because they were responding to 120Hz ripple from the ambient florescent lighting. I’d say the response time constant is a few milliseconds, not hundreds.

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [January 27, 2011, 7:31pm UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/9 "2011-01-27T19:31:33Z")

</div>

> [@Pann](#):
>
> I would love to use something more elaborate than photoresistors, but they are the only thing I have laying around. This is one of those projects that I’m building just because the idea hit me and no other reason. Photoresistors are the only thing I have that will detect light. I would most likely lose interest by the time I ordered a photo-diode or a photovoltaic cell and waited for it to arrive.

If you’ve got any of those old transistors that are in a little glass capsule covered by a metal can (they look like the OC201 on [this](http://www.wylie.org.uk/technology/semics/Mullard/Mullard.htm)page), you can often pop off the can and they will be very responsive to light

Alternatively, any transistor in a metal can will do the same, if you very carefully cut the top of the can off with a junior hacksaw.

---

<div class="post-metadata">

**Author:** ![scr4](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@scr4](https://boards.straightdope.com/u/scr4)\
**Post date:** [January 27, 2011, 7:38pm UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/10 "2011-01-27T19:38:25Z")

</div>

> [@Pann](#):
>
> Photoresistors are the only thing I have that will detect light. I would most likely lose interest by the time I ordered a photo-diode or a photovoltaic cell and waited for it to arrive.

Do you have any LEDs lying around? They are basically photodiodes, and can be used to [detect light](http://en.wikipedia.org/wiki/LED_circuit#LED_as_light_sensor).

---

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [January 28, 2011, 5:07am UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/11 "2011-01-28T05:07:02Z")

</div>

You say you’re detecting a “light.” What kind of light?

---

<div class="post-metadata">

**Author:** ![Leo\_Bloom](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/leo_bloom/32/10377_2.png) [@Leo\_Bloom](https://boards.straightdope.com/u/Leo_Bloom)\
**Post date:** [January 29, 2011, 11:37pm UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/12 "2011-01-29T23:37:53Z")

</div>

Hijack/  
Same question, but re the human eye?  
/

---

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [January 29, 2011, 11:49pm UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/13 "2011-01-29T23:49:29Z")

</div>

If you want to detect a specific light source while minimizing noise and interference from extraneous sources, the best approach is to modulate the light source, and design the receiver to detect the modulation. Sort of like a lock-in amplifier. There are \*many \*modulation techniques. I would need more info to provide a recommendation.

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [January 31, 2011, 3:35am UTC](https://boards.straightdope.com/t/how-fast-is-a-photo-resistor/569162/14 "2011-01-31T03:35:37Z")

</div>

> [@Leo\_Bloom](#):
>
> Hijack/  
> Same question, but re the human eye?  
> /

Somewhere in the neighborhood of 50 ms or so. It varies a bit from person to person.
