Cảm biến siêu âm AGV URM09 Analog Ultrasonic Sensor
Operating Current: 20mA
Operating Temperature: -10℃~+70℃
Measurement Range: 2cm~500cm
Resolution: 1cm
Accuracy: 1%
Frequency: 30Hz Max
Dimension: 47mm × 22 mm/1.85× 0.87”
Thông tin sản phẩm
Module xuất dải đo:
data(cm)=Vout(mV)*520/Vin(mV)
Chương trình ADC 12bit STM32
#define MAX_RANG (520)//the max measurement vaule of the module is 520cm(a little bit longer than effective max range)
#define ADC_SOLUTION (4096.0)//ADC accuracy of Arduino UNO is 10bit
float calulator_distan(float value)
{
float s1;
s1= (value * MAX_RANG) / ADC_SOLUTION;//
return s1;
}
Với Arduino
#define MAX_RANG (520)//the max measurement vaule of the module is 520cm(a little bit longer than effective max range)
#define ADC_SOLUTION (1024.0)//ADC accuracy of Arduino UNO is 10bit
float calulator_distan(float value)
{
float s1;
s1= (value * MAX_RANG) / ADC_SOLUTION;//
return s1;
}
Tài liệu trang chủ :
https://wiki.dfrobot.com/URM09_Ultrasonic_Sensor_(Gravity_Analog)_SKU_SEN0307