Noduino NODEC

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
(Relay Switch)
(Application)
 
(未显示2个用户的41个中间版本)
第66行: 第66行:
 
=== List device ===
 
=== List device ===
  
Following above step, please click "Enter Official Account" button, all your linked devices will be listed in the menu "Smart Devices" (The second button on the bottom of the page)
+
Following above steps, please click "Enter Official Account" button, all your linked devices will be listed in the menu "Smart Devices" (The second button on the bottom of the page)
  
 
[[文件:MK-Noduino-iBaihe-NFF-4.jpg | 450px]]
 
[[文件:MK-Noduino-iBaihe-NFF-4.jpg | 450px]]
第96行: 第96行:
 
== Application ==
 
== Application ==
  
=== Relay Switch ===
+
=== Smart Plug ===
  
通用 110V / 220V WiFi 微信电源开关:
+
* AC 85V - 250V Smart Plug
 +
* ESP8285 inside
 +
* 250V 10A relay
 +
* Shell size 53mm x 53mm x 27mm
  
110V/220V WeChat Power
 
  
[[文件:Openonoff-1.jpg | 600px]]
+
[[文件:Open-plug-board-shell.jpg | 600px]]
 +
[[文件:Open-plug-board.jpg | 600px]]
  
  
内置Airkiss,手机控制 WiFi 智能开关,详情:[[Noduino_OpenOnoff_CN]]
+
Details: [[Noduino OpenPlug]]
 +
 
 +
<br><br>
 +
 
 +
=== Relay Switch ===
 +
 
 +
110V/220V MQTT Power Switch
 +
 
 +
[[文件:Openonoff-1.jpg | 600px]]
 +
 
  
Airkiss build-in, Mobile remote WiFi smart switch
+
WeChat Airkiss build-in, mobile remote WiFi smart switch: [[Noduino_OpenOnoff]]
  
 
<br><br>
 
<br><br>
  
=== 多路继电器控制 ===
+
=== Multi-channel Relay Control ===
  
110V / 220V WiFi 微信继电器开关,单路 250V/10A  
+
110V/220V WiFi MQTT Relay switch, single channel 250V/10A
  
家庭自动化、智能家居。。。
+
Home Automation, Smart Home...
  
  
第121行: 第133行:
  
  
底板设计文件在 github: https://github.com/icamgo/Noduino-iBaihe-Shield
+
Eagle design documents: https://github.com/icamgo/Noduino-iBaihe-Shield
  
 
<br><br>
 
<br><br>
  
=== 四路 LED 控制 ===
+
=== 4-Channle LED Control ===
  
R, G, B, W 全彩 LED 控制器,微信 Airkiss,微信控制
+
R, G, B, W 4-way full color LED controller, MQTT,  using the WeChat as the HTML5 front-end to control
  
OpenLight,最高支持 32W
+
OpenLight, 32W MAX
  
 
[[文件:OpenLight-Controller-2.jpg | 600px]]
 
[[文件:OpenLight-Controller-2.jpg | 600px]]
 +
 
[[文件:Openlight-ctrl-demo.jpg | 600px]]
 
[[文件:Openlight-ctrl-demo.jpg | 600px]]
  
  
详情:[[Noduino_OpenLight_CN]]
+
Details:[[Noduino_OpenLight]]
  
 
<br><br>
 
<br><br>
  
=== 窗帘电机控制 ===
+
=== Curtain Motor Control ===
 
+
* 正转控制
+
* 反转控制
+
* 位置传感器读取
+
  
 +
* Clockwise Control
 +
* Anti-clockwise Control
 +
* Position Sensor support
 +
  
 
[[文件:OpenCurtain.jpg | 600px]]
 
[[文件:OpenCurtain.jpg | 600px]]
  
  
详情:[[Noduino_OpenCurtain_CN]]
+
Details:[[Noduino_OpenCurtain]]
  
 
<br><br>
 
<br><br>
  
== 管脚接口 ==
+
== Pin Interface ==
  
<font color=red><b>注意:模块只能 3.3V 供电,5V 供电会烧毁芯片,切记切记!</b></font>
+
<font color=red><b>Attention: The model only apply to 3.3V power supply !</b></font>
  
 
+
Frontside:
正面:
+
  
 
   GPIO12 GPIO13 GPIO14 GPIO4 GPIO5 GPIO15
 
   GPIO12 GPIO13 GPIO14 GPIO4 GPIO5 GPIO15
  
  
 
+
Backside:
背面:
+
  
 
   GPIO16 GPIO0 GND TX RX VCC
 
   GPIO16 GPIO0 GND TX RX VCC
  
  
默认烧写的固件为 5 路继电器控制固件,使用的 GPIO 资源为:
+
The default firmware is 5 channel relay control firmware, used GPIO resource:
  
 
<pre>
 
<pre>
第180行: 第191行:
  
  
6 路继电器控制固件,第 6 路为: GPIO5 (D9) control the 6th relay
+
6 channel relay control firmware, the 6th channel is: GPIO5 (D9) control the 6th relay
  
  
应用如需外接 I2C 口的传感器、OLED 屏等,可将 GPIO4 (D8) GPIO5 (D9) 作为 I2C 之 SCL 和 SDA,参考示例:
+
If need to connect sensor with I2C interface, OLED screen etc...GPIO4(D8) and GPIO5(D9) can work as SCL & SDA of I2C, for example:
  
 
* [[Noduino SHT2x]] SHT2X Digital Humidity & Temperature Sensor
 
* [[Noduino SHT2x]] SHT2X Digital Humidity & Temperature Sensor
第198行: 第209行:
  
  
这样即便 GPIO4 GPIO5 用作 I2C,依然有 GPIO12, GPIO13, GPIO14, GPIO15, GPIO16, GPIO0 用作继电器控制
+
Although GPIO4 (as SDA) and GPIO5 (as SCL) act as I2C, GPIO12, GPIO13, GPIO14, GPIO15, GPIO16, GPIO0 still work as relay controller
 
+
  
 
<br><br>
 
<br><br>
  
== 原理图 ==
+
== Schematic diagram ==
  
 
[[文件:Nodec-v2.0-sch.jpg | 800px]]
 
[[文件:Nodec-v2.0-sch.jpg | 800px]]
 
  
 
<br><br>
 
<br><br>
  
== 驱动继电器 ==
+
== Driving Relay ==
 
+
模块是 3.3V 电平,驱动 5V 继电器,需要有个简单的外围电路:
+
  
 +
The model is 3.3V electrical level, a simple peripheral circuit is necessary to drive 5V relay:
  
 
[[文件:Relay-driver.jpg]]
 
[[文件:Relay-driver.jpg]]
  
  
继电器推荐 HKE HRS3FNH
+
Relay recommend HKE HRS3FNH
  
SI2302 MOSFET 管,可用 DTC143ECA 替换 (此时可移去 R1)
+
SI2302 MOSFET pipe can be exchanged by DTC143ECA (remove R1)
  
 +
This circuit is stable & reliable that has been tested through 1200W inductive load & capacitive load, and mass for mass production。
  
此电路经大功率 1200W 感性负载、容性负载测试,稳定可靠,已大规模用于批量产品中。。。
 
 
 
多路继电器控制,复制该单元电路即可
 
  
 +
Multi channel relay control can copy the unit circuit.
  
 
<br><br>
 
<br><br>
  
== 按钮和 LED ==
+
== Push Button & LED ==
  
默认固件支持:
+
Default Firmware Support:
  
* GPIO0 可以接一个按钮,按下接地。固件支持。短按反转所有继电器的状态,长按恢复出厂设置(清除 WiFi 配置、清除设备 ID ...)
+
* GPIO0 can pick up a button then press to connect ground. Firmware supportable. Short press to reverse all relays situation, long touch to restore factory settings
* RX  接一个蓝 LED 到地。固件默认支持,用于指示 WiFi 状态
+
  
 +
* RX receive a blue LED into the ground. Firmware supportable can be used to indicate WiFi situation
  
 
[[文件:Noduino-openoff-key-led.jpg]]
 
[[文件:Noduino-openoff-key-led.jpg]]
第243行: 第249行:
 
<br><br>
 
<br><br>
  
== 电源 ==
+
== Power Supply ==
 
+
模块供电电压 3.3V,正常运转所需电流 200mA,特殊情形瞬时电流可到 1A
+
  
<font color=red>所需电源之额定电流必须能到 600mA,电源电流不够,芯片会不稳定,最常见为无故重启</font>
+
The supply voltage of model is 3.3V, required current is 200mA, peak current for special case is up to 1A
  
电源输出侧建议加 220uF / 470uF 电容蓄容,以应对芯片可能到 1A 的瞬时电流
+
<font color=red>Rated current of the power supply must be more than 600mA. Insufficient current will cause chip unstable, most oftenly reboot with no reason</font>
  
 +
Recommend adding 220uF / 470uF capacitor to power output side in response to 1A peak current of the chip
  
DC-DC 芯片,推荐 AP2112 (5V 3.3V,小体积) / AMS1117-3.3 (12V-5V 3.3V,大电流) / WL2803G  
+
DC-DC chip, recommend AP2112 (5V switch 3.3V,compact size) / AMS1117-3.3 (12V-5V switch 3.3V,high current) / WL2803G  
  
  
第272行: 第277行:
 
=== WL2803G ===
 
=== WL2803G ===
  
需要低 dropout voltage 的场合,替换 AMS1117
+
Replace AMS1117 to fit low dropout voltage situation
  
 
;;Feature:
 
;;Feature:
第306行: 第311行:
 
=== MP1470 ===
 
=== MP1470 ===
  
宽电压输入,建议用 MP1470
+
Wide input voltage recommend to use MP1470
  
 
* Wide 4.7V-to-16V Operating Input Range
 
* Wide 4.7V-to-16V Operating Input Range
第320行: 第325行:
 
<br><br>
 
<br><br>
  
== 固件烧写 ==
+
== Update Firmware ==
  
模块默认烧写的是微信控制 5 路继电器的固件,可自行刷写微信控制 6 路继电器的固件
+
Default firmware that the model upload is WeChat control 5 relay, 6 relay firmware can be write by your own
  
 +
Bootloader built in, the firmware can be uploaded through the serial port directly
  
模块自带 Bootloader,可直接通过串口刷写固件。
+
GPIO0 start up is normal; Pull down and then power up the module will automatically enter upgrade mode
  
GPIO0 拉高是正常启动;拉低后再上电,模块会自动进入刷机模式
+
=== Tools ===
  
 
+
The programming Interface were in the back of module. Use a 5-pin probe on Dupont line, connected to the USB switch TTL Panel,  firmware can be upgrade then.
=== 准备工具 ===
+
 
+
模块设计时把编程刷机的接口都放在在背面,用一个顶针接上杜邦线,连上 USB TTL 板,就能刷写固件
+
 
+
 
+
准备一个 5 pin 的顶针,此物某宝有售,[https://item.taobao.com/item.htm?id=531373443594 烧录探针2.54 5P烧录工具]
+
  
 
[[文件:5pin.jpg]]
 
[[文件:5pin.jpg]]
  
  
 
+
One USB switch serial port board, we used a FT232RL breakout board / Noduino Falcon board
准备一个 USB 转串口板,此处我们使用一个 FT232RL USB 转串口板,此物某宝有售:[http://s.click.taobao.com/bPo0xTx FT232RL USB 转串口板]
+
  
 
[[文件:Ft232.jpg | 800px]]
 
[[文件:Ft232.jpg | 800px]]
  
  
如下接线:
+
Wiring as below:
  
* USB_GND ------> NODEC_GPIO0
+
* USB_GND ------> NODE_GPIO0
* USB_GND -----> NODEC_GND
+
* USB_GND -----> NODE_GND
* USB_RXD -----> NODEC_TX
+
* USB_RXD -----> NODE_TX
* USB_TXD -----> NODEC_RX
+
* USB_TXD -----> NODE_RX
  
  
以上接好后,最后 USB_VCC3.3 -----> NODEC_VCC 通电开机,即进入刷机模式
+
Last but not least, USB_VCC3.3 -----> NODE_VCC power on, then enter upgrade mode
  
 
<br><br>
 
<br><br>
  
=== 准备固件 ===
+
=== Prepare Firmware ===
  
获取 noduino-sdk:
+
Fetch the noduino-sdk
  
 
<source lang=bash>
 
<source lang=bash>
第367行: 第366行:
  
  
生成 toolchain (you need Python 2.7)
+
Generate toolchain (you need Python 2.7)
  
 
<source lang=bash>
 
<source lang=bash>
第374行: 第373行:
 
</source>
 
</source>
  
编译:
+
 
 +
Compile:
  
 
<source lang=bash>
 
<source lang=bash>
第382行: 第382行:
  
  
各平台下,Noduino SDK 使用,更多参考:
+
Noduino SDK usage under different platform please refer to:
  
 
* [[Getting Started with Noduino SDK on Linux]]
 
* [[Getting Started with Noduino SDK on Linux]]
第390行: 第390行:
 
<br><br>
 
<br><br>
  
=== 刷写固件 ===
+
=== Firmware upload  ===
  
还是在 sketch/ctrl5relay 目录下,直接 make flash:
+
In sketch/ctrl5relay directory, 'make flash' directly:
  
 
<source lang=bash>
 
<source lang=bash>
第398行: 第398行:
 
</source>
 
</source>
  
即可上传固件。不同平台下,你的串口设备号可能不一样,确认一下你的串口设备,比如在 Windows 下 FT232RL 板可能被识别为 COM3 (设备管理器里查看),则:
+
Firmware will be uploaded. Number of your serial port might be different in different platform, please confirm the device. For instance, FT232RL board may be identified as COM3 in Windows(check in device manager),then:
  
 
<source lang=bash>
 
<source lang=bash>
 
$ make produce ESPPORT=COM3
 
$ make produce ESPPORT=COM3
 
</source>
 
</source>
 
即可
 
  
 
<br><br>
 
<br><br>
  
== 常见问题 ==
+
== FAQ ==
  
=== 射频性能 ===
+
=== RF performance ===
  
出厂测试,保证家用环境下 WiFi 穿一堵墙,配网和控制可正常使用
+
Appearance test, assure network connection and control normal operation in home environment with WiFi through a wall
  
如发现配网多次失败、经常掉线类似问题,可先用示波器确认电源纹波:
+
If network connection failed many times or drop the line occurs often, please use the oscilloscope to confirm the power supply ripple
  
一般情形下,发送 11N MCS7 的包,电源纹波必须 < 80 mV。发送 11B 包时,电源纹波必须  < 120 mV
+
In general, send 11N MCS7 packet, power supply ripple must be <80mV. Send 11B packet then power supply ripple must be <120mV
  
 
<br><br>
 
<br><br>
  
== 扩展阅读 ==
+
== Extensive Reading ==
  
;;更多问题参考:
+
;;More Reference:
  
 
* [[Noduino]]
 
* [[Noduino]]

2016年11月14日 (一) 11:10的最后版本

Chinese version: Noduino NODEC CN

目录

[编辑] 1 Overview

NODE C.png


  • Super mini, 15.5mm*17.8mm, 1 cent coin size
  • ESP8285, built in 1MB Flash
  • 2nd generation WiFi IoT model, independent WiFi nodes (MCU not necessary)
  • 3.3v power supply
  • Support up to 6 relay, sensor and OLED



[编辑] 2 Quick Start

Link 3.3V power supply (600mA output) to VCC&GND that is on the back of model;


Nodec-2.jpg


Power on, the model will auto detect Wifi. If there is no available router can be detected, the model will be waiting for network connection. Please follow below indication to connect WiFi.


[编辑] 2.1 Setup WiFi

Make sure that your phone is connected to your WiFi router.

Scan the QR code in WeChat


Maike-wifi-ctrl-2233-all-en.jpg


Coming to below page:

MK-Noduino-MJYUN-NFF-1.jpg


Click "Connecting Network" button:

MK-Noduino-MJYUN-NFF-2.jpg


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 Link Device

Complete WiFi connection, WeChat will auto detect linkable devices in current routed environment and list them:

MK-Noduino-MJYUN-NFF-3.jpg


1st device, last 4 letters is the MAC address that can corresponds to the serial port output


Click the 1st device then click the "Link Device" on the bottom of next page. (Note, if this device has been linked, button at the bottom will be "Enter Official Account"



[编辑] 2.3 List device

Following above steps, please click "Enter Official Account" button, all your linked devices will be listed in the menu "Smart Devices" (The second button on the bottom of the page)

MK-Noduino-iBaihe-NFF-4.jpg



[编辑] 2.4 Control Device

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


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


Turn On/Off Relay in WeChat UI page. Corresponding GPIO will be increase or reduce physically.



[编辑] 3 Application

[编辑] 3.1 Smart Plug

  • AC 85V - 250V Smart Plug
  • ESP8285 inside
  • 250V 10A relay
  • Shell size 53mm x 53mm x 27mm


Open-plug-board-shell.jpg Open-plug-board.jpg


Details: Noduino OpenPlug



[编辑] 3.2 Relay Switch

110V/220V MQTT Power Switch

Openonoff-1.jpg


WeChat Airkiss build-in, mobile remote WiFi smart switch: Noduino_OpenOnoff



[编辑] 3.3 Multi-channel Relay Control

110V/220V WiFi MQTT Relay switch, single channel 250V/10A

Home Automation, Smart Home...


IBaihe-v2.0-layout.png


Eagle design documents: https://github.com/icamgo/Noduino-iBaihe-Shield



[编辑] 3.4 4-Channle LED Control

R, G, B, W 4-way full color LED controller, MQTT, using the WeChat as the HTML5 front-end to control

OpenLight, 32W MAX

OpenLight-Controller-2.jpg

Openlight-ctrl-demo.jpg


Details:Noduino_OpenLight



[编辑] 3.5 Curtain Motor Control

  • Clockwise Control
  • Anti-clockwise Control
  • Position Sensor support


OpenCurtain.jpg


Details:Noduino_OpenCurtain



[编辑] 4 Pin Interface

Attention: The model only apply to 3.3V power supply !

Frontside:

 GPIO12 GPIO13 GPIO14 GPIO4 GPIO5 GPIO15


Backside:

 GPIO16 GPIO0 GND TX RX VCC


The default firmware is 5 channel relay control firmware, used GPIO resource:

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 channel relay control firmware, the 6th channel is: GPIO5 (D9) control the 6th relay


If need to connect sensor with I2C interface, OLED screen etc...GPIO4(D8) and GPIO5(D9) can work as SCL & SDA of I2C, for example:


Although GPIO4 (as SDA) and GPIO5 (as SCL) act as I2C, GPIO12, GPIO13, GPIO14, GPIO15, GPIO16, GPIO0 still work as relay controller



[编辑] 5 Schematic diagram

Nodec-v2.0-sch.jpg



[编辑] 6 Driving Relay

The model is 3.3V electrical level, a simple peripheral circuit is necessary to drive 5V relay:

Relay-driver.jpg


Relay recommend HKE HRS3FNH

SI2302 MOSFET pipe can be exchanged by DTC143ECA (remove R1)

This circuit is stable & reliable that has been tested through 1200W inductive load & capacitive load, and mass for mass production。


Multi channel relay control can copy the unit circuit.



[编辑] 7 Push Button & LED

Default Firmware Support:

  • GPIO0 can pick up a button then press to connect ground. Firmware supportable. Short press to reverse all relays situation, long touch to restore factory settings
  • RX receive a blue LED into the ground. Firmware supportable can be used to indicate WiFi situation

Noduino-openoff-key-led.jpg



[编辑] 8 Power Supply

The supply voltage of model is 3.3V, required current is 200mA, peak current for special case is up to 1A

Rated current of the power supply must be more than 600mA. Insufficient current will cause chip unstable, most oftenly reboot with no reason

Recommend adding 220uF / 470uF capacitor to power output side in response to 1A peak current of the chip

DC-DC chip, recommend AP2112 (5V switch 3.3V,compact size) / AMS1117-3.3 (12V-5V switch 3.3V,high current) / 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

Replace AMS1117 to fit low dropout voltage situation

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

Wide input voltage recommend to use 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 Update Firmware

Default firmware that the model upload is WeChat control 5 relay, 6 relay firmware can be write by your own

Bootloader built in, the firmware can be uploaded through the serial port directly

GPIO0 start up is normal; Pull down and then power up the module will automatically enter upgrade mode

[编辑] 9.1 Tools

The programming Interface were in the back of module. Use a 5-pin probe on Dupont line, connected to the USB switch TTL Panel, firmware can be upgrade then.

5pin.jpg


One USB switch serial port board, we used a FT232RL breakout board / Noduino Falcon board

Ft232.jpg


Wiring as below:

  • USB_GND ------> NODE_GPIO0
  • USB_GND -----> NODE_GND
  • USB_RXD -----> NODE_TX
  • USB_TXD -----> NODE_RX


Last but not least, USB_VCC3.3 -----> NODE_VCC power on, then enter upgrade mode



[编辑] 9.2 Prepare Firmware

Fetch the noduino-sdk

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


Generate toolchain (you need Python 2.7)

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


Compile:

$ cd ../sketch/ctrl6relay
$ make


Noduino SDK usage under different platform please refer to:



[编辑] 9.3 Firmware upload

In sketch/ctrl5relay directory, 'make flash' directly:

$ make produce

Firmware will be uploaded. Number of your serial port might be different in different platform, please confirm the device. For instance, FT232RL board may be identified as COM3 in Windows(check in device manager),then:

$ make produce ESPPORT=COM3



[编辑] 10 FAQ

[编辑] 10.1 RF performance

Appearance test, assure network connection and control normal operation in home environment with WiFi through a wall

If network connection failed many times or drop the line occurs often, please use the oscilloscope to confirm the power supply ripple

In general, send 11N MCS7 packet, power supply ripple must be <80mV. Send 11B packet then power supply ripple must be <120mV



[编辑] 11 Extensive Reading

More Reference

























个人工具
名字空间

变换
操作
导航
工具箱