Esp 01 wiring diagram. Wifi module based on ESP8266 chip. USB-to-TTL converter using DTR connector

... In general, this material is not limited to just one Arduino topic.

The topic of ESP8266 is quite a difficult one. But, if you work with these Wi-Fi modules in the Arduino IDE development environment, the entry threshold drops to a level acceptable for the average Arduino user. And not only the Arduino guy, but any person who has a desire to whip up something on the topic of IoT (Internet of Things), and without spending a lot of time reading the documentation for the chip and studying the API for these modules.

This video completely duplicates the material presented in the article below.

Well, we already know how to connect the ESP8266 and put it into programming mode, now let's move on to something more useful.

I’ll say right away that once we program the module in the Arduino development environment, we destroy the native firmware, and we will no longer be able to work with the module using AT commands. Personally, this doesn’t make me cold/hot, but if someone needs it, towards the end of the article I’ll show you how to flash the native firmware back into the module, or some kind of bootloader like NodeMcu.

To begin with, download from the official website latest version Arduino IDE, on this moment this is 1.6.7. Older versions like 1.0.5. won’t fit because they simply don’t have the necessary functionality, and dancing with a tambourine doesn’t interest us, right?

We launch the development environment and immediately go to File/Settings:

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

Then go to Tools/Board:/Board Manager...:

A board manager window will appear in front of us, scroll through it to the very bottom, and if everything is done correctly we will see something like this:

Click the cursor on the inscription " esp8266 by ESP8266 Community"after that, we have an “Install” button, select the desired version, I take the latest one, today it is 2.1.0 and install it. The development environment will download the files it needs (about 150 megabytes) and opposite the inscription " esp8266 by ESP8266 Community""INSTALLED" will appear, that is, installed:

We scroll down the list of boards and see that we have many different ESPs in the list, take “Generic ESP8266 Module”:

Go to “Tools” and select the desired COM port (for me it’s COM32) Arduino or USB UART converter, then set Upload Speed: “115200”:

We set the speed to 74880 and “NL & CR” and again turn off and apply power and it will respond with some debugging information:

Note that 74880 is not the main speed of the ESP8266, it just sends debugging information at it. If the module does not send anything to the console, then something may be connected incorrectly.

By default, the speed should be 115200, but in some cases it can be 9600 and others... So try to find it.

After selecting the required speed, we send the “AT” module and it should respond that everything is “OK”. The "AT+GMR" command displays information about the firmware.

Before you start flashing the ESP8266 in Arduino IDE I advise you to read the article to the end.

Now let's try to flash the ESP8266 via Arduino IDE. We put the module into programming mode (I wrote how to do this in a previous article).

Let's add a standard LED to the flasher:

// By Mr. PodelkinTs youtube.com/RazniePodelki // special to geektimes.ru/post/271754/ #define TXD 1 // GPIO1/TXD01 void setup() ( pinMode(TXD, OUTPUT); ) void loop() ( digitalWrite( TXD, HIGH); delay(1000); digitalWrite(TXD, LOW); delay(1000); )

Flashed? So everything was done correctly. Where did I get that the LED is connected to the first pin? In the previous article there is a picture with pinouts of different modules, and there is a marking of the ports when using the Arduino bootloader (pins are marked in pink).

Blinking an LED is of course good, but we need to install some kind of web server or start controlling the LED at least using buttons in the browser, right? But I’ll tell you about this some other time.

And now how to flash back native firmware, and how to even flash a module with third-party bootloaders. For ESP8266 there is such a program as NodeMCU Flasher, which is originally intended for flashing the NodeMCU boot loader. But as it turned out, it perfectly flashes other firmware.

I will attach an archive with this program and firmware to the article for convenience, but you can always download new version NodeMCU Flasher.

In the “nodemcu-flasher-master” folder there are 2 folders Win64 and Win32 and depending on the bit depth of your OS, select the one you need. Next, in the Release folder, run “ESP8266Flasher.exe” and see the program interface:

Select the desired COM port and go to the “Config” tab, remove the cross next to “INTERNAL://NODEMCU” and put it one point lower, as in the screenshot:

(If you want to flash the NodeMCU bootloader, remove the cross where it was not, and put it where it was, that is, near “INTERNAL://NODEMCU”).

Then we click on the gear and select where our firmware is located, the firmware is usually in *.bin format (in the attached archive it is “v0.9.5.2 AT Firmware.bin” which is in the main folder), and also select “0x00000” as and higher.

We return again to the “Operation” tab, put the module into programming mode and click “Flash”:

That’s it, the module has started to be flashed, after flashing, don’t forget to reboot the module and voila, it’s flashed with the firmware we need.

We check with the AT command “AT+GMR” whether we did everything correctly:

As you can see, everything went smoothly.

It is gaining more and more popularity, and Arduino is already taking up the initiative - adding these Wi-Fi modules to the list of supported boards.
But how to connect it to Arduino? Is it possible to somehow do without an Arduino at all? This is exactly what this article will be about today.

Looking ahead, I will say that there will be a second article, more practical, on the topic of firmware and programming the ESP8266 module in the Arduino IDE development environment. But first things first.

This video completely duplicates the material presented in the article.



At the moment, there are many varieties of this module, here are some of them:

And here is the pinout of ESP01, ESP03, ESP12:


*This picture can be viewed in good quality on off. website pighixxx.com.

Personally, I like the ESP07 version the most. At least for the fact that there is a metal screen (it protects the microcircuits from external interference, thereby ensuring more stable operation), its own ceramic antenna, and a connector for an external antenna. It turns out by connecting to it external antenna, for example like biquadrat, then you can achieve a good range. In addition, there are quite a few input/output ports, the so-called GPIO (General Purpose Input Output - input/output ports general purpose), by analogy with Arduino - pins.

Let's go back to our sheep Wi-Fi modules and Arduino. In this article, I will look at connecting an ESP8266 (model ESP01) to an Arduino Nano V3.

But, this information will be relevant for most ESP8266 modules and also various Arduino boards, for example the most popular Arduino UNO.

A few words about the ESP01 legs:

Vcc And GND(in the picture above these are 8 and 1) - food, per leg Vcc can be submitted, judging by the documentation, from 3 to 3.6 V, A GND- ground (minus power). I saw one person connect this module to two AA batteries (the supply voltage in this case was approximately 2.7 V) and the module was operational. But still, the developers indicated the voltage range in which the module should be guaranteed to work; if you use another one, that’s your problem.

Attention! This module is based on 3.3V logic, while Arduino is mostly 5V logic. 5 V can easily damage the ESP8266, so it needs to be powered separately from the Arduino.

- My Arduino has a leg where it says 3.3 V, why not use it?

You'll probably think. The fact is that the ESP8266 is quite a power-hungry module, and in peaks it can consume currents of up to 200 mA, and almost no Arduino is capable of delivering such a current by default, with the exception of Arduino Due, in which the current along the 3.3 V line can reach 800 mA, which is plenty, in other cases I advise you to use an additional 3.3 V stabilizer, for example AMS1117 3.3 V. There are a lot of them both in China and here.

Leg RST 6 - is intended for hardware to reboot the module, by briefly applying a low logical level to it, the module will reboot. Although I neglected this in the video, I still advise you “press” this leg with a 10 kOhm resistor to the power supply positive, in order to achieve better stability in the operation of the module, otherwise I would reboot at the slightest interference.

Leg CP_PD 4 (or in another way EN) - serves, again, to “hardwire” the module into energy-saving mode, in which it consumes very little current. Well again - It wouldn’t hurt to “press” this leg with a 10 kOhm resistor to the positive Pitalova In the video, I stupidly short-circuited this leg to Vcc, because I didn’t have such a resistor at hand.

Legs RXD0 7 TXD0 2 - hardware UART, which is used for flashing, but no one prohibits using these ports as GPIO (GPIO3 and GPIO1, respectively). For some reason, GPIO3 is not marked in the picture, but it is in the datasheet:

By the way, to the leg TXD0 2 the “Connect” LED is connected, and it lights up when the logic level on GPIO1 is low, or when the module sends something via UART.

GPIO0 5 - can not only be an I/O port, but also put the module into programming mode. This is done by connecting this port to a low logical level (“pressing” it to GND) and supplying power to the module. In the video I do this with a regular button. After flashing, do not forget to pull out the jumper/press the button (it is not necessary to hold the button during flashing; when turned on, the module goes into programming mode and remains in it until rebooted).

GPIO2 3 - input/output port.

And one more important point, each GPIO of the Wi-Fi module can safely deliver current up to 6mA, so as not to burn it, be sure to place resistors in series with the input/output ports on... Remember Ohm's law R = U/I = 3.3V / 0.006 A = 550 Ohm, that is, at 560 Ohm. Or neglect it, and then wonder why it doesn't work.

In ESP01, all GPIOs support PWM, so to our four GPIOs, that is, GPIO0-3, you can connect a motor driver, ala L293 / L298, and steer two engines, for example, boats, or make RGB Wi-Fi whatever. Yes, yes, this module has a lot of things on board, and for simple projects the Arduino violinist is not needed, only for flashing. And if you use ESP07, then in general the ports are almost the same as those of Uno, which makes it possible to confidently do without an Arduino. True, there is one unpleasant moment, the ESP01 has no analog ports at all, and the ESP07 has only one, called ADC. This of course makes working with analog sensors more difficult. In this case, an Arduino analog multiplexer will help.

Everything seems to be explained by pinout, and here is the diagram for connecting the ESP8266 to the Arduino Nano:

Do you see the jumper on the RST and GND pins on the Arduino Nano? This is necessary so that the Arduino does not interfere with the firmware of the module; in the case of connecting the ESP8266 using Arduino, this is a prerequisite.

Also, if you connect to Arduino, the RX of the module must go to the RX of the arduino, TX - TX. This is because the converter chip is already connected to the Arduino pins in a cross pattern.

Also important is a resistive divider consisting of 1 kOhm and 2 kOhm resistors (can be made from two 1 kOhm resistors by connecting them in series) along the RX line of the module. Because Arduino is 5 V logic and the module is 3.3. This turns out to be a primitive level converter. It must be there, because the legs of the RXD TXD module are not tolerant to 5 V.

Well, you can do without an Arduino altogether by connecting the ESP8266 via a regular USB-UART converter. In the case of connecting to Arduino, we essentially use a standard converter usb interfaces and uart, bypassing the brains. So why spend extra money if you can do without an Arduino at all? Only in this case, we connect the RXD of the module to the TXD of the converter, TXD - RXD.

If you are too lazy to bother with connections, fiddling with resistors and stabilizers, there are ready-made NodeMcu solutions:

Everything is much simpler here: plug the cable into the computer, install the drivers and program, just don’t forget to use the jumper/button on GPIO0 to switch the module to firmware mode.

Well, that’s probably all with the theory, the article turned out to be quite long, and I will publish the practical part, ala firmware and programming of the module, a little later.

Many users have already turned their attention to the ESP8266-12 chip, released by Espressif. Its cost is significantly cheaper compared to a standard Bluetooth adapter board, and despite its smaller dimensions, it has significantly greater capabilities. Now all home hobbyists have the opportunity to work in Wi-Fi networks in two modes at once, that is, connect your computer to any access points or turn it on as such a point.

On the other hand, you need to correctly understand that such boards are not just shields intended only for Wi-Fi communication. The ESP8266 itself is a microcontroller that has its own UART, GPIO and SPI interfaces, that is, it can be used as completely autonomous equipment. After the release of this chip, many called it a real revolution, and over time such devices will begin to be built into even the most simple types technology, but so far the device is relatively new and there is no stable firmware for it. Many specialists around the world are trying to invent their own firmware, because uploading them to the board is actually not difficult, but despite various difficulties, the device can already be called quite suitable for work.

Currently only two application options are being considered of this module:

  • Using the board in combination with an additional microcontroller or a computer that will control the module via UART.
  • Independent writing of firmware for the chip, which allows you to later use it as a self-sufficient device.

It is quite natural that we should consider independent firmware in this case we won't.

Looking at ease of use and good characteristics, many people among the many microcontrollers give their preference to the ESP8266 model. Connection and firmware update of this device is extremely simple and affordable, and is produced on the same hardware on which the equipment is connected to the computer. That is, also via a USB-TTL converter or, if someone prefers other connection options, it can be done via RPi and Arduino.

How to check?

In order to check the functionality of a newly purchased device, you will need to use a special stabilized voltage source rated at 3.3 volts. It’s worth noting right away that the real supply voltage range of this module is from 3 to 3.6 volts, and supplying an increased voltage will immediately lead to the fact that you will simply damage your ESP8266. After such a situation, firmware and other software may begin to work incorrectly, and you will need to repair the device or somehow fix it.

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

  • CH_PD and VCC are connected to the 3.3 volt supply.
  • GND connects to ground.

If you are not using ESP-01, but some other module, and it already initially has an output GPIO15, then in this case you will need to additionally connect it to ground.

If the factory firmware started up normally, then in this case you can see and then the blue light will blink a couple of times. However, it is worth noting that not all ESP8266 series devices have a red power indicator. The firmware on some devices does not provide for the red indicator to light up if the module does not have one (in particular, this applies to the ESP-12 model).

After connecting to your wireless network a new access point will be activated, which will be called ESP_XXXX, and it will be discoverable from any device that has access to Wi-Fi. In this case, the name of the access point directly depends on the manufacturer of the firmware you are using, and therefore may be something different.

If the point does appear, you can continue experimenting, otherwise you will need to re-check the power supply, as well as the correctness of the GND and CH_PD connections, and if everything is connected correctly, then most likely you are still trying to use a broken module or on It simply has firmware installed with non-standard settings.

How to quickly connect it?

The standard kit required to connect this module includes the following:

  • the module itself;
  • solderless breadboard;
  • a full set of female-male wires intended for a breadboard, or a special DUPONT M-F cable;
  • USB-TTL converter based on PL2303, FTDI or some similar chip. The best option is if RTS and DTR are also output to the USB-TTL adapter, since due to this you can achieve fairly fast loading of the firmware from some UDK, Arduino IDE or Sming, without even having to manually switch GPIO0 to ground.

If you are using a 5-volt converter, then in this case you will need to purchase an additional power stabilizer based on the 1117 chip or some similar one, as well as a power source (for a standard 1117, even an ordinary 5-volt smartphone charger is quite suitable). It is recommended not to use the Arduino IDE or USB-TTL as a power source for the ESP8266, but to use a separate one, as this can ultimately get rid of a lot of problems.

An expanded set to ensure comfortable and constant operation of the module requires the use of additional resistors, LEDs and DIP switches. Apart from this, you can also use inexpensive USB monitor, which will allow you to constantly monitor the amount of current consumed, and will also provide a little protection for the USB bus from

What do we have to do?

First of all, it is worth noting the fact that in the ESP8266 the controls may be slightly different depending on which specific model you are using. There are quite a lot of such modules available today, and the first thing you will need is to identify the model you are using and decide on its pinout. In this instruction we will talk about working with the ESP8266 ESP-01 V090 module, and if you are using some other model with a GPIO15 pin (HSPICS, MTDO), you will need to pull it to the ground both for the standard start of the module and to use the firmware mode.

After this, double check that the supply voltage for the connected module is 3.3 volts. As mentioned above, the permissible range is from 3 to 3.6 volts, and if it increases, the device fails, but the supply voltage may even be significantly lower than the 3 volts stated in the documents.

If you are using a 3.3 volt USB-TTL converter, then connect the module exactly as on the left side of the picture below. If you use exclusively five-volt USB-TTL, then pay attention to the right side of the figure. Many may think that the right circuit is more efficient due to the fact that it uses a separate power source, but in fact in the case USB-TTL applications For a 5-volt converter, it is highly advisable to also make an additional resistor divider to ensure matching of three-volt and five-volt logic levels, or simply use a level conversion module.

Connection features

The right figure shows the connection of UTXD (TX), as well as URXD (RX) of this module to five-volt TTL logic, and such procedures are carried out only at your own peril and risk. For the ESP8266, the description says that the module only works effectively with 3.3-volt logic. In the vast majority of cases, even when working with five-volt logic, the equipment does not fail, but such situations occasionally occur, so such a connection is not recommended.

If you do not have the opportunity to use a specialized 3.3-volt USB-TTL converter, you can use a resistor divider. It is also worth noting that in the right picture, the 1117 power stabilizer is connected without additional wiring, and this is a really working technology, but it is still best to use the 1117 connection diagram with capacitor wiring - you need to check it with the ESP8266 datasheet for your stabilizer or use a completely ready one module based on the 1117 base.

To start the module, you need to open the GPIO0-TND circuit, after which you can apply power. It is worth noting that everything needs to be done in exactly this order, that is, first make sure that GPIO0 is “hanging in the air”, and only then apply power to CH_PD and VCC.

How to connect correctly?

If you can spare more than one evening to properly connect the ESP8266 module, you can use a more stable option. In the diagram above you see a connection option with automatic download firmware.

It is worth noting that the image above does not show the use of free GPIOs or ADCs, and their connection will directly depend on what exactly you want to implement, but if you want to ensure stability, remember to pull all GPIOs to power and ADCs to ground using pull-up resistors.

If necessary, 10k resistors can be replaced with any others in the range from 4.7k to 50k, excluding GPIO15, since its value should be no more than 10k. The value of the capacitor that smoothes out high-frequency pulsations may be slightly different.

Connecting RESET and GPIO16 through the use of a 470 Ohm deep sleep resistor may become necessary when using the appropriate mode, since in order to exit deep sleep mode, the module performs a full reboot by applying a low level to GPIO16. With absence of this connection The deep sleep mode for your module will last forever.

At first glance, it may seem that GPIO0, GPIO1 (TX), GPIO2, GPIO3 (RX) and GPIO15 are busy, so you won’t be able to use them for your purposes, but in fact this is far from the case. A sufficiently high level on GPIO0 and GPIO2, as well as a low level on GPIO15, may be required only for the initial startup of the module, and in the future you can use them at your discretion. The only thing worth noting is to remember to ensure the required levels before performing a full reset of your equipment.

You can also use TX, RX as an alternative to GPIO1 and GPIO3, but do not forget that after the module starts, each firmware begins to “pull” TX, while simultaneously sending debugging information to UART0 at a speed of 74480, but after the download will be successful, they can be used not only as UART0 in order to exchange data with another device, but also as standard GPIOs.

For modules that have a small number of wired pins (for example, ESP-01), there is no need to connect undone pins, that is, only GND, CH_PD, VCC, GPIO0, GPIO2 and RESET are wired on the ESP-01, and that’s what you need will need to be tightened. There is no need to solder directly to the ESP8266EX chip and then pull the bare pins unless you really need it.

Such wiring diagrams were used after a large number of experiments carried out by qualified specialists and collected from a lot of different information. It is worth noting that even such schemes cannot be considered ideal, since a number of other, no less effective options can be used.

Connection via Arduino

If for some reason you do not have a 3.3 volt USB-TTL converter, then the ESP8266 WiFi module can be connected via Arduino with a built-in converter. Here you will need to first turn your attention to three main elements:

  • When used with the ESP8266, Arduino Reset is initially connected to GND to prevent the microcontroller from starting up, and in this form it was used as a transparent USB-TTL converter.
  • RX and TX were not connected “at the crossroads”, but directly - RX-RX (green), TX-TX (yellow).
  • Everything else is connected exactly as described above.

What to consider

This circuit also requires matching the TTL levels of 5 volts on the Arduino, as well as 3.3 volts on the ESP8266, but it can function quite well either way.

When connected to an ESP8266, the Arduino may be equipped with a power regulator that cannot handle the current required by the ESP8266, so you will need to check the datasheet for the one you are using before activating it. Do not try to connect any other power-consuming components with the ESP8266, as this may cause the power regulator built into the Arduino to simply fail.

There is also another ESP8266 and Arduino connection scheme that uses SoftSerial. Since for the SoftSerial library the port speed of 115200 is too high and cannot guarantee stable operation, this connection method is not recommended, although there are some cases in which everything works quite stably.

Connection via RaspberryPi

If you do not have any USB-TTL converters at all, then you can use RaspberryPi. In this case, for the ESP8266, programming and connection are carried out almost identically, but everything here is not so convenient, and in addition you will also need to use a 3.3-volt power stabilizer.

To begin with, we connect RX, TX and GND of our device to the ESP8266, and take GND and VCC from the one designed for 3.3 volts. Here, special attention should be paid to the fact that you need to connect all GND devices, that is, the RaspberryPi stabilizer and ESP8266. If the stabilizer built into your device model can withstand up to 300 milliamps of additional load, then in this case connecting the ESP8266 is quite normal, but this is all done only at your own peril and risk.

Setting up parameters

Once you have figured out how to connect the ESP8266, you need to make sure that the drivers for your devices are installed correctly, as a result of which a new virtual serial port has been added to the system. Here you will need to use a program - a serial port terminal. In principle, you can choose any utility to suit your taste, but you must correctly understand that any command that you send to the serial port must have the trailing characters CR+LF at the end.

The CoolTerm and ESPlorer utilities are quite widespread, and the latter allows you not to enter the ESP8266 yourself, and at the same time makes it easier to work with lua scripts under NodeMCU, so it can be used as a standard terminal.

For a normal connection to, you will have to do a lot of work, since the firmware for the ESP8266 is mostly varied and activation can be carried out on different speeds. To decide on the best option, you will need to go through three main options: 9600, 57600 and 115200.

How to sort?

To begin, connect to the virtual serial port in the terminal program, setting the parameters to 9600 8N1, then perform a complete reboot of the module, disconnecting CH_PD (chip enable) from the power supply, and then reactivate it again by jerking CH_PD. You can also perform a short RESET to ground to reset the module and observe the data in the terminal.

First of all, the device's LEDs should appear exactly as shown in the test procedure. You should also observe in the terminal the set various characters, which will end with the line ready, and if it is not there, a reconnection to the terminal is carried out at a different speed, followed by a reboot of the module.

When you see one of the speed options this line, the module can be considered ready for operation.

How to update the firmware?

Once you install the ESP8266, it will only take a few seconds to connect the device, and then you can start updating the firmware. To install a new software you need to do the following.

To get started, download the new firmware version from the official website, and also download special utility for firmware. Here special attention should be paid to what operating system installed on the machine with which the ESP8266 works. It is best to connect the device to systems older than Windows 7.

For standard Windows operating systems, it would be optimal to use a program called XTCOM UTIL, which is especially convenient to use if the firmware consists of only one file. The best multi-platform option is the esptool utility, which, however, requires python, as well as the need to specify parameters via command line. In addition, the ESP8266 allows you to conveniently connect the main functions with the Flash Download Tool, which has a fairly large number of settings, as well as a convenient technology for installing firmware from several files.

Next, disconnect your terminal program from the serial port, and also completely disconnect CH_PD from the power supply, connect GPIO0 of the module to GND, and after that CH_PD can be returned back. Ultimately, just run the modular firmware program and load it into the ESP8266 relay.

In the vast majority of cases, the firmware is loaded into the module at a speed of around 115200, but a special mode provides automatic speed distribution, as a result of which the firmware can be carried out at a speed of more than 9600, updating the available functions of the ESP8266. Arduino was used for connection or USB-TTL - it does not play a special role here, and here the maximum speed already depends on the length of the wires, the converter used and a number of other factors.

The Chinese company Espressif in 2014 began selling Wi-Fi modules based on ESP8266 chips. which immediately gained great popularity among radio amateurs due to its low cost and great capabilities. Today there are a large number of different modules based on the ESP8266 chip; in this article I will talk about the ESP-01.

Technical specifications

Supply voltage: 3V ~ 3.6V
Maximum operating current: 220mA
Operating frequency: 2.4 GHz
Modes: P2P (client), soft-AP (access point)
Number of GPIOs: 2.
Flash memory: 1024 kb.
output power in 802.11b mode: +19.5dBm
Support wireless standard: 802.11 b/g/n
Dimensions: 24.8mm x 14.3mm x 8mm

General information about ESP-01

Essentially, the ESP8266 chip is a miniature microcontroller with a Wi-Fi transmitter that can operate in complete autonomy, without additional fee Arduino. Using the ESP-01 module, you can transmit data on temperature, humidity, turn on a relay, and so on. For ease of use of the ESP8266 chip, the manufacturer has manufactured a series of modules from ESP-01 to ESP-14. The first in this series is the ESP-01 module (there is also ESP-01S, more on that a little later), which is one of the famous ones due to its price and small size, only 14.3 mm by 24.8 mm. But it has two drawbacks: limited quantity programmed GPIO pins and their inconvenient location (inconvenient to layout).


The ESP-01 module is a small board, black, on which two main chips are located, an ESP8266 microcontroller and a 1 MB flash memory. Nearby is a quartzite resonator and a printed antenna. The board has two LEDs, red and blue. The red LED lights up when the module has power, and the blue one blinks when commands are executed (the red LED has been removed from the NSP-01S due to constant power consumption). To connect the ESP-01 module, eight pins are provided (two rows of four pins, 2.54 mm pitch), two of the ready-made ones are digital input-output, supporting pulse-width modulation. Although the module has two GPIO pins by default, you can use other available pins if you have the necessary soldering tool.


Pin assignment
GND:"-" module power supply
GPIO2:(Digital I/O programmable)
GPIO0:(Digital I/O programmable, also used for boot modes)
RX: UART reception
TX: UART transmission
CH_PD:(power on/off, must be output to 3.3V directly or through a resistor)
RST: reset, you need to pull it to 3.3V
VCC:“3.3V” module power supply

Module connection
To operate the ESP-01 module, a power source is required direct current, which should produce 3.3 V and a current of at least 250 mA. Unfortunately, the standard stabilizer installed on the Arduino is not capable of delivering the necessary current for the ESP-01 to operate (if you decide to connect the ESP-01 anyway, expect unstable operation and constant rebooting). In addition, the logic signal of this module is designed for 3.3 V, that is, a voltage of 3.3 V must be applied to the RX pin, and a voltage of 3.3 V will be supplied from the TX pin (the same for other pins). If you need to connect the module to Arduino or other controllers that output 5V to the logic pin, you must use resistors or a logic level module; if you connect directly, the module will fail.

Attention! ESP-01 are very capricious when it comes to power supply, you need to use an external 3.3V voltage regulator, I will use a USB adapter as the first example

From the table above, it can be seen that the ESP-01 module can operate in several sleep modes, with minimal current consumption, they are called by software, except for the last “Power Off”, to enable this mode, you need to install a jumper between GPIO16 and RST, I will give an example later.

Installing ESP8266 in Arduino IDE

Download the Arduino IDE program from the website arduino.cc
Next, you need to install the ESP board in the Arduino IDE. To do this, run the Arduino IDE program and open: File -> Settings.
In the new open window, in field " Additional links for PCB Manager:» add link:

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

In the open window, look for " esp8266 by ESP8266 Communit y" and press " Install". The installation will take a few minutes, then the message “ Installed", click " Close«

Click " Tools -> Boards -> Generis ESP8266 Module«.

Now you need to connect the ESP-01 module to the computer via a special USB adapter on the CH340G chip


Adjusting the processor frequency " CPU Frequency: "80 MHz"", speed " Upload Speed: "115200"" and select " Port«.

Then we upload a sketch that will make the ESP8266 blink the LED.

/* 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); )