Creative Commons images are CC BY-NC-SA 3.0

1.50

added to your
shopping cart

quantity
In stock 658 in stock
1.50 1+ units
1.35 10+ units
1.20 100+ units

Description: This is a very small light sensor. A photocell changes (also called a photodetector, photo resistor, CdS or photoconductive cell) resistance depending on the amount of light it is exposed to. These little sensors make great ambient light triggers (when light in the room turns on, do something).

Features:

  • Light resistance : ~1k Ohm
  • Dark resistance : ~10k Ohm
  • Max voltage : 150V
  • Max power: 100mW

Dimensions:

  • 2 x 4 x 5mm
  • 4mm between pins
  • 31mm lead length

Documents:

Comments 35 comments

  • Remember that the response time on these is very long, somewhere in the 50-100ms range, so it’s difficult to use them for transient events (like, say, laser triplines).

    • It depends on what the trip wire is connected to. If all you want is a siren to go off a 100ms delay isn’t bad given the simplicity of a photocell; If you’re making a trap door or some other time sensitive device then yeah every millisecond counts!

    • I’m not so sure- I’m using these for a laser tag project, and they work excellently for transient lasers.

  • I use these on several projects and they are lots of fun. Of course, SparkFun.com just started selling them so I couldn’t get them here yet. I’m glad to see them available.
    I first used them for an automatic blinds project to detect when morning comes. I’ve also used them to detect lines on a line following robot. I know that the combo IR emitter detectors work better but at this price it is worth paying for just to see if it will work for your purposes. I was able to simply connect this with a 10k resistor as a resistor divider to an ADC pin. I then was able to reliably use it to detect a ½" solid black line pretty reliably.

    • Hey Tinkerish, I was checking out your blog and would love to see the documentation for that blinds project if you get a chance.

  • Here’s a tutorial on using this sensor with the Arduino.

  • I used a bunch of these (20K ohm, I think) to measure boxes; see http://www.weasure.com

  • What would be the lightest microcontroller to control this? I want some night time light activation. Need super light weight.

    • If you’re willing to go AVR, attiny85 might fit your bill. I remember it having an ADC/ADMUX, but always check the datasheet.

  • Are they polarity sensitive?

  • Hi! I was going to measure my mechanical camera’s shutter speed with this and a laser and a 555 timer. I was wondering how practical that is. The response time and the decay time are within 10 ms of each other (not sure how accurate and how repeatable that is) according to a random web datasheet for the GL5528. If I subtract 10 ms from all my results, I should be fine, I guess?

  • I just used one to automatically adjust the backlight on an LCD module connected to an Arduino. Made a voltage divider, connected the center to an analog input, scaled the value based on empirical observations, and used a PWM output pin connected to the LCD backlight. Cheap, easy, works like a charm. When ambient light is bright, the backlight is full-on, and in the dark, the backlight is (almost) full-off.

  • FYI: The resistance values posted above do not reflect the values of the device I received. On my photocell Light ~ 9.76K Ohms and Dark ~ 64.2K Ohms. Other than that it works like a champ.

  • Is this the same photocell used in the Terror-Min?

  • Hi! Is it possible to “invert” the sensor: as in when there is little light, something turns on, and while there is light, nothing happens. I want to use the sensor to turn on LEDs when it starts to get dark outside.

    • You could implement that easily in the code for your microcontroller. The light sensor itself can’t be ‘inverted’, but you could simply code it so as the amount of light sensed decreases, the number of LEDs turned on increases.

      • Thanks for the reply Toni. As I want to utilize the photocell in a garment, can the photocell be washed? And will the photocell’s detection of light/lack of light be affected by being covered in a transparent or bright material? As I am a newbeginner, the specifications in the datasheet do not lead my to any conclusion on those matters. Thanks.

        • If you are looking to use this in a garment, I would recommend you check out the Lilypad Light Sensor. These boards are designed specifically for e-textile applications. Covering the sensor will affect the detection of light, though if you are using a transparent material, it shouldn’t affect it too strongly.

  • For anyone wondering how low these can go, I put one right on the light in my desk(it’s super bright) and it went down to ~120 ohms

    Also, I put one in my mouth(only place I could think of where I’m positive there no light being produced, I hope these are RoHS compliant) and it got up to ~1.7 MOhms

    • For your next test, use a better testing area like… where the sun.. err… does not shine?….. I bet theres not light there either.

      Only then we will know how low you can go…. (Pun? … yeah, 100%)

      (sorry… it was to easy to let it go)

  • Works perfectly for black on white line sensing. on the one i got the light resistance was about 1K and the dark was about 40K. i had a idea for these awhile back, if you take three of these and cover them in color filters so one only senses either red, blue, or green, you could make a real cheap analog color sensor. What does everyone think of this idea?

    • It sounds pretty darn cool, mon! Do it! Worth the money even if it doesn’t work, ‘cause you’ll learn something either way. It wouldn’t be very accurate, but you could write some code that would print “Red” or “Yellow” to a serial monitor.

    • I just had a brilliant idea that would let me dump all the AVRs and stuff out of my line-following robot!!
      So I would have two motors for moving, right? Then I could use 2 power transistors such as TIP20s with a pair of these, and when the bot veered right enough that the left CdS detected black, the transistor would limit the current to the left motor and the bot would turn left back onto the line!
      Whaddaya think?

      • I really wanna know if this would work! Thanks!

        • If you look at the datasheet, the peak sensitivity is in the green region (540nm), so I don’t think these are well suited for RGB. However you can actually get colored LEDs to respond to light input, that might be worth a shot.

          • I meant, would my idea work. Thanks for tossing out an answer though, because other people probably want to know.
            Cheers

            • Since you were responding to Klone38’s RGB idea, that’s what I was responding to as well. But in response to your idea, sure, people were making robots long before computers with these kind of sensor-feedback systems. You might need to throw an op-amp or two in there to tune the photocell response to what your transistors want to see, but yes it can be done. Google Mark Tilden for lots of clever ideas.

              • Thanks! Awesome!

                • I did that as a high school project a while back and it did work but was a a bit sluggish when the difference in light levels were comparable. I didn’t use any op-amps and it seemed to work fine but in retrospect they seem to a good idea.

    • These things aren’t too good at detecting blue light, but its worth a shot.

  • Anyone know the solderability of this component?

  • Could someone please comment on the time delay? How repeatable//stable/linear is the resistance?


Related Products