Shop OBEX P1 Docs P2 Docs Learn Events
Need to shutdown at night - CDS cell control — Parallax Forums

Need to shutdown at night - CDS cell control

GICU812GICU812 Posts: 289
edited 2008-07-20 08:00 in General Discussion
I have a time controlled camera project that runs on a AA and I really need to conserve power wherever possible. It doesnt take pictures in the dark, so I need a way to shutdown the controller at night. Ive got some CDS cells and transistors and a whole box of componets, I just dont know how to assemble them.

I dont know which way would be best, but·I could either pull the RESET line on the MC low when dark, or just to cut power to the controller. The controller is running off 3.3V

IIRC, a CDS cell has lower resistance in light so Im guessing maybe just a PNP transistor inline with the power line, and the CDS cell grounding the base? I just dont know how to work that in with the required support componets, it doesnt need a lot of adjustment, just off at or near dusk.

So can anyone help me here? It would be great if you could answer any questions I had once we have a basic design, so I can learn why it works, for future projects.
·

Comments

  • GICU812GICU812 Posts: 289
    edited 2008-07-16 23:38
    Ive been playing with it trying, Ive got a 2n3906 and a ?121EI? dunno what·the 121's·are, but both are PNP. What Im getting is more of an amplification effect, it doesnt shut off, wrong transistors?

    Post Edited (GICU812) : 7/16/2008 11:52:34 PM GMT
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2008-07-16 23:43
    You should find plenty of examples in the various parallax downloads - manuals and Nuts & Volts articles.
  • GICU812GICU812 Posts: 289
    edited 2008-07-16 23:52
    Yea you're right. I make a lot of posts like this, I ask a question and by the time I hit the submit button, Ive answered most of my questions. I'll look, but if anyone has advice or schems in the meantime, please let me know
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-17 00:11
    Why not "read" the photocell value with RCTIME?
  • GICU812GICU812 Posts: 289
    edited 2008-07-17 00:45
    Its not a stamp, its actually a TINY varaiant, Ive never messed with programming them.
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2008-07-17 01:01
    Plop this string into a Google search:

    CDS transitor light dark schematic

    [noparse]:)[/noparse])

    - Howard

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Buzz Whirr Click Repeat
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2008-07-17 01:03
    (Oops! It even works when transiStor is spelled wrong!)

    However smart Google may be,·it doesn't seem to answer this correctly·(yet):

    How do I make a million bucks drinking beer, sitting·in front of the Tube?

    rolleyes.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Buzz Whirr Click Repeat

    Post Edited (CounterRotatingProps) : 7/17/2008 1:08:40 AM GMT
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-07-17 13:56
    The BasicStamp manual explains how to do this without the need for the transistor, just resistors.

    How do you make a million bucks drinking beer and sitting in front of the tube? You don't, Budweiser makes the millions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It's sunny and warm here. It is always sunny and warm here.... (unless a typhoon blows through).

    Tropically, G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
  • RonPRonP Posts: 384
    edited 2008-07-17 18:09
    Try reversing a Darlington Aray. dont ask me how but it possible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Im not that bright and i can prove it.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-07-17 19:59
    Take a look at this link

    http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Wamv2_2.pdf

    Chapter #7: Measuring Light · Page 189

    Light Detector Test Parts
    (1) Photoresistor
    (1) Resistor – 220 Ω (red-red-brown)
    (1) Capacitor – 0.01 μF

    (1) Capacitor – 0.1 μF

    ' What's a Microcontroller - TestPhotoresistor.bs2
    ' Read photoresistor in RC-time circuit using RCTIME command.
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    time VAR Word
    DO
    HIGH 2
    PAUSE 100
    RCTIME 2, 1, time
    DEBUG HOME, "time = ", DEC5 time

    LOOP

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • GICU812GICU812 Posts: 289
    edited 2008-07-17 23:03
    Thats great, but im not using a Stamp in this project, and I dont have the knowlege to modify the code on the micro Im using.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-07-18 23:55
    If your asking us to provide code for the AVRtiny your asking the wrong forum. www.avrfreaks.net is a more appropriate place to ask for help with code for that microcontroller. I'm not trying to shoo you off, just trying to help you find the best place to get your question answered.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • GICU812GICU812 Posts: 289
    edited 2008-07-19 01:43
    No, I dont have the hardware or knowlege to reprogram the tiny, i'm looking for hardware to either pull the reset pin low, or cut power to the tiny.

    I think i'm onto something, I just havent had time to prototype it. My main problem so far is the circuits Ive found dont really pop on or off, there is a transistion period where the transistor is partially on, Im afraid this will damage the tiny
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-19 02:56
    photocell.jpg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Time·─ Space·─ Gravity·─ Darkness·─ Death
  • GICU812GICU812 Posts: 289
    edited 2008-07-19 05:23
    Looks good. A little more indepth than I had hoped (IC vs trans) but that looks like it should work. I think I wasted too much time trying to find a simpler (fewer componets) solution.

    I just tried one of the circuits I found on google, I thought it looked wrong, moronic was more like it, I told myself, theres no way this can work. Smoked a transistor, I should have listened to myself, haha.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-07-20 02:53
    PJ Allen

    Very Nice· idea.gif·I think i might use this as well

    For IC 1 Voltage Comparator will any one do·or what heve you used before

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 7/20/2008 2:58:31 AM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-20 04:57
    Use an LM339 quad comparator.· They're inexpensive.·

    You could configure any op-amp as a comparator, practically, but comparator IC's like the LM339·yield better "rail-to-rail" results.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-07-20 08:00
    GICU812,

    If you need to add hysteresis to your circuit, here is a simple modification to PJ Allen's design.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
    1005 x 807 - 93K
Sign In or Register to comment.