ESP8266-01 with Arduino Nano issues

Discussion in 'Electronic Projects' started by Steve Peart, Oct 12, 2017.

  1. Steve Peart

    Steve Peart

    Joined:
    Sep 16, 2015
    Messages:
    50
    Likes Received:
    3
    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 Peart, Oct 12, 2017
    #1
    1. Advertisements

  2. Steve Peart

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Joined:
    Jan 21, 2010
    Messages:
    23,022
    Likes Received:
    2,036
    Location:
    Mid way between Beijing and the Ronne Ice Shelf
    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*), Oct 12, 2017
    #2
    1. Advertisements

  3. Steve Peart

    Steve Peart

    Joined:
    Sep 16, 2015
    Messages:
    50
    Likes Received:
    3
    Does powering the Nano with the 9V Adapter not give the entire circuit access to the current? Even the 3.3V line?
     
    Steve Peart, Oct 12, 2017
    #3
  4. Steve Peart

    Steve Peart

    Joined:
    Sep 16, 2015
    Messages:
    50
    Likes Received:
    3
    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 Peart, Oct 12, 2017
    #4
  5. Steve Peart

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Joined:
    Jan 21, 2010
    Messages:
    23,022
    Likes Received:
    2,036
    Location:
    Mid way between Beijing and the Ronne Ice Shelf
    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.
     
    (*steve*), Oct 12, 2017
    #5
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. mollekake

    Arduino Nano + RGB led + adxl335

    mollekake, Jan 24, 2015, in forum: Microcontrollers and Programming
    Replies:
    1
    Views:
    882
    mollekake
    Jan 24, 2015
  2. jaosef

    Quadcopter build using Arduino nano

    jaosef, Apr 22, 2015, in forum: Electronic Projects
    Replies:
    0
    Views:
    735
    jaosef
    Apr 22, 2015
  3. Areeha Durrani

    esp8266 with avr

    Areeha Durrani, Feb 16, 2016, in forum: Microcontrollers and Programming
    Replies:
    1
    Views:
    884
    Amar Dhore
    Feb 18, 2016
  4. Jeroen Humasol

    Pizero or arduino nano?

    Jeroen Humasol, Oct 10, 2016, in forum: General Electronics Chat
    Replies:
    5
    Views:
    285
  5. Raja Vigneshwaran

    ESP8266 arduino coding

    Raja Vigneshwaran, Nov 23, 2016, in forum: Microcontrollers and Programming
    Replies:
    1
    Views:
    198
    Amar Dhore
    Nov 30, 2016
  6. martik123

    I2C ESP8266 Arduino Bad Reading

    martik123, Feb 13, 2017, in forum: Microcontrollers and Programming
    Replies:
    0
    Views:
    185
    martik123
    Feb 13, 2017
  7. Rajat Bajaj

    How To Use Esp8266 With Arduino Uno

    Rajat Bajaj, Jun 18, 2017, in forum: Microcontrollers and Programming
    Replies:
    1
    Views:
    181
    Amar Dhore
    Jun 19, 2017
  8. Schlogdawg

    Issues with arduino power from cars accessory power fuse

    Schlogdawg, Jul 23, 2017, in forum: Electronic Projects
    Replies:
    10
    Views:
    108
    Bluejets
    Jul 24, 2017
Loading...