差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
wm_wiki:mg995_sovor:manual [2020/03/10 18:38] juneral [1. 电机概述] |
wm_wiki:mg995_sovor:manual [2020/05/12 15:44] (当前版本) juneral [3.1. 模块功能及图形化编程指南] |
||
---|---|---|---|
行 4: | 行 4: | ||
<html><body> | <html><body> | ||
+ | <p class=MsoNormal style='text-indent:32.0pt'><span lang=EN-US | ||
+ | style='font-size:16.0pt;line-height:105%;font-family:宋体'>MG995</span><span | ||
+ | style='font-size:16.0pt;line-height:105%;font-family:宋体'>舵机是一种简单的,常用的标准伺服电机,可使用在机器人头部,机械手,云台等场景。</span></p> | ||
</body></html> | </body></html> | ||
行 12: | 行 14: | ||
<div align=center> | <div align=center> | ||
- | <table class=MsoTable15List5DarkAccent5 border=1 cellspacing=0 cellpadding=0 | + | <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 |
- | style='border-collapse:collapse;border:none'> | + | style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:0cm 0cm 0cm 0cm'> |
- | <tr> | + | <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'> |
<td width=173 valign=top style='width:130.1pt;border-top:solid #5B9BD5 3.0pt; | <td width=173 valign=top style='width:130.1pt;border-top:solid #5B9BD5 3.0pt; | ||
border-left:solid #5B9BD5 3.0pt;border-bottom:solid white 2.25pt;border-right: | border-left:solid #5B9BD5 3.0pt;border-bottom:solid white 2.25pt;border-right: | ||
行 31: | 行 33: | ||
</td> | </td> | ||
</tr> | </tr> | ||
- | <tr> | + | <tr style='mso-yfti-irow:1'> |
- | <td width=173 valign=top style='width:130.1pt;border-top:none;border-left: | + | |
- | solid #5B9BD5 3.0pt;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt; | + | |
- | background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | + | |
- | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | + | |
- | text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | + | |
- | font-family:宋体;color:white'>额定电压</span></b></p> | + | |
- | </td> | + | |
- | <td width=395 valign=top style='width:295.9pt;border-top:none;border-left: | + | |
- | none;border-bottom:solid white 1.0pt;border-right:solid #5B9BD5 3.0pt; | + | |
- | background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | + | |
- | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | + | |
- | text-align:center;line-height:normal'><span lang=EN-US style='font-size:16.0pt; | + | |
- | color:white'>9.6 VDC</span></p> | + | |
- | </td> | + | |
- | </tr> | + | |
- | <tr> | + | |
<td width=173 valign=top style='width:130.1pt;border-top:none;border-left: | <td width=173 valign=top style='width:130.1pt;border-top:none;border-left: | ||
solid #5B9BD5 3.0pt;border-bottom:none;border-right:solid white 1.0pt; | solid #5B9BD5 3.0pt;border-bottom:none;border-right:solid white 1.0pt; | ||
行 59: | 行 45: | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
text-align:center;line-height:normal'><span lang=EN-US style='font-size:16.0pt; | text-align:center;line-height:normal'><span lang=EN-US style='font-size:16.0pt; | ||
- | color:white'>7.0~10.0 VDC</span></p> | + | color:white'>3.0~7.2 VDC</span></p> |
</td> | </td> | ||
</tr> | </tr> | ||
- | <tr> | + | <tr style='mso-yfti-irow:2'> |
<td width=173 valign=top style='width:130.1pt;border:solid white 1.0pt; | <td width=173 valign=top style='width:130.1pt;border:solid white 1.0pt; | ||
border-left:solid #5B9BD5 3.0pt;background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | border-left:solid #5B9BD5 3.0pt;background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | ||
- | font-family:宋体;color:white'>空载电流</span></b></p> | + | font-family:宋体;color:white'>工作电流</span></b></p> |
</td> | </td> | ||
<td width=395 valign=top style='width:295.9pt;border-top:solid white 1.0pt; | <td width=395 valign=top style='width:295.9pt;border-top:solid white 1.0pt; | ||
行 73: | 行 59: | ||
background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
- | text-align:center;line-height:normal'><span style='font-size:16.0pt; | + | text-align:center;line-height:normal'><span lang=EN-US style='font-size:16.0pt; |
- | font-family:宋体;color:white'>≤</span><span lang=EN-US style='font-size:16.0pt; | + | font-family:宋体;color:white'>100</span><span lang=EN-US style='font-size:16.0pt; |
- | color:white'>150mA</span></p> | + | color:white'>mA</span></p> |
</td> | </td> | ||
</tr> | </tr> | ||
- | <tr> | + | <tr style='mso-yfti-irow:3'> |
<td width=173 valign=top style='width:130.1pt;border-top:none;border-left: | <td width=173 valign=top style='width:130.1pt;border-top:none;border-left: | ||
solid #5B9BD5 3.0pt;border-bottom:none;border-right:solid white 1.0pt; | solid #5B9BD5 3.0pt;border-bottom:none;border-right:solid white 1.0pt; | ||
行 84: | 行 70: | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | ||
- | font-family:宋体;color:white'>空载转速</span></b></p> | + | font-family:宋体;color:white'>舵机类型</span></b></p> |
</td> | </td> | ||
<td width=395 valign=top style='width:295.9pt;border:none;border-right:solid #5B9BD5 3.0pt; | <td width=395 valign=top style='width:295.9pt;border:none;border-right:solid #5B9BD5 3.0pt; | ||
background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
- | text-align:center;line-height:normal'><span lang=EN-US style='font-size:16.0pt; | + | text-align:center;line-height:normal'><span style='font-size:16.0pt; |
- | color:white'>14500RPM</span><span style='font-size:16.0pt;font-family:宋体; | + | font-family:宋体;color:white'>模拟舵机</span></p> |
- | color:white'>±</span><span lang=EN-US style='font-size:16.0pt;color:white'>10%</span></p> | + | |
</td> | </td> | ||
</tr> | </tr> | ||
- | <tr> | + | <tr style='mso-yfti-irow:4'> |
<td width=173 valign=top style='width:130.1pt;border:solid white 1.0pt; | <td width=173 valign=top style='width:130.1pt;border:solid white 1.0pt; | ||
border-left:solid #5B9BD5 3.0pt;background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | border-left:solid #5B9BD5 3.0pt;background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | ||
- | font-family:宋体;color:white'>减速比</span></b></p> | + | font-family:宋体;color:white'>工作扭矩</span></b></p> |
</td> | </td> | ||
<td width=395 valign=top style='width:295.9pt;border-top:solid white 1.0pt; | <td width=395 valign=top style='width:295.9pt;border-top:solid white 1.0pt; | ||
行 106: | 行 91: | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
text-align:center;line-height:normal'><span lang=EN-US style='font-size:16.0pt; | text-align:center;line-height:normal'><span lang=EN-US style='font-size:16.0pt; | ||
- | color:white'>48:1</span><span style='font-size:16.0pt;font-family:宋体; | + | font-family:宋体;color:white'>13KG/</span><span lang=EN-US style='font-size: |
- | color:white'>(减速输出</span><span lang=EN-US style='font-size:16.0pt;color:white'>302RPM</span><span | + | 16.0pt;color:white'>cm</span></p> |
- | style='font-size:16.0pt;font-family:宋体;color:white'>左右)</span></p> | + | |
</td> | </td> | ||
</tr> | </tr> | ||
- | <tr> | + | <tr style='mso-yfti-irow:5'> |
<td width=173 valign=top style='width:130.1pt;border-top:none;border-left: | <td width=173 valign=top style='width:130.1pt;border-top:none;border-left: | ||
solid #5B9BD5 3.0pt;border-bottom:none;border-right:solid white 1.0pt; | solid #5B9BD5 3.0pt;border-bottom:none;border-right:solid white 1.0pt; | ||
行 117: | 行 101: | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | ||
- | font-family:宋体;color:white'>堵转转矩</span></b></p> | + | font-family:宋体;color:white'>反应转速</span></b></p> |
</td> | </td> | ||
<td width=395 valign=top style='width:295.9pt;border:none;border-right:solid #5B9BD5 3.0pt; | <td width=395 valign=top style='width:295.9pt;border:none;border-right:solid #5B9BD5 3.0pt; | ||
background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
- | text-align:center;line-height:normal'><span style='font-size:16.0pt; | + | text-align:center;line-height:normal'><span lang=EN-US style='font-size:16.0pt; |
- | font-family:宋体;color:white'>≥</span><span lang=EN-US style='font-size:16.0pt; | + | font-family:宋体;color:white'>53~62R/M</span></p> |
- | color:white'>75gf.cm</span></p> | + | |
</td> | </td> | ||
</tr> | </tr> | ||
- | <tr> | + | <tr style='mso-yfti-irow:6'> |
<td width=173 valign=top style='width:130.1pt;border:solid white 1.0pt; | <td width=173 valign=top style='width:130.1pt;border:solid white 1.0pt; | ||
border-left:solid #5B9BD5 3.0pt;background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | border-left:solid #5B9BD5 3.0pt;background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | ||
- | font-family:宋体;color:white'>堵转电流</span></b></p> | + | font-family:宋体;color:white'>转动角度</span></b></p> |
</td> | </td> | ||
<td width=395 valign=top style='width:295.9pt;border-top:solid white 1.0pt; | <td width=395 valign=top style='width:295.9pt;border-top:solid white 1.0pt; | ||
border-left:none;border-bottom:solid white 1.0pt;border-right:solid #5B9BD5 3.0pt; | border-left:none;border-bottom:solid white 1.0pt;border-right:solid #5B9BD5 3.0pt; | ||
+ | background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
+ | text-align:center;line-height:normal'><span lang=EN-US style='font-size:16.0pt; | ||
+ | font-family:宋体;color:white'>0</span><span style='font-size:16.0pt;font-family: | ||
+ | 宋体;color:white'>°<span lang=EN-US>~180</span>°</span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style='mso-yfti-irow:7;mso-yfti-lastrow:yes'> | ||
+ | <td width=173 valign=top style='width:130.1pt;border-top:none;border-left: | ||
+ | solid #5B9BD5 3.0pt;border-bottom:solid white 1.0pt;border-right:solid white 1.0pt; | ||
+ | background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
+ | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
+ | text-align:center;line-height:normal'><b><span style='font-size:16.0pt; | ||
+ | font-family:宋体;color:white'>结构材质</span></b></p> | ||
+ | </td> | ||
+ | <td width=395 valign=top style='width:295.9pt;border-top:none;border-left: | ||
+ | none;border-bottom:solid white 1.0pt;border-right:solid #5B9BD5 3.0pt; | ||
background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | background:#5B9BD5;padding:0cm 5.4pt 0cm 5.4pt'> | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
text-align:center;line-height:normal'><span style='font-size:16.0pt; | text-align:center;line-height:normal'><span style='font-size:16.0pt; | ||
- | font-family:宋体;color:white'>≤</span><span lang=EN-US style='font-size:16.0pt; | + | font-family:宋体;color:white'>金属铜齿、空心杯电机、双滚珠轴承</span></p> |
- | color:white'>1.8A</span></p> | + | |
</td> | </td> | ||
</tr> | </tr> | ||
行 155: | 行 154: | ||
<html><body> | <html><body> | ||
- | |||
<p class=MsoNormal style='text-indent:32.0pt'><span style='font-size:16.0pt; | <p class=MsoNormal style='text-indent:32.0pt'><span style='font-size:16.0pt; | ||
- | line-height:105%;font-family:等线;color:#666666;background:white'>该电机支持的图形化编程平台有</span></span><span | + | line-height:105%;font-family:等线;color:#666666;background:white'>该电机支持的图形化编程平台有</span><span |
lang=EN-US style='font-size:16.0pt;line-height:105%;font-family:"Helvetica",sans-serif; | lang=EN-US style='font-size:16.0pt;line-height:105%;font-family:"Helvetica",sans-serif; | ||
color:#666666;background:white'><span style='box-sizing: border-box;font-variant-ligatures: normal; | color:#666666;background:white'><span style='box-sizing: border-box;font-variant-ligatures: normal; | ||
行 229: | 行 227: | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
text-align:center;line-height:normal'><span style='font-size:14.0pt; | text-align:center;line-height:normal'><span style='font-size:14.0pt; | ||
- | font-family:等线;color:black;background:white'>驱动电机运作</span></p> | + | font-family:等线;color:black;background:white'>驱动舵机运作</span></p> |
</td> | </td> | ||
<td width=189 style='width:142.05pt;border-top:none;border-left:none; | <td width=189 style='width:142.05pt;border-top:none;border-left:none; | ||
行 242: | 行 240: | ||
0px'>2</span></span><span style='font-size:14.0pt;font-family:等线;color:black; | 0px'>2</span></span><span style='font-size:14.0pt;font-family:等线;color:black; | ||
background:white'>个参数)所接端口</span><span style='font-size:14.0pt;font-family: | background:white'>个参数)所接端口</span><span style='font-size:14.0pt;font-family: | ||
- | 宋体;color:black;background:white'>、速度<span lang=EN-US>(-255~255)</span></span></p> | + | 宋体;color:black;background:white'>、角度<span lang=EN-US>(0~180)</span></span></p> |
</td> | </td> | ||
<td width=455 valign=top style='width:341.05pt;border-top:none;border-left: | <td width=455 valign=top style='width:341.05pt;border-top:none;border-left: | ||
行 248: | 行 246: | ||
padding:0cm 5.4pt 0cm 5.4pt'> | padding:0cm 5.4pt 0cm 5.4pt'> | ||
<p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | <p class=MsoNormal align=center style='margin-bottom:0cm;margin-bottom:.0001pt; | ||
- | text-align:center;line-height:normal'><span lang=EN-US><img width=328 | + | text-align:center;line-height:normal'><span lang=EN-US><img width=310 |
- | height=64 id="图片 1" src="https://www.weeemake.com.cn/wiki/lib/exe/fetch.php?media=wm_wiki:tt_dc_motor:pasted:20200310-150145.png"></span></p> | + | height=70 id="图片 1" src="lib/exe/fetch.php?media=wm_wiki:mg995_sovor:pasted:20200310-185655.png"></span></p> |
</td> | </td> | ||
</tr> | </tr> | ||
行 256: | 行 254: | ||
</div> | </div> | ||
- | <p class=MsoNormal style='text-indent:36.0pt'><b><span lang=EN-US | + | <p class=MsoNormal style='text-indent:36.0pt'><span lang=EN-US |
- | style='font-size:5.0pt;line-height:105%;font-family:等线;color:#ffffff; | + | style='font-size:5.0pt;line-height:105%;font-family:等线;color:#666666; |
- | background:yellow'><o:p> </o:p></span></b></p> | + | background:yellow'> </span></p> |
- | + | ||
- | <p class=MsoNormal style='text-indent:36.0pt'><b><span style='font-size:16.0pt; | + | |
- | line-height:105%;font-family:等线;color:#666666;background:yellow'>备注:</span></b><span | + | |
- | style='font-size:16.0pt;line-height:105%;font-family:黑体;color:#666666; | + | |
- | background:white'>电机转速正负定义,电机轴面向人,速度值为正:顺时针转;速度值为负:逆时针转</span></p> | + | |
- | + | ||
- | <p class=MsoNormal style='text-indent:36.0pt'><b><span lang=EN-US | + | |
- | style='font-size:5.0pt;line-height:105%;font-family:等线;color:#ffffff; | + | |
- | background:yellow'><o:p> </o:p></span></b></p> | + | |
<p class=MsoNormal style='text-indent:36.0pt'><span style='font-size:16.0pt; | <p class=MsoNormal style='text-indent:36.0pt'><span style='font-size:16.0pt; | ||
行 275: | 行 263: | ||
</body></html> | </body></html> | ||
- | {{ :wm_wiki:tt_dc_motor:pasted:20200310-150534.png }} | + | {{ :wm_wiki:mg995_sovor:pasted:20200310-185643.png }} |
==== 3.2. 文本代码编程指南 ==== | ==== 3.2. 文本代码编程指南 ==== | ||
行 283: | 行 271: | ||
</body></html> | </body></html> | ||
- | <sxh cpp; first-line: 1;highlight: [3,4,13,14,16,17,19,20,22,23]; title: we_dcmotor_test.ino> | + | <sxh cpp; first-line: 1;highlight: [3,6,10,12]; title: we_servo_test.ino> |
#include "WeELF328P.h" | #include "WeELF328P.h" | ||
- | WeDCMotor motor1(M1); | + | Servo weservo; |
- | WeDCMotor motor2(M2); | + | void setup() |
- | + | { | |
- | uint8_t motorSpeed = 100; | + | weservo.attach(PORT_1); |
- | + | ||
- | void setup() | + | |
- | { | + | |
} | } | ||
- | void loop() | + | void loop() |
{ | { | ||
- | motor1.run(motorSpeed); | + | weservo.write(0); // sets the servo position according to the scaled value 0-180 |
- | motor2.run(motorSpeed); | + | delay(2000); // waits for the servo to get there |
- | delay(2000); | + | weservo.write(180); |
- | motor1.stop(); | + | delay(2000); |
- | motor2.stop(); | + | |
- | delay(500); | + | |
- | motor1.run(-motorSpeed); | + | |
- | motor2.run(-motorSpeed); | + | |
- | delay(2000); | + | |
- | motor1.stop(); | + | |
- | motor2.stop(); | + | |
- | delay(500); | + | |
} | } | ||
</sxh> | </sxh> | ||
行 314: | 行 291: | ||
<html><body> | <html><body> | ||
- | <p class=MsoNormal style='text-indent:32.0pt;mso-char-indent-count:2.0'><span | + | <p class=MsoNormal style='text-indent:32.0pt'><span lang=EN-US |
- | style='font-size:16.0pt;mso-ascii-font-family:Helvetica;mso-hansi-font-family: | + | style='font-size:16.0pt;line-height:105%;font-family:宋体;color:#222222; |
- | Helvetica;mso-bidi-font-family:Helvetica;color:#222222;background:white'>不能长时间快速正反转,这样会造成电流过大,发热量大,烧毁模块上的驱动芯片。</span></p> | + | background:white'>1</span><span style='font-size:16.0pt;line-height:105%; |
+ | font-family:宋体;color:#222222;background:white'>、不能长时间快速正反转,这样会造成电流过大,发热量大,烧毁舵机。</span><span | ||
+ | lang=EN-US> </span></p> | ||
+ | |||
+ | <p class=MsoNormal style='text-indent:32.0pt'><span lang=EN-US | ||
+ | style='font-size:16.0pt;line-height:105%;font-family:宋体;color:#222222; | ||
+ | background:white'>2</span><span style='font-size:16.0pt;line-height:105%; | ||
+ | font-family:宋体;color:#222222;background:white'>、不能长时间堵转,这样会造成电流过大,发热量大,烧毁舵机。</span></p> | ||
+ | |||
+ | <p class=MsoNormal style='text-indent:32.0pt'><span lang=EN-US | ||
+ | style='font-size:16.0pt;line-height:105%;font-family:宋体;color:#222222; | ||
+ | background:white'>3</span><span style='font-size:16.0pt;line-height:105%; | ||
+ | font-family:宋体;color:#222222;background:white'>、电源正负极不能接错。</span></p> | ||
</body></html> | </body></html> |