Difference between revisions of "Microduino-Module WIFI,ESP"

From Microduino Wiki
Jump to: navigation, search
 
(36 intermediate revisions by 6 users not shown)
Line 4: Line 4:
 
|
 
|
 
[[file:Microduino-8266-rect.jpg|400px|thumb|right|Microduino-ESP]]
 
[[file:Microduino-8266-rect.jpg|400px|thumb|right|Microduino-ESP]]
Microduino-WiFi (ESP) module is a WiFi communication module, through the serial port
+
Microduino-WIFI(ESP) is a WIFI communication module, which can communicate with Core+/CoreUSB (Core can not be used, because its baud rate can't reach at 115200.) through the serial port or connect with other WIFI devices and is a complete and system-in-itself wifi network resolution.
Transmission data to Core / Core + / CoreUSB core module  for communication, you can  
 
connect other WiFi devices.
 
  
 
==Features==
 
==Features==
*Serial Communications;
+
*Serial communication.
*It can be connected to the Internet;
+
*Internet connection available.
*Small, cheap, stack, open source;
+
*Small, cheap, stack-able and open.
 +
*High on-chip integration. 
 +
*Have a strong on-chip processing and storage capabilities.
 +
*Reduce the occupancy of system resources in operation.
 +
*Available for integrating sensor and other application specific devices through the GPIO port.
  
==Specifications==
+
==Specification==
*Forms of communication: Serial passthrough, the default port for the D2 (RX), D3 (TX);
+
*Communication method: Serial pass through with the default serial port D2(RX), D3(TX);
*Power supply:+3.3VDC 50mA;
+
*Power supply: +3.3VDC 50mA;
*Status indicator;
+
*Status indicator;  
 +
*SDIO 2.0, SPI and UART interface;
 +
*32-pin QFN sealed ;
 +
*With RF switch, balun, LNA, 24 PA dBm, DCXO and power management unit (PMU) integrated;
 +
*With RISC processor, on-chip memory and external memory interface integrated; 
 +
*With MAC/ baseband processor integrated;
 +
*High quality service management;
 +
*With I2S interface required by high fidelity audio applications;
 +
*All internal power supply contains on-chip low dropout linear regulator; 
 +
*Proprietary spurious free clock generation architecture; 
 +
*With WEP, TKIP, AES, and WAPI engines integrated.
  
==Common AT commands==
+
==Common AT Instruction==
*All AT commands are end with "\ r \ n". When the AT command debug please pay  
+
*All AT instructions are ended with "\r\n ". When debugging the AT commands, please pay attention to the choice of "\r\n".
  
attention to select "\ r \ n".
+
*Common AT instruction:
 
+
**AT+RST  Restart the module;
*Common AT commands:
+
**AT+GMR  Check the version information;
**AT+RST  Restart module
+
**AT+CWMODE=3  Station and access point;
**AT+GMR  Check the version information
+
***1 Station Mode;
**AT+CWMODE=3  station and access point
+
***2 AP Mode;
***1 Station Mode
+
***3 AP and the Station.
***2 AP Mode
+
**AT+CWLAP  WIFI SSID List;
***3 AP and Station
+
**AT+CWSMARTSTART=0  Start smart connection:
 
+
***0: Adopt AL-LINK technology;
**AT+CWLAP  wifi ssid List
+
***1: Adopt ESP-TOUCH;
 
+
***2: Adopt AIR-KISS.
**AT+CWSMARTSTART=0  enable smart configer
+
**AT+CWSMARTSTOP    Stop the smart connection;
***0: use 安信可 AI-LINK technology
+
**AT+CWJAP="<access_point_name>","<password>"  Join in a certain WIFI;
***1: use ESP-TOUCH technology
+
**AT+CIFSR Display the information of wifi;
***2: use AIR-KISS
+
**AT+CIPSTATUS Acquire the connection status;
 
+
**AT+CIPSTART=4,"TCP","baidu.com",80  Establish TCP/UDP connection and ports;
**AT+CWSMARTSTOP    stop smart configer
+
**AT+CIPCLOSE    Close the connection of TCP/UDP(single connection);
 
+
**AT+CIPCLOSE=5  Close multiple connections;
**AT+CWJAP="<access_point_name>","<password>"  join a WiFi
+
**AT+CIPMUX=1  Start multiple connections.
 
 
**AT+CIFSR   show wifi infomation
 
 
 
**AT+CIPSTATUS Get the connection status
 
 
 
**AT+CIPSTART=4,"TCP","baidu.com",80  Establishes a TCP or UDP connection, port.
 
 
 
**AT+CIPCLOSE    Close connection TCP or UDP (single-link)
 
 
 
**AT+CIPCLOSE=5  Close multiple connections
 
 
 
**AT+CIPMUX=1  Start multiple connections
 
  
 
==Documents==
 
==Documents==
Support AT command configuration /
+
*AT command instruction:'''[[File:ESP8266__AT Instruction Set__CN_v0.30.pdf]]'''
 
+
*AT command instruction:'''[[File:ESP8266__AT Instruction Set__EN_v0.30.pdf]]'''
control:'''[[File:ESP8266_WiFi_Module_Quick_Start_Guide_v_1.0.4.pdf]]'''
+
*AT command example:'''[[File:ESP8266__AT Command Examples__CN_v0.5.pdf]]'''
 +
*AT command example:'''[[File:ESP8266__AT Command Examples__EN_v0.5.pdf]]'''
  
 
==Development==
 
==Development==
Line 64: Line 65:
 
*Test program
 
*Test program
  
Use Microduino IDE-->example-->_03_microduino_WiFi_ESP8266-->HTTPGET  
+
Use Microduino IDE-->example-->_03_microduino_WiFi_ESP8266-->HTTPGET program test is OK.
 
 
program test is OK.
 
 
[[File:ESP8266-exampleCode.jpg|thumb|600px|center]]
 
[[File:ESP8266-exampleCode.jpg|thumb|600px|center]]
  
We have set SSID (wifi name) and pass (password) places in the code, change your wifi
+
You can change the WIFI password where you set the SSID (WIFI name) and the password in the code.
 
+
[[File:1ESP8266-exampl1eCode.jpg|thumb|600px|center]]
password
 
 
 
 
*Download program
 
*Download program
 
**Stack together with Microduino-WiFi(ESP), Microduino-Core+ and Microduino-USBttl,  
 
**Stack together with Microduino-WiFi(ESP), Microduino-Core+ and Microduino-USBttl,  
 
 
insert USB line into the Microduino-USBttl, other side of USB line insert into computer,  
 
insert USB line into the Microduino-USBttl, other side of USB line insert into computer,  
 
 
start Arduino IDE, The above program is copied to the IDE, the tool (tools) -> Board  
 
start Arduino IDE, The above program is copied to the IDE, the tool (tools) -> Board  
 
 
(Board) is selected Microduino Core, and the tools (tools) -> Serial Port (Serial) select the  
 
(Board) is selected Microduino Core, and the tools (tools) -> Serial Port (Serial) select the  
 
 
corresponding serial number. After clicking the top left corner IDE √ button to compile  
 
corresponding serial number. After clicking the top left corner IDE √ button to compile  
 
 
the program, after the end of the compilation click -> button is programmed to the board;
 
the program, after the end of the compilation click -> button is programmed to the board;
  
*Open the serial monitor, set:“\r\n”、“115200 baud”.
+
*Open the serial monitor, set:"\r\n", "115200 baud".
 
*First of prompts is to show connect WiFi successful information
 
*First of prompts is to show connect WiFi successful information
 
*If you see the following description you already visited Baidu Home website.
 
*If you see the following description you already visited Baidu Home website.
Line 92: Line 84:
  
  
*Pin Description
+
*Pin Description
 +
**GPIO0/15/2/RX/TX available.
 +
**"0" is the key, "2" and "15" are the dialing switches.
  
:[[file:Microduino-WiFi(ESP)-1Big2.jpg|800px|thumb|center|Microduino-WiFi(ESP)]]
+
 
 +
:[[file:00Microduino-WiFi(ESP)-1Big21.jpg|800px|thumb|center|Microduino-WiFi(ESP)]]
 
<br style="clear: left"/>
 
<br style="clear: left"/>
  
 
==Application==
 
==Application==
'''Related Applications:'''
+
*'''Related Applications:'''
[[WiFi Weather Stations]]
+
**[[Open Source WiFi Weather Station System]]
 +
**[[Open Source Smart Socket]]
  
==Firmware programming instructions==
+
==Firmware Programming==
1:welds point marked "down", or use wire to connect GND and GPIO0(written on the  
+
===Download the Programming Tool===
 +
*Programming tool:'''[[File:ESP8266Flasher.rar]]'''
 +
*Firmware:'''[[File:MicroduinoESP8266.rar]]'''
  
back of the board of the vias 0)
+
You can use English Flasher see http://www.xess.com/blog/esp8266-reflash/ with Firmware MicroduinoESP8266 binary
2:Recommend use USBTTL transfer serial  directly, you need connect four wires to
 
  
transfer serail port.
+
===Modules Connection===
 +
*Before programming, you need to prepare the serial port environment of the WIFI module.
 +
*The serial port the WIFI module uses is serial port 1(D2, D3), so there are two methods of  connect:
 +
*Method A: Use USBTTL to transform through the serial port.
 +
**For cables are needed to connect the serial ports together.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 120: Line 121:
 
| GND || GND
 
| GND || GND
 
|}
 
|}
If you use the core module programming firmware, please do the serial converter with
 
 
Core+ module, can not use Core, because WIFI (ESP) serial port is (D2, D3) pin 115200
 
  
baud rate, the corresponding Core is soft serial port, baud rate less than 115200.
+
*Method B: Use core to cooperate to program firmware.
The USBTTL, Core+ stack, download the program to the Core+ module.
+
**Stack USBTTL, Core+ and WIFI together(Core can not be used, because its baud rate can't reach at 115200.
 +
**Download the following program to Core+
 
<source lang="cpp">
 
<source lang="cpp">
#define my_Serial Serial1  //Core+ or CoreUSB
 
 
 
void setup() {  
 
void setup() {  
 
   Serial.begin(115200);  
 
   Serial.begin(115200);  
   my_Serial.begin(115200);
+
   Serial1.begin(115200);
 
}  
 
}  
  
Line 137: Line 134:
 
   if (Serial.available()) {  
 
   if (Serial.available()) {  
 
     char c = Serial.read();  
 
     char c = Serial.read();  
     my_Serial.write(c);  
+
     Serial1.write(c);  
   } if (my_Serial.available()) {  
+
   } if (Serial1.available()) {  
     char c = my_Serial.read();  
+
     char c = Serial1.read();  
 
     Serial.write(c);  
 
     Serial.write(c);  
 
   }
 
   }
 
}
 
}
 
</source>
 
</source>
soft serial port to hard seral port:[[File:softToHard-V2.rar]]
 
 
3:Connect USB, open burn firmware tool, set firmware address update firmware.
 
 
Firmware tool software:[[File:ESP8266Flasher.rar]]
 
 
Firmware file:[[File:MicroduinoESP8266.rar]]
 
 
Connect USB to PC, your firmware tool software will show below:
 
[[File:Microuino-WiFi(ESP)burnLoarderStep1.png|thumb|600px|center]]
 
 
setup as below:
 
 
v0.9.5.2 AT Firmware-------------0x00000
 
  
Find right firmware file in floder and fill right address
+
===Configure Programming Tool===
[[File:Microuino-WiFi(ESP)burnLoarderStep2V1.png|thumb|600px|center]]
+
*Open the programming tool, and set the firmware and parameters according to the graphic.
return operation tab, and click burn
+
[[File:Microuino-WiFi(ESP)burnSoftwareDir.png|thumb|600px|center]]
[[File:Microuino-WiFi(ESP)burnLoarderStep2-1.png|thumb|600px|center]]
 
[[File:Microuino-WiFi(ESP)burnLoarderStep3.jpg|thumb|600px|center]]
 
  
 +
===Programming===
 +
*Press the GPIO0 key of WIFI module, and connect to USB to power.
 +
*The choose the corresponding serial port, and click START key to download the program.
 +
[[File:Microuino-WiFi(ESP)burnLoarderButton1.png|thumb|600px|center]]
  
4:Open debugging tools, test AT command make sure whether the firmware burn
+
===Function Verification===
 +
*3: After downloading, powered again, it can work normally.
 +
*Open the serial port debugging tool, and test the AT command to confirm whether the downloading is successful or not.
  
successful
+
==FAQ==
  
5:Finally remove the weld on "down" or disconnect the wire which connect GND and
+
==Players Community==
  
GPIO0(written on the  
+
At present, there are many playing methods of ESP8266, and according to the different kinds of the firmware, they can be roughly divided into:
 +
*1. AT firmware method is using Arduino mcu combining with ESP8266 brushed with the AT command to implement the internet of things;
 +
*2. NodeMCU firmware method refers to brush ESP8266 firmware to NodeMCU, then use Arduino IDE for ESP8266 to compile program and brush to the corresponding flash zone to implement the control. Besides, this firmware can also be compile program with NodeMcu Studio 2015 or LuaLoader, in LUA language , to implement the internet of things;
 +
*3. SDK method refers to use sdk provided by such as Lexin, Essence and Guoyun Techonology to build project, which combines with eclipse and cygwin to generate the firmware programming. And the language this method adopts are c and c++. At present, GizWits, HEKR and tisan in our country are all implemented by this method.
 +
*4. Micropython method is similar to the front one. Use Micropython SDK to compile and program firmware, and then use putty or other serial port software to run the program on the basis of python language.
  
==Questions==
+
From:http://www.geek-workshop.com/forum.php?mod=viewthread&tid=25456&page=1&extra=#pid114413
  
 
==Gallery==
 
==Gallery==
[[file:Microduino-WiFi(ESP)-t1.png|thumb|600px|center]]
+
[[file:8266back.jpg|thumb|600px|center]]
[[file:Microduino-WiFi(ESP)-b1.png|thumb|600px|center]]
+
[[file:8266front.jpg|thumb|600px|center]]
[[file:Microduino-WiFi(ESP)-t.png|thumb|600px|center|Microduino-WiFi(ESP) Front]]
 
[[file:Microduino-WiFi(ESP)-b.png|thumb|600px|center|Microduino-WiFi(ESP) Back]]
 
 
|}
 
|}

Latest revision as of 05:58, 4 August 2017

Language: English  • 中文
Microduino-ESP

Microduino-WIFI(ESP) is a WIFI communication module, which can communicate with Core+/CoreUSB (Core can not be used, because its baud rate can't reach at 115200.) through the serial port or connect with other WIFI devices and is a complete and system-in-itself wifi network resolution.

Features

  • Serial communication.
  • Internet connection available.
  • Small, cheap, stack-able and open.
  • High on-chip integration.
  • Have a strong on-chip processing and storage capabilities.
  • Reduce the occupancy of system resources in operation.
  • Available for integrating sensor and other application specific devices through the GPIO port.

Specification

  • Communication method: Serial pass through with the default serial port D2(RX), D3(TX);
  • Power supply: +3.3VDC 50mA;
  • Status indicator;
  • SDIO 2.0, SPI and UART interface;
  • 32-pin QFN sealed ;
  • With RF switch, balun, LNA, 24 PA dBm, DCXO and power management unit (PMU) integrated;
  • With RISC processor, on-chip memory and external memory interface integrated;
  • With MAC/ baseband processor integrated;
  • High quality service management;
  • With I2S interface required by high fidelity audio applications;
  • All internal power supply contains on-chip low dropout linear regulator;
  • Proprietary spurious free clock generation architecture;
  • With WEP, TKIP, AES, and WAPI engines integrated.

Common AT Instruction

  • All AT instructions are ended with "\r\n ". When debugging the AT commands, please pay attention to the choice of "\r\n".
  • Common AT instruction:
    • AT+RST Restart the module;
    • AT+GMR Check the version information;
    • AT+CWMODE=3 Station and access point;
      • 1 Station Mode;
      • 2 AP Mode;
      • 3 AP and the Station.
    • AT+CWLAP WIFI SSID List;
    • AT+CWSMARTSTART=0 Start smart connection:
      • 0: Adopt AL-LINK technology;
      • 1: Adopt ESP-TOUCH;
      • 2: Adopt AIR-KISS.
    • AT+CWSMARTSTOP Stop the smart connection;
    • AT+CWJAP="<access_point_name>","<password>" Join in a certain WIFI;
    • AT+CIFSR Display the information of wifi;
    • AT+CIPSTATUS Acquire the connection status;
    • AT+CIPSTART=4,"TCP","baidu.com",80 Establish TCP/UDP connection and ports;
    • AT+CIPCLOSE Close the connection of TCP/UDP(single connection);
    • AT+CIPCLOSE=5 Close multiple connections;
    • AT+CIPMUX=1 Start multiple connections.

Documents

Development

  • Test program

Use Microduino IDE-->example-->_03_microduino_WiFi_ESP8266-->HTTPGET program test is OK.

ESP8266-exampleCode.jpg

You can change the WIFI password where you set the SSID (WIFI name) and the password in the code.

1ESP8266-exampl1eCode.jpg
  • Download program
    • Stack together with Microduino-WiFi(ESP), Microduino-Core+ and Microduino-USBttl,

insert USB line into the Microduino-USBttl, other side of USB line insert into computer, start Arduino IDE, The above program is copied to the IDE, the tool (tools) -> Board (Board) is selected Microduino Core, and the tools (tools) -> Serial Port (Serial) select the corresponding serial number. After clicking the top left corner IDE √ button to compile the program, after the end of the compilation click -> button is programmed to the board;

  • Open the serial monitor, set:"\r\n", "115200 baud".
  • First of prompts is to show connect WiFi successful information
  • If you see the following description you already visited Baidu Home website.
Serial


  • Pin Description
    • GPIO0/15/2/RX/TX available.
    • "0" is the key, "2" and "15" are the dialing switches.


Microduino-WiFi(ESP)


Application

Firmware Programming

Download the Programming Tool

You can use English Flasher see http://www.xess.com/blog/esp8266-reflash/ with Firmware MicroduinoESP8266 binary

Modules Connection

  • Before programming, you need to prepare the serial port environment of the WIFI module.
  • The serial port the WIFI module uses is serial port 1(D2, D3), so there are two methods of connect:
  • Method A: Use USBTTL to transform through the serial port.
    • For cables are needed to connect the serial ports together.
WIFI(ESP) USBTTL
D2 D1(TX1)
D3 D0(RX0)
3V3 3V3
GND GND
  • Method B: Use core to cooperate to program firmware.
    • Stack USBTTL, Core+ and WIFI together(Core can not be used, because its baud rate can't reach at 115200.)
    • Download the following program to Core+
void setup() { 
  Serial.begin(115200); 
  Serial1.begin(115200);
} 

void loop() { 
  if (Serial.available()) { 
    char c = Serial.read(); 
    Serial1.write(c); 
  } if (Serial1.available()) { 
    char c = Serial1.read(); 
    Serial.write(c); 
  }
}

Configure Programming Tool

  • Open the programming tool, and set the firmware and parameters according to the graphic.
Microuino-WiFi(ESP)burnSoftwareDir.png

Programming

  • Press the GPIO0 key of WIFI module, and connect to USB to power.
  • The choose the corresponding serial port, and click START key to download the program.
Microuino-WiFi(ESP)burnLoarderButton1.png

Function Verification

  • 3: After downloading, powered again, it can work normally.
  • Open the serial port debugging tool, and test the AT command to confirm whether the downloading is successful or not.

FAQ

Players Community

At present, there are many playing methods of ESP8266, and according to the different kinds of the firmware, they can be roughly divided into:

  • 1. AT firmware method is using Arduino mcu combining with ESP8266 brushed with the AT command to implement the internet of things;
  • 2. NodeMCU firmware method refers to brush ESP8266 firmware to NodeMCU, then use Arduino IDE for ESP8266 to compile program and brush to the corresponding flash zone to implement the control. Besides, this firmware can also be compile program with NodeMcu Studio 2015 or LuaLoader, in LUA language , to implement the internet of things;
  • 3. SDK method refers to use sdk provided by such as Lexin, Essence and Guoyun Techonology to build project, which combines with eclipse and cygwin to generate the firmware programming. And the language this method adopts are c and c++. At present, GizWits, HEKR and tisan in our country are all implemented by this method.
  • 4. Micropython method is similar to the front one. Use Micropython SDK to compile and program firmware, and then use putty or other serial port software to run the program on the basis of python language.

From:http://www.geek-workshop.com/forum.php?mod=viewthread&tid=25456&page=1&extra=#pid114413

Gallery

8266back.jpg
8266front.jpg