Master's Thesis
Total Page:16
File Type:pdf, Size:1020Kb
PLATFORM TO CONTROL AND MONITOR A MICROCONTROLLER REMOTELY A Degree Thesis Submitted to the Faculty of the Escola Tècnica d'Enginyeria de Telecomunicació de Barcelona Universitat Politècnica de Catalunya by Marc Riudalbàs Clemente In partial fulfilment of the requirements for the degree in TELECOMMUNICATIONS SYSTEMS ENGINEERING Advisors: Josep Prat Gomà, Barcelona, Spain Heinrich Steinhart, Aalen, Germany Barcelona, June 2017 Abstract This project is going to modify a communication between monitoring software and a microcontroller. Currently this communication is carried out physically with a cable. Our goal is to remove this cable and implement a wireless communication. We are going to work with existing technologies and protocols, creating a hardware and software platform that interacts with each other as long as this replacement is transparent to both nodes. Once the system is implemented, we are going to communicate the program and the microcontroller using the new platform to see that the information flow is robust and free of errors. We will conclude with a real communication and we are going to give possible solutions to the disadvantages of wireless communications in front of cable communications, proposing a line of future research, which could be done to improve our system. 1 Zusammenfassung In diesem Projekt soll die Datenkommunikation zwischen einer Monitoring-Software und einem Mikrocontroller geändert werden. Momentan wird diese Kommunikation physikalisch mit einem Kabel hergestellt. Unser Ziel ist es, dieses Kabel durch die “wireless”-Kommunikation zu ersetzen. Wir werden mit bestehenden Technologien und Protokollen arbeiten, hierfür werden wir eine Software- und Hardware-Plattform erstellen. Diese Plattformen werden mit sich selbst interagieren damit der Ersatz des Kabels transparent für beide Knoten ist. Sobald das System verwirklicht ist, werden wir die Kommunikation zwischen dem Program und dem Mikrocontroller mittels der neuen Plattform herstellen, um festzustellen dass der Informationsfluss robust ist und keine Fehler aufweist. Zum Abschluss des Projekts soll eine reelle Datenkommunikation stattfinden und mögliche Lösungen gefunden werden um die Nachteile der kabellosen Kommunikation gegenüber der physikalischen Kommunikation aufzuzeigen. Die Ausarbeitung eines neuen Kommunikationssytems soll in der Zukunft weiter erforscht werden. 2 Resum En aquest projecte es modificarà una comunicació entre un software de monitorització i un microcontrolador. En aquests moments, aquesta comunicació està configurada físicament per cable. El nostre objectiu és retirar aquest cable i implementar una comunicació “wireless”. Treballarem amb tecnologies i protocols ja existents, creant una plataforma de hardware i software que interactuïn entre sí per tal que aquest canvi sigui transparent pels dos nodes. Un cop realitzat el sistema, farem que el programa i el microcontrolador es comuniquin fent servir la nova plataforma per veure que el flux d’informació és robust i no presenta errors. Conclourem veient una comunicació real i donarem possibles solucions als desavantatges que presenten les comunicacions sense fils davant les comunicacions amb cable, proposant una línia d’investigació futura que es podrà dur a terme per a millorar el nostre sistema. 3 Resumen En este proyecto se modificará una comunicación entre un software de monitorización y un microcontrolador. Actualmente esta comunicación se lleva a cabo físicamente con un cable. Nuestro objetivo es retirar este cable e implementar una comunicación “wireless”. Trabajaremos con tecnologías y protocolos ya existentes, creando una plataforma de hardware y software que interactúe entre sí con tal de que este reemplazamiento sea transparente para ambos nodos. Una vez realizado el sistema, vamos a hacer que el programa y el microcontrolador se comuniquen usando la nueva plataforma para ver que el flujo de información es robusto y no presenta errores. Concluiremos viendo una comunicación real y trataremos de dar posibles soluciones a las desventajas que presentan las comunicaciones sin cable frente a las comunicaciones por cable, proponiendo una línea de investigación futura que se podrá realizar para mejorar nuestro sistema. 4 Ehrenwörtliche Erklärung Ich versichere hiermit, dass ich die Bachelor Thesis „Platform to control and monitor a microcontroller remotely” selbstständig verfasst und keine anderen als die angegeben Quellen un Hilfsmittel benutzt habe. Aalen, den 23. Juni 2017 Marc Riudalbàs Clemente Declaration of Autorship I hereby certify that the thesis “Platform to control and monitor a microcontroller remotely“ has been composed by me and is based on my own work, unless stated otherwise. No other person’s work has been used without due acknowledgement in this thesis. All references and verbatim extracts have been quoted, and all sources of information, including graphs and data sets, have been specifically acknowledged. Aalen, 23rd of June 2017 Marc Riudalbàs Clemente 5 Acknowledgements This research was supported by the Hochschule Aalen and the Universitat Politècnica de Barcelona. We thank our colleagues from “Labor für elektrische Antriebstechnik und Leistungselektronik” who provided insight and expertise that greatly assisted the research. We thank Professor Doktoringenieur Heinrich Steinhart and Professor and Doctor Josep Prat Gomà for working as project advisors and tracking it. We also want to thank Joaquim Pinol Bel and Iván Gutiérrez Otero for the assistance and comments, which have helped with the project development. 6 Revision history and approval record Revision Date Purpose 0 19/03/2017 Document creation 1 08/06/2017 Document revision 2 17/06/2017 Document revision DOCUMENT DISTRIBUTION LIST Name e-mail Marc Riudalbàs Clemente [email protected] Josep Prat Gomà [email protected] Heinrich Steinhart [email protected] Joaquim Pinol Bel [email protected] Iván Gutiérrez Otero [email protected] Written by: Reviewed and approved by: Date 19/03/2017 Date 19/06/2017 Name Marc Riudalbàs Clemente Name Joaquim Pinol Bel Position Project Author Position Project Supervisor Assistant 7 Table of contents Abstract ............................................................................................................................ 1 Zusammenfassung ........................................................................................................... 2 Resum .............................................................................................................................. 3 Resumen .......................................................................................................................... 4 Ehrenwörtliche Erklärung .................................................................................................. 5 Declaration of Autorship ................................................................................................... 5 Acknowledgements .......................................................................................................... 6 Revision history and approval record ................................................................................ 7 Table of contents .............................................................................................................. 8 List of Figures ................................................................................................................. 10 List of Tables: ................................................................................................................. 12 Glossary of terms ........................................................................................................... 13 1. Introduction .............................................................................................................. 14 1.1. Objectives ........................................................................................................ 15 1.2. Requirements and specifications ...................................................................... 16 1.3. Initial work plan ................................................................................................. 17 1.3.1. Initial breakdown structure ......................................................................... 17 1.3.2. Initial work packages ................................................................................. 17 1.3.3. Milestones ................................................................................................. 18 1.3.4. Initial time plan .......................................................................................... 19 1.3.4.1. Gantt diagram ......................................................................................... 19 1.3.4.2. Pert diagram ............................................................................................ 19 2. State of the art ......................................................................................................... 20 2.1. Microcontroller .................................................................................................. 20 2.2. UART (Universal Asynchronous Receiver/Transmitter) .................................... 21 2.3. Wi-Fi ................................................................................................................. 22 2.4. OSI Model (Open System Interconnection)....................................................... 23 2.5. TCP/IP .............................................................................................................