Shop OBEX P1 Docs P2 Docs Learn Events
Scribbler wheel encoder (NPN question) — Parallax Forums

Scribbler wheel encoder (NPN question)

BergamotoffBergamotoff Posts: 20
edited 2007-12-14 17:26 in General Discussion
Just to double ckeck - ITR9904 "OPTO INTERRUPTER"

To interface this device to Basic Stamp 2 I'm going to connect it's leads liek that (see picture attached)

1 - to 470ohm resistor and +5V
2 - to gnd
3 - to BS2 i/o port
4 - +5V

Will it work?
175 x 185 - 4K

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-12-14 17:26
    You will also need a resistor from (3) to ground (if there isn't already one in the Scribbler — you didn't mention which BS2 pin) to pull that pin down when the phototransistor is not receiving light. The optimum value will have to be determined through experimentation. I'd start with 4.7K.

    -Phil
Sign In or Register to comment.