Shop OBEX P1 Docs P2 Docs Learn Events
Phototransistor + LM358 dual op-amp help — Parallax Forums

Phototransistor + LM358 dual op-amp help

G27ViperG27Viper Posts: 6
edited 2008-07-22 23:24 in Robotics
hello,

How do i hook up a phototransistor and a
LM358 dual op-amp for it to give me a reading
of 5 volts or more?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-07-22 21:35
    That's a pretty vague question. What is your overall objective?

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • G27ViperG27Viper Posts: 6
    edited 2008-07-22 21:41
    my objective is to sense light in the visible light spectrum
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-07-22 21:50
    Well, okay, what are you interfacing the output to? (You mentioned 5 volts or more as a goal.) What kind of response time do you need? Are you interested in reading an analog value, or is this just an on/off requirement?

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-07-22 21:54
    BTW, I now see you've asked the same question in the BASIC Stamp forum, too. Duplicate posts are against forum rules. While you still can, please delete your other post using the "X" button in its upper righthand corner.

    Thanks,
    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • G27ViperG27Viper Posts: 6
    edited 2008-07-22 22:12
    i want the output to go to my super carrier board and from what i heard i need at least 5 volts for the basic stamp program to reconize it

    - it is an on off requirement
    -i need a sum what fast response time ( under a second at least)
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-22 22:38
    You may not need an op-amp if your phototransistor is sensitive enough for your application. You connect the emitter of the phototransistor to ground (Vss) and the collector to a Stamp I/O pin. Connect a 10K resistor between the same Stamp I/O pin and +5V (Vdd). When the phototransistor is exposed to enough light, it will conduct enough to bring the I/O pin to under about 1.2V which the Stamp will see as LOW (or 0). When the phototransistor is in the dark, it won't conduct and the 10K resistor will "pull up" the I/O pin to roughly +5V which the Stamp will see as HIGH (or 1).
  • G27ViperG27Viper Posts: 6
    edited 2008-07-22 23:15
    i need it the other way around.
    when it is light i need it high
    when it is not light i need it low
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-22 23:24
    Why does that matter?· You can just as easily test for zero as you can for one in your program.· You can write "!INx" as well as you can write "INx" to get the opposite of the value of the I/O pin state.
Sign In or Register to comment.