Arduino pro mini with ESP-01

Dear community, greetings to all.

This is my first post want to thank you in advance for every help.

I am new to the arduino world, my recent project is a blinking rgb strip controlled by a switch button ::slight_smile:

I’ve ordered an ESP-01 or ESP 8266 to start a project controlled over WiFi.

I am using a USB to TTL to power up my arduino pro mini, now I need to attach somehow the esp-01 to the arduino (not sure if i need the adapter which I bought in a bundle). As i know it has a regulator for 5v->3.3v.

I connected the ESP-01 directly to the TTL and flashed a firmware (even few of them after failing with my project).

I was using this tutorial for the wiring:

My code returns me that the WiFi shield is not present.

One of the problems that I saw is that I cannot (or don’t know how) send the AT commands to my esp.

Please see attached image of the components that i am using (ignore the wiring).

Any advice is welcome!
Thank you in advance.

Best regards

When you follow that tutorial, you can not use AT commands anymore. You will have replaced the AT firmware with the ESP8266 cord for Arduino firmware. https://github.com/esp8266/Arduino

I would also add that it is much easier to use an all-in-one board instead of Arduino Pro Mini + ESP-01. I bought the ESP-01 before I knew better.

If I was starting over, I would buy https://store.arduino.cc/usa/nano-33-iot-with-headers

.

I know it's great to support Arduino and buy a branded board but if you're on a budget, a better option may be a NodeMCU of a Wemos D1 Mini. They can be both powered via usb, eliminating the need for the FTDI module.

IMG_20191230_225706 (Medium).jpg

Yes, you are approaching it wrong.

To program the ESP-01 you use the proper adapter.

This is the enhanced version of the module first described in the quite good tutorial you cited so you do not need to add the programming jumper - the switch is already on this adapter.

Other than for programming the $1 "plain" adapter is extremely useful as it plugs straight into the average USB "phone charger" and you simply solder your connections to the adapter to operate other parts or sensors.

The ESP-01 has four I/O available - you will need to cut the track to the RX pin on the module to use that fourth pin effectively.

If you need more I/O, then you should go for the WeMOS D1 Mini as exiledyorkie points out.

The point is, it makes little or no sense to use an ESP in addition to an Arduino. The ESP is substantially more capable, so if you want WiFi, you use the ESP and forget the Arduino. :grinning:

How do you do a Reset on the ESP-01 when using the Sensemart adapter (red)? Do you simply unplug and replug the ESP-01?

For programming the ESP-01, I lucked on the adapter I bought on eBay that had the Silicon Labs CP2102 chip. It is 3.3V on its UART pins. https://www.silabs.com/documents/public/data-sheets/CP2102-9.pdf I built a board following the schematic at https://www.allaboutcircuits.com/projects/flashing-the-ESP-01-firmware-to-SDK-v2.0.0-is-easier-now/ .

@X3NomoRpH

If you were successful with the programming using that tutorial you, then you won't be able to use AT commands.

If you were unsuccessful with the programming, the AT firmware should still be in your ESP-01 module.

To verify which is which, use Termite or Putty or Teraterm and connect your ESP-01 to your PC using the USB-TTL adapter.

Please post back if you have questions.

.

“If you need more I/O, then you should go for the WeMOS D1 Mini as exiledyorkie points out.”

I just got a WeMOS D1 board from a US supplier for ~$6 shipped and it connects to my router with no issues, and uses the DollarTree thin flexible USB micro cables. So far very simple to use like a UNO with added no hassle wifi.

ieee488: How do you do a Reset on the ESP-01 when using the Sensemart adapter (red)? Do you simply unplug and replug the ESP-01?

Pretty much.

Not a great difficulty that I have found as I am necessarily swapping the ESP-01 between the programming adapter and the target system.

In fact, I am not sure I actually have the (red) adapter with the switch - I'll have to look (and that will consume my time even on New Years Day). :sunglasses:

I just have a number of the cheaper adapters, including those actually attached to the "Times square" boards as the fully functional project. One such adapter has a jumper fitted which I leave in place, so I alternate between putting the ESP-01 into the programming adapter and plugging it in to USB to program, and taking it out and swapping it into the target system to test the result. :grinning:

zoomkat: "If you need more I/O, then you should go for the WeMOS D1 Mini as exiledyorkie points out."

I just got a WeMOS D1 board from a US supplier for ~$6 shipped and it connects to my router with no issues, and uses the DollarTree thin flexible USB micro cables. So far very simple to use like a UNO with added no hassle wifi.

The Wemos website is sparse. Who are they?

ieee488:
@X3NomoRpH

If you were successful with the programming using that tutorial you, then you won’t be able to use AT commands.

If you were unsuccessful with the programming, the AT firmware should still be in your ESP-01 module.

To verify which is which, use Termite or Putty or Teraterm and connect your ESP-01 to your PC using the USB-TTL adapter.

Please post back if you have questions.

.

I was successful mulitple times with the flashing. But I could not use the AT commands.

In the end I wanted the AT commands just for the test and the confirmation that I successfully updated the firmware on my ESP-01.

I want to use it in my arduino project with the WiFiEsp library (or any other) to connect with my arduino to the internet.

I connect the esp-01 over the adapter with my arduino, but I get always an “No wifi shield” status.

I don’t know what needs to be done.

Thanks

ieee488: The Wemos website is sparse. Who are they?

I do not know too much regarding their back story but the D1 Mini is a well regarded board.

The company changed the names, not too long ago. This is their official store

LOLIN Official Store https://a.aliexpress.com/48HNcXmpN

"The Wemos website is sparse. Who are they?"

Not sure who they are, but the board is somewhat like an uno with wifi. Still figuring out the pin arrangement, but no setup for communication or wifi. Just load a web server program and it works. You modify the example code to connect to your internet router and you are on line. I have two of them now, I got one from china and one from US supplier, both about $6.75 including shipping (China speedpak from china).

X3NomoRpH: I was successful mulitple times with the flashing. But I could not use the AT commands.

In the end I wanted the AT commands just for the test and the confirmation that I successfully updated the firmware on my ESP-01.

I want to use it in my arduino project with the WiFiEsp library (or any other) to connect with my arduino to the internet.

I connect the esp-01 over the adapter with my arduino, but I get always an "No wifi shield" status.

I don't know what needs to be done.

Thanks

As I have already written, if you were successful with flashing the ESP-01, the AT firmware is GONE. GONE.

How are you getting the "No wifi shield" status? What sketch are you using?

You are not helping yourself with this. You have told us nothing useful to help you.

.

exiledyorkie: I do not know too much regarding their back story but the D1 Mini is a well regarded board.

The company changed the names, not too long ago. This is their official store

LOLIN Official Store https://a.aliexpress.com/48HNcXmpN

Very useful. Thank you.

zoomkat: Not sure who they are, but the board is somewhat like an uno with wifi. Still figuring out the pin arrangement, but no setup for communication or wifi. Just load a web server program and it works. You modify the example code to connect to your internet router and you are on line. I have two of them now, I got one from china and one from US supplier, both about $6.75 including shipping (China speedpak from china).

Thanks.

Do you use the Arduino IDE to upload the web server sketch? Just want to confirm.

Sounds easy. I will have to get one. These ESP-01 are a royal pain. LOL.

Well, my plan is

ieee488:
As I have already written, if you were successful with flashing the ESP-01, the AT firmware is GONE.
GONE.

How are you getting the “No wifi shield” status?
What sketch are you using?

You are not helping yourself with this.
You have told us nothing useful to help you.

Wow… that means I cannot flash an AT firmware anymore?
Well… my plan is to connect my arduinio pro mini to the internet and make an HTTP request to my webpage. I found some sketches and combined them to write my code.

#include <SPI.h>
#include <WiFiEsp.h>
#include <HttpClient.h>
#include "SoftwareSerial.h"

SoftwareSerial Serial1(2, 3); // RX, TX

char ssid[] = "#########";
char pass[] = "#########";
int status = WL_IDLE_STATUS;
const char* kHostname = "#########";
const char* kPath = "/#########";

void setup() {
  Serial.begin(9600);
  Serial1.begin(115200);
  WiFi.init(&Serial1);

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while (true);
  }

  while(WiFi.status() != WL_CONNECTED) {
      Serial.print("Attempting to connect to WEP network, SSID: ");
	    Serial.println(ssid);
	    status = WiFi.begin(ssid, pass);

	    delay(2000);
  }

  Serial.println("Connected to SSID");
}

void loop() {
  if(WiFi.status() == WL_CONNECTED) {
  	Serial.println("Success.");
  	WiFiEspClient c;
  	HttpClient http(c);

  	int httpCode = http.get(kHostname, kPath);

  	if(httpCode > 0) {
  		Serial.println("HTTP request succeed");
  		char payload = http.read();
  		Serial.println(httpCode);
  		Serial.println(payload);
      //do my stuff
  	} else {
  		Serial.println("Error on HTTP request");
  	}

  	http.stop();
  }

  delay(10000);
}

"Do you use the Arduino IDE to upload the web server sketch? Just want to confirm."

Yes, no different than loading code to an arduino using the arduino IDE. You get a board list that includes the WeMOS D1, download the wifi libraries, and select the examples you want to run/ modify. Same operations as using an arduino.

X3NomoRpH: Wow... that means I cannot flash an AT firmware anymore?

I did not write that. I said that after what you did, the AT firmware is gone.

You can flash AT firmware back to your ESP-01 if you want. I did this with four ESP-01 the past few days. You should use v 1.6.2 of AT firmware. https://www.espressif.com/sites/default/files/ap/ESP8266_AT_Bin_V1.6.2_0.zip and use Espressif's Flash Download Tool https://www.espressif.com/sites/default/files/tools/flash_download_tools_v3.6.8.zip

or you can stick with the ESP8266 Core for Arduino.

Your choice. .