# Electric Drive with an Adaptive Controller and Wireless Communication System
## 6 Experimental Verification
### Remote Data Visualization  
The design of the control system was extended with a remote Human-Machine Interface. The main task for the HMI was the visualization of the system state variables; the user interface additionally provides access to basic control, such as selecting the speed set-point and enabling/disabling the drive with a start&stop switch. In comparison to known HMI systems, which in most cases require special, licensed software and specialized hardware (e.g. additional sensors or measurement cards) for data acquisition and visualization [63; 64; 65], the proposed system broadcasts the desired data to any network-connected device. The developed system consists of the power electronics and sensors that were required for the drive operation. The state variables were extracted from the control hardware via the serial port and processed with a low-cost, highly adaptable dual-core \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Motor nominal power & 500 W \\ Load nominal power & 500 W \\ Shaft length & 600 mm \\ Shaft nominal diameter & 5 mm \\ Encoder impulse & 36,000 ppr \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Nominal parameters of the drive. Figure 12: The laboratory setup. ESP32 microcontroller. The ESP32 incorporates a wide range of communication modules, both wired (I2C, I2S, SPI, UART) and wireless (Bluetooth Classic, Bluetooth Low Energy (BLE) and Wi-Fi), which makes it a universal tool that can be implemented in a variety of applications [66; 67; 68]. The embedded Wi-Fi module was used to provide remote access for end users. A simple web page was generated, thus enabling data monitoring through any device, such as mobile phones, tablets, or laptop PCs. The scenario assumes the situation with ESP32 working as an internet-connected web server (Figure 13). It enables cloud-based drive monitoring from any destination around the world--the approach especially valuable for maintenance staff in international companies. Not only industrial solutions can use the IoT-enabled machinery, but also research centers and universities may conduct experiments remotely. This is an essential in the home office and remote learning reality of pandemic. Because of the increasing necessity of ensuring data safety, advanced encryption is required. The access can be granted only for the authenticated users (3 rd party services are no required). A parameter comparison between typical industrial HMI solutions and the device utilized in this article is presented in Table 3.  
The network framework was developed using an asynchronous web server ESP32 utility. It allows generating a responsive web page design based on HTML syntax. The communication between control system acquisition module and the web server in asynchronous mode was established in a request-based manner. Every reload of the web page or user activity (such as switch toggle) generates a defined request to access microcontroller variables. The asynchronous operation reduces the workload of the processor, as the data exchange was only conducted at the user request. The CSS style file and HTML code are stored in flash memory of the ESP32 with the utilization of SPIFFS (SPI Flash File System). Such an approach allows to generate a more complex graphical interface in comparison to the minimal code constrained by program memory. Moreover, the web page file was replaced in the microcontroller memory without the interference with the network configuration and data acquisition logic. The designed HMI web page was linked with the system during the experimental tests. The speed transient was plotted from the buffered samples. The length of the single data  
Figure 13: Remote data visualization with ESP32: dataflow (**a**), laboratory equipment (**b**).