Noobs Guide To ESP8266 With Arduino Mega 2560 or Uno
Noobs Guide To ESP8266 With Arduino Mega 2560 or Uno
Noobs Guide To ESP8266 With Arduino Mega 2560 or Uno
Living
Outside
Play
Technology
Workshop
Table of Contents
A newbie's guide to setup ESP8266 with Arduino Mega 2560 or Uno . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Intro: A newbie's guide to setup ESP8266 with Arduino Mega 2560 or Uno . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 4: Methodology & Observations: Setup(s) that does not work/ does work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 6: References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
http://www.instructables.com/id/noobs-guide-to-ESP8266-with-Arduino-Mega-2560-or-U/
Author:shinteo
Intro: A newbie's guide to setup ESP8266 with Arduino Mega 2560 or Uno
For any open source products to be successful or adoption en masse by the "makers"/ "DIY-ers" / "dev" / "etc"; an up-to-date and accurate documentation or quick start
guide has to be provided. User's posts in discussion forums are good, but the bits and bites of (usable) information are hidden in the troves, hiding deep inside irrelevant
comments/posts. This might discourage the faint-hearted from "looking harder" at the problem. After scouring the Internet to find some leads on why the setup via
"official" guide has failed, the good reads discovered are placed in the references section. From a seeming "easy" writeup on the SEEEDstudio official guide, it took many
hours trying to troubleshoot the setup to make it to work..
To save you from the frustrating moments, let's cut the chase and go straight to what works. If you are interested on what doesn't work, read between the lines or skip
the steps below till the "what works /does not work" section.
There are a few parameters that will make or break this setup. Due to unforeseen err in documentations/writeups, the following parameters that worked were result of
bruteforced effort.
The parameters relevant to this setup are
ESP8266 version
Choice of "matching" baudrate (e.g 9600, 57600, 115200) for 2 sets of serial comms: ESP8266<->Arduino, and Arduino<->USB serial monitor (hardware serial or
software serial)
Choice of 5v and 3.3v bridging circuitry between Arduino and ESP8266
Choice of Arduino Mega or Uno, that affect the availability of serial comms
Choice of terminal software
Choice of code for testing
Yours truly recommends Arduino Mega with ESP8266, using either logic level shifter or voltage divider, and Serial Monitor.
Assuming you only have an ESP8266 and an Arduino, trying to make ends meet without another FTDI breakout board for the softserial, you are not out of luck. Check
out the 2nd last page for the source code that uses RGB LED as indicator instead of softserial.
for the context/background info of this setup: http://shin-ajaran.blogspot.sg/2014/12/noobs-guide-to-esp8266-with-arduino.html
http://www.instructables.com/id/noobs-guide-to-ESP8266-with-Arduino-Mega-2560-or-U/
option A: plug directly the TX-RX pairs between arduino and ESP8266. If used, there is a risk of damaging both of them. You might get lucky for getting away with this?
How many times you can get lucky?
option B: use a voltage divider circuit to divide 5v source from Arduino to 3.3v source for ESP8266. Acceptable methods, definitely much better that plugging in directly.
URL for voltage divider calculation: https://www.abelectronics.co.uk/tools/resistor-vo... ; Vin is 5v, Vout is 3.3v (ish), enter either R1 or R2 with a resistor value available
at your disposal.
The following diagram describes the setup with a 330ohm and 180 ohm resistors (the only 2 resistors available on hand at the time of making) voltage divider circuit
option C: logic level shifter, e.g those sold by sparkfun. This method is highly recommended
4. wiring scheme
Rule of thumb: always check pin out diagram before wiring, ensure common ground, vcc and gnd are connected according to voltage specs. ESP8266 CH_PD aka chip
power down and RESET are connected to 3.3V for logic high; TX &RX pair for comms: ESP TX-> Arduino RX; ESP RX-> Arduino TX
Assuming using Arduino Mega Serial2 (pin #16 and #17), ESP8266, and logic level shifter by sparksfun.
logical wiring schematic
MEGA ------sparkfun logic shifter -------------ESP 8266
5V -------------HV
3.3V-----------LV
3.3V-------------------------------------------------------VCC, CH_PD,RESET
GND----------GND (both HV and LV)---------------GND
TX(#16) ------HV chn0 RX==LV chn0 RX---------RX
RX (#17) -----HV chn0 TX===chn0 TX--------------TX
the following diagram describes the wiring setup on a breadboard.
http://www.instructables.com/id/noobs-guide-to-ESP8266-with-Arduino-Mega-2560-or-U/
http://www.instructables.com/id/noobs-guide-to-ESP8266-with-Arduino-Mega-2560-or-U/
http://www.instructables.com/id/noobs-guide-to-ESP8266-with-Arduino-Mega-2560-or-U/
Step 4: Methodology & Observations: Setup(s) that does not work/ does work
Official manufacturer's documentation which doesn't work out of the box for yours truly
http://www.seeedstudio.com/blog/2014/09/11/getting... a few dependencies 1. the baudrate in the blog post is 57600 whereas the ESP82665 on hand is 9600, with no
mentioned or whatsoever w.r.t it in the blogpost of the manufacturer. 2. the CH_PD & RESET are not held at logic high in the blogpost of the manufacturer.
Methodology & Observations: Setup(s) that does not work/ does work
MCU: uno comm: serial0 only
code: "Examples->basic->BareMinimum"
en: 3.3v to ch_pd and REST
cct: voltage divider
baud s0: 9600
D0 rx-> tx ESP8266 D1 tx-> RX ESP8266
Serial mon on Serial0; AT and then "send" => no response
http://www.instructables.com/id/noobs-guide-to-ESP8266-with-Arduino-Mega-2560-or-U/
//----------------------MCU: uno
comm: serial0 only
code: "Examples->basic->BareMinimum"
en: 3.3v to ch_pd and REST
cct: voltage divider
baud s0: 9600
D0 rx-> tx ESP8266 D1 tx-> RX ESP8266
SSCom32 on Serial0; AT and then "send" => no response
//----------------------MCU: uno
comm: serial0 only
code: "serial0 setup with 9600"
en: 3.3v to ch_pd and REST
cct: voltage divider
baud s0: 9600
D0 rx-> tx ESP8266 D1 tx-> RX ESP8266
SSCom32 on Serial0; AT and then "send" => no response
//----------------------MCU: uno
comm: serial0 only
code: "serial0 setup with 9600"
en: 3.3v to ch_pd and REST
cct: voltage divider
baud s0: 9600
D0 rx-> tx ESP8266 D1 tx-> RX ESP8266
Serial mon on Serial0; AT and then "send" => no response
//----------------------MCU: uno
comm: serial0 only
code: "modified hello word with RGB indicator"
en: 3.3v to ch_pd and REST
cct: voltage divider
baud s0: 9600
D0 rx-> tx ESP8266 D1 tx-> RX ESP8266
Serial mon on Serial0 can't used
//----------------------MCU: mega comm: serial0 only
code: "Examples->basic->BareMinimum"
en: 3.3v to ch_pd and REST
cct: voltage divider
baud s0: 9600
D0 rx-> tx ESP8266 D1 tx-> RX ESP8266
Serial mon on Serial0; AT and then "send" => no response
//--------------------------
http://www.instructables.com/id/noobs-guide-to-ESP8266-with-Arduino-Mega-2560-or-U/
MCU: mega
comm: serial0 & serial2 for ESP8266
code: "copy s0<->s2"
en: 3.3v to ch_pd and REST
cct: voltage divider
baud s0: 115200 baud s2: 9600
D17 rx-> tx ESP8266 D16 tx-> RX ESP8266
Serial mon on Serial0; AT and then "send" => OK; AT+RST and then "send" => ready;
=========================================================
Step 6: References
https://scargill.wordpress.com/2014/10/05/esp8266-working/
http://www.electrodragon.com/w/Wi07c http://blog.electrodragon.com/cloud-updating-your-wi07c-esp8266-now/ http://hackaday.io/project/3072/instructions
http://tminusarduino.blogspot.sg/2014/09/experimenting-with-esp8266-5-wifi-module.html
http://rancidbacon.com/files/kiwicon8/ESP8266_WiFi_Module_Quick_Start_Guide_v_1.0.4.pdf http://zeflo.com/2014/esp8266-weather-display/
Related Instructables
Use ESP8266 to
Internet enabled
AC Appliances
by shinteo
ESP8266 WiFi
temperature and
humidity sensor
by EasyIoT
ESP8266 WiFI
water leak
sensor by
EasyIoT
ESP8266 WiFi
relay switch by
EasyIoT
Blink for
ESP8266 native,
like arduino
using Windows
by jbeemster
ESP8266 mini
Tutorial by
GreatScottLab
http://www.instructables.com/id/noobs-guide-to-ESP8266-with-Arduino-Mega-2560-or-U/
Advertisements
Comments
5 comments
Add Comment
AJackOfAllTrades says:
shinteo says:
hi jack,
look for the "schematic" under the "logical wiring schematic". not quite a schematic,but an ascii art representation; hopefully one could figure out what the
wiring and connections.
shinteo says:
http://www.instructables.com/id/noobs-guide-to-ESP8266-with-Arduino-Mega-2560-or-U/