Shop OBEX P1 Docs P2 Docs Learn Events
cadmium sulfide photocell on with light? — Parallax Forums

cadmium sulfide photocell on with light?

mikeamikea Posts: 283
edited 2015-03-01 06:15 in Accessories
Hi, I'm making a night light and have some photocells from radio shack. Physically they look the same as the pictures I've seen on the web, but I can't find a datasheet. The resistance go down as light intensity increases, which is opposite from what I need. I've checked it with ohm meter unconnected to a circuit. Did I buy a bad one or are there photocells that work each way(on with light)?

Comments

  • kwinnkwinn Posts: 8,697
    edited 2015-02-28 12:36
    mikea wrote: »
    Hi, I'm making a night light and have some photocells from radio shack. Physically they look the same as the pictures I've seen on the web, but I can't find a datasheet. The resistance go down as light intensity increases, which is opposite from what I need. I've checked it with ohm meter unconnected to a circuit. Did I buy a bad one or are there photocells that work each way(on with light)?

    Nope, it's not bad. That's the way way they work. You need some additional circuitry to have it turn a light on. Exactly what sort of circuit depends on the voltage the light is powered by and the type of light (led, inc. bulb, fluorescent, etc).
  • mikeamikea Posts: 283
    edited 2015-02-28 12:53
    Thanks for the response. It's a 5 mm through hole led, resistor , 9 volt battery...night light. Sounds like I need a way to run the circuit and have the the added current from the photocell turn it off when it's active.
  • mikeamikea Posts: 283
    edited 2015-02-28 13:33
    Is there a simple way to turn the circuit off with a photocell, without using a normally closed relay?
  • Hal AlbachHal Albach Posts: 747
    edited 2015-02-28 15:34
    A possible solution;
    Since you are just driving an led the circuit can be just a voltage divider triggering a logic level mosfet to drive the led. The voltage divider consists of the CDS cell from ground through a 5K or so resistor to +9. The gate of the N channel mosfet to the divider junction. Source to ground, drain through a suitable resistor to the led to +9. When light shines on the CDS the resistance drops to a low value, pulling the gate towards ground and mosfet stays off. With the CDS dark the resistance rises and allows the upper resistor to pull the gate up past the trigger threshold and the mosfet turns on and the led lights up. You may have to play with size of the upper resistor to establish the trip point.




    cds.bmp
    cds.bmp 39.2K
  • ercoerco Posts: 20,256
    edited 2015-02-28 17:25
    mikea wrote: »
    Hi, I'm making a night light and have some photocells from radio shack. ... The resistance go down as light intensity increases, which is opposite from what I need. .... Did I buy a bad one ?

    You could always try returning them to Radio Shack... Save your receipts, Nyuk, nyuk!

    Sorry, I couldn't resist. Per other commenters, they are functioning properly, and you need additional circuitry to get the action you want. I'm sure you know that even dollar stores have photoelectric nightlights that operate as you describe, but presumably you are in it for a learning experience. Good on ya. See http://www.electronics-tutorials.ws/io/io_4.html
  • mikeamikea Posts: 283
    edited 2015-03-01 04:59
    I have a mosfet that will work in the basement so I can get back to it without waiting for the mailman to bring some phototransistors. Thanks for the help guys.
  • kwinnkwinn Posts: 8,697
    edited 2015-03-01 06:15
    I would suggest using a 555 timer chip to turn the led on and off. It can handle the voltage and current involved, has the comparators and flip-flop needed, and is very inexpensive.
Sign In or Register to comment.