Blog

TFM: Implementation and integration of a chart engine oriented to Big Data and it’s application in domotics

IoT (Internet of Things) and Big Data are very relevant today, and they tend to appear together. This happens because the most accepted definition of of IoT is having a lot of wireless sensors generating data continuously. This requires having the infrastructure to be able to save all the data that is generated in databases. However, this presents a problem when doing queries, since queries in big databases (millions of samples) take a long time to finish. Reducing this time is the objective of the following project.

This project consists of a Web application (making it cross-platform) that allows management of a database using a simple user interface. It is also able to select a small sample of data (independently of the amount of data in the database) and plotting it. Finally, it can also be used to monitor live data. These last two functions are extremely useful in domotics, since the data that’s used in those applications (temperature, pressure) are very easy to interpret when plotted.

Captura representación gráfica
Screenshot of the webpage used to chart data

In order to carry out this project we used MongoDB, a NoSQL database. This type of databases have big advantages over traditional SQL databases when taking into account the type of data we are going to store, mainly faster speed and more flexibility. For the web server we used NodeJS, this way all the code written for this project is Javascript, both server-side, using ExpressJS to simplify the development, and client-side, using the native API calls for web manipulation present in most modern web browsers.

Lastly, one of the biggest advantages of our project is the ability to add data to the database sending a HTTP request to a certain URL. With this we can save any type of data from any sensor easily, the only requirement is having a node that supports IP in order to send the HTTP request, which is something very common nowadays.

TFG: Design and development of a reliable routing protocol for Wireless Sensor Networks

Wireless Sensor Networks, or WSN, is one of the most promising fields of research when talking about Information Technology, as its use and deployment is extended in developing projects related to Internet of Things.

WSN are composed by multiple wireless tiny sensor nodes called motes, which are equipped with a microcontroller and some sensors capable to measure physical data of the parameter to be monitored. They also feature one or several radio antennas, meant to share the gathered data with the rest of the sensor nodes in the network.

Many projects have been developed using WSN, all of them with the common characteristic of the need of sharing data among nodes. This is achieved by the implementation of a network protocol on the nodes.

Different research lines have been followed and scientific papers have been published related to the field of WSN network protocols, most of them focused on the creation of algorithms and theoretical work rather than on field implementation and actual deployment of the network protocol on physical nodes.

multihop
Multihop packet sending between nodes on WSN

The final objective of this thesis is the development of a realiable routing protocol for WSN, which is meant to establish routes among the nodes which later will be used as paths for sending and receiving data. It will be ready to use for stablishing networks on any project based on WSN developed by the B105 Electronic Systems Lab Research Group, regardless of its application or purpose. Multihop will be one of the main features on this routing protocol.

This protocol has been designed to be reliable, customizable and adaptable to the different needs a WSN developer may have. Its code is portable to different motes, and has been developed as a process running within the FreeRTOS operating system, which is node sensor oriented. Besides, the Contiki netstack, Rime, and its customized layer of communication services provided by the B105 Electronic Systems Lab, have been the main sources of primitive communication modules used on the development of this routing protocol.

TFG: DESIGN AND IMPLEMENTATION OF AN ELECTRONIC SYSTEM TO MANAGE A SMART FRIDGE

There is currently a boom in smart devices in all kinds of environments. Most stores like www.discountfilterstore.com are getting advanced. This is due to the large amount of data and services that they provide us, facilitating our daily tasks. In this context, the design and implementation of an electronic system, to manage a fridge and a pantry situated in a room in the B105 Electronic Systems Lab research group, where there are products for the lab’ users, has been performed. In order to simplify the accounting, track the stock, control the consumption and facilitate the use and payment, a system based in a Raspberry Pi 2 Model B has been developed, composed of a database, a touchscreen and a fingerprint sensor. Additionally, a webpage has been developed to observe the stock and the user consumption.

In order to reach this aim, several phases have been fulfilled. First of all, an analysis of the current situation has been made to decide how to improve it. Afterwards, system requirements have been established. According to them, the available technologies have been analyzed. With the already decided requirements, the hardware and software design has been carried out. Finally, the designed system has been installed and performed all the necessary tests to determine that the system operation is the one desired.

A MySQL database has been designed to store the products, prices, stock, users and virtual wallet data. It is composed of four tables for users, products, consumptions and money movements.

In order to univocally identify the users, it has been decided to use a fingerprint sensor connected to the Raspberry’s UART. Python language has been used for sending and receiving data packets between Raspberry and sensor. It has also been considered the case of a temporary user which can log in as invited, in order to keep all the database’s tables updated and allow him to consume.

As far as communication between users and system is concerned, it has been decided that it is performed by means of a touchscreen, because it is handy, intuitive and its use is very widespread. It displays the graphical user interface that has been developed, implemented as web application. The main technologies used for this purpose have been PHP, HTML, CSS and JavaScript.

Likewise, a webpage has been implemented for queries in the own lab intranet, where users can see their own consumptions and the fridge and pantry products stock.

Finally, the system has been installed in the fridge and pantry room, resulting operative for users. For this purpose, a clamping system has been designed and printed in 3D, to provide stability and make it easy for users.

TFG: Diseño e implementación de una interfaz gráfica para gestión de una red de sensores inalámbrica

Las redes de sensores inalámbricas constituyen una nueva tecnología que se encuentra en un momento de desarrollo creciente. Este tipo de redes están formadas por varios nodos autónomos con capacidad de comunicación inalámbrica. Dichos nodos son capaces de monitorizar y muestrear varios parámetros físicos del entorno en el que se encuentran, procesar la información obtenida y comunicarse con otros nodos para tomar decisiones.

Debido al desarrollo de esta tecnología, se han encontrado varias necesidades entre las que se encuentran la gestión de las redes, su mantenimiento o la realización de pruebas. Es por ello que en el mercado han surgido varias alternativas para cubrir estas necesidades.

En el grupo de investigación del B105 Electronic Systems Lab del Departamento de Ingeniería Electrónica se ha desarrollado un banco de pruebas que permite comprobar, de una manera eficiente, el comportamiento de las redes de sensores ante distintas configuraciones de protocolos de comunicación y de los nodos. Para poder utilizar este sistema de manera sencilla se necesita una interfaz gráfica.

Este proyecto nace con la idea de cubrir esa necesidad, con el reto añadido de desarrollarla de manera que cumpla las características de fiabilidad, comodidad, flexibilidad y escalabilidad. También se pretende que esta interfaz sea lo más genérica posible. La interfaz se tendrá que comunicar con la red de sensores para configurar parámetros de los nodos y para solicitar datos a los mismos. Estos datos se tendrán que guardar y mostrar adecuadamente al usuario.

Para la realización de la interfaz se usará el entorno de programación Visual Studio en su versión de C#. Este contiene todas las herramientas y utilidades necesarias para diseñar e desarrollar interfaces de una manera rápida y sencilla, comunicarse con otros dispositivos y almacenar datos en ficheros y bases de datos.

También se diseñará e implementará las funciones necesarias para el correcto envío de datos a la interfaz por parte de la red de sensores. Esta tarea será realizada por un nodo pasarela, que actúa de intermediario entre los miembros de la red y el PC.

TFG: Desarrollo e implementación de un sistema electrónico para medir y caracterizar el consumo de sistemas empotrados

Un reloj digital, un teléfono inteligente, una pulsera electrónica y un sensor inalámbrico son algunos ejemplos de sistemas empotrados. Es fácil observar que este tipo de dispositivos juegan un papel muy importante en la sociedad actual.

Tras analizar con detalle este tipo de dispositivos nos damos cuenta de que en numerosas ocasiones son autónomos desde un punto de vista energético, es decir, se alimentan a través de baterías o pilas. En estos casos, será de gran interés para el diseñador obtener un perfil de consumo del dispositivo con la finalidad de poder estimar un tiempo de vida del mismo.

Realizar este proceso de caracterización en ocasiones no será para nada trivial, incrementándose considerablemente cuando trabajemos con dispositivos cuyo comportamiento no sea constante a lo largo del tiempo, pudiendo existir grandes diferencias de consumo entre un momento y otro como, por ejemplo, en las redes de sensores inalámbricos.

Ante la inexistencia de herramientas comerciales económicas que nos permitan caracterizar un dispositivo similar a los presentados anteriormente, nos propondremos realizar con este proyecto una herramienta de bajo coste con dicha funcionalidad. Para ello, diseñaremos, por un lado, un dispositivo hardware que nos permitirá medir el consumo de un tercero de forma fiable y, por otro, una herramienta software a través del cual el usuario podrá acceder a los datos adquiridos y procesarlos según considere, obteniendo la información relevante para el análisis del consumo.

Entre las restricciones a las que tendremos que hacer frente destacamos lo que se conoce como tensión de Burden. La tensión de Burden se define como la tensión que cae en el instrumento de medida por el mero hecho de medir. Fruto de esta restricción, será necesario incluir en el sistema, un mecanismo de regulación que cambie el estado del sistema de forma que, en ningún caso, la caída de tensión en bornes de nuestro dispositivo supere los 0,1 V.

tensiondeburdenLimitación de la tensión de Burden.

 

Adicionalmente al prototipo hardware, se desarrolló una interfaz que nos permitirá trabajar con el perfil de consumo obtenido durante el proceso de adquisición, facilitando el análisis de los datos.interfaz

 

Interfaz de usuario

Entre las funcionalidades incluidas en la aplicación destacamos: el panel de representación, que nos permitirá hacer zoom en un intervalo de tiempo específico; el panel de datos, donde se mostrarán los valores de interés del sistema (valor mínimo, máximo y medio) y el panel de configuración de umbrales, que nos permitirá conocer cuánto tiempo ha permanecido el sistema un una banda acotada de consumo.

MDC montaje

Montaje real del sistema completo