release catch unit

This commit is contained in:
Sean
2021-03-12 18:21:50 +08:00
parent d6a4bb26b8
commit 781110a61c
18 changed files with 522 additions and 18 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -52,6 +52,7 @@ img {
#pc_anchor .el-submenu .el-menu-item {
min-width: 195px;
padding: 0 10px 0px 45px;
}
#pc_anchor .el-menu {
Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

+1 -1
View File
@@ -18,7 +18,7 @@
- The effective voltage measurement error reaches 0.5%
- UART communication (baud: 4800)
- ∑-Δ ADC, high-precision energy metering core
- JP&US standard jack
- JP&US standard jack- PSE certification
- HY2.0-4P external control interface
## Includes
+1 -1
View File
@@ -150,7 +150,7 @@
<script>
var purchase_link = '';
var purchase_link = 'https://m5stack-store.myshopify.com/collections/m5-atom/products/atom-stepmotor-kit';
anchor_search(purchase_link);
scrollFunc();
+2 -1
View File
@@ -267,7 +267,8 @@
"Accessories": {
"Servos": [
{"id":"servos"},
{"a":"/#/en/accessory/sg90_servo", "img":"https://static-cdn.m5stack.com/image/m5-docs_homepage/accessory/servo_01.webp", "p":"SG90 servo", "sku":"A076" ,"kw":"180 SERVO", "category":"Servos"},
{"a":"/#/en/unit/catch", "img":"https://static-cdn.m5stack.com/image/m5-docs_homepage/unit/catch_01.webp", "p":"Catch", "sku":"U102" ,"kw":"180 SERVO LEGO", "category":"Servos"},
{"a":"/#/en/accessory/sg90_servo", "img":"https://static-cdn.m5stack.com/image/m5-docs_homepage/accessory/servo_01.webp", "p":"SG90 servo", "sku":"A076" ,"kw":"180 SERVO"},
{"a":"/#/en/accessory/servo_kit", "img":"https://static-cdn.m5stack.com/image/m5-docs_homepage/accessory/servo_kit_01.webp", "p":"Servo Kit 180°/360°", "sku":"A076-B&A076-C" ,"kw":"180 360 SERVO Kit"}
],
"Cables": [
+3 -3
View File
@@ -6,12 +6,12 @@
## Description
**4-Relay** unit is an integrated 4-way relay module which can be controlled by I2C protocol. The maximum control voltage of each relay is AC-250V, the rated current is 10A and the instantaneous current can hold up to 16A. Each relay can be controlled independently, each on it's own. Each relay has status (LED) indictor as well to show the state of the relay at any given time.
**4-Relay** unit is an integrated 4-way relay module which can be controlled by I2C protocol. The maximum control voltage of each relay is AC-250V/DC-28V, the rated current is 10A and the instantaneous current can hold up to 16A. Each relay can be controlled independently, each on it's own. Each relay has status (LED) indictor as well to show the state of the relay at any given time.
## Product Features
- 4-way relay
- AC-250V/10A
- AC-250V/DC-28V/10A
- LED status indication
- I2C communication (0x26)
@@ -35,7 +35,7 @@
</tr>
<tr>
<td>Maximum input voltage</td>
<td>250V</td>
<td>AC-250V/DC-28V</td>
</tr>
<tr>
<td>Rated current</td>
+173
View File
@@ -0,0 +1,173 @@
# Catch Unit
<el-tag effect="plain">SKU:U102</el-tag>
<div class="product_pic"><img src="assets/img/product_pics/unit/catch/catch_01.webp"><img src="assets/img/product_pics/unit/catch/catch_02.webp"><img src="assets/img/product_pics/unit/catch/catch_03.webp"></div>
## Description
**Catch** is a gripper that uses a SG92R servo as a power source. The servo uses a PWM signal to drive the gripper gear to rotate and control the gripper for clamping and releasing operations. The structure adopts a design compatible with Lego 8mm round holes. You can combine it with other Lego components to build creative control structures, such as robotic arms, gripper carts, etc.
?>Because the opening and closing angle of the gripper is `90°`, please control the rotation angle of the driving servo to `0-45°` (PWM: freq: 50Hz, 0°-45°(pulse:0.5ms-1ms) to prevent blocking rotation. The steering gear burned out.
## Product Features
- SG92R steering gear
- PWM signal drive
- Lego hole compatible
- The jaw opening and closing angle is 90°
- Compatible with RoverC
- Support input voltage: 4.2-6V
- Development platform [UIFlow](http://flow.m5stack.com), [MicroPython](http://micropython.org/), [Arduino](http://www.arduino.cc)
## Include
- 1x Catch Unit
- 1x HY2.0-4 adapter
## Application
- Robot gripper
- Steering gear manipulator gripper
## Specification
<table>
<tr style="font-weight:bold">
<td>Master control resources</td>
<td>Parameters</td>
</tr>
<tr>
<td>Servo model</td>
<td>SG92R</td>
</tr>
<tr>
<td>Drive signal</td>
<td>PWM: freq: 50Hz, 0°-45°(pulse:0.5ms-1ms)</td>
</tr>
<tr>
<td>Working frequency</td>
<td>50Hz</td>
</tr>
<tr>
<td>Clamping jaw opening and closing angle</td>
<td>90°</td>
</tr>
<tr>
<td>Input voltage range</td>
<td>4.2-6V</td>
</tr>
<tr>
<td>Work dead zone</td>
<td>10us</td>
</tr>
<tr>
<td>Output torque</td>
<td>2.5kg/cm at 4.8V</td>
</tr>
<tr>
<td>Output speed</td>
<td>0.1sec/60° at 4.8V</td>
</tr>
<tr>
<td>Working temperature</td>
<td>0°C to 55°C</td>
</tr>
<tr>
<td>Net weight</td>
<td>21.5g</td>
</tr>
<tr>
<td>Gross weight</td>
<td>50g</td>
</tr>
<tr>
<td>Product size (gripper extension)</td>
<td>72 x 56 x 37 mm</td>
</tr>
<tr>
<td>Package size</td>
<td>147 x 90 x 40 mm</td>
</tr>
<tr>
<td>Shell material</td>
<td>Plastic (PC )</td>
</tr>
</table>
## Pin mapping
**When the Catch Unit is connected to PortB, the pin mapping is as follows**
<table>
<tr><td>M5Core(PORT B)</td><td>GPIO26</td><td>5V</td><td>GND</td></tr>
<tr><td>Catch Unit</td><td>SIGNAL</td><td>5V</td><td>GND</td></tr>
</table>
## Example
?>This case controls the Catch Unit clamping jaws to perform clamping and releasing cycles.
<el-card class="box-card" style="margin-bottom:20px">
<div slot="header" class="clearfix">
<span style="font-size: 22px; font-weight: bold;">Arduino</span>
<i class="el-icon-s-management" style="float: right;"></i>
</div>
<div class="box-card-item">
<a href='https://github.com/m5stack/M5Stack/tree/master/examples/Unit/CATCH'><el-tag>For BASIC/M5GO/FIRE</el-tag></a>
</div>
</el-card>
```clike
/*
Description: Control Catch Unit through PWM.
*/
#include <M5Stack.h>
const int servoPin = 26;
int freq = 50;
int ledChannel = 0;
int resolution = 10;
void setup() {
// put your setup code here, to run once:
M5.begin();
M5.Power.begin();
M5.Lcd.setCursor(100, 50, 4);
M5.Lcd.println("Catch Unit");
M5.Lcd.setCursor(40, 120, 4);
ledcSetup(ledChannel, freq, resolution);
ledcAttachPin(servoPin, ledChannel);
}
void loop() {
// High level 0.5ms is angle 0°
// duty = 0.5/20ms = 0.025, 0.025*1023≈25
ledcWrite(ledChannel, 25);
delay(2000);
// High level 1ms is angle 45°
// duty = 1/20ms = 0.05, 0.05*1023≈50
ledcWrite(ledChannel, 50);
delay(2000);
}
```
## Video
<video class="video_size" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Product_example_video/Unit/CATCH.mp4" type="video/mp4">
</video>
<script>
var purchase_link = 'https://m5stack-store.myshopify.com/products/catch-unit';
anchor_search(purchase_link);
scrollFunc();
</script>
+3 -2
View File
@@ -97,9 +97,9 @@ What can the software do?
| *Interface* | *OV2640 Pin*| *ESP32Cam* |
| :------------------- | :--------:| :--------: |
| SCCB Clock | SIOC | IO23 |
| SCCB Data | SIOD | IO22 |
| SCCB Data | SIOD | IO25 |
| System Clock | XCLK | IO27 |
| Vertical Sync | VSYNC | IO25 |
| Vertical Sync | VSYNC | IO22 |
| Horizontal Reference | HREF | IO26 |
| Pixel Clock | PCLK | IO21 |
| Pixel Data Bit 0 | D2 | IO17 |
@@ -115,6 +115,7 @@ What can the software do?
| Power Supply 3.3V | 3V3 | 3V3 |
| Ground | GND | GND |
**GROVE Interface**
| *Grove* | *ESP32Cam* |
+1 -1
View File
@@ -18,7 +18,7 @@
- 有效电压的测量误差达到0.5%
- UART通讯(baud:4800)
- ∑-Δ型ADC,高精度的电能计量内核
- 日标/美标插孔
- 日标/美标插孔-PSE认证
- HY2.0-4P外部控制接口
## 包含
+1 -1
View File
@@ -150,7 +150,7 @@
<script>
var purchase_link = '';
var purchase_link = 'https://m5stack-store.myshopify.com/collections/m5-atom/products/atom-stepmotor-kit';
anchor_search(purchase_link);
scrollFunc();
+154
View File
@@ -0,0 +1,154 @@
# wifiCfg
>使用wifiCfg模块中的API, 配置设备WiFi连接。
```
import wifiCfg
//自动连接已经保存的WiFi
wifiCfg.autoConnect(lcdShow=True)
```
# M5mqtt
>使用M5mqtt模块中的API, 连接mqtt服务器与订阅发布消息内容。
- 连接mqtt服务器
```clike
from m5mqtt import M5mqtt
//创建连接实例
m5mqtt = M5mqtt(
client_id,
server,
port=0,
user=None,
password=None,
keepalive=0,
ssl=False,
ssl_params=None
)
//开始连接
m5mqtt.start()
while True:
```
- 订阅与发布消息
```clike
//订阅消息
def callback(topic_data):
print(topic_data)
m5mqtt.subscribe(topic, callback)
//发布消息
m5mqtt.publish(topic, data)
```
- 其他配置
```clike
//配置客户端遗嘱消息
m5mqtt.set_last_will(topic, msg)
//断开连接
m5mqtt.deinit()
```
# ESP-NOW
>使用ESP-NOW技术,无线传输数据到其他ESP32主控设备
```
import espnow
//初始化
espnow.init()
//设置信道
//获取本机mac_addr
espnow.get_mac_addr()
//广播
espnow.broadcast(data='Hello')
//设置peer列表
espnow.add_peer(slave_mac_addr, id)
//发送消息
espnow.send(id, data='World')
//发送消息回调
def send_cb(flag):
if flag:
print('succeed')
else:
print('Failed')
espnow.send_cb(send_cb)
//接收消息回调
def recv_cb():
//获取数据
sender_address, _, receive_data = espnow.recv_data(encoder='str')
espnow.recv_cb(recv_cb)
```
# HTTP
>使用HTTP模块中的API, 向服务器发送HTTP请求,获取数据。
```
import urequests
//GET请求
req = urequests.request(
method='GET',
url='http://api.m5stack.com/v1',
headers={'Content-Type':'text/html'}
)
//POST请求
req = urequests.request(
method='POST',
url='http://api.m5stack.com/v1',
json={'KEY':'VALUE'},
headers={'Content-Type':'text/html'}
)
//获取响应体状态码
print(req.status_code)
//获取响应体Reason-Phrase
print(req.reason)
//获取原生响应体
print(req.content)
//获取响应体字符串
print(req.text)
//获取响应体JSON
print(req.json)
```
+2 -1
View File
@@ -267,7 +267,8 @@
"配件": {
"舵机": [
{"id":"servos"},
{"a":"/#/zh_CN/accessory/sg90_servo", "img":"https://static-cdn.m5stack.com/image/m5-docs_homepage/accessory/servo_01.webp", "p":"SG90 servo", "sku":"A076" ,"kw":"180 SERVO", "category":"Servos"},
{"a":"/#/zh_CN/unit/catch", "img":"https://static-cdn.m5stack.com/image/m5-docs_homepage/unit/catch_01.webp", "p":"Catch", "sku":"U102" ,"kw":"180 SERVO LEGO", "category":"Servos"},
{"a":"/#/zh_CN/accessory/sg90_servo", "img":"https://static-cdn.m5stack.com/image/m5-docs_homepage/accessory/servo_01.webp", "p":"SG90 servo", "sku":"A076" ,"kw":"180 SERVO"},
{"a":"/#/zh_CN/accessory/servo_kit", "img":"https://static-cdn.m5stack.com/image/m5-docs_homepage/accessory/servo_kit_01.webp", "p":"Servo Kit 180°/360°", "sku":"A076-B&A076-C" ,"kw":"180 360 SERVO Kit"}
],
"线材": [
+3 -3
View File
@@ -6,12 +6,12 @@
## 描述
**4-Relay** 是一款集成4路继电器的Unit,通过I2C进行控制,继电器控制电压最高AC-250V,额定电流10A,瞬时电流可承受16A。每路继电器可单独控制,每路继电器都有一个可编程的状态指示灯。
**4-Relay** 是一款集成4路继电器的Unit,通过I2C进行控制,继电器控制电压最高AC-250V/DC-28V,额定电流10A,瞬时电流可承受16A。每路继电器可单独控制,每路继电器都有一个可编程的状态指示灯。
## 产品特性
- 4路继电器
- AC-250V/10A
- AC-250V/DC-28V/10A
- 状态指示灯
- I2C通讯
@@ -35,7 +35,7 @@
</tr>
<tr>
<td>最大输入电压</td>
<td>250V</td>
<td>AC-250V/DC-28V</td>
</tr>
<tr>
<td>额定电流</td>
+174 -1
View File
@@ -1,6 +1,179 @@
# Catch Unit
<el-tag effect="plain">SKU:U102</el-tag>
<div class="product_pic"><img src="assets/img/product_pics/unit/catch/catch_01.webp"><img src="assets/img/product_pics/unit/catch/catch_02.webp"><img src="assets/img/product_pics/unit/catch/catch_03.webp"></div>
## 描述
**Catch** 是一款由使用SG92R舵机作为动力源的夹爪,该舵机使用PWM信号驱动夹爪齿轮旋转,控制夹爪进行夹持和释放操作。结构上采用了兼容乐高8mm圆孔的设计。你可以将它结合到其他的乐高组件中,搭建出创意十足的控制结构,如机械臂,夹爪车等。
?>由于夹爪的开合角为`90°`,驱动舵机旋转角度请控制在`0-45°`(PWM: 频率50Hz, 0°-45°(pulse:0.5ms-1ms)), 防止阻转导致舵机烧毁。
## 产品特性
- SG92R舵机
- PWM信号驱动
- 乐高孔兼容
- 夹爪开合角度90°
- 兼容RoverC
- 支持输入电压: 4.2-6V
- 开发平台 [UIFlow](http://flow.m5stack.com), [MicroPython](http://micropython.org/), [Arduino](http://www.arduino.cc)
## 包含
- 1x Catch Unit
- 1x HY2.0-4转接头
## 应用
- 夹爪机器人
- 舵机机械臂夹爪
## 规格参数
<table>
<tr style="font-weight:bold">
<td>主控资源</td>
<td>参数</td>
</tr>
<tr>
<td>舵机型号</td>
<td>SG92R</td>
</tr>
<tr>
<td>驱动信号</td>
<td>PWM: 频率50Hz, 0°-45°(pulse:0.5ms-1ms)°</td>
</tr>
<tr>
<td>工作频率</td>
<td>50Hz</td>
</tr>
<tr>
<td>夹爪开合角度</td>
<td>90°</td>
</tr>
<tr>
<td>输入电压范围</td>
<td>4.2-6V</td>
</tr>
<tr>
<td>工作死区</td>
<td>10us</td>
</tr>
<tr>
<td>输出扭力</td>
<td>2.5kg/cm at 4.8V</td>
</tr>
<tr>
<td>输出速度</td>
<td>0.1sec/60° at 4.8V</td>
</tr>
<tr>
<td>工作温度</td>
<td>0°C to 55°C</td>
</tr>
<tr>
<td>净重</td>
<td>21.5g</td>
</tr>
<tr>
<td>毛重</td>
<td>50g</td>
</tr>
<tr>
<td>产品尺寸(夹爪展开)</td>
<td>72 x 56 x 37 mm</td>
</tr>
<tr>
<td>包装尺寸</td>
<td>147 x 90 x 40 mm</td>
</tr>
<tr>
<td>外壳材质</td>
<td>Plastic ( PC )</td>
</tr>
</table>
## 管脚映射
**当将Catch Unit连接至PortB时,管脚映射如下**
<table>
<tr><td>M5Core(PORT B)</td><td>GPIO26</td><td>5V</td><td>GND</td></tr>
<tr><td>Catch Unit</td><td>SIGNAL</td><td>5V</td><td>GND</td></tr>
</table>
## 案例程序
?>该案例控制Catch Unit夹爪循环执行夹持和释放。
<el-card class="box-card" style="margin-bottom:20px">
<div slot="header" class="clearfix">
<span style="font-size: 22px; font-weight: bold;">Arduino</span>
<i class="el-icon-s-management" style="float: right;"></i>
</div>
<div class="box-card-item">
<a href='https://github.com/m5stack/M5Stack/tree/master/examples/Unit/CATCH'><el-tag>For BASIC/M5GO/FIRE</el-tag></a>
</div>
</el-card>
```clike
/*
Description: Control Catch Unit through PWM.
*/
#include <M5Stack.h>
//设置控制引脚
const int servoPin = 26;
//设置频率
int freq = 50;
//设置PWM通道
int ledChannel = 0;
//设置脉冲分辨率
int resolution = 10;
void setup() {
// put your setup code here, to run once:
M5.begin();
M5.Power.begin();
M5.Lcd.setCursor(100, 50, 4);
M5.Lcd.println("Catch Unit");
M5.Lcd.setCursor(40, 120, 4);
ledcSetup(ledChannel, freq, resolution);
ledcAttachPin(servoPin, ledChannel);
}
void loop() {
// High level 0.5ms is angle 0°
// duty = 0.5/20ms = 0.025, 0.025*1023≈25
ledcWrite(ledChannel, 25);
delay(2000);
// High level 1ms is angle 45°
// duty = 1/20ms = 0.05, 0.05*1023≈50
ledcWrite(ledChannel, 50);
delay(2000);
}
```
## 相关视频
<video class="video_size" controls>
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Product_example_video/Unit/CATCH.mp4" type="video/mp4">
</video>
<script>
var purchase_link = 'https://m5stack-store.myshopify.com/products/catch-unit';
anchor_search(purchase_link);
scrollFunc();
</script>
</script>
+2 -2
View File
@@ -96,9 +96,9 @@
| *接口* | *OV2640 Pin*| *ESP32Cam* |
| :------------------- | :--------:| :--------: |
| SCCB Clock | SIOC | IO23 |
| SCCB Data | SIOD | IO22 |
| SCCB Data | SIOD | IO25 |
| System Clock | XCLK | IO27 |
| Vertical Sync | VSYNC | IO25 |
| Vertical Sync | VSYNC | IO22 |
| Horizontal Reference | HREF | IO26 |
| Pixel Clock | PCLK | IO21 |
| Pixel Data Bit 0 | D2 | IO17 |