# 超声波传感器模块

## 概述

超声波传感器模块有效探测距离范围为4-400cm，一个发射探头，一个接受探头。此模块只需你提供一个10uS以上脉冲触发信号，该模块内部将发出8个40kHz周期电平并检测回波。一旦检测到有回波信号则输出回响信号。回响信号的脉冲宽度与所测的距离成正比。由此通过发射信号到回响信号的时间间隔可以计算得到距离。建议测量周期为60ms以上，以防发射信号对回响信号的影响。

## 参数

* 尺寸：56x36mm
* 工作电压：5V
* 接口类型：XH2.54mm-4P
* 引脚定义：1-地 2-电源 3-SCL 4-SDA

## 接口说明

* 可用端口：四排排针

## 使用方式

![](/files/-LWVPVz4eEN2UyrlPkSv)

## 示例代码

![](/files/-LWVPVz6l4mXOTu3niHe)

![](/files/-LWVPVz8BJgzRnSh3gEL)

[超声波模块示例代码](http://www.haohaodada.com/show.php?id=956445)

## 原理图

{% file src="/files/-LrD9I3FAz80qZlKGNJ3" %}
超声波模块原理图
{% endfile %}

## 尺寸说明

![](/files/-LWVPVzAYkMku37qLOlP)

## 相关资源

{% file src="/files/-LrHNMIWpNkKDCRF3fjo" %}
STM8S003F3U6TR芯片手册
{% endfile %}

{% file src="/files/-LrHNYgBDUTLWUH0g6SG" %}
MAX232芯片手册
{% endfile %}

{% file src="/files/-LrHNe0K-BbVuX6ET8FT" %}
LMV324IDR芯片手册
{% endfile %}

## 常见问题


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.haohaodada.cn/jiao-xue-chan-pin/arduino-kai-yuan-ying-jian/chao-sheng-bo-chuan-gan-qi-mo-kuai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
