Communication system for embedded systems - Diogo Jorge Freitas Cadavez (2021)
This thesis aims at developing a generic communication system for embedded systems. In our days, reliable and in real time data is very valuable, as this data can be used to optimize the performance of a given system, or to prevent system failures, so having a generic communication system, that can be used for the different case scenarios, where we can find a computer monitoring the behaviour of a microcontroller, and that is able to deliver data in the conditions described above has high value. Because of this the main purpose of creating a system like this is to offer a standard platform that can be used by whoever needs to establish some sort of communication between a microcontroller and a desktop or web app, in a more user friendly way, as by using this platform the user doesn't need to worry about the communication part, taking away all the frustration and difficulties that can arise from doing that task. The work that is going to be presented in this thesis can be divided in three parts parts, a library that handles the communication on the microcontroller side, an API that communicates with the microcontroller and the desktop app, and third a desktop application that shows the data using the communication system. (1) This library is implemented in C and offers the user a range of functions that allow him to easily setup the communication system, as there might be a desire to use different type of communications, this library shall at least support WiFi, this is crucial for situations in which a physical connection is not possible, for example if we want to monitor the function of a self-flying drone that is collecting some kind of data,and also USB and RS485 connections. The last two connections are still very important as sometimes using WiFi is not a reliable option to transfer data. The RS485 has high relevance for the industry, as the environment in which the microcontroller is going to be used has a lot of noise, or implicates having a long distance connection between the microcontroler and the main controller/computer. (2) This API is developed in JavaScript to receive the data from the microcontroller and send it to the application, the reverse can also happen. (3) The application was developed using Electron, that is a node.js package to build cross-platform desktop apps using JavaScript, HTML and CSS. This app will monitor the microcontroller and provide the user information about the behavior of the system, to do this the user can configure the app to show the variables specified in the code that runs on the microcontroller. Apart from the feedback that the app provides, the user also has the possibility to change the value of those variables and send it to the microcontroller. The received data can also be displayed in graphs, where the user can choose the variables that he pretends to correlate. This system can also offer another feature for the user, talking now about the developing part of a project, where the user can use this system as a way of doing debug in a more easy and organized way.