Shop OBEX P1 Docs P2 Docs Learn Events
newbie question about wiring for phototcell — Parallax Forums

newbie question about wiring for phototcell

ArchiverArchiver Posts: 46,084
edited 2003-11-28 19:32 in General Discussion
could any one tell me how to wire a cadmium photocell, i've
looked at several web sites and books and i have seen different
ways to do this but i can't seem to get it to work. any help would
be appreciated. thanks in advance.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-11-27 03:08
    There are many possible ways. One nice way with the Stamp is to look at the
    RCTime command in the Stamp manual and hook up the CdS cell as though it
    were a variable resistor. Then use RCTime to read the value of the cell.

    If you want an on/off you can then compare the value from RCTime against a
    threshold.

    There are ways to make it a digital output, but RCTime would be easier.

    Hope that helps.

    Regards,

    Al Williams
    AWC
    * Easy RS232 Prototyping: http://www.al-williams.com/rs1.htm




    >
    Original Message
    > From: jsteff74 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=TOwLOgfutHwTvw4J7nTW3f9RBLAJziNHUeJH0s79pgOpB7SaPxOiVNbU2tXbbgEEuaiR4AKR-7n7ldMF]jsteff74@y...[/url
    > Sent: Wednesday, November 26, 2003 6:46 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] newbie question about wiring for phototcell
    >
    >
    > could any one tell me how to wire a cadmium photocell, i've
    > looked at several web sites and books and i have seen different
    > ways to do this but i can't seem to get it to work. any help would
    > be appreciated. thanks in advance.
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    > Subject and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-11-27 22:09
    jsteff74 wrote:
    > could any one tell me how to wire a cadmium photocell, i've
    > looked at several web sites and books and i have seen different
    > ways to do this but i can't seem to get it to work. any help would
    > be appreciated. thanks in advance.

    A cadmium photocell is basically a variable resistor that
    changes it's resistance according to light levels. It's often
    wired as half of a voltage divider or sometimes a current
    limiter... so there are various ways to use it depending on what
    you want to do. You could use it as a voltage divider and
    measure '1' or '0' directly at a stamp pin, or add an ADC and
    measure a finer granularity, or even use it to charge a cap and
    measure that with RCTIME - just depends on exactly what you want
    to do.

    Michael
  • ArchiverArchiver Posts: 46,084
    edited 2003-11-28 19:32
    al,
    thanks for the help. i used the wiring diagram in the
    book and instead of getting a reading for the light in
    the room, i get a reading of 1. that number only
    increases if i touch the photocell. it does not
    respond to changes in the ambient light. do you know
    what might be causing this? i tried downloading the
    rctime program to two different bs2 and i get the same
    results. i have to admit that i have limited knowledge
    about most of this, i am an artist and i am trying to
    learn as i go. so thanks again for your help.
    jared


    --- Al Williams <alw@a...> wrote:
    > There are many possible ways. One nice way with the
    > Stamp is to look at the
    > RCTime command in the Stamp manual and hook up the
    > CdS cell as though it
    > were a variable resistor. Then use RCTime to read
    > the value of the cell.
    >
    > If you want an on/off you can then compare the value
    > from RCTime against a
    > threshold.
    >
    > There are ways to make it a digital output, but
    > RCTime would be easier.
    >
    > Hope that helps.
    >
    > Regards,
    >
    > Al Williams
    > AWC
    > * Easy RS232 Prototyping:
    > http://www.al-williams.com/rs1.htm
    >
    >
    >
    >
    > >
    Original Message
    > > From: jsteff74 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nQFdlIqjX1DEf7X_vvXiFtNGHpmVNqVFqwUuoYaUmuG4UdF7zepwQmKmw96u9OqxG179i-lVAvw]jsteff74@y...[/url
    > > Sent: Wednesday, November 26, 2003 6:46 PM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] newbie question about
    > wiring for phototcell
    > >
    > >
    > > could any one tell me how to wire a cadmium
    > photocell, i've
    > > looked at several web sites and books and i have
    > seen different
    > > ways to do this but i can't seem to get it to
    > work. any help would
    > > be appreciated. thanks in advance.
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed.
    > Text in the
    > > Subject and Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
    > >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed.
    > Text in the Subject and Body of the message will be
    > ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    __________________________________
    Do you Yahoo!?
    Free Pop-Up Blocker - Get it now
    http://companion.yahoo.com/
Sign In or Register to comment.