ESP-12F + Arduino nano does not work
Posted: Sun Oct 27, 2019 12:51 pm
Hey there,
I wanted to get into that ESP stuff after some experience with the arduino itself as well as some sensors and i2c connections etc.
So I grabbed some ESP-12F modules from ebay and checked the tutorials. Most of them were referring to the ESP-01 but some of them mentioned the 12F in the diagrams.
So I wired all up the following (using SoftSerial):
Nano D2 -> 220Ohm -> ESP TX -> 470Ohm -> GND
Nano D3 -> ESP RX
Nano VCC -> From USB
Nano GND -> From USB
ESP VCC -> 3.3v from external line
ESP GND -> from external line (also connected to GND from Arduino to have a common GND)
ESP EN -> 10kOhm -> VCC 3.3v
That was what I was getting from various online resources. However, when uploading my code to the Arduino and checking the serial monitor, I only get garbled text (higher baud = more chars). The one LED on the ESP was flashing once when powering it up.
No matter what I tried (all baud rates from 300 - 115200) or even connecting RX from Arduino directly to ESP TX (without the voltage divider) I got no connection.
I tested three different modules without any luck. I then found an old ESP-01 in my box and tried with this one, and lo and behold it worked (not with the voltage divider, but with direct connection).
A few chars where garbled, but that may be because of the over voltage. I didn't try too long, because I was afraid of killing the ESP TX pin.
Can anyone give me an idea why my ESP-12F modules don't work? Is there anything missing? I'm open for all suggestions at this point.
Code is the one which is all over the internet:
I wanted to get into that ESP stuff after some experience with the arduino itself as well as some sensors and i2c connections etc.
So I grabbed some ESP-12F modules from ebay and checked the tutorials. Most of them were referring to the ESP-01 but some of them mentioned the 12F in the diagrams.
So I wired all up the following (using SoftSerial):
Nano D2 -> 220Ohm -> ESP TX -> 470Ohm -> GND
Nano D3 -> ESP RX
Nano VCC -> From USB
Nano GND -> From USB
ESP VCC -> 3.3v from external line
ESP GND -> from external line (also connected to GND from Arduino to have a common GND)
ESP EN -> 10kOhm -> VCC 3.3v
That was what I was getting from various online resources. However, when uploading my code to the Arduino and checking the serial monitor, I only get garbled text (higher baud = more chars). The one LED on the ESP was flashing once when powering it up.
No matter what I tried (all baud rates from 300 - 115200) or even connecting RX from Arduino directly to ESP TX (without the voltage divider) I got no connection.
I tested three different modules without any luck. I then found an old ESP-01 in my box and tried with this one, and lo and behold it worked (not with the voltage divider, but with direct connection).
A few chars where garbled, but that may be because of the over voltage. I didn't try too long, because I was afraid of killing the ESP TX pin.
Can anyone give me an idea why my ESP-12F modules don't work? Is there anything missing? I'm open for all suggestions at this point.
Code is the one which is all over the internet:
Code: Select all
// Basic serial communication with ESP8266
// Uses serial monitor for communication with ESP8266
//
// Pins
// Arduino pin 2 (RX) to ESP8266 TX
// Arduino pin 3 to voltage divider then to ESP8266 RX
// Connect GND from the Arduiono to GND on the ESP8266
// Pull ESP8266 CH_PD HIGH
//
// When a command is entered in to the serial monitor on the computer
// the Arduino will relay it to the ESP8266
//
#include <SoftwareSerial.h>
SoftwareSerial ESPserial(2, 3); // RX | TX
void setup()
{
Serial.begin(9600); // communication with the host computer
//while (!Serial) { ; }
// Start the software serial for communication with the ESP8266
ESPserial.begin(9600);
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() ); }
}