“Rotation Sensor”的版本间的差异

来自丢石头百科
(创建页面,内容为“<div class="tabber"> <!--<div class="tabbertab" title="说明"></div>--> <div class="tabbertab" title="资料"> {{外围模块|colorscheme=blue |name = Rotation Sens…”)
 
 
(未显示1个用户的4个中间版本)
第1行: 第1行:
 
<div class="tabber">
 
<div class="tabber">
<!--<div class="tabbertab" title="说明"></div>-->
 
<div class="tabbertab" title="资料">
 
 
{{外围模块|colorscheme=blue
 
{{外围模块|colorscheme=blue
 
|name = Rotation Sensor
 
|name = Rotation Sensor
|img=[[File:Rotation-Sensor-intro.jpg|360px |alt=Rotation-Sensor|link=http://www.waveshare.net/shop/Rotation-Sensor.htm | Rotation Sensor]]
+
|img=[[File:Rotation-Sensor-intro.jpg|360px |alt=Rotation-Sensor|link=https://{{SERVERNAME}}/shop/Rotation-Sensor.htm | Rotation Sensor]]
 
|category1=传感器
 
|category1=传感器
 
|brand=Waveshare
 
|brand=Waveshare
第10行: 第8行:
 
| interface1 =I/Os
 
| 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="资料">
 
===文档===
 
===文档===
*[http://www.waveshare.net/w/upload/d/d3/Rotation-Sensor-UserManual.pdf 用户手册] <br>
+
<!--*[https://{{SERVERNAME}}/w/upload/d/d3/Rotation-Sensor-UserManual.pdf 用户手册] <br>-->
*[http://www.waveshare.net/w/upload/2/25/Rotation-Sensor-Schematic.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]]
 
*[[Rotation-Sensor-Video|演示视频]][[File:video-logo.png|23px|link=Rotation-Sensor-Video]]
 
===程序===
 
===程序===
*[http://www.waveshare.net/w/upload/a/a8/Rotation-Sensor-code.7z 示例程序]<br>
+
*[https://{{SERVERNAME}}/w/upload/a/a8/Rotation-Sensor-code.7z 示例程序]<br>
 
===软件===
 
===软件===
*[http://www.waveshare.net/w/upload/5/5f/Sscom.7z 串口调试助手]
+
*[[:File:串口调试助手.zip|串口调试助手]]
<br /><big>批量下载教程——请戳<big><big><big>☛</big></big></big></big>[[File:download-icon.png|link=批量下载教程]]
+
转到:[[#软件]],[[#程序]],[[#文档]]
 
 
 
<!--{{Join_us}}-->
 
<!--{{Join_us}}-->
 
</div>
 
</div>
 +
 +
== FAQ ==
 
<div class="tabbertab" title="FAQ"><br /></div>
 
<div class="tabbertab" title="FAQ"><br /></div>
 
<div class="tabbertab" title="售后"><br />{{Service11}}</div>
 
<div class="tabbertab" title="售后"><br />{{Service11}}</div>

2023年6月21日 (三) 17:10的最新版本

Rotation Sensor
Rotation-Sensor
{{{name2}}}
{{{name3}}}
基本信息
分类: 传感器模块
{{{userDefinedInfo1}}}: {{{userdefinedvalue1}}}
{{{userDefinedInfo2}}}: {{{userdefinedvalue2}}}
{{{userDefinedInfo3}}}: {{{userdefinedvalue3}}}
品牌: Waveshare
功能简介
特性 旋转编码器
' 无特性,不解释
' 无特性,不解释
' 无特性,不解释
' 无特性,不解释
接口 I/Os
相关产品
带Rotation Sensor的产品

{{{Product1}}}

{{{Product2}}}

{{{Product3}}}

{{{Product4}}}

{{{Product5}}}

{{{Product6}}}

产品特性

  • 工作电压: 3.0V-5.3V
  • 旋转一圈脉冲数: 15
  • 产品尺寸: 32.0mm*15.0mm
  • 固定孔尺寸: 2.0mm

原理:增量编码器是一种将旋转位移转换为一连串数字脉冲信号的旋转式传感器。通过旋转可以计数正方向和反方向转动过程中输出脉冲的次数,旋转计数不像电位计,这种转动计数是没有限制的。配合旋转编码器上的按键,可以复位到初始状态,即从0开始计数。

主要用途

解决工业控制中的定位问题

接口说明

接口说明表
引脚号 标识 描述
1 SIA 与SIB组合判断编码器的旋转方向
2 SIB 与SIA组合判断编码器的旋转方向
3 SW 读取编码器的按键是否按下
4 GND 电源地
5 VCC 电源正(3.0V-5.3V)

操作与现象

下面,以接入我们的开发板为例。
① 将配套程序下载到相应的开发板中。
② 将串口线和模块接入开发板,给开发板上电。
模块与开发板连接如下表所示:

模块接入STM32开发板表
端口 STM32单片机引脚
SIA GPIOA.0
SIB GPIOA.1
SW GPIOA.2
GND GND
VCC 3.3V


模块接入Arduino表
端口 Arduino引脚
SIA D2
SIB D3
SW NC
GND GND
VCC 5V


串口配置如下表所示:

串口配置表
Baud rate 115200
Data bits 8
Stop bit 1
Parity bit None


③ 分别正向旋转,反向旋转和按下编码器,串口输出数据分别如下表所示:

旋转编码器对应串口输出表
正向旋转 反向旋转 按下编码器
Turn right Turn left Turn down


④ 把模块的SIA,SIB,SW端口分别连接逻辑分析仪的CH0,CH1,CH2。
正向旋转编码器,波形输出如下图所示:

Rotation Sensor- (1).png

图1. 正向旋转编码器对应波形


反向旋转编码器,波形输出如下图所示:

Rotation Sensor- (2).png

图2. 反向旋转编码器对应波形


按下编码器上的按键,波形输出如下图所示:

Rotation Sensor- (3).png

图3. 按下编码器上的按键对应波形

文档

视频

程序

软件

转到:#软件#程序#文档

FAQ



Icon-mail.png 联系 丢石头

我们的工作时间是: 09:00-18:00 (UTC+8 周一到周六)