Development and research of the control module using remote access in a microcontroller system based on Wi-Fi interface
Content
- Introduction
- 1. Relevance of the topic
- 2. The purpose and objectives of the study, the planned results
- 3. Analysis of the ESP8266 microcontroller
- 4. Conclusions
- Bibliography
Introduction
Nowadays, microcontroller systems are being introduced everywhere: from “home” use, providing a person with comfort and safety, to industrial, allowing you to automate the production process and improve accuracy.
With the introduction of microcontroller systems, the concept of the Internet of Things, formulated back in 1999 [1], and implying the exclusion of human participation from various processes, has received rapid development. Later, in 2004, an article devoted to this concept [2] was published, in which an illustration was given showing how household appliances, home systems, sensors, and “things” interact with each other through communication networks and make the processes fully automated. An important moment in the development of the “Internet of Things” was 2008–2009, when the number of devices connected to the global network exceeded the population of the Earth [3].
Not an unimportant role in the development of the “Internet of Things” concept was played by wireless technologies, the most common of which is the Wi-Fi interface. The introduction of this interface allowed creating contactless microprocessor systems, providing flexibility in their use.
1. Relevance of the topic
Automated processes do not always work perfectly and can fail. Also, these processes can be performed in places that are difficult for people to access. In such situations, external intervention is necessary. And the use of wireless technologies in the microcontroller system makes it easy to solve this problem, for example, using smartphones, almost all of which today are equipped with a Wi-Fi interface, or by providing access to the microcontroller system via the Internet, which will allow you to access it from any points of the world.
Also, today the model of “foggy calculations” is actively developing, in which the data and their processing are as close as possible to the device. The need for this model appeared due to the huge number of devices and large amounts of data that need to be processed with low latency in real time [4]. This concept requires active interaction between devices, which closely connects it with the Internet of Things and wireless technologies.
At one time, modern wireless technologies have their drawbacks associated primarily with interference and overcoming obstacles.
There are many examples of the use of microcontroller systems with remote access. For example, Abdrakhmanov Vali Hyzyrovich, Vazhdaev Konstantin Vladimirovich and Salikhov Renat Bayazitovich in their article [5] explored the possibility of improving the quality of dairy products using network electronic technologies and network monitoring and monitoring of milking equipment.
2. The purpose and objectives of the study, the planned results
The aim of the work is to develop a control module with remote access in a microcontroller system based on the Wi-Fi interface and to study the data transfer process. To achieve the goal highlighted the following tasks:
- Analysis of the hardware base for building a model.
- Building an experimental model.
- Development of software for the experimental model.
- Research data transfer process.
3. Analysis of the ESP8266 microcontroller
ESP8266 is a microcontroller from a Chinese manufacturer Espressif with Wi-Fi interface. In addition to Wi-Fi, the microcontroller features the ability to execute programs from external flash memory with an SPI interface. This microcontroller attracted attention in 2014 due to the release of the first products based on it at an unusually low price.
This microcontroller contains:
- 80 MHz 32-bit processor Tensilica Xtensa L106;
- IEEE 802.11 b / g / n Wi-Fi. WEP and WPA / WPA2 supported;
- 14 I / O ports (of which 11 can be used), SPI, I2S, UART, 10-bit ADC;
- Power 2.2 ... 3.6V. Consumption up to 215 mA in transmission mode, 100 mA in receive mode, 70 mA in standby mode. 3 low power modes are supported, all without connection to the access point: Modem sleep (15 mA), Light sleep (0.4 mA) and Deep sleep (15 ?A).
The microcontroller does not have on-chip user non-volatile memory. The program is executed from the external SPI ROM by dynamically loading the required program sections into the instruction cache. The load is hardware, transparent to the programmer. Up to 16 MB of external program memory is supported. Available Standard, Dual or Quad SPI interface.
The manufacturer does not provide documentation on the internal periphery of the microcontroller. Instead, it provides a set of libraries, through the API of which the programmer accesses peripherals. Since these libraries intensively use the controller's RAM, the manufacturer in the documents does not indicate the exact amount of RAM on the chip, but only an approximate estimate of the amount of RAM that remains to the user after linking the libraries - about 50 KB. Supposedly, it contains 32 KB of instruction cache and 80 KB of data RAM.
ESP8266 can work both as an access point and as an end station. During normal operation on the local network, the ESP8266 is configured in end station mode.
The main application is in the management of a variety of home appliances through wireless networks. The concept of such management is called "Internet of Things". The top level of this concept is represented by a variety of applications running on popular platforms (Android, Windows, etc.).
LoLin v3 NodeMcu Lua based on ESP8266 was chosen for development. This board is used for programming, control, management in various projects in which you need to use a microcontroller or you can connect to software running on a computer. LoLin NodeMcu v3 comes on board with a microUSB socket and a USB converter - UART CH340G, which allows you not to use external USB - UART converters and not worry about the high consumption of the ESP8266 chip.
To use LoLin NodeMcu v3, you need to connect it to a computer’s USB port using a USB cable type A - microUSB type B. The computer's operating system will identify the device as a USB Serial CH340. After power is applied to the controller board, a blue LED will flash (data transfer indication). After connecting the controller to the computer, you need to download and install the software to work. LoLin NodeMcu v3 comes with the NodeMCU firmware already loaded on the ESP8266. This firmware accepts code written in the LUA programming language.
But, there is also the opportunity to work with the Arduino IDE in the C and C ++ programming languages. Before flashing, you need to hold down the Reset button, then, without releasing the Reset, hold down the Flash button, then release the Reset first and then Flash. To update the firmware in the Arduino IDE program at the following address: the File tab, the Settings item, the line “Additional Boards Manager URLs:” contains the string http://arduino.esp8266.com/package_ esp8266com_index.json. Next, the “Tools” tab, the “Fee:” item, “Boards Manager ...” is selected in the pop-up list, you need to type ESP in the search bar, the module name appears below the search line, then click the INSTALLED button. After the information has been downloaded and installed, it will be possible to choose the ESP8266 module as a controller in the Arduino IDE software and write programs directly for it. After that, we return to the “Tools” tab, the “Fee:” item, search and select NodeMCU 1.0.
There are three options for using the wireless mode: Client (STA), Access Point (AP), Client + Access Point (STA + AP).
Conclusions
In the course of research work, materials relating to the topic of master's work were studied. The possibilities of various boards based on the selected microcontroller were analyzed and the hardware base was chosen for further work on master's work. A plan for further work was also outlined.
Bibliography
- Ëåîíèä ×åðíÿê. Ïëàòôîðìà Èíòåðíåòà âåùåé. Îòêðûòûå ñèñòåìû. ÑÓÁÄ, ¹7, 2012. Îòêðûòûå ñèñòåìû
- Neil Gershenfeld, Raffi Krikorian, Danny Cohen. The Internet of Things
- Dave Evans. The Internet of Things. How the Next Evolution of the Internet Is Changing Everything
- Bonomi, Flavio; Milito, Rodolfo; Zhu, Jiang; Addepalli, Sateesh (2012-08-17). Fog computing and its role in the internet of things
- Àáäðàõìàíîâ Â.Õ., Âàæäàåâ Ê.Â., Ñàëèõîâ Ð.Á. Ðàçðàáîòêà ñðåäñòâ àâòîìàòèçàöèè ñ èñïîëüçîâàíèåì Wi-Fi ìîäóëåé ESP8266 è LPWAN òåõíîëîãèé