Maker Pro
Maker Pro

ESP8266-01 with Arduino Nano issues

Steve Peart

Sep 16, 2015
53
Joined
Sep 16, 2015
Messages
53
Hello All,

First, I know I can technically just flash things to the ESP8266-01 without the Arduino. I couldn't get that to actually work so I wanted to use the ESP8266-01 out of the box as a Wifi connection for my arduino nano.

I have looked at a lot of tutorials for this setup and found they vary here and there. I have tried a lot of them but I am not seemingly able to get the Nano to talk to the ESP8266-01.

Here's how I have it all wired up (currently)ESP8266-with-Nano.jpg

The 9VDC @1500mA is a 9V Power Supply I purchased online to give the ESP8266-01 enough current to not have it unable to perform. Should be overkill, but I read that the 3.3v out from the nano won't have enough on it's own plugged in via USB to make Wifi work.

I included a graphic of the ESP8266-01 So you can also see which pins are which.

The resistors in the middle-top area are a voltage divider so that the signal from the nano at 5V doesn't fry the ESP8266-01 which accepts 3.3V as HIGH. I read that somewhere too.

The TX/RX Pins are going to regular Arduino digital pins so the Nano can communicate with the ESP8266-01 via Software Serial libraries, since you don't get extra TX/RX pins to use for this from the Nano.

Here's the basic sketch I am trying to run:
---------------------------------------------------------------------------------------------------------------------------


#include <SoftwareSerial.h>
SoftwareSerial ESPserial(2, 3); // RX | TX

void setup()
{
Serial.begin(115200); // communication with the host computer

// Start the software serial for communication with the ESP8266
ESPserial.begin(115200);

Serial.println("");
Serial.println("Remember to to set Both NL & CR in the serial monitor.");
Serial.println("Ready");
Serial.println("");
}

void loop()
{
// listen for communication from the ESP8266 and then write it to the serial monitor
if ( ESPserial.available() ) { Serial.write( ESPserial.read() ); }

// listen for user input and send it to the ESP8266
if ( Serial.available() ) { ESPserial.write( Serial.read() ); }
}

---------------------------------------------------------------------------------------------------------------------------

I figured out that my connection to the ESP8266-01 needs to take place at a 115200 Baud rate based on some previous testing I did using an FTDI Connector and directly communicating with it through the arduino console.

When I run this sketch, all I get is a little bit of gibberish at the beginning as output from the ESP8266-01, and the rest of the sketch prints out it's startup stuff fine. I type in AT commands and sometimes get weird characters, and sometimes a few question marks (?), etc.

I am sure I am making a bunch of mistakes and bad assumptions in my wiring/coding, but I feel a bit stuck and could really use some help figuring out where I am going wrong.

Feel free to ask me to test a voltage on something or any other questions and I'll provide whatever other details I can.

Thanks!
-Steve
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
You've recognised that the 3.3V output can not supply sufficient current. What have you done to supply enough current to the ESP8366? Have you wired up an external 3.3V regulator? If you're powering it from 9V it may get reasonably warm unless heatsinked or in a fairly large package.
 

Steve Peart

Sep 16, 2015
53
Joined
Sep 16, 2015
Messages
53
Does powering the Nano with the 9V Adapter not give the entire circuit access to the current? Even the 3.3V line?
 

Steve Peart

Sep 16, 2015
53
Joined
Sep 16, 2015
Messages
53
Also, assuming the 9v adapter current DOESN'T come through the 3.3V pin, I threw together a quick voltage divider for the 9V coming in to have a 3V line and that didn't work either. I am partially wondering now if the software serial cannot handle the 115200 baud rate to the ESP8266-01, but for me to change that, I'd have to flash the ESP8266-01 to change that config, which if I could do that, I would try to use it without the nano.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
The existing 3.3V regulator may be good for about 50mA, about half of what you want. A voltage divider is somewhere between useless and extremely wasteful.

Get an external 3.3V regulator and use that.
 

Abid Jamal

Nov 13, 2017
4
Joined
Nov 13, 2017
Messages
4
Step 1: Turn On Your ESP8266 Module by Using Arduino Nano 3.3V Dc Output Pin. Remeber sometimes Arduino board is not delivering sufficient voltage to the ESP8266 module. You can use a 3.3 V ( Do not exceed input voltage from 3.3v) regulator ( AMS1117 ) to power this module. A voltage divider circuit is used to drop the Arduino 5V to ESP8266 3.3 V.

Step 2: Here is the schematic Diagram, in my code I used Digital pin 2 as a Tx and D3 as an RX.

Step 3: Open Arduino IDE and Paste the source code in the window just like shown in the picture.

Step 4: You are ready to send At Commands to Your ESP8266 Module. Remember you will see a Garbage value during Serial Communication.

AT – Will give OK on the serial monitor, if Not just unplug vcc Pin of ESP8266 Module for a moment and reconnect again.

Send AT+RST – Command to Restart module / Optional Command

Send AT+GMR – To get the firmware version

Send AT+CWMODE? – Set Module to a Dual Mode Sucha as Standalone + Access Point mode.

Send AT+CWLAP – Command to Search Nearby Wifi Access Point. Find your Wifi Name in the Search Result.

Send AT+CWJAP="Your Wifi Name","Your Wifi Password" – Command to Connect to WIFI.

Send AT+CIFSR – Command to Check Allocated Ip given by your Wifi to your ESP8266 Module/Optional Command.
 
Top