Shop OBEX P1 Docs P2 Docs Learn Events
How to use the S.S.I.R. Sensor? — Parallax Forums

How to use the S.S.I.R. Sensor?

zhiyezhiye Posts: 2
edited 2007-12-14 22:21 in BASIC Stamp
I am making a simple system with the Parallax S.S.I.R. sensor, and I have been trying to figure out how it works. First I used PULSIN to read the pulse width of the signal from this IR sensor, but the data was not stable at all, even when there's nothing blocking the sensor, the pulse width will still change dramatically. And then I tried to compute the ratio of 1s and 0s of in each second, but the ratio doesn't change much even though I move my hands closer and further in front of the sensor. So have anybody used this IR sensor before? How does it work?

This kind of sensor is called Stephen Swanson Infrared Sensor from Parallax. I am not sure if they still sell this, but I really need some help. Thanks!


Zhiye

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-14 20:22
    If this is the sensor you have (www.parallax.com/Store/Sensors/ObjectDetection/tabid/176/CategoryID/51/List/0/Level/a/ProductID/83/Default.aspx?SortField=ProductName%2cProductName), there are links on the page for documentation and sample programs.
  • zhiyezhiye Posts: 2
    edited 2007-12-14 20:36
    Thanks, but it is not the sensor I have. The one I have can not be found on Parallax website anymore and it's called S.S.I.R sensor with the part number #28019

    There is a piece of paper that came with each of these sensors, but I didn't get enough information from it. On this document, the sample code for this sensor is as follow:

    DIR0 = 1
    Holdbit VAR BIT

    Start:

    Freqout 0, 1, 38500
    Holdbit = in0

    DEBUG 1, "sensor = ", DEC Holdbit, CR

    GOTO Start


    The code above sends a 1ms burst to the sensor and get a 1bit output immediately, which still confuses me a lot about how this sensor really works.
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-12-14 22:07
    Your in luck!· I happened to copy all the info about the SSIR before Parallax discontinued it.· it works pretty much the same way that the IR sensors work on the BOEbot, but it uses only one pin to trigger the IR emmitter, then switches the pin to an input to be able to read the IR detector.· What specific questions did you have?


    Post Edited (Steve Joblin) : 12/14/2007 10:12:07 PM GMT
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-12-14 22:21
    It turns out, the IR Detector device will 'hold' its signal low for a while after the FREQOUT has actually turned off. Thus, if you try to read the value of the pin immediatly after you did the FREQOUT, if the detector WAS detecting the 38 Khz signal, you'll get a 'low' back for a little bit.

    The code you're showing doesn't seem to turn the "zero" pin into an input -- unless the "IN0" name does that for you. Also, I find a 10Kohm 'pull-up' resistor insures there's a nice solid 'one' to read, when the detector isn't "pulling" the signal down.
Sign In or Register to comment.