Shop OBEX P1 Docs P2 Docs Learn Events
example CDS sensor circuit — Parallax Forums

example CDS sensor circuit

KatyBriKatyBri Posts: 171
edited 2006-10-29 20:23 in BASIC Stamp
I need to interface a .3MOhm (dark) CDS sensor to a STAMP II pin.

Does anyone know where there is an example circuit with an adjustment pot to adjust the set-point? I've seen them before, but can't remember where. I would like the STAMP II pin to read a logic high when the CDS sensor is seeing light.

Thanks.

Post Edited By Moderator (Chris Savage (Parallax)) : 10/29/2006 4:29:44 AM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-29 04:01
    How about using RCTIME? Measure the resistance of the CDS sensor in approximately the light level you want and that's your minimum R with the maximum R being the 300K dark value. Parallel a fixed resistor of approximately the same value as your light level across the CDS sensor. Now you'll have a variable resistor from about 1/2 R-light to R-light. (From the PBasic manual) RCTIME units = 600 x R (in K) x C (in uF). Pick a value of C that gives you a maximum RCTIME unit of a couple of thousand or so. That gives you reasonable resolution, yet not an excessive amount of time. You'll need a 220 ohm resistor between the Stamp pin and the junction of C (to +5V) and R (to ground).

    Once you have this working, you can play with thresholds for the light levels you're interested in.
  • ForrestForrest Posts: 1,341
    edited 2006-10-29 04:03
    Chapter 7 of What's a Micontroller explains the use of a CDS light sensor www.parallax.com/detail.asp?product_id=28152
  • KatyBriKatyBri Posts: 171
    edited 2006-10-29 20:23
    To Mike Green and Forrest-

    Thanks very much for your replies and information. I now have enough information to complete the CDS sensor input to the STAMP II.
Sign In or Register to comment.