Noduino NODEC

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
(快速尝试)
(快速尝试)
第29行: 第29行:
 
=== 配置 WiFi ===
 
=== 配置 WiFi ===
 
Connect WiFi
 
Connect WiFi
 +
 
打开微信,扫一扫如下二维码:
 
打开微信,扫一扫如下二维码:
 
Scan the QR code
 
Scan the QR code
第43行: 第44行:
  
 
点上图中的 "配置设备上网" 进入:
 
点上图中的 "配置设备上网" 进入:
Click "Connecting
+
Click "Connecting Network" button
  
 
[[文件:MK-Noduino-MJYUN-NFF-2.jpg | 450px]]
 
[[文件:MK-Noduino-MJYUN-NFF-2.jpg | 450px]]
第49行: 第50行:
  
 
输入您的路由密码,点 “连接”,等待配网完成(注意,目前此快速配网模式不支持 5G 路由,只支持 2.4G;另外企业级安全认证也不支持)
 
输入您的路由密码,点 “连接”,等待配网完成(注意,目前此快速配网模式不支持 5G 路由,只支持 2.4G;另外企业级安全认证也不支持)
 
+
Enter WiFi password then click "Connect" to complete WiFi connection. (NOTE, this network connection model only apply to 2.4G router, unapplicable for neither 5G router nor Enterprise level security certification.
 
<br><br>
 
<br><br>
  
 
=== 绑定设备 ===
 
=== 绑定设备 ===
 +
Binding Device
  
 
WiFi 配置完成后,微信自动进入局域网发现设备模式,其会列出当前路由环境里同一类型的设备列表:
 
WiFi 配置完成后,微信自动进入局域网发现设备模式,其会列出当前路由环境里同一类型的设备列表:
 
+
Complete WiFi connection, WeChat will auto detect linkable devices in current routed environment and list them
  
 
[[文件:MK-Noduino-MJYUN-NFF-3.jpg | 450px]]
 
[[文件:MK-Noduino-MJYUN-NFF-3.jpg | 450px]]
第62行: 第64行:
  
 
第一个设备,最后四个字母是为该设备的 MAC 地址,这个可与串口输出对应
 
第一个设备,最后四个字母是为该设备的 MAC 地址,这个可与串口输出对应
 +
1st device, last 4 letters is the MAC address that can corresponds to the serial port output
  
 
+
点击第一个设备,进入页面,在页面最下面会有 “绑定设备” 按钮 (如果已经绑定过该设备,最下面的按钮为“进入公众号”),点击按钮,完成设备绑定
点击第一个设备,进入页面,在页面最下面会有 “绑定设备” 按钮 (如果已经绑定过改设备,最下面的按钮为“进入公众号”),点击按钮,完成设备绑定
+
Click the 1st device then click the "Bind Device" on the bottom of next page. (Note, if this device has been binded, button at the bottom will be "Enter Official Account"
 
+
 
<br><br>
 
<br><br>
  
 
=== 列出已绑定设备 ===
 
=== 列出已绑定设备 ===
 +
Bind devices list
  
 
完成后,点“进入公众号”,在公众号菜单的 “智能设备”,即可列出你绑定的所有设备
 
完成后,点“进入公众号”,在公众号菜单的 “智能设备”,即可列出你绑定的所有设备
 
+
Following above step, please click "Enter Official Account" button, all your bind devices will be listed in the menu "Smart Devices"
  
 
[[文件:MK-Noduino-iBaihe-NFF-4.jpg | 450px]]
 
[[文件:MK-Noduino-iBaihe-NFF-4.jpg | 450px]]
第78行: 第81行:
  
 
=== 控制设备 ===
 
=== 控制设备 ===
 +
Control Device
  
 
该快速示例,默认设备名为 "Noduino Ctrl5Relay",在上面的设备列表页里,触摸一下 "Noduino Ctrl5Relay" 这个设备,即可进入该设备的控制界面:
 
该快速示例,默认设备名为 "Noduino Ctrl5Relay",在上面的设备列表页里,触摸一下 "Noduino Ctrl5Relay" 这个设备,即可进入该设备的控制界面:
 
+
The default device name of this quick example is Noduino Ctrl5Relay". Click "Noduino Ctrl5Relay" in the device list page then coming to the control page
  
 
[[文件:MK-Noduino-iBaihe-NFF-5.jpg | 450px]]
 
[[文件:MK-Noduino-iBaihe-NFF-5.jpg | 450px]]
第86行: 第90行:
  
 
Relay 和 模块管脚对应关系:
 
Relay 和 模块管脚对应关系:
 
+
Correspondence of Relay and model pins
 
<pre>
 
<pre>
 
1. GPIO13(D4) control the 1st relay
 
1. GPIO13(D4) control the 1st relay
第97行: 第101行:
  
 
微信 UI 页里 开 / 关 Relay,物理上,对应的 GPIO 就会被拉高 / 拉低
 
微信 UI 页里 开 / 关 Relay,物理上,对应的 GPIO 就会被拉高 / 拉低
 
+
Turn On/Off Relay in WeChat UI page. Corresponding GPIO will be increase or reduce physically.
 
<br><br>
 
<br><br>
  

2016年10月31日 (一) 15:59的版本

目录

1 概述

NODE C.png


  • 超小体积,15.5mm x 17.8mm,一角硬币大小
 Super mini, 15.5mm*17.8mm, 1 cent coin size
  • ESP8285,芯片内置 1MB Flash
 ESP8285, built in 1MB Flash
  • 二代 WiFi IoT 模块,独立 WiFi 节点(无需 MCU)
 2nd generation WiFi IoT model, independent WiFi nodes (MCU not necessary)
  • 模块 3.3V 供电,通电即用!
 3.3v power supply
  • 最高支持控制 6 路继电器,支持传感器、OLED 屏
 Support up to 6 relay, sensor and OLED



2 快速尝试

准备一个 3.3V 电源 (有 600mA 的输出电流)接上模块背面的 VCC (正极)和 GND: Link 3.3V power supply (600mA output) to VCC&GND that is on the back of model;

Nodec-2.jpg


通电后,模块自动进入探测无线 WiFi 路由模式,如果没有发现可以连接成功的路由器,则自动进入配网模式,此时按如下步骤为其配置 WiFi Power on, the model will auto detect Wifi. If there is no available router can be detected, the model will keep connecting network. Please follow below indication to connect WiFi.

2.1 配置 WiFi

Connect WiFi

打开微信,扫一扫如下二维码: Scan the QR code Maike-wifi-ctrl-2233-all.jpg


自动进入如下: Coming to below page

MK-Noduino-MJYUN-NFF-1.jpg


点上图中的 "配置设备上网" 进入: Click "Connecting Network" button

MK-Noduino-MJYUN-NFF-2.jpg


输入您的路由密码,点 “连接”,等待配网完成(注意,目前此快速配网模式不支持 5G 路由,只支持 2.4G;另外企业级安全认证也不支持) Enter WiFi password then click "Connect" to complete WiFi connection. (NOTE, this network connection model only apply to 2.4G router, unapplicable for neither 5G router nor Enterprise level security certification.

2.2 绑定设备

Binding Device

WiFi 配置完成后,微信自动进入局域网发现设备模式,其会列出当前路由环境里同一类型的设备列表: Complete WiFi connection, WeChat will auto detect linkable devices in current routed environment and list them

MK-Noduino-MJYUN-NFF-3.jpg


第一个设备,最后四个字母是为该设备的 MAC 地址,这个可与串口输出对应 1st device, last 4 letters is the MAC address that can corresponds to the serial port output

点击第一个设备,进入页面,在页面最下面会有 “绑定设备” 按钮 (如果已经绑定过该设备,最下面的按钮为“进入公众号”),点击按钮,完成设备绑定 Click the 1st device then click the "Bind Device" on the bottom of next page. (Note, if this device has been binded, button at the bottom will be "Enter Official Account"

2.3 列出已绑定设备

Bind devices list

完成后,点“进入公众号”,在公众号菜单的 “智能设备”,即可列出你绑定的所有设备 Following above step, please click "Enter Official Account" button, all your bind devices will be listed in the menu "Smart Devices"

MK-Noduino-iBaihe-NFF-4.jpg



2.4 控制设备

Control Device

该快速示例,默认设备名为 "Noduino Ctrl5Relay",在上面的设备列表页里,触摸一下 "Noduino Ctrl5Relay" 这个设备,即可进入该设备的控制界面: The default device name of this quick example is Noduino Ctrl5Relay". Click "Noduino Ctrl5Relay" in the device list page then coming to the control page

MK-Noduino-iBaihe-NFF-5.jpg


Relay 和 模块管脚对应关系: Correspondence of Relay and model pins

1. GPIO13(D4) control the 1st relay
2. GPIO12(D5) control the 2nd relay (pull up)
3. GPIO14(D6) control the 3rd relay
4. GPIO16(D7) control the 4th relay
5. GPIO4 (D8) control the 5th relay


微信 UI 页里 开 / 关 Relay,物理上,对应的 GPIO 就会被拉高 / 拉低 Turn On/Off Relay in WeChat UI page. Corresponding GPIO will be increase or reduce physically.

3 典型应用

3.1 继电器开关

通用 110V / 220V WiFi 微信电源开关:


Openonoff-1.jpg


内置Airkiss,手机控制 WiFi 智能开关,详情:Noduino_OpenOnoff_CN




3.2 多路继电器控制

110V / 220V WiFi 微信继电器开关,单路 250V/10A

家庭自动化、智能家居。。。


IBaihe-v2.0-layout.png


底板设计文件在 github: https://github.com/icamgo/Noduino-iBaihe-Shield



3.3 四路 LED 控制

R, G, B, W 全彩 LED 控制器,微信 Airkiss,微信控制

OpenLight,最高支持 32W

OpenLight-Controller-2.jpg Openlight-ctrl-demo.jpg


详情:Noduino_OpenLight_CN



3.4 窗帘电机控制

  • 正转控制
  • 反转控制
  • 位置传感器读取


OpenCurtain.jpg


详情:Noduino_OpenCurtain_CN



4 管脚接口

注意:模块只能 3.3V 供电,5V 供电会烧毁芯片,切记切记!


正面:

 GPIO12 GPIO13 GPIO14 GPIO4 GPIO5 GPIO15


背面:

 GPIO16 GPIO0 GND TX RX VCC


默认烧写的固件为 5 路继电器控制固件,使用的 GPIO 资源为:

1. GPIO13(D4) control the 1st relay
2. GPIO12(D5) control the 2nd relay (pull up)
3. GPIO14(D6) control the 3rd relay
4. GPIO16(D7) control the 4th relay
5. GPIO4 (D8) control the 5th relay


6 路继电器控制固件,第 6 路为: GPIO5 (D9) control the 6th relay


应用如需外接 I2C 口的传感器、OLED 屏等,可将 GPIO4 (D8) 和 GPIO5 (D9) 作为 I2C 之 SCL 和 SDA,参考示例:


这样即便 GPIO4 和 GPIO5 用作 I2C,依然有 GPIO12, GPIO13, GPIO14, GPIO15, GPIO16, GPIO0 用作继电器控制




5 原理图

Nodec-v2.0-sch.jpg




6 驱动继电器

模块是 3.3V 电平,驱动 5V 继电器,需要有个简单的外围电路:


Relay-driver.jpg


继电器推荐 HKE HRS3FNH

SI2302 MOSFET 管,可用 DTC143ECA 替换 (此时可移去 R1)


此电路经大功率 1200W 感性负载、容性负载测试,稳定可靠,已大规模用于批量产品中。。。


多路继电器控制,复制该单元电路即可




7 按钮和 LED

默认固件支持:

  • GPIO0 可以接一个按钮,按下接地。固件支持。短按反转所有继电器的状态,长按恢复出厂设置(清除 WiFi 配置、清除设备 ID ...)
  • RX 接一个蓝 LED 到地。固件默认支持,用于指示 WiFi 状态


Noduino-openoff-key-led.jpg



8 电源

模块供电电压 3.3V,正常运转所需电流 200mA,特殊情形瞬时电流可到 1A

所需电源之额定电流必须能到 600mA,电源电流不够,芯片会不稳定,最常见为无故重启

电源输出侧建议加 220uF / 470uF 电容蓄容,以应对芯片可能到 1A 的瞬时电流


DC-DC 芯片,推荐 AP2112 (5V 转 3.3V,小体积) / AMS1117-3.3 (12V-5V 转 3.3V,大电流) / WL2803G


8.1 AMS1117-3.3

Feature
  • 1000mA LDO
  • Dropout voltage : 1.1V @ Iout = 800mA load current
  • The quiescent current is typically 5mA
  • Vin MAX = 15V
  • SOT-223-3L package


AMS1117-pin.png



8.2 WL2803G

需要低 dropout voltage 的场合,替换 AMS1117

Feature
  • 1000mA CMOS LDO
  • Dropout voltage : 260mV @ Iout = 800mA load current
  • The quiescent current is typically 150uA
  • Vin MAX = 6.5V
  • SOT-223-3L package
  • Output 3.3V is marking 2803G**/YYWW [ ** - Voltage code (33: 3.3V), YY - Year code, WW - Week code ]


Wl2803g-pin-app.png



8.3 AP2112

Feature
  • 600mA CMOS LDO
  • Low Dropout Voltage (3.3V): 250mV (Typ.) @ 600mA
  • Low Quiescent Current: 55μA (Typ.)
  • Low Standby Current: 0.01μA (Typ.)
  • Vin MAX = 6.5V
  • Provides SOT-23-5, SOT-89-5, and SOIC-8 packages


AP2112-pin-app.png



8.4 MP1470

宽电压输入,建议用 MP1470

  • Wide 4.7V-to-16V Operating Input Range
  • Fixed 500kHz Switching Frequency
  • Over-Current Protection and Hiccup
  • Thermal Shutdown
  • Output Adjustable from 0.8V
  • Available in a 6-pin TSOT-23 package


Mp1470-typical.jpg



9 固件烧写

模块默认烧写的是微信控制 5 路继电器的固件,可自行刷写微信控制 6 路继电器的固件


模块自带 Bootloader,可直接通过串口刷写固件。

GPIO0 拉高是正常启动;拉低后再上电,模块会自动进入刷机模式


9.1 准备工具

模块设计时把编程刷机的接口都放在在背面,用一个顶针接上杜邦线,连上 USB 转 TTL 板,就能刷写固件


准备一个 5 pin 的顶针,此物某宝有售,烧录探针2.54 5P烧录工具

5pin.jpg


准备一个 USB 转串口板,此处我们使用一个 FT232RL USB 转串口板,此物某宝有售:FT232RL USB 转串口板

Ft232.jpg


如下接线:

  • USB_GND ------> NODEC_GPIO0
  • USB_GND -----> NODEC_GND
  • USB_RXD -----> NODEC_TX
  • USB_TXD -----> NODEC_RX


以上接好后,最后 USB_VCC3.3 -----> NODEC_VCC 通电开机,即进入刷机模式



9.2 准备固件

获取 noduino-sdk:

$ git clone --recursive git://github.com/icamgo/noduino-sdk.git noduino-sdk


生成 toolchain (you need Python 2.7):

$ cd noduino-sdk/toolchain
$ ./gen.py

编译:

$ cd ../sketch/ctrl6relay
$ make


各平台下,Noduino SDK 使用,更多参考:



9.3 刷写固件

还是在 sketch/ctrl5relay 目录下,直接 make flash:

$ make produce

即可上传固件。不同平台下,你的串口设备号可能不一样,确认一下你的串口设备,比如在 Windows 下 FT232RL 板可能被识别为 COM3 (设备管理器里查看),则:

$ make produce ESPPORT=COM3

即可



10 常见问题

10.1 射频性能

出厂测试,保证家用环境下 WiFi 穿一堵墙,配网和控制可正常使用

如发现配网多次失败、经常掉线类似问题,可先用示波器确认电源纹波:

一般情形下,发送 11N MCS7 的包,电源纹波必须 < 80 mV。发送 11B 包时,电源纹波必须 < 120 mV



11 扩展阅读

更多问题参考:

























个人工具
名字空间

变换
操作
导航
工具箱