پینگ ))) برد یاب اولتراسونیک از Parallax است. فاصله نزدیکترین جسم در جلوی سنسور را تشخیص می دهد (از 2 سانتی متر تا 3 متر). این کار با ارسال یک انفجار اولتراسوند و گوش دادن به پژواک زمانی که از یک جسم خارج می شود، کار می کند.
برد آردوینو یک پالس کوتاه برای شروع تشخیص ارسال می کند، سپس با استفاده از تابع pulseIn() به یک پالس روی همان پین گوش می دهد . مدت زمان این پالس دوم برابر با زمانی است که اولتراسوند برای حرکت به جسم و بازگشت به حسگر صرف می کند. با استفاده از سرعت صوت می توان این زمان را به فاصله تبدیل کرد.
جریان
پایه 5 ولت PING))) به پایه 5 ولت آردوینو، پایه GND به پایه GND و پایه SIG (سیگنال) به پایه دیجیتال 7 در آردوینو متصل است.
تصویر با استفاده از Fritzing ایجاد شده است . برای نمونه مدارهای بیشتر، صفحه پروژه فریتزینگ را ببینید
شماتیک:
کد
/* Ping))) Sensor This sketch reads a PING))) ultrasonic rangefinder and returns the distance to the closest object in range. To do this, it sends a pulse to the sensor to initiate a reading, then listens for a pulse to return. The length of the returning pulse is proportional to the distance of the object from the sensor. The circuit: * +V connection of the PING))) attached to +5V * GND connection of the PING))) attached to ground * SIG connection of the PING))) attached to digital pin 7 http://www.arduino.cc/en/Tutorial/Ping created 3 Nov 2008 by David A. Mellis modified 30 Aug 2011 by Tom Igoe This example code is in the public domain. */
سخت افزار مورد نیاز
برای جزئیات بیشتر: کد محدوده یاب التراسونیک آردوینو پینگ
در ادامه، متن انگلیسی این مطلب را میتوانید مشاهده نمایید:
The Ping))) is an ultrasonic range finder from Parallax. It detects the distance of the closest object in front of the sensor (from 2 cm up to 3m). It works by sending out a burst of ultrasound and listening for the echo when it bounces off of an object.