DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Building Scalable Real-Time Apps with AstraDB and Vaadin
Register Now

Trending

  • Unlocking the Power of AIOps: Enhancing DevOps With Intelligent Automation for Optimized IT Operations
  • Implementing a Serverless DevOps Pipeline With AWS Lambda and CodePipeline
  • Top 10 Pillars of Zero Trust Networks
  • File Upload Security and Malware Protection

Trending

  • Unlocking the Power of AIOps: Enhancing DevOps With Intelligent Automation for Optimized IT Operations
  • Implementing a Serverless DevOps Pipeline With AWS Lambda and CodePipeline
  • Top 10 Pillars of Zero Trust Networks
  • File Upload Security and Malware Protection
  1. DZone
  2. Data Engineering
  3. Data
  4. Cheap and Simple WiFi with ESP8266 for the FRDM Board

Cheap and Simple WiFi with ESP8266 for the FRDM Board

Erich Styger user avatar by
Erich Styger
·
Oct. 17, 14 · Interview
Like (0)
Save
Tweet
Share
6.17K Views

Join the DZone community and get the full member experience.

Join For Free

How cool would it be to add WiFi support to any projects or IoT? Why not using WiFi with a microcontroller which has only few KBytes of RAM and FLASH. For less than US$5? Dreams came true, and intrigued by an article at Hack-A-Day, I searched a supplier for that ESP8266 module. And this evening I have found the four ESP8266 modules I have ordered for $4.50 each from ElectroDragon in my mailbox. Of course I did not want to wait for the week-end, so I hooked it up to my FRDM-KL25Z board.

ESP8266 Module

ESP8266 Module for US$ 4.50

I already love a very similar module, the nRF24L01+ (see “Tutorial: Nordic Semiconductor nRF24L01+ with the Freescale FRDM-K64F Board“). The ESP8266 looks is similar from the size and connection header, but instead of SPI it uses UART mode with AT commands. So it is much more like one of the HC-06 Bluetooth modules (see “Getting Bluetooth Working with JY-MCU BT_BOARD V1.06“).

Main features of the module (from http://www.electrodragon.com/w/Wi07c):

  • 2.4 GHz WiFi 802.11 b, g and n
  • Supports WPA/WPA2 security mode
  • 14 mm x  24 mm module size
  • AP (Access Point), STA (standalone) and AP+STA modes
  • Simple AT commands to join router, run TCP client and TCP server
  • Built-in TCP/IP Protocol stack
  • PCB antenna

There are only a few pins needed for connecting it to a microcontroller, and by default the module features a serial UART interface:

ESP8266 Pinout

ESP8266 Pinout

The module is all using 3.3V logic levels.

  1. Vcc: 3.3V, up to 300 mA
  2. GND: Ground
  3. Tx: UART Tx of the module, to be connected to the microcontroller Rx of the microcontroller
  4. Rx: UART Rx of the module, to be connected to the microcontroller Tx of the microcontroller
  5. RST: Reset/Restart, pull to GND to restart
  6. CH_PD: Chip enable, used for flash boot and updating the module
  7. GPIO0: pulled low for update mode
  8. GPIO2: not sure yet???

The processor on the board is a Tensilica Xtensa LX3 32bit, clocked at 80 MHz, and it has an SPI flash on the module/board. There is now even a gcc port/environment for it (see http://www.esp8266.com/viewtopic.php?f=9&t=224), so if I want, I can write and update code for that module :-). So with this, I can run the module standalone, and even do not need another microcontroller. Very neat!

But to get a first response from the module, there were several problems to solve:

  1. Data sheet is in Chinese. Luckily, there are already some Google Translation version in the community (see links below)
  2. Many posts and articles mention a baud rate of 57600. But the issue is that newer modules use 115200, and of course mine was using 115200 :-)
  3. The module is rather power-hungry, some articles talk about 80 mA or even up to 260 mA (!!!!). To protect my FRDM board, I’m using a 3.3V DC-DC converter.
  4. Some posts indicate that only Vcc (3.3V), GND, Tx and RX need to be connected. Until I found a post indicating that all the other pins need to be pulled up at Vcc too.
First Setup for ESP8266

First Setup for ESP8266

And finally, the module responded to my AT command: I send “AT\r\n”, and it responds with “AT\r\n\r\nOK\r\n”, hurray! :-)

ESP8266 Response to AT Command

ESP8266 Response to AT Command

So I’m not communicating with the world yet. But at least the microcontroller can talk to the module. To be continued…..

Links:

  1. Hack-A-Day article: http://hackaday.com/2014/08/26/new-chip-alert-the-esp8266-wifi-module-its-5/
  2. Hack-A-Day project: http://hackaday.io/project/2879-ESP8266-WiFi-Module-Library
  3. ESP8266 Forum: http://www.esp8266.com/
  4. AT command overview: http://www.electrodragon.com/w/Wi07c
  5. NURDs page on ESP8266: https://nurdspace.nl/ESP8266
  6. First impressions on the ESP8266 module: http://rayshobby.net/?p=9734
  7. Using the ESP8266 module: http://www.instructables.com/id/Using-the-ESP8266-module/?ALLSTEPS
  8. GCC for ESP8266: http://hackaday.com/2014/10/02/gcc-for-the-esp8266-wifi-module/
  9. Module at iteadstudio: http://imall.iteadstudio.com/im140905002.html

Happy WiFi’ng :-)


Command (computing) POST (HTTP) Links Transmission Control Protocol Service provider interface Joins (concurrency library) Data (computing) Hooked (app) Interface (computing)

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • Unlocking the Power of AIOps: Enhancing DevOps With Intelligent Automation for Optimized IT Operations
  • Implementing a Serverless DevOps Pipeline With AWS Lambda and CodePipeline
  • Top 10 Pillars of Zero Trust Networks
  • File Upload Security and Malware Protection

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: