ESP8266 and Arduino, plugged in, pinned out. ESP8266 firmware, programming Arduino IDE Esp 01 arduino firmware

Golovna / Main functionality

Module esp-01
Scheme of the correct connection of the esp-01 module for programming that firmware.

The firmware of the module is carried out by switching to the programming mode, for which the FLASH button is pressed, then it is not allowed to press the RESET button for a short time and the FLASH is allowed.
The module has been switched to programming mode.
At the terminal at the moment you can chat

ets Jan 8 2013,rst cause:2, boot mode:(1,6)
boot mode:(1,6) - reset by RESET to programming mode
boot mode: (1,7) – re-entering boot mode into programming mode – which is not correct.

To flash the vicorist program NODEMCU FIRMWARE PROGRAMMER
(Before the topic, there will be additions of archives from the program)
Unpack the archives and run the 32-bit version of Win32Release ESP8266Flasher.exe in my windows
Now, it's a pid module, in my opinion, 1 megabyte of flash memory or 8 megabytes.




We need to erase the memory with an empty file of 1 MB.
Tse neobov'yazkovy point. You can skip erasing and go to the firmware.
Whoever has more memory than less - will need an empty file of the same size.
Dalі vyznaєmo what kind of firmware is needed!
You can tweak how to prepare the firmware for NODEMCU, as well as from the designer with your own modules.
For example, one of the old misconceptions of NODEMCU

Constructor wifi-iot.com/
Constructor nodemcu-build.com/
otherwise I’ll stop downloading

Problems with firmware
Yakscho the esp8266 module is not flashed, reverse the pull-ups and the correctness of the connection to GND GPIO0. And also do not mix RX TX.
At the terminal, you can change whether you saw boot mode:(1,6) or boot mode:(1,7).

Yakscho If the module does not work recently, try to erase the memory with an empty file, the memory expansion form.

Yakscho If the module after a successful firmware is not sent to the port without the end of the smittya (maybe the data transmission light is blocked), it is trapped during the flashing of the remaining Nodemcu selections, then it is necessary to additionally flash the file into the memory area in the memory chip.
From site nodemcu taken information from memory.
0x7c000 for 512 kB, modules like ESP-01,03,07
0xfc000 for 1 MB, modules type ESP8285, PSF-A85 and other esp-01,01s
0x1fc000 for 2 MB
0x3fc000 for 4 MB, module type ESP-12E, NodeMCU devkit 1.0, WeMos D1 mini ID

If you don’t help anything, then write.

I add the official group of the owner of the possession

Wi-Fi module ESP-01 is the most popular module of the ESP8266 series. The connection with a computer or a microcontroller is connected via UART for an additional set of AT commands. In addition, the module can be tweaked as an independent attachment, for which it is necessary to install your own firmware. You can program and download the firmware through the Arduino IDE version 1.6.5. To flash the module, you need a UART-USB adapter. The ESP-01 module can be wide-width for use in IoT (Internet of speech) applications.

Technical characteristicsmodule

  • WiFi 802.11b/g/n
  • WiFi modes: client, hotspot
  • External tension - 19.5 dB
  • Live voltage - 1.8 -3.6 V
  • Strum calming - 220 mA
  • GPIO ports: 4
  • Processor clock frequency - 80 MHz
  • Memory capacity for code
  • RAM - 96 KB
  • Rosemary - 13×21 mm

Connection

Let's look at the AT command mode. For this, we connect the module to the computer via a USB-UART adapter. Assignment of module options (div. figure 1):
  • VCC - +3.3
  • GND - ground
  • RX, TX - UART pins
  • CH_PD - Chip enable
  • GPIO0, GPIO2 - digital contacts
The module needs a living 3.3.

Figure 1. ESP-01 module pin assignments

Connection diagram for interfacing with the module in AT command mode (Figure 2):

Figure 2. Scheme of connecting the ESP-01 module to the computer via the port

Figure 3. Collection scheme

For strengthening AT-commands in Mac OS X, you can tweak the CoolTerm program, in the Windows operating system, the Termite program. Recognition of the COM-port security for connecting to the module is possible only experimentally, for different firmware it can be different. For my module, the speed was 9600 baud. In addition, the installation of the exchange was only possible after the reconnection was turned on until the CH_PD output was alive. After the connection is typed in the AT terminal and may be removed from the OK module input. The AT+GMR command displays the firmware version number of the module, the AT+RST command - re-mounts the module (div. small 4). The list of basic AT commands can be viewed in this document (ESP8266ATCommandsSet.pdf).

Figure 4. Sending AT commands to the module from the Termite program

If the AT command mode is not for you, the board can be adjusted using the AppStack ESP8266 Config program, you can install it using http://esp8266.ru/download/esp8266-utils/ESP8266_Config.zip. The old look of the program representations of the little one 5. Setting up the module is built with the help of a graphical interface; At the monitor, you can also send AT commands from the command line.

Figure 5. AppStack ESP8266 Config Program

Figure 6. Serial monitor in AppStack ESP8266 Config

There are two options for using this module:

  • at the link with a microcontroller (for example, Arduino), a kind of keruvatime module via UART;
  • writing a custom firmware for the ESP8266 wiki as an independent attachment.

Butt vikoristannya

Let's take a look at the connection to the ESP-01 module of the moisture and temperature sensor DHT11 and the power of data from the dark service ThingSpeak (https://thingspeak.com/). We need the following details:
  • ESP-01 module
  • breadboard board
  • humidity and temperature sensor DHT11
  • resistor 10k
  • zadnuvalni darts
  • living block 3 - 3.6V
We connect the DS18B20 sensor to the ESP-01 module. DS18B20 is a digital temperature sensor that works with a single-wire 1-Wire interface. The diagram for connecting the DS18B20 sensor to the module is shown in fig. 7.

7. Scheme of connecting the DHT11 sensor to the ESP-01 module.

Then you need to create a profile with the ThingSpeak service. The service has instructions for raising data from the service and removing data from the service.

Figure 8. Scheme at the collection.

The program is written in the Arduino IDE for ESP8266. We will chicory the ESP8266WiFi.h libraries and OneWire.h. Listing 1 sketch for the Arduino board - removing data from the temperature sensor and overpowering data from the ThingSpeak service. You need to enter your data for the WiFi access point for the ESP-01 module:

  • const char *ssid;
  • const char *password;
as well as the privateKey parameter for your program in the ThingSpeak service. Listing 1 // website // Include robot library with esp8266 # include // Include DHT library before DHT11 #include // pin connected to the DATA pin #define DHTPIN 4 // sensor DHT11 #define DHTTYPE DHT11 // instantiation of the DHT object DHT dht(DHTPIN, DHTTYPE); // ssid WiFi connections const char ssid = "********"; // Wi-Fi password of the connection merge const char password = "******"; // ThingSpeak server const char * host = "184.106.153.149"; // API KEY of your ThingSpeak program const char * privateKey = "*************** *"; // Changes to save temperature and moisture float temp; floating humidity; // change the interval of muting unsigned long millis_int1=0; void setup() ( // start the serial port Serial.begin(115200); delay(10); Serial.print("Connect to WiFi"); Serial.println(ssid); // Connect via WiFi WiFi.begin (ssid) , password), while (WiFi.status() != WL_CONNECTED) ( delay(500); ) Serial.println("WiFi connected"); check interval 10 times if(milis()-millis_int1>=10*60000) ( Serial.print("connect to ThingSpeak"); Serial.println(host); // WiFi Client WiFiClient client; if (!client.connect ) (host, 80)) ( Serial. println("connection failed"); return; ) // get temperature data temp = get_data_temperature(); humidity = get_data_humidity(); // Create a URL with a request for the server String url = "/ update?key="; url += privateKey; url += "&temp="; url += temp; url += "&humidity="; url += humidity; // Can be sent to server client.print(String(" GET ") + url + " HTTP/1.1\r\n" + "Host: " + host + "\r\n" + "Connection: close\r\ n\r\n");delay(10); // ThingSpeak server response while(client.available())( String req = client.readStringUntil("\r"); Serial.print(req); ) ) ) Now the ThingSpeak service can display a graph showing our DHT11 temperature sensor (Malyunok 9).

Figure 9. Graph of the reading of the temperature sensor DS18B20 for the ThingSpeak service.

Food Parts FAQ

1. The module is not supportedAT commands
  • Reverse the correct connection of the module;
  • Reverse the correct connection of Rx, Tx contacts to the UART-USB adapter;
  • Change the connection to the CH_PD contact to 3.3;
  • Experimentally pick up the exchange rate on the serial port.
2. The ESP-01 module does not take temperature data from the sensorDHT11
  • Check the correct connection of the DHT11 sensor to the module.
3. Data is not transmitted to the ThingSpeak service
  • Change the connection of the module to the WiFi access point;
  • Change the connection of the WiFi access point to the Internet;
  • Reverse the correctness of the question before ThingSpeak.

Many koristuvachiv have already gained respect for the ESP8266-12 chip released by the Espressif company. Vartity of yoga is significantly cheaper compared to the standard board of the Bluetooth-adapter, which, with smaller dimensions of the vin, is significantly more capable. Now all home lovers have taken away the possibility of working in Wi-Fi at once in two modes, so that you can connect your computer to any access point or turn it on as such a point.

From the other side, it is necessary to understand correctly that such payments are not just shields, recognized only for calling via Wi-Fi. By itself, the ESP8266 is a microcontroller that can control UART, GPIO and SPI-interface, so that it can be played as an absolutely autonomous possession. Well, after the release of this chip, they called it the first blue revolution, and in an hour it’s time to start building up with the simplest technology, but for the time being, it’s still new and stable firmware on the new one. A lot of fakhіvtsіv all over the world are smeared with wines of good firmware, even if you fill them at the board, they really don’t add up special difficulties, but without respect for the various difficulties, attachments at once can be called a whole appendage to work.

At the moment, there are only two options for loading this module:

  • Vikoristannya payment in combination with an additional microcontroller or a computer, which will control the module via UART.
  • Self-written firmware for the chip, which allows you to later win it as a self-sufficient attachment.

It’s completely natural, we won’t be able to look at the independent firmware in this way.

Surprised by the versatility of victories and good characteristics, a lot of people among the anonymous microcontrollers believe the ESP8266 model to be superior. Connecting and updating the firmware of this add-on is marginally simple and accessible, and carried out on the same hall, on which the connection to the computer is connected. So through a USB-TTL converter, or, if you want to overcome other connection options, you can connect through RPi and Arduino.

How to distort?

In order to reconsider the practicality of a newly purchased add-on, you will need to use a specially stabilized voltage socket, 3.3 volts insured. Once again, it means that the real voltage range of this module should be set from 3 to 3.6 volts, and the supply of the increased voltage will be brought up to the point where you just get your ESP8266 out of tune. Firmware and other software security in the event of a similar situation may often be incorrectly processed, and you will need to repair attachments or fix it.

To determine the practicality of the microcontroller model, you just need to connect three pins:

  • CH_PD and VCC are connected up to 3.3 volts.
  • GND is connected to ground.

If you win not ESP-01, but another module, and on the new GPIO15, then in such a situation you will need to connect to the ground additionally.

If the factory firmware started up normally, then in such a state you can dance, and then the sprat will flash blue. However, it indicates that the red life indicator may not be available for all ESP8266 series. The firmware on some outbuildings does not transmit the glowing red indicator, as it is the fault of the day (the cream, the ESP-12 model is required).

After connecting to a wireless network, a new access point will be activated, as it will be called ESP_XXXX, and you will be able to show any attachment that can access Wi-Fi. At this point, having named the access point, lie down in the middle of the virobnik of the firmware you have installed, and you can also be something else.

If the point is valid, you can continue the experiment, in the next case it will be necessary to re-verify the life, as well as the correctness of the connection of GND and CH_PD, and if everything is connected correctly, then, more for everything, you still slander the moduleists otherwise, the new firmware is installed with non-standard tweaks.

How to connect yoga fast?

Standard dialing required to connect this module, including the foot:

  • the module itself;
  • solderless breadboard;
  • additional set of female-male wires, recognized for a breadboard, or a special DUPONT M-F cable;
  • USB-TTL converter based on PL2303, FTDI or similar chip. The most optimal option is to use RTS and DTR on a USB-TTL adapter, so you can reach the firmware download for any UDK, Arduino IDE or Sming without needing to manually jump GPIO0 to ground.

If you use a 5 volt converter, then in such a situation you will need to add an additional life stabilizer based on a 1117 chip, or similar, and also life support (for a standard 1117, it’s not bad to start a 5 volt smart phone charging). It is recommended not to use the Arduino IDE or USB-TTL as a life saver for the ESP8266, but to put in an okremium, which can cause a lot of problems for the account.

A set of extensions for ensuring comfortable and permanent work with the transmission module requires a variety of additional resistors, light diodes and DIP jumpers. Of course, you can also use an inexpensive USB-monitor, which will allow you to constantly monitor for a small amount of stunned strum, as well as secure a small USB bus from a backup.

What do you need to work?

This varto is indicative of the fact that in the ESP8266, the control can be changed a little, depending on how the model itself wins. It is presented to complete such modules today, and first, as it will be necessary, - it is necessary to carry out the identification of the model, which is victorious, and to be assigned to її pinouts. This instruction speaks about the work with the ESP8266 ESP-01 V090 module, and as you need to win another model with the GPIO15 pin (HSPICS, MTDO), you will need to pull the firmware to the ground as a standard module start, so for the win mode .

After that, switch over to the fact that the voltage of life for the connected module becomes 3.3 volts. As it was said above, the allowable range should be set from 3 to 3.6 volts, and in times of increase in attachments, go out of tune, but if the pressure is on, it can be significantly lower than 3 volts, as stated in the documents.

If you use a USB-TTL converter for 3.3 volts, then in this way connect the module just like in the left part of the image below. If the 5-volt USB-TTL is turned on and off, then respect for the right part of the little one. It’s possible to get rich, that the right circuit is effective for the account of what is in it, it’s the life’s life, but it’s true that at times the USB-TTL converter is stuck at 5 volts in the region, it’s also a supplementary dilnik on resistors, to ensure the safety of these three-volt voltages logic, or just tweak the module of transformation of equals.

Features of the connection

On the right little one, you can connect UTXD (TX), as well as URXD (RX) of this module to the five-volt TTL logic, and such procedures are carried out only at your own risk. Before the ESP8266, it was described to talk about those that the module effectively works only with 3.3-volt logic. For more vipadkіv navіt razі zі zі zі pyatіvіlіtіvіy іt'іvіtіlіtіvіyі іgіlіkoyu obladannіa do not get out of tune, but if there are such situations, the similar connection is not recommended.

Since you don’t have the ability to specialize in a USB-TTL converter for 3.3 volts, you can plug in a dilnik on resistors. Takozh Varto to bending, the right -handed malyunka Stabilizator Zhilnnya 1117 pirkluchas without the appraisal of the observation, I tsely robocha technology, ale is still more painfully browned by the schematic of pydklochennya, the condenser of the condenser is a stubborn I will now have a ready-made module that will run on the basis of 1117.

To start the module, you need to open the GPIO0-TND port, after which you can apply live. With this varto, designate that everything is needed by itself in this order, so you can start thinking about having GPIO0 “hang in the window”, and then just serve food on CH_PD and VCC.

How to connect correctly?

If you can give more than one evening to plug in the ESP8266 module normally, you can win a more stable version. On the diagram, you can see the connection option with automatic firmware upgrade.

Please note that the image does not show any GPIOs or ADCs, and they are connected without a middle ground depending on what you specifically want to implement, or if you want to ensure stability, do not forget to connect all GPIOs to the earth, ADC vikoristannyam podtyaguchih resistors.

Resistors for 10k can be replaced, if necessary, in the range from 4.7k to 50k, GPIO15 crimson, shards of yogo nominal can be three times more than 10k. The rating of the capacitor, which smooths out high-frequency ripples, can be smaller.

Resetting the GPIO16 via a 470 ohm deep sleep resistor switch may be necessary when the switch is in low sleep mode, so in order to get out of deep sleep mode, the module needs to be reset again, setting the low level on GPIO16. During the day, the deep sleep mode for your module is always on.

At first glance, you might think that GPIO0, GPIO1 (TX), GPIO2, GPIO3 (RX) and GPIO15 are occupied, so you can’t see them for your own sake, but in reality it’s far from the case. It may be necessary to add a high value to GPIO0 and GPIO2, as well as a low value to GPIO15 only for the initial start of the module, and then you can still stop them at the high court. The only thing that varto means - do not forget to take care of your expenses before you start to re-advantage your possession.

It is also possible to twist TX, RX as an alternative to GPIO1 and GPIO3, but if not, forget about those that after the start of the module, the skin firmware starts to "smack" TX, in parallel, being engaged in editing the nagojuval information in UART0 on the next day, 744 success, you can use it not only like UART0 in order to exchange data with other devices, but also like a standard GPIO.

For modules that have a small number of wired pins (for example, ESP-01), it is not necessary to connect unwired pins, so only GND, CH_PD, VCC, GPIO0, GPIO2 and RESET will be wired on ESP-01, and you yourself will need pull up. You don't need much to solder directly to the ESP8266EX chip, and then attract unwired pins, as you actually need.

Such connection schemes were victorious after a large number of experiments carried out by qualifications of facsimiles and selections from impersonal and varied information. With this varto, it means that such schemes cannot be created as ideal ones, so that it is possible to win a number of low, no less effective options.

Connection via Arduino

If you don’t have a USB-TTL converter for 3.3 volts, then in this case the WiFi ESP8266 module can be connected via Arduino with a built-in converter. Here you will need to turn your attention back to three main elements:

  • When working in robots with the ESP8266 Arduino Reset, the number of connections to GND, to make it impossible to start the microcontroller, and in this case, it looks like a transparent USB-TTL converter.
  • RX and TX were connected not at an intersection, but without a middle - RX-RX (green), TX-TX (yellow).
  • Everything else is connected just like it was meant to be.

What do you need to bribe

This circuit also requires 5 volts TTL for the Arduino, as well as 3.3 volts for the ESP8266, but with which it can function like this.

When connected to the ESP8266, the Arduino can be equipped with a life stabilizer, which does not show the strum, which is necessary for the ESP8266, after which, before it, it is necessary to activate it, it is necessary to look at the dataship on the one that you have. Do not try to connect other power-saving elements at the same time with the ESP8266, you can get the chips to the point that the life stabilizer in the Arduino will just go out of tune.

Also, there is another connection scheme for ESP8266 and Arduino, in which SoftSerial is used. So, as for the SoftSerial library, the port port speed, which is more expensive than 115200, may be too high and cannot guarantee a stable operation, such a way to turn on the vicory is not recommended, although there are some fluctuations, they are all stable.

Connected via RaspberryPi

If you can't use any USB-TTL converters, you can use RaspberryPi in this way. In this case for the ESP8266, programming that connection is practically identical, but with it everything is not so handy, but it will be necessary to use a 3.3 volt life stabilizer.

For the cob RX, TX and GND of our add-on is connected to ESP8266, and GND and VCC are taken from the 3.3 volts. Here, I would like to respect the following to the fact that it is necessary to carry out the installation of all GND devices, that is, the RaspberryPi and ESP8266 stabilizer. If I add a stabilizer to your model, it can withstand up to 300 milliamps of additional voltage, then in such a situation, the ESP8266 connection will work normally, but everything will only work on your own fear and risk.

Customized parameters

If you have sorted out how to connect the ESP8266, you need to reconnect, so that the drivers to your devices are installed correctly, after which a new last virtual port was added to the system. Here you will need to win the program - the terminal of the last port. In principle, you can use the utility to your liking, but if you are guilty, it is correct to understand that if the team is virushatim by you in the last port, the mother is to blame for the final symbols CR + LF.

CoolTerm and ESPlorer utilities can be extended to wide widths, while still allowing you not to enter the ESP8266 on your own, and if so, it’s easier to work with lua scripts for NodeMCU, so you can even win as a standard terminal.

For a normal connection, it took a little work, so the firmware for the ESP8266 in its most varied and activation can be carried out on different hardware. To choose the most optimal option, you will need to go through the three main options: 9600, 57600 and 115200.

How to sort out?

To start, connect in the terminal program to the serial virtual port, setting the parameters 9600 8N1, after which you need to reset the module externally, turning on CH_PD (chip enable) for live, after which you re-activate yoga, changing CH_PD. It is also possible to carry out a short-term RESET hiccup to the ground, in order to reset the module, and watch for data in the terminal.

In the first line, I will add the blame exactly as shown in the description of the verification procedure. Also, you should check in the terminal for typing different symbols, which ends with a row of ready, but it can not, be reconnected to the terminal on a different speed with the upcoming module reconfiguration.

If you choose one of the security options in this row, you can use the module to prepare for work.

How to update the firmware?

After you install the ESP8266, the connection will take just a few seconds, and then you can update the firmware. To install new software, you need to work on your feet.

For the cob, download the new firmware version from the official site, and also download a special utility for the firmware. Here, I would like to pay attention to the fact that the operating system is installed on the machine, with which the ESP8266 is used. I will most likely make connections to older systems for Windows 7.

For standard Windows operating systems, it is optimal to tweak the program under the name XTCOM UTIL, as it is especially handy in robots, as the firmware is compiled only from one file. The best multi-platform option is to name the esptool utility, yak, truth, python, and also the need to specify parameters through the command line. Of course, the ESP8266 connection of the main functions allows you to manually download the Flash Download Tool, so you can get a lot of upgrades, as well as manually install the firmware from the download files.

Next, plug your terminal program into the serial port, and also plug CH_PD into life again, connect the GPIO0 module to GND, and the last CH_PD can be turned back. Alternatively, simply run the flashing software and hack it into the ESP8266 relay.

For more devices, the firmware is loaded into the module with a firmware in the region of 115200, and with this special mode, it automatically transfers the firmware, because of which the firmware can be carried out on a firmware greater than 9600, upgrading the available functions of the ESP8266. Arduino twisted for connecting or USB-TTL - it doesn’t play a special role here, and here it’s borderline to lie in the wires, the twisted converter and other factors.

How to convert ESP8266

To re-verify the ESP8266, whichever you came up with, you need it.

Respect!The allowable voltage range of the ESP8266 module is 3.0 to 3.6 volts. The supply of boosted voltage to the module is guaranteed to be brought to the output of the ESP8266.

To convert the ESP8266, ESP-01, just connect three pins: VCC and CH_PD (chip enable) to 3.3 volts, and GND to ground. If you don’t have an ESP-01, but another module and GPIO15 is connected to the new one, then you need to connect the GPIO15 to ground additionally.

With a successful start of the factory firmware on the ESP8266 modules, a red LED will light up (live indicator, on some versions of the module, for example ESP-12, can be daily) and a few times it flashes blue (the indicator of data transmission of data from the module to the terminal via the RX line, maybe TX-line mother of a different color) and your wireless network is to blame for a new access point with the name ESP_XXXX, so you can work with any WiFi add-on. By naming the access point to lie down in the firmware selection, you can also use it differently, for example AI-THINKER_AXXXXC. If the access point has appeared, then you can continue the experiment, if not, then once again reverse the life, CH_PD, GND and if everything is connected correctly, then it’s better for everything, you have a faulty module, but hopefully, the firmware in the module is non-standard nalashtuvannyami і Possibly, flashing will help you.

How to connect ESP8266

The minimum set for connecting the firmware of the ESP8266 module includes:

Chervoniy - kharchuvannya 3.3v

Black - GND

Yellow - on the ESP8266 side - RX, on the USB-TTL side - TX

Green - on the ESP8266 side - TX, on the USB-TTL side - RX

Orange - CH_PD (CHIP ENABLE) - is guilty of buti zavzhd p_dyagnuty before eating

Blue - GPIO0 - connections via vimikach to ground for raising the module flashing mode. For a perfect start of the GPIO0 module, you can leave it unconnected.

Rozhevy on the right scheme - unstabilized eating 5-8 volts

4. To start the module, open the GPIO0 - GND port and you can supply food (moreover, in this order: we change the order so that GPIO0 "hangs in the window", then we feed live on VCC and CH_PD)

Respect! In the case of actually working butts, the connection of the ESP8266 is connected to the connection of the ESP8266 “without a middle” to the ground and life, or “hang in the air”, as we have no RESET connections, which is absolutely wrong and extraneous for the pariment only as a whole it is practical on the most important modules. "Directly" to the live, only VCC pull-ups are connected, the wires: CH_PD, RESET, GPIO0, GPIO2, they are connected directly (pullup) to the live (VCC) through a resistor of 4.7 to 50 kOhm. "Directly", up to minus (a hot dart), only GND is connected, and GPIO0 is pulled (pulldown) also through a resistor up to 10k to GND to transfer the module to the firmware capture mode. If you plan and have to experiment with the ESP8266, then work it out just the same for any other microcontrollers. A detailed description of pullup and pulldown is beyond the scope of this article, but you can easily google a description of the correct I/O port connection. « » Connecting to allow you to get rid of the impersonal «miracles» and problems and will inevitably be necessary in case of any difficulties caused by launching or flashing the ESP8266 module.

How to connect the ESP8266 correctly

If you are planning to work with the ESP8266 more than one evening, then you will need a connection option that will ensure greater stability. There are two connection schemes below: for additional auto-loading of the firmware with and without it.

ESP8266 wiring diagram (without auto-uploading firmware, it is flashed in front by installing the BURN jumper and re-uploading the module)

Connection diagram for additional auto-upload of firmware with Arduino IDE, UDK, Sming. For Flash Download Tool and XTCOM_UTIL, you may need to enable RTS/DTR. If RTS and DTR are not easy for you to turn on, then you can add to the jumper circuit

These diagrams do not show the connection of ADC and other GPIOs - they are not connected depending on what you want to implement, but if you want stability, then do not forget to pull all GPIOs to life (pullup), and ADC to ground (pulldown) through resistors, so pull up. .

Resistors for 10k can replace other 4.7k up to 50k, GPIO15 crimson can be up to 10k. The rating of the capacitor, which smooths out high-frequency ripples, can be smaller.

You need to RESET and GPIO16 through a 470 ohm deep sleep resistor, so you can turn on the deep sleep mode: to exit the deep sleep mode, the module resets itself by applying a low voltage to GPIO16. Without this sleep, deep sleep will be eternal for your module.

At first glance, it is clear from the diagrams that GPIO0, GPIO2, GPIO15, GPIO1 (TX), GPIO3 (RX) are occupied and you cannot twist them for your purposes, but not so. A high rate on GPIO0 and GPIO2, a low rate on GPIO15 only require the module to start, and in the future you can beat them to your own discretion, just do not forget to secure the required rate until the module is reloaded.

You can tweak and TX, RX like GPIO1 and GPIO3, without forgetting about those that at the start of the module, whether the firmware will be muted TX, adjusting the tax information in UART0 on the firmware 74480, but after a successful capture of UART, you can only beat the UART for exchanging data with other attachments, as well as for GPIOs.

For modules that may reduce the number of studded pins, for example, ESP-01 connection of unspawned studs is not required, then. on the ESP-01, only the following are installed: VCC, GND, GPIO0, GPIO2, CH_PD and RESET - the axis is only їх and pull. No need to solder directly to the ESP8266EX chip and attract unwired pins, just as you need.

These connection schemes were born after anonymous experiments carried out by our members of the forum and selected according to the criteria of the divided and inaccessible source of documentation by our spivtovaristvo, I just tried to combine knowledge in one area. You will know a lot of joy for the connection. In the same place, you can ask food, what to call you, or to know. Yakshcho vy pardoned, the inaccuracy of this article, or else what to add, then.

Respect! Navit qi schemes cannot be called "ideal". There is no way to get it right: manually connect another USB-TTL to UART1 (with ESP8266 you can take only GND and UTXD1, then GPIO2) to connect the hosting terminal (you need another USB-TTL converter) - then you can flash the ESP8266 module via UART0 without plugging in the hosting terminal on UART1. It would be wrong to connect low-value resistors to both UARTs, put a diode at the RTS line, add a capacitor at the life line to dampen low-frequency pulses. For example, manually, it is broken in this tax-free board: all GPIOs are connected to light diodes, a photoresistor is connected to ADC connections, but there is no RESET button and there is only one jumper on GPIO0.

It would be correct to tell you that there is no ideal and at the same time universal ESP8266 connection scheme. On the right, in the fact that it’s too rich to lay down the type of firmware, you’re going to fill it in. Introduce more insurance schemes for newcomers, who are just starting to master the ESP8266, for experimentation. For real projects, you may need to change the scheme a little. For example, you need to connect RTS to GPIO15, and CTS to GPIO13. Also, in real projects, I recommend giving special attention to nutrition.

Connecting ESP8266 via Arduino

If you didn’t have a USB-TTL converter for 3.3v at your fingertips, but if there is an Arduino with a USB-TTL converter, then you can use such a connection scheme

On scho respect respect:

1. Arduino Reset connections to GND (blue wire) so that the microcontroller does not start on the Arduino, in this form it is possible to use the Arduino as a clear USB-TTL converter

2. RX and TX connections are not "crossed", but directly - RX - RX (green), TX - TX (yellow)

3. Reshtu connected just like that in the front butts

Respect! In this circuit, it is also necessary to use equal TTL 5 volts Arduino and 3.3 volts on ESP8266, the prote is badly working and so.

Respect!On the Arduino, you can install a life stabilizer, which is not visible, the ESP8266 is required, so first, if you need to connect, check the datasheet on that stabilizer, which you have installed yourself. Do not connect other power-saving components at the same time to the ESP8266 through the risk of output from the fret of the power stabilizer built into the Arduino.

Connections to the last port will have a little bit of trouble: connection with different firmware for ESP8266 can be connected to different firmwares. If you need a security, you can choose the way of a simple enumeration of three options: 9600, 57600 and 115200. How to enumerate? Connect in the terminal program to your virtual serial port by setting the following parameters: 9600 8N1, then re-bind the module by enabling CH_PD (chip enable) to live (USB-TTL when it is not connected to USB) resetting live - read, you can also short-circuit RESET to ground to reset the module) and store data in the terminal. First, the light on the ESP8266 is on fire as described on the cob of the article in the distribution. In another way, at the terminal you are guilty of "smite" from different symbols, which will end with a row of "ready". If "ready" is not possible, then the terminal is reconnected to a different firmware and the module is reloaded again.

On one of the “ready” security options, you can still play - for sure, your module is ready to work. If not, then we kindly ask you - we will try to help, but read ahead.

Few reports about the "smitty". On the right, at the start of the firmware, the UART of the ESP8266 module switches to the transmission speed 74 880 (the axis is such a computer in Chinese) sees the UART lag information, then it switches the port speed to 115200 (well, either to 9600 or to 5760 in the fall ESP8266 can be connected to ESP8266 on firmware 74880

wdt reset load 0x40100000, len 25052, room 16 tail 12 chxum 0x 0x 0x0

wdt reset

load 0x40100000 , len 25052 , room 16

tail 12

chksum 0x0b

ho 0 tail 12 room 4

load 0x3ffe8000, len 3312, room 12

What work did

If you have a new module, then, better for everything, one of the old custom AT firmwares is flashed in a new one. Better for everything AI-THINKER AT v0.16 SDK v0.9.2. You can check the firmware version with the “AT + GMR” command, tobto. directly in the terminal program, type AT + GMR without paws and press Enter. The module is responsible for displaying "OK" and displaying the firmware version (for example, "0016000092" - for other versions of AT firmware, the format for displaying the version is changed). Controlling the ESP8266 AT module with commands deserves a lot of credit, but you can easily manage it yourself by using one of our AT command guides:

At the time of writing this article, the current firmware version for ESP8266 is:

ESP8266 firmware update

The ESP8266 module is a miracle team, which does not require a special programmer - the firmware update is carried out on the same platform, on which you connect the ESP8266 module to the computer, tobto. tezh via USB-TTL converter (well chi Arduino chi RPi). To update the firmware on the ESP8266 modules, click here:

1. Get a new version of the firmware from our site from the distribution (the axis was sent at the time of writing this article)

2. Download one of the utilities for flashing ESP8266 in the location of your operating system from the distribution of our site

The Chinese company Espressif in 2014 started selling Wi-Fi modules based on ESP8266 chips. which immediately won great popularity among radio amateurs through its cheapness and great possibilities. Today, there is a large number of different modules based on the ESP8266 chip, in this article we are talking about ESP-01.

Technical characteristics

Power supply voltage: 3V ~ 3.6V
Max working strum: 220mA
Operating frequency: 2.4GHz
Modes: P2P (client), soft-AP (access point)
Number of GPIOs: 2.
Flash memory: 1024 kb.
Exterior Attenuation in 802.11b Mode: +19.5dBm
Rootless support: 802.11 b/g/n
Dimensions: 24.8mm x 14.3mm x 8mm

Headlines about ESP-01

In fact, the ESP8266 chip is a miniature microcontroller with Wi-Fi transmitting, which can function in the minds of full autonomy, without an additional Arduino board. For the help of the ESP-01 module, you can transfer data about temperature, moisture, turn on the relay and so on. For the convenience of using the ESP8266 chip, the manufacturer has prepared a series of modules from ESP-01 to ESP-14. The first in this series, the ESP-01 module (this is the ESP-01S, about the new three is better), which is one of the things we know, through its price and small dimensions, only 14.3 mm by 24.8 mm. Ale, in the new one, there are two nedolіki, where the number of GPIO programming visnovkіv and їх unhandedly roztashuvannya (handily mock-up) is surrounded.


The ESP-01 module is a small board, black in color, with two main chips on it, with an ESP8266 microcontroller and 1 MB flash memory. A hand-stitched quartzite resonator and an over-armed antenna. Two light diodes are installed on the board, red and black. Red light, glows if the modules are alive, and blue flashes when the commands are fired (NSP-01S red light flashes, through a constant reduction of electricity). For the connection of the ESP-01 module, it was supplied with all connections (two rows of inputs, 2.54 mm wide), two ready-made digital input-output, which support pulse-width modulation. If the module can have two GPIO inputs per lock, you can use the other available pins, as long as you have the necessary soldering tool.


Visnovkiv appointment
GND:"-" module life
GPIO2:(Digital I/O programming)
GPIO0:(Digital I/O programming, also available for capture modes)
RX: UART receive
TX: UART transmission
CHPD:(on / off life, due to buti connected to 3.3 directly or through a resistor)
RST: drop, you need to pull up to 3.3V
VCC:"3.3V" module life

Module connection
For the work of the ESP-01 module, it is necessary to have a permanent strum, which is responsible for supplying 3.3 V and a strum not less than 250 mA. Unfortunately, the regular stabilizer of installations on the Arduino is not built to see the necessary stream for the ESP-01 robot (if you fail all the same, connect the ESP-01, check for an unstable robot and permanently restart). In addition, the logical signal of this module is set to 3.3, so it is necessary to apply a voltage of 3.3V to the RX wires, and 3.3V voltage will be applied to the TX wires (this is the same for other wires). If you need to connect the module to the Arduino or other controllers, if you see logic wire 5, you need to change the resistors or the logic equalizer module, so you can connect it without intermediary, the module will be fine.

Respect! ESP-01 should be ready for life, it is necessary to use a normal voltage stabilizer at 3.3V, as the first butt of the voltage regulator USB adapter

From the table above, it can be seen that the ESP-01 module can work in decal sleep modes, with minimal wake-up, the stench is called out by the software way, the rest is “Power Off”, to start the data mode, it is necessary to install a jumper, between GPIO16 and RST, later I'll give an example.

Installing ESP8266 in Arduino IDE

Downloaded from the site arduino.cc program IDE Arduino
Next, you need to install the ESP board in the Arduino IDE, for which we launch the Arduino IDE program, you can see: File -> Customization.
At the new vіdkritom vіknі, in the field Additional requests for the Board Manager:» we add the message:

http://arduino.esp8266.com/stable/package_esp8266com_index.json

At the vіdkritu vіknі, jokingly " esp8266 by ESP8266 Communit y "that presses" Insert“. Installing a loan for a kіlka hvilin, then we'll show up write " Installed", embossed" close«

It's pushing " Tools -> Pay -> Generis ESP8266 Module«.

Now it is necessary to connect the ESP-01 module to the computer via a special USB adapter on the CH340G chip


Adjust the frequency of the processor CPU Frequency: "80MHz"", shvidkіst" Upload Speed: "115200"» ta choose « Port«.

Let's take a look at the sketch, which will flash the ESP8266 with a light diode.

/* Tested on Arduino IDE 1.8.5 Test date 06/15/2018. */ #define TXD 1 // GPIO1 / TXD01 void setup() ( pinMode(TXD, OUTPUT); ) void loop() ( digitalWrite(TXD, HIGH); delay(1000); digitalWrite(TXD, LOW); delay( 1000);

© 2022 androidas.ru - All about Android