Shop OBEX P1 Docs P2 Docs Learn Events
Photo resistor/servo — Parallax Forums

Photo resistor/servo

frosliefroslie Posts: 67
edited 2011-04-16 14:42 in BASIC Stamp
Please help!

I need to do something simple and do not have my resources (books) in town.

I would like to use four photoresistors I have to read light patterns on a tv and then use that information to control four servo motors.

can anyone tell me how to execute this.

thanks so much

Comments

  • frosliefroslie Posts: 67
    edited 2005-12-03 21:32
    I am not sure if I should re-word this question as I have not gotten any response.

    It may help if I could just understand how to control a photo resistor - any information would be helpful.
  • TiboTibo Posts: 81
    edited 2005-12-03 22:45
    well, a photo resistor is a resistance.
    You dont control it, you measure it.

    There are various ways, usually a RC time (resistance/condensator/time) circuit to measure the delay a condensator takes to empty through the resistance with the basic stamp.
    Google 'RC time', and also use the forum search engine to get infos on it.

    I dont understand what you mean by : I have to read light patterns on a tv and then use that information to control four servo motors.
    How are the patterns ? How do the servos shall react ?
    ++
  • JonathanJonathan Posts: 1,023
    edited 2005-12-03 23:10
    Fros,

    Be patient! Sunday is a slow day smile.gif

    A CDS type photoresistor changes resistance with light. The easiest way to interface it with a Stamp is to use it in a "voltage divider". You should google for the definition, but basically you take another resistor, say a 10K, and connect it like my lame ascii art below.




    VDD
    CDS Cell
    |
    /\/\/\/\-- 10K
    VSS

    The point in the center is the divided voltage. This voltage will vary with the amount of light. Now to interface that voltage to the stamp, as was mentioned above, you can use the RCTIME command to measure it. Depending on what you need, that may work fine. If you need to measure very small changes in light intensity, you will want an ADC (analog to digital converter). I like the TLC2543.

    Also as noted above, the more you tell us about what you want to do, the more we can help.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • frosliefroslie Posts: 67
    edited 2005-12-03 23:11
    thanks


    As the stamp measures variation in light pattern created on the television monitor - it will change the speed or direction in a corresponding servo.
  • frosliefroslie Posts: 67
    edited 2005-12-03 23:15
    I like the ascii.

    anyway, thank you, I will google the info- did not mean to seem impatient.
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2005-12-03 23:57
    Careful with the static electricity buildup on the tv/monitor. Some CdS cells have exposed metal pins that can
    act like an antenna for picking up the static electricity which can damage your electronics in a hurry. You might
    consider using a photo transistor rather than a photo resistor. You should also consider filtering the 60Hz/70Hz
    produced by your tv/monitor.

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

    IC Layout Engineer
    Parallax, Inc.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-04-16 06:31
    Wow, here's another "Reply" to a Subject that
    dropped carrier ages ago, this one lasted 5 1/2 years.
    Fascinating.
  • FranklinFranklin Posts: 4,747
    edited 2011-04-16 11:11
    So why do it then?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-04-16 13:29
    The "mod" omitted the digger's post but not so mine.

    PE - Gonner teaches me a lessin, 'e is.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-04-16 14:42
    The other poster was probably the same spammer that dropped non sequiturs in several other ancient threads. But, hey, maybe it's not so bad to have old threads revived occasionally. 'Keeps the pot stirred.

    -Phil
Sign In or Register to comment.