
Practical data connection between MATLAB and microcontrollers using virtual serial port and MicroPython Pyboard: A survey
Author(s) -
Safari Ashkan,
Sabahi Mehran
Publication year - 2021
Publication title -
iet circuits, devices and systems
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.251
H-Index - 49
eISSN - 1751-8598
pISSN - 1751-858X
DOI - 10.1049/cds2.12038
Subject(s) - computer science , matlab , serial port , python (programming language) , computer hardware , software , serial communication , graphics , microcontroller , ascii , embedded system , computer graphics (images) , operating system
In this paper, a simple and practical method to hookup between Pyboard and computer using MicroPython and MATLAB is presented. With the presented way, MATLAB can connect to Pyboard with virtual serial port (VSP). This process is performed with a virtual port, without using MATLAB toolbox in all versions of this software and control prototyping is widely available on the hardware. This system can also be used in Simulink and widely be under the control of MATLAB to perform tasks. The system is based on (.py) file and (.m) file. One is made in MicroPython to perform analog to digital task and the second contains VSP source code to have a virtual connection with the proposed board and calculating codes to plot graphics. This way can cause the high speed of data sampling and data transfer in two different environments: Python interpretation environment and MATLAB environment. With the defined way, it is possible to make the devices that require calculation operations and the correlation of the computer and external environment with lower costs and fewer accessories. To validate the correctness of the proposed approach, an experimental prototype as a total harmonic distortion (THD) meter device has been built.