(SKU:RB-02S012)PING))) Ultrasonic Sensor

From ALSRobot-Wki
Jump to: navigation, search


Product overview

The PING))) ™ ultrasonic sensors This is a match, BASIC Stamp launched by sensor, microprocessor, of course, other microprocessor (51, AVR, PIC, MSP430, ARM) also can be used. Is very suitable for use on the robot, can to detect moving or stationary objects, when used as long as the microprocessor I/O 1 can. The PING))) ™ sensor using a ultrasound (far more than what people can hear frequency), from the sensor to the object under test, by the time required to receive echo to judge distances. From the PING))) ™ is a PWM (pulse width modulation) pulse signal, the receiving and PWM signal.


  1. Working voltage :5V +/-10%
  2. Power consumption :20mA
  3. Working current:30mA
  4. Maximum current: 35mA
  5. Working temperature range:0℃~+70℃
  6. Detection range:2cm~3m
  7. size: 22 mm H x 46 mm W x 16 mm D (0.85 in x 1.8 in x 0.6 in)
  8. weight of the:9g

Method of use

Pin definition

  • GND:-
  • 5V:+
  • SIG:signal interface

Connection here

SIG in the controller of the 11 pin, 5 v socket GND in the controller 5 v pin socket in the controller GND pin


Application of routine

In accordance with the procedures between ultrasonic sensors and UNO, testing the actual detection distance.

sample code

const int pingPin = 11;
unsigned int duration, inches;

void setup() {

void loop() {
  pinMode(pingPin, OUTPUT);          // 设置为输出引脚
  digitalWrite(pingPin, LOW);        // 发送低电平
  digitalWrite(pingPin, HIGH);       // 开始测距
  delayMicroseconds(5);              //   延时5微妙
  digitalWrite(pingPin, LOW);        //结束测距
  pinMode(pingPin, INPUT);           // 设置为输入引脚
  duration = pulseIn(pingPin, HIGH); // 读取返回脉冲
  inches = duration / 58;        // 转换为厘米
  Serial.println(inches);            // 显示结果
  delay(200);		             // 延时200毫秒

Application effect

Open the serial port monitor can be observed that the distance of the output value of the ultrasonic is apart from the actual distance of the obstacle ahead.

Products related to recommend


Personal tools