匿名
未登录
登录
丢石头百科
搜索
查看“Rotation Sensor”的源代码
来自丢石头百科
名字空间
页面
讨论
更多
更多
页面选项
查看
查看源代码
历史
←
Rotation Sensor
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
<div class="tabber"> {{外围模块|colorscheme=blue |name = Rotation Sensor |img=[[File:Rotation-Sensor-intro.jpg|360px |alt=Rotation-Sensor|link=https://{{SERVERNAME}}/shop/Rotation-Sensor.htm | Rotation Sensor]] |category1=传感器 |brand=Waveshare |feature = 旋转编码器 | interface1 =I/Os }} <div class="tabbertab" title="说明"> ==产品特性== *工作电压: 3.0V-5.3V *旋转一圈脉冲数: 15 *产品尺寸: 32.0mm*15.0mm *固定孔尺寸: 2.0mm 原理:增量编码器是一种将旋转位移转换为一连串数字脉冲信号的旋转式传感器。通过旋转可以计数正方向和反方向转动过程中输出脉冲的次数,旋转计数不像电位计,这种转动计数是没有限制的。配合旋转编码器上的按键,可以复位到初始状态,即从0开始计数。<br /> ==主要用途== 解决工业控制中的定位问题<br /> ==接口说明== {|border=2 style="width:600px" |- align="center" |colspan=3| 接口说明表 |-align="center" style="background:#996" |引脚号||标识||描述 |-align="center" |1||SIA||与SIB组合判断编码器的旋转方向 |-align="center" |2||SIB||与SIA组合判断编码器的旋转方向 |-align="center" |3||SW||读取编码器的按键是否按下 |-align="center" |4||GND||电源地 |-align="center" |5||VCC||电源正(3.0V-5.3V) |} ==操作与现象== 下面,以接入我们的开发板为例。<br /> ① 将配套程序下载到相应的开发板中。<br /> ② 将串口线和模块接入开发板,给开发板上电。<br /> 模块与开发板连接如下表所示:<br /> {|border=2 style="width:600px" |- align="center" |colspan=2|模块接入STM32开发板表 |-align="center" style="background:#699" |端口||STM32单片机引脚 |- align="center" |SIA||GPIOA.0 |- align="center" |SIB||GPIOA.1 |- align="center" |SW||GPIOA.2 |- align="center" |GND||GND |- align="center" |VCC||3.3V |} <br /> {|border=2 style="width:600px" |- align="center" |colspan=2|模块接入Arduino表 |-align="center" |-align="center" style="background:#cba" |端口||Arduino引脚 |-align="center" |SIA||D2 |-align="center" |SIB||D3 |-align="center" |SW||NC |-align="center" |GND||GND |-align="center" |VCC||5V |} <br /> 串口配置如下表所示:<br /> {|border=2 style="width:600px" |-align="center" style="background:#996" |colspan=2|串口配置表 |-align="center" |Baud rate||115200 |-align="center" |Data bits||8 |-align="center" |Stop bit|| 1 |-align="center" |Parity bit||None |} <br /> ③ 分别正向旋转,反向旋转和按下编码器,串口输出数据分别如下表所示:<br /> {|border=2 style="width:600px" |-align="center" style="background:#0f0" |colspan=3|旋转编码器对应串口输出表 |-align="center" |正向旋转||反向旋转||按下编码器 |-align="center" |Turn right||Turn left||Turn down |} <br /> ④ 把模块的SIA,SIB,SW端口分别连接逻辑分析仪的CH0,CH1,CH2。<br /> 正向旋转编码器,波形输出如下图所示: {|class=imgtable |[[File:Rotation Sensor- (1).png|600px]]<br /> 图1. 正向旋转编码器对应波形 |}<br /> 反向旋转编码器,波形输出如下图所示: {|class=imgtable |[[File:Rotation Sensor- (2).png|600px]]<br /> 图2. 反向旋转编码器对应波形 |}<br /> 按下编码器上的按键,波形输出如下图所示:<br /> {|class=imgtable |[[File:Rotation Sensor- (3).png|600px]]<br /> 图3. 按下编码器上的按键对应波形 |} </div> <div class="tabbertab" title="资料"> ===文档=== <!--*[https://{{SERVERNAME}}/w/upload/d/d3/Rotation-Sensor-UserManual.pdf 用户手册] <br>--> *[https://{{SERVERNAME}}/w/upload/2/25/Rotation-Sensor-Schematic.pdf 原理图]<br> ===视频=== *[[Rotation-Sensor-Video|演示视频]][[File:video-logo.png|23px|link=Rotation-Sensor-Video]] ===程序=== *[https://{{SERVERNAME}}/w/upload/a/a8/Rotation-Sensor-code.7z 示例程序]<br> ===软件=== *[[:File:串口调试助手.zip|串口调试助手]] 转到:[[#软件]],[[#程序]],[[#文档]] <!--{{Join_us}}--> </div> == FAQ == <div class="tabbertab" title="FAQ"><br /></div> <div class="tabbertab" title="售后"><br />{{Service11}}</div>
该页面使用的模板:
模板:Service00
(
查看源代码
)
模板:Service11
(
查看源代码
)
模板:Tipbox
(
查看源代码
)
模板:外围模块
(
查看源代码
)
返回至
Rotation Sensor
。
导航
导航
首页
最近更改
随机页面
MediaWiki帮助
首页
首页
树莓派
主机
配件包
外壳
键鼠
电源
扩展板
显示屏
墨水屏
摄像模块
通信模块
继电器
电机驱动板
游戏机
产品分类
树莓派
Arduino
micro:bit
STM32
Espressif
WiFi模块
蓝牙模块
无线模块
LoRa模块
4G模块
GSM
GPRS
以太网
导航模块
北斗卫星
GPS
LCD
墨水屏
OLED
摄像头
USB模块
串口模块
RS232
RS485
CAN
传感器
温度模块
湿度模块
气压模块
继电器
电机模块
指纹模块
电平转换
音频模块
编程器
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志