-40%
Dustproof Waterproof Ultrasonic Distance sensor module Bell mouth 3.3-5V arduino
$ 18.47
- Description
- Size Guide
Description
IntroductionUltrasonic distance sensor determines the distance to a target by measuring time lapses between the sending and receiving of the ultrasonic pulse. A01NYUB is an waterproof ultrasoinic sensor module with 7.5m effective ranging distance. It is compatible with 3.3V ~ 5V device like Arduino, Raspberry Pi, etc. The average current of A01NYUB is only 15mA so it can be powered by most controllers' IO port.
The ultrasonic sensor adopts closed probe of transmitter & receiver, waterproof and dustproof, which could be well suitable for harsh and moist measuring environment. It reserves 2.54-4P interface and adopts UART communication. The ultrasonic sensor has experienced long-term test and constant optimization so it can offer a pretty fast response time, high stability and sensitivity, and low power consumption.
Use the sensor with Arduino controller to build up your projects, such as backing car annunciator, obstacle avoidance robot, object approaching detection etc.
Specification
Operating Voltage: 3.3V-5v
Average Current: ≤15mA
Blind Zone Distance: 0-28cm
Ranging Distance for Flat Object: 28-750cm
Output: UART
Response Time: 100ms
Probe Center Frequency: 40K ± 1.0K
Operating Temperature: -15 ~ 60 ℃
Storage Temperature: -25 ~ 80 ℃
Protection Rate: IP67
Features
High Protection Rate
Strong Resistance
Stable Output
Low Power
Fast Response
High Antistatic Performance
Wide Operating Temperature
High Accuracy
Small in Size
Installation Dimension
Pinout
Label
Name
Description
1
VCC
Power Input
2
GND
Ground
3
RX
Processed Value / Real-time Value Output Selection
4
TX
UART Output
UART Output
Output Communication
When "RX" floats or input High level, the module outputs processed value, the data is more steady, response time: 150-300ms; when input Low level, the module outputs real-time value, response time: 150ms.
UART
Data bit
Stop bit
Parity
Band rate
TTL level
8
1
none
9600bps
UART Output Form
Frame Data
Description
Byte
Header
0xFF
1 byte
DATA_H
Distance Data High 8-bits
1 byte
DATA_L
Distance Data Low 8-bits
1 byte
SUM
Checksum
1 byte
UART Output
Header
DATA_H
DATA_L
SUM
0xFF
0x07
0xA1
0xA7
Note: checksum only reserves the low 8-bits of the accumulated value.
SUM=(Header+Data_H+Data_L)&0x00FF
=(0XFF + 0X07 + 0XA1)&0x00FF
=0XA7;
Copy
Distance = Data_H * 256 + Data_L = 0X07A1;
Equal to 1953 when converted into decimal;
Represent the current measured distance is 1953mm.
Arduino Platform
#include
SoftwareSerial mySerial(11,10); // RX, TX
unsigned char data[4]={};
float distance;
void setup()
{
Serial.begin(57600);
mySerial.begin(9600);
}
void loop()
{
do{
for(int i=0;i<4;i++)
{
data[i]=mySerial.read();
}
}while(mySerial.read()==0xff);
mySerial.flush();
if(data[0]==0xff)
{
int sum;
sum=(data[0]+data[1]+data[2])&0x00FF;
if(sum==data[3])
{
distance=(data[1]<<8)+data[2];
if(distance>280)
{
Serial.print("distance=");
Serial.print(distance/10);
Serial.println("cm");
}else
{
Serial.println("Below the lower limit");
}
}else Serial.println("ERROR");
}
delay(150);
}