28015 Parallax Inc, 28015 Datasheet - Page 8
![Optical Sensor Development Tools PING))) DISTANCE SENSOR ULTRASONIC](/photos/16/0/160001/28015-l_sml.jpg)
28015
Manufacturer Part Number
28015
Description
Optical Sensor Development Tools PING))) DISTANCE SENSOR ULTRASONIC
Manufacturer
Parallax Inc
Series
PING)))™r
Datasheet
1.28015.pdf
(12 pages)
Specifications of 28015
Operating Voltage
5 V
Operating Current
30 mA
Maximum Operating Temperature
+ 70 C
Minimum Operating Temperature
0 C
Description/function
Proximity Sensor
Sensing Distance
0.787" ~ 118.110" (20mm ~ 3m) ADJ
Sensor Type
UltraSonic
Sensing Object
Metallic and Non-Metallic
Response Frequency
40kHz
Material - Body
-
Shielding
Unshielded
Voltage - Supply
5V
Output Type
Pulse Output
Terminal Type
3-Wire
Package / Case
3-SIP
For Use With/related Products
Basic Stamp
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Part Number:
28015
Manufacturer:
PARALLA
Quantity:
20 000
Propeller Microcontroller
{{
***************************************
*
*
* Author: Chris Savage & Jeff Martin *
* Started: 05-08-2006
***************************************
Interface to Ping))) sensor and measure its ultrasonic travel time. Measurements can be in
units of time or distance. Each method requires one parameter, Pin, that is the I/O pin that
is connected to the Ping)))'s signal line.
--------------------------REVISION HISTORY--------------------------
}}
CON
PUB Ticks(Pin) : Microseconds | cnt1, cnt2
''Return Ping)))'s one-way ultrasonic travel time in microseconds
PUB Inches(Pin) : Distance
''Measure object distance in inches
PUB Centimeters(Pin) : Distance
''Measure object distance in centimeters
PUB Millimeters(Pin) : Distance
''Measure object distance in millimeters
Copyright © Parallax Inc.
v1.1 - Updated 03/20/2007 to change SIG resistor from 10K to 1K
┌───────────────────┐
│┌───┐
││ ‣ │ PING))) │ ‣ ││
│└───┘
│
└─────┬───┬───┬─────┘
TO_IN = 73_746
TO_CM = 29_034
outa[Pin]~
dira[Pin]~~
outa[Pin]~~
outa[Pin]~
dira[Pin]~
waitpne(0, |< Pin, 0)
cnt1 := cnt
waitpeq(0, |< Pin, 0)
cnt2 := cnt
Microseconds := (||(cnt1 - cnt2) / (clkfreq / 1_000_000)) >> 1
Distance := Ticks(Pin) * 1_000 / TO_IN
Distance := Millimeters(Pin) / 10
Distance := Ticks(Pin) * 10_000 / TO_CM
(C) 2006 Parallax, Inc.
GND +5V SIG
│ │
└┘
Ping))) Object V1.1
1K
└ Pin
┌───┐│
└───┘│
│
Connection To Propeller
Remember PING))) Requires
+5V Power Supply
PING))) Ultrasonic Distance Sensor (#28015)
*
*
*
' Inches
' Centimeters
' Clear I/O Pin
' Make Pin Output
' Set I/O Pin
' Clear I/O Pin (> 2 μs pulse)
' Make I/O Pin Input
' Wait For Pin To Go HIGH
' Store Current Counter Value
' Wait For Pin To Go LOW
' Store New Counter Value
' Distance In Inches
' Distance In Centimeters
' Distance In Millimeters
' Return Time in μs
v1.5 2/15/2008 Page 8 of 12