How to Use Ultrasonic Distance Sensor Module
This sensor uses ultrasonic waves to measure distance. It can also be used to create distance-dependent switches.
About the Component
Specifications
Voltage | 5V |
---|---|
Measurement Range | 4~300cm |
Temperature Range | -10~60℃ |
Measurement Angle | Less than 15° |
Trigger Signal | 10μS (TTL level pulse wave) |
Echo Output Signal | Reflection (round trip) time |
Size | 34 x 20 (mm) |
Connection
Connect the Ultrasonic Distance Sensor Module to the SPACEBLOCK microcontroller board using jumper wires (male-female) as follows:
- Connect the TRIG pin of the ultrasonic distance sensor to the digital-compatible pin of SPACEBLOCK
- Connect the Echo pin of the ultrasonic distance sensor to the digital-compatible pin of SPACEBLOCK
- Connect the GND pin of the ultrasonic distance sensor to the GND pin of SPACEBLOCK
※The image shows the signal line connected to pins A0 and A1. Digital-compatible pins are A0 to A10, A13, A15, B0 to B15, C14 to C1.
※5V and GND can also be inserted into the pins with the same notation on the SPACEBLOCK microcontroller board.
Usage
The sensor detects the distance between the sensor and the object and returns a value. The larger the distance, the larger the value.
You can retrieve values from the Ultrasonic Distance Sensor Module using blocks in the 'Input' category of the project.
For detailed usage of the blocks, click here
Retrieve Distance from Ultrasonic Distance Sensor