element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Internet of Things
  • Technologies
  • More
Internet of Things
Blog ESP8266 developing using an Arduino
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Internet of Things requires membership for participation - click to join
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: camuyano
  • Date Created: 4 Nov 2014 10:00 PM Date Created
  • Views 3280 views
  • Likes 2 likes
  • Comments 23 comments
  • wifi
  • internet_of_things
  • esp8266
  • iot
  • arduino
Related
Recommended

ESP8266 developing using an Arduino

camuyano
camuyano
4 Nov 2014

Currently I am playing with the ESP8266 WIFI module as many others are. Since I want to create some Arduino libraries for it, I am in the need to do some debugging. The Arduino only has one hardware UART. And if you wire anything to the atmega UART port you may run into problems when downloading new code to the Arduino. The Arduino programs the atmega via the hardware UART port and if something is connected it may cause trouble. For downloading you end up disconnecting and reconnecting the ESP module without mentioned that you loose the ability to use the Serial Console for debugging.

 

To solve this situation I now am using the SoftwareSerial library. Before all this I updated the ESP8266 firmware and the default baud rate is 9600 which is fine for the SoftwareSerial library.

My current setup is:

1. ESP8266 (ESP02) connected to a level shifter (to make 3.3V talks to the Arduino 5V). The level shifter I am using is a 74HC4050N hex non inverting buffer.

2. Wire pin 10, 11 via the level shifter to the ESP8266

3. Load a modified SoftwareSerial echo example to allow me to send serial commands from the Serial Monitor window to the ESP8266 via the arduino. Here is the link to the Arduino code for software echo.

I had it all wired without a level shifter but the SoftwareSerial library responded always like there were data available to receive when there were none. By using the level shifter all that "noise" went away and now I have a clean communication.image

 

What the code do is just wait for anything from the UART serial port and sends it via the SoftwareSerial port (pins 10,11) and back. This way I can upload new code to the Arduino, talk to the ESP8266 and get debug messages via the Serial console without having to rewire things.

I am just starting to use this module, but it looks very interesting. Just wanted to share my current setup in case anyone wants to code for the Arduino and ran into the same problem I did.

 

Sorry that my diagram do not have a pretty ESP8266 module drawing but you get the idea. Use the legend above the green connector to match your module.

 

Update:

With this same thinking I decided to try a more "permanent solution". So I am in the process of building an interface prototype board for this module. I decided to build a dedicated interface circuit board (no breadboard prototype, straight to production). I blogged about it here if you care.

 

This is how this setup looks in real life:

image

 

Note:

Verify your Arduino version maximun 3.3V supply current. The official Arduino Uno R3 can supply something like 150mA tops and that is not enough to make the ESP8266 work always. It may power up but not much more. Arduino compatible boards or clones may have different hardware with more power ratings. If not available then my recommendation is to get an external power source or to reduce the 5V power to 3.3V.

  • Sign in to reply

Top Comments

  • Former Member
    Former Member over 10 years ago +1
    Thanks, it is a good starting point for beginners with ESP8266
  • mcb1
    mcb1 over 10 years ago in reply to scargill +1
    Peter Mohan has provided the datasheet link. https://anibit.com/sites/default/files/product_files/ESP8266_Specifications_English.pdf Unless an IC is specifically designed, it's never a good idea to apply…
  • pmohan
    pmohan over 10 years ago in reply to mcb1

    Thanks Mark for updating with the relevant page from document.

    scargill Somehow i never got the level shifting to work. I am a noob and i might be doing something wrong when i do the level shifting. Any way i was able to build another working project with ESP8266 with Ada Fruit 5v Pro Trinket with no level shifting... For 3.3v input voltage for ESP8266 i used an output from a color sensor i used in the project. But for the TX/RX communication i didn't use any level shifting.

     

    Part 3.4 Behold the Color Catcher and Thrower

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 10 years ago in reply to scargill

    Peter

    Mohan has provided the datasheet link.

    https://anibit.com/sites/default/files/product_files/ESP8266_Specifications_English.pdf

     

    Unless an IC is specifically designed, it's never a good idea to apply a voltage greater than the supply.

    While the spec shows it contains 'over voltage protection'  it also shows the maximum voltage to be 3v6 with a 3v3 supply.

    image

     

    Using a 3v3 Arduino (Many have the option of 5v or 3v3 operation) would solve it, but the resistor trick is an easy solution.

     

     

    Mark

     

    Peter

    I was looking at your blogs, and you have some very good info and tools there.

    maybe you should add the link here.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • scargill
    scargill over 10 years ago in reply to pmohan

    You may be confusing something here. ALL my boards are 5 volts. Therefore in order to talk to the ESP8266 you HAVE to level shift any outputs which are going TO the ESP8266 as it is not designed to handle 5v. If your boards are 3v3 then you do NOT want level shifting. Now, it is true that the documentation on the ESP8266 is confusing in that in some places on the web it says it is NOT 5v tolerant - in other places it says maximum 6v.  Personally until I can get something definitive from ESPRESSIF I'm playing safe. I have NO problems that relate to level shifting. I only shift things going INTO the chip - and I do that with a 560r from say the Arduino to the ESP8266 input and from there a 1k to ground.

     

    If you have DEFINITIVE information that says you can reliably pump 5v into the inputs- then please do link here so we can benefit....

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • pmohan
    pmohan over 10 years ago

    I am surprised about the constant note on all articles related to esp8266 about level shifting. It never worked for me when I used level shifting. Threw it all out and connected directly and it works like a charm. Moreover the data sheet seem to suggest the Digital pins are tolerant upto 6v.. See the quote from datasheet and my working version of esp8266 without level shifing here..

    Part 3.3: Arduino Uno + ESP8266 + Eclipse Ponte HTTP Bridge = MQTT Magic

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • scargill
    scargill over 10 years ago in reply to Former Member

    Personall I set CH_PD to +Vcc but don't connect other pins at all.. just serial in and out...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube