Last Updated on 1 April 2022 by Suffocation
Mit Hilfe dieser Zusatzplatine kann der Arduino über das WLan kommunizieren. Die Platine hat einen ESP8266 Microcontroller on Board, welcher die Netzwerkkommunikation übernehmen kann. Bei Auslieferung sollte auf dem ESP eine Firmware von AI Thinker aufgespielt sein. Wie man dies herausfindet und vieles Mehr habe ich in diesem Beitrag so kompakt zusammen gefasst.
Im Netzt wird oft bemängelt, dass es anscheinend keine Dokumentation zu dieser Platine gibt. Auch die Herstellerseite war zum Zeitpunkt der Erstellung dieses Beitrages nicht verfügbar. Dennoch gibt es einige Versuche zur Dokumentation, die mir sehr geholfen haben. Alles sind wie immer unter dem Kapitel Quellen gesammelt verlinkt.
Man könnte sich nun fragen warum einen ESP der an sich schon recht leistungsstark ist auf einen Arduino packen der kein Wifi kann. Nun hierfür sprechen die folgenden Argumente:
- The Arduino can power 5V peripherals, while the ESP can directly only power 3.3V.
- The Arduino has more usable I/Os and more analogue ports.
- Es gibt mehr Zusatzplatinen für den Arduino als für den ESP
- Wenn man nur Wifi brauch aber nicht auf ESP Programmierung umsteigen will, bietet dies eine gute Lösung
AddendumThere are at least two circuit boards of this kind. The original, which should not cause any problems, and the plagiarism which I am describing here ;).
Facts
- Arduino Uno/Leonardo compatible add-on board.
- Houses an ESP8266 Wi-Fi module
- Der ESP8266 ist mit einer nicht näher definierten Firmware geflashed (weiteres später)
- The ESP's UART is set to 115200 baud
Views
So sieht die Platine auf, man erkennt gut den ESP auf der linken Seite der Frontansicht. Seine Anschlüsse sind zusätzlich über Pins herausgeführt, so dass man diese auch nutzen könnte. Unterhalb des ESPs ist dessen serielle Schnittstelle herausgeführt. Rechts neben dieser befindet sich ein Dipschalter (mehr dazu später), gefolgt von einem Resetschalter für den ESP.

ESP8266 add-on board from below 
ESP8266 add-on board from above 
ESP8266 add-on board DIP switch 
ESP8266 Add-on board debug port
Analyse
Ich habe mich entschlossen, da die Dokumenation so sprärlich ist mal ein Analyse Kapitel einzuflechten. Hier beschreibe ich was ich zur Erkundung der Zusatzplatine so gemacht habe.
DIP switch
I found the DIP switch settings online:
| Switch | Description |
| 1/2 | Only together do we switch, connects the Arduino serial port with ESP (Doesn't work for plagiarism) |
| 3 | Aktiviert den Bootloader, brücke between Mass and GPIO 0 |
| 4 | DFÜ LED zeigt die Aktivitäten am Seriellen Port. (Function currently unknown) |
Firmware
Um die Firmware herauszufinden habe ich einen Serial zu USB Adapter an den Debugging-Port gehängt. Den Adapter habe ich von 5V auf 3V umgestellt. ACHTUNG – das Board selbst muss noch mit 5V versorgt werden, hierfür habe ich es auf einen Uno gesteckt und diesen ebenfalls an den USB Port gehängt.
Occupancy
| Serial – Adapter | Debug Port ESP |
| Ground | Ground |
| CTS | – |
| VCC | 3V |
| TX | RX |
| RX | TX |
| DTR | – |
This is what it looks like

Console output
Arduino Gui auf den richtigen COM Port einstellen, nach öffnen der Konsole die Boud-Rate auf 115200 stellen und dann einmal reset drücken.

Es Handelt sich also um eine AI-Thinker Firmware, hierzu habe ich dann mal Google bemüht, folgenden Seiten haben mir beim Verständnis geholfen.
https://www.electrodragon.com/w/ESP8266_AT-Command_firmware
https://wiki.ai-thinker.com/_media/esp8266/esp8266_series_modules_user_manual_v1.1.pdf
This means it's firmware controlled by AT commands, like the old modems. Let's then read out the version; to do this, enter the following command in the console:
AT+GMR
With me, all commands just resulted in ERROR. I thought perhaps it was the board, so I tried a second board. Exactly the same problem. In forums, I came across the line break and changed it in the console to New Line + Carriage Return. It worked after that.

This way, the version can also be read out:

Diese ist nicht gerade die neuste, deshalb erstmal updaten. Die aktuelle Version für die AT Firmare kann bei Espressif, dem Hersteller des ESP herunter geladen werden.
https://www.espressif.com/en/products/hardware/esp8266ex/resources
Ich nehme für die aktuelle Version 1.6.2 (1.7 ging bei mir nicht) und schaue mal wie weit ich komme (Direct link).

A suitable flash tool to write the firmware to the ESP is also provided directly by Espressif.Direct link).

Beim Starten wird gefragt welcher Chip denn programmiert werden soll, ich wähle den ESP8266.

Erst den ESP vorbereiten. Zum ändern der Firmware muss der GPIO 0 mit Masse verbunden werden. Dies kann über den Dipschalter 3 (auf An) geschehen oder über eine Brücke. Nach dem Programmieren die Verbindung wieder trennen.

Jetzt ist etwas Fleiß gefrag:
- Specify the corresponding files and the storage location to which they should be written. .
- Einstellungen für den eigenen ESP überprüfen, bitte die Einstellungen im Bild übernehmen und für andere ESPs anpassen.
- COM-Port und Geschwindigkeit wählen
- Start programming.

Is there no progress? Just take a look at the Reset des ESP drücken, then it should work.


Let's see what the console has to offer.
ATTENTION – The first characters from the controller are output at 74880 baud, which is why only "Schrummel" is displayed. After that, it continues at 115200. Please set the console to 115200.

And lo and behold, the AT+GMR command demonstrates the success of the flashing.

Communication between ESP and Arduino
Mit Aktivierung des DIP-Schalters 1 und 2 soll die serielle Schnittstelle des Arduino mit dem des ESP Verbunden werden. Das klappt leider bei mir nicht. Selbst wenn die Schalter aus sind lässt sich der Arduino Uno, auf dem die Platine steckt, nicht programmieren. Deshalb gehe ich einen anderen Weg. Ich verbinde den RX/TX Anschluss des ESP mit pin 2/3 des Uno’s:

I'm cutting the actual connection:

Ich habe ein kleine Testprogramm geschrieben welches den Befehl „AT“ über den SoftwareSerial des Arduino an den ESP sendet. Hierbei ist mir aufgefallen, dass es ab und an zu Problemen in der Verbindung kommt. Deshalb habe ich zusätzlich die Übertragungsrate des seriellen Ports per Code auf 9600 herunter gesetzt. Danach konnte ich keine Fehler mehr feststellen.
Die Einstellung ist nur temprorär, Sollte die Kommunikation nicht funktionieren einfach mal den ESP und etwas später den Arduino zurücksetzen. Hier das Programm zum Download:
Programming
Libraries
https://github.com/bportaluri/WiFiEsp
Die Bibliothek habe ich dieses mal per Lib Manager installiert, weil das alleinige Kopieren in den Projektordner zu Compiler Fehlern geführt hat, die ich nicht beheben konnte.
The integration of libraries in general is described under the following link, and I will not go into further detail here.
https://fambach.net/arduino-ide#Bibliotheken
Test programme
As a test example, I've taken the UdpNTPClient example. I have permanently set the serial port of the ESP to 9600 baud. (The code for this is still in the setup function)
As an NTP time server, I used my Fritzbox, as the server from the example did not respond. Set your internet router here or one of the free NTP servers from the following link.
https://www.pool.ntp.org/de/zone/de
Here is the example to download:
Conclusion
Die Zusatzplatine lässt sich nutzen hat jedoch ihre Tücken. Gerade wenn es sich um die Nachbau-China-Platine handelt, gilz rd rin paar Schritte zu beachten. (Das Plagiat erkennt man an der Aufrisft „Moer info $ tech“.) Es gibt ein paar Tips und Kniffe im Internet wie sie dennoch verwendet werden kann. Ich hoffe ich konnte hier eine gute Möglichkeit, ohne zu löten, zeigen.
Die Platine selbst ist sehr günstig und bietet dem Arduino eine WLan Verbindung an.
Verwandte Beiträge
- Retro Project – FDC USB Floppy Disk Controller
- Arduino Nano 33 BLE
- Arduino Nano 33 IoT
- Preview – Arduino Motor Shield with L298P
- Preview – Arduino Mega Logger Shield
- Preview – Prototype Shield for Arduino Mega
- Preview – Arduino Nano Add-on Board
- Preview – Arduino Mini ATMEGA328P 328
- Arduino Ethernet Board W5100
- Arduino VS1053 MP3 audio shield with TF card
Sources
http://www.rainer-rebhan.de/proj_esp8266.html
https://www.clicks-and-stones.de/2017/11/17/esp-12e-wlan-shield-auf-dem-arduino-uno/
https://www.espruino.com/arduino-esp8266
https://blog.uni-koeln.de/rrzk-knowhow/2017/11/17/esp-12e-wlan-shield-auf-dem-arduino-uno/
https://github.com/bportaluri/WiFiEsp
https://www.electronicshub.org/update-flash-esp8266-firmware/
https://www.espressif.com/en/products/hardware/esp8266ex/resources
http://stefanfrings.de/esp8266/
| Date | Change | Author |
|---|---|---|
| 09.11.2016 | Post created | Suffocation |
The Wi-Fi sheet is quite tricky. But with the help of this guide, I managed to get the sheet working. Flashing didn't work for me. Nevertheless, I'm getting the time from the timeserver. Here are a few hints where my attempts failed:
– These instructions refer to the Chinese knock-off. You can recognise the knock-off by the inscription „Moer info $ tech“. (With the knock-off, many of the tips found online are not applicable!)
You must adhere exactly to these instructions, and the plagiarism will work without soldering! This means no switch on ON, do not plug TX/RX into the Arduino Uno as shown, and an external serial connection between Arduino ports 2/3 to the TX/RX of the debug interface.
I couldn't find a terminal program that works at 115200 baud. Only the terminal from the Arduino IDE can handle it, and changing the line ending to \n\r in the Arduino terminal program caused the modem to respond with OK. However, flashing still didn't work. But Wi-Fi works for me even without flashing.
Conclusion: Great post!
Hello Ludger,
Thank you for your comment. Putty I have already used this under Windows/Linux with 115200 baud, possibly the line breaks still need to be configured. Why the programming doesn't work is a mystery to me, but if it works without flashing, it's not absolutely necessary. Are you using the ESP/Arduino for your railway, a truly impressive layout. I am always interested in finding application examples for Arduinos and their ilk.
Hello
Stefan