vrijdag 1 juli 2016

ESP8266 WangTongze Arduino Uno Shield

To use with Arduino Uno / Genuino i did buy a time ago this ESP8266 Arduino Uno Shield.
On the PCB is printed:
Arduino ESP8266 WiFi
Shield version 1.0
by WangTongze

More info & tech support please go to elecshop.ml

As there are more shields and Arduino ESP8266 combinations.
The elecshop website is not working but i did find this video  https://www.youtube.com/watch?v=LJcYgR479Vw
 and some info on

P1+P2 TTLSW Disconnect ESP8266 from Arduino (to flash it)
P3 DFU/NOR Programming mode on/of to flash ( DFU )
P4 DFU LED Use DFU LED yes/no
This  WangTongze ESP8266 Arduino Uno shield has 4 leds on board (PWR,DFU,AP,STA )

With an Arduino Uno i could not easy figure out how to make it work or find a working ready to go example project. I decided making it work "stand alone" first (without Arduino) connect it using the maintenance port.

In one of my projects with an ESP8266 the USB cable connections where:
Red VCC +5V not connected
Black GND
Green TXD
White RXD
and the ESP8266 was powered separate with 3 AA batteries

I decided to connected the USB cable (Spoiler: this is not the right connection !)
Green TXD
White RXD
Red +5V
Black GND
3V3 (not connected)

and set all the dip switches "DOWN"
Some of the lights went on when connecting the USB cable to my computer.
And i found  a new Wifi signal AI-THINKER_F50152

I connected the Wifi with my smartphone.
The device had IP adres192.168.4.1 (.2 is address of the connected smartphone)
A port scan gave no open ports.
Webpage in browser gave “webpage not available”
I tried to connect the USB with a Putty terminal program. (baud rate 115200) 
but had no luck. (USB found as com2 )
Finally i decided to swat the TXD and RXD connections. 
Pressing the ESP reset button (Als DIP switches down) gave a message:
"Arduino ESP8266 Shield v.1.0" to the Putty terminal
Typing AT commands (also tried some other things) did not give results.

I finally decided to flash it with ESP8266Basic


DIP buttons DOWN DOWN UP UP ESP8266 Basic (4M) flashed (See previous article and ESP8266 Website for more details.
Restart with DIP switches DOWN DOWN DOWN DOWN gave ESP Wifi signal. Configuring home network connection and tests with some basic programs (Wifi scan) went well.

Conclusion
1) Flashing this module (with ESP8266Basic) is possible
1) Buttons DOWN DOWN UP UP  
=> Flash the ESP8266
2) Buttons DOWN DOWN DOWN DOWN => "normal (stand alone) running " mode

3) USB cable connection is
White TXD
Green RXD
Red +5V
Black GND
3V3 (not connected)
USB cable info did tell me that Green is the cable TXD line and White the cable RXD line.
The cable TXD need to be connected with the ESP8266 RXD
The cable RXD need to be connected with the ESP8266 TXD
I trust this board more than the other board (that also had GPIO4 and GPIO5 swapped.) Therefore I expect the other ESP8266 test board RXD and TXD labels are wrong.

A next step could be connecting the shield to Arduino and test communication to the Arduino.

1 opmerking:

Matthew Watson zei

Great start.

Swap the RX TX pins between the shield and the UNO -- take TX from the esp to the TX on the UNO and the RX to the RX. This way you can use the Andrino IDE (with a empty sketch) to communicate with the esp.