Non Blind Zone Ultrasonic Module SDM-IO

11,00  (πλέον ΦΠΑ)

Ποσότητα:

Κωδικός:701107. Κατηγορία: .

Περιγραφή Προϊόντος

Non Blind Zone Ultrasonic Module SDM-IO is a stable and measuring the distance accurately ultrasonic module which provides 0cm – 1500mm non-contact measurement function,the ranging accuracy can reach to 3mm. Its performance can compare with SRF05/SRF02 ultrasonic distance measuring module, also it has non-blind (From 0-1cm the measurement results are not accurate when we test, but more than 1cm are accurate) design and fast response.

 

Specification:

 

Supply voltage 3.8 – 5.5 V

Global Current Consumption 8 mA

Ultrasonic Frequency 40k Hz

Maximal Range 1500 mm

Minimal Range 0 cm

Resolution 3 mm

Trigger Pulse Width 10 μs

Operation Level Digital 5V

Power Supply External 5V

Sensor Angle 15 degrees

Board Size 3.7×2.0x1.5 cm

Version 1.0

 

 

sample code:

 

Connection to Arduino Uno

 

5V on Arduino —&gt V5.0 on SDM-IO module

GND on Arduino —&gt GND on SDM-IO module

Pin 7 on Arduino (for this example) —&gt Trig on SDM-IO module

 

int pin = 7 // connected to the Trig on the module, this serves as both Trigger and Echo

unsigned long time

unsigned long sizeofpulse

float distance

 

void setup()

{

Serial.begin(9600)

pinMode(pin, OUTPUT)

digitalWrite(pin, HIGH) // Trig pin is normally HIGH

}

 

void loop()

{

pinMode(pin, OUTPUT) //return digital pin to OUTPUT mode after reading

digitalWrite(pin, LOW)

delayMicroseconds(25)

digitalWrite(pin, HIGH) //Trig pin pulsed LOW for 25usec

time = micros() //record timer

pinMode(pin, INPUT) //change pin to INPUT to read the echo pulse

sizeofpulse = pulseIn(pin, LOW, 18000) //should be approx 150usec, timeout at 18msec

time = micros() – time – sizeofpulse // amount of time elapsed since we sent the trigger pulse and detect the echo pulse, then subtract the size of the echo pulse

distance = (time*340.29/2/10000)-3 // convert to distance in centimeters

Serial.print(&quot Distance: &quot )

Serial.print(distance)

Serial.println(&quot cm&quot )

delay(100)

}