QTI Line sensor

From RoboWiki
Revision as of 21:58, 4 August 2009 by Balogh (talk | contribs) (New page: This page describe how to use Parallax QTI Line Sensor. 200px We will use this [http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/qti/List/0/SortFie...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page describe how to use Parallax QTI Line Sensor.


QTIsensor.jpg

We will use this QTI Sensor by the Parallax Inc. as a line following sensor. The sensor is available also in set of four sensors together with mounting material for the complete task, see the QTI Line Follower AppKit for the Boe-Bot.

Please, read the following documentation before You start:

Schematic diagram of the connection type 1 (analogue)

QTIsensorAnalogSchematic.png


Demonstration program for the analogue readings:

' -----[ Title ]----------------------------------------------------------------
' Line Sensor Test

' {$STAMP BS2}
' {$PBASIC 2.5}

' -----[ I/O Definitions ]------------------------------------------------------

LineSnsrPwr   CON 10       ' line sensor power
LineSnsrIn    CON  9       ' line sensor input

' -----[ Variables ]------------------------------------------------------------

Sense         VAR Word     ' sensor raw reading


' -----[ Main Code ]------------------------------------------------------------

Read_Sensor:

  HIGH LineSnsrPwr                   ' activate sensor
  HIGH LineSnsrIn                    ' discharge QTI cap
  PAUSE 1                            ' wait until stable
  RCTIME LineSnsrIn, 1, Sense        ' read sensor value
  LOW LineSnsrPwr                    ' deactivate sensor

Display:

  DEBUG HOME
  DEBUG "Sensor ", CR
  DEBUG "-----", CR
  DEBUG DEC Sense, CLREOL
  PAUSE 100

GOTO Read_Sensor

...and its operation

QTIscreenA.png

Schematic diagram of the connection type 2 (digital only)

QTIsensorDigitalSchematic.png

Demonstration program for the analogue readings:


...and its operation

QTIscreenD.png