Obtención de indicadores de fatiga mediante el electroencefalograma.


Desde el proyecto Simbiosys, buscamos nuevas formas de detección de fatiga. Puesto que el sistema está destinado a ser usado en un simulador para conductores de vehículos, se busca que sea lo menos intrusivo posible, para facilitar el movimiento y comodidad del conductor.

Con este fin se está desarrollando un sistema multisensor con una parte importante de investigación como es la detección de distintos estados de fatiga mediante la actividad cerebral del conductor.

Para la obtención del electroencefalograma (EEG) se eligió un casco con un único electrodo, ya que los EEG convencionales presentan más de veinte electrodos, lo cual sería muy intrusivo para el conductor.


Tras la obtención de la señal en bruto del cerebro, el sistema se basa en la detección de la cantidad de energía que existe en las diferentes bandas del cerebro. En este caso las bandas de interés serán la banda alpha, betha y tetha, todas ellas relacionadas con estados de cansancio, fatiga o sueño.


El sistema consta de dos partes diferenciadas, basadas en machine learning. En la primera parte se obtiene las características – la energía de cada banda- del sujeto en estado de consciencia (no fatigado) para formar dos clústeres.

El objetivo es generar dos esferas que engloben todas las características en este estado, de tal forma que, si en la segunda parte del algoritmo se obtiene alguna característica que no pertenece a los clústeres, se considera una anomalía. Será la acumulación de anomalías durante un periodo de tiempo la que nos indique la presencia de fatiga en el sujeto.


Development of a network of devices connected through the LIN (Local Interconnect network) bus.


The communication among a high number of electronic devices creates several troubles. The most common being: latency, data errors and high development cost. This lead to the creation of device networks, which objective is to link many devices using as few conductors as possible. This new network should fulfill some requirements such as; efficiency, low cost, and robustness. The need of satisfying such requirements gave place to the construction of the bus of communication. Generally, the automotive industry uses CAN (Controller Area Network), LIN (Local Interconnected network) and FlexRay buses to connect their devices. Each of them are used for a specific application inside of the automobile. The efficient performance of this buses has allowed different industries to incorporate them to their systems. Nowadays CAN and LIN are used in domotic systems, medical equipment, automatization factories, navy electronic, industrial machines control, among others. Moreover, many projects are development in the B105 Electronic Systems Lab where it is necessary to link different actuators and sensors because of this, it has been decided to implement a LIN network.

The Project was composed of a master node and two slaves nodes that interact with each other. The discovery kit STM32F411E DISCO was used to implement the master and the slave node. Finally, the other devices the discovery kit STM32F411E DISCO possess like the diodes led (actuators) and the accelerometers (sensors) were used for the working demonstration.

TFG: High mobility Brigadier General (OF-6) wireless Command and Control Center design applying “Human-Centered Design” methodologies

Imagen 1


A high mobility Command and Control Center a the Brigadier General (OF-6) level (PCBRI) contains from twenty to thirty operator workstations. Each workstation consists on a computer connected to SIMACET (Command and Control Spanish Army digital network) and a telephony terminal. According to the PCBRI layout it supposes between three and five kilometers of signal wire.

Each time the PCBRI moves from one location to another one means removing and recabling several kilometers of wire and about three hundred wire connections. On the other hand beyond the work, personnel and material the main problem is the unavailability of the Command and Control Center between jumps and the connections reliability.

The development of a new wireless Command and Control Center was considered as a good challenge for applying “Human-Centerd Design” methodologies and the “Brigada Guadarrama XII” created a working group acting as final user, the Research Group “B105 Electronic Systems Lab” (Universidad Politécnica de Madrid) as technological and methodological partner, the Colegio Universitario de la Defensa (Zaragoza) both as technological and educational partner, the company Teldat and the Escuela Politécnica Superior del Ejército de Tierra as observer for, applying this methodology, develop a prototype to work inside of the PCBRI without wires.

The results of this project, apart of the experience of applying Human-Centered Design and SCRUM methodologies within the Spanish Army, is the development of a prototype of a high mobility Command and Control Center that copes with the demands of the Brigade where time and effort have been fully controlled. Main features are:

  • Phantom Digital system over the SIMACET network (The developed system is transparent to the legacy network)
  • VoIP phantom system supported by an smart switchboard allowing intelligent routing and voice recording running over a legacy NAVARRA station
  • Electromagnetic shielding with several choices in the binomial cost-attenuation according the mission requirements


Project architecture

A Wireless Sensor Network or WSN is a set of stand-alone devices that communicate with each other wirelessly. These networks consist of devices with low resources and wireless connectivity and are able to monitor different parameters.

Wireless sensor networks are intended for a multitude of environments, whether at an environmental (temperature, humidity), industrial or private (home automation, remote control) level.

The main objective of this project is to locate by means of a WSN to the members of laboratory. This information will be captured through small wireless devices made during this project. This information will be valuable both to know the availability and presence of the members of the laboratory and to optimize other systems such as lighting, air conditioning or common workstations.

The B105 Electronic Systems Lab has an intelligent environment that monitors different environmental aspects such as temperature, luminosity, humidity, etc. In this project it is proposed to develop the hardware and software necessary to detect the position of the members of the laboratory. In this way, each person will carry a device that sends the necessary information to the nodes of the network to position that person. Considerations such as low consumption, communications and data processing will be taken into account. The designed device is shown in the following image.

 The designed device

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 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.



There is currently a boom in smart devices in all kinds of environments. 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

Screen Shot 2017-07-11 at 6.38.55 PM

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



TFM: Development of an auto-tuned mechanical energy harvester

Prototipo mecánico de energy harvester

The Wireless Sensor Networks (WSNs) field is expected to experience a disruptive development in the next few years. One of the main obstacles that designers face is the extremely low consumption requirements related to this networks, as the operational costs involved in changing empty batteries might be very high. Therefore, technologies that permit recovering residual energy from the environment –frequently referred as Energy harvesting techniques- might become a powerful enabler for WSNs, reducing the pressure exerted by the strict consumption restrictions.

The present work describes the full design and development of a mechanical Energy harvester based on an electromagnetic transducer. The system is capable of transforming mechanical energy in form of vibrations with a non-flat energy density spectrum into electrical energy that can be used to power sensors, ideally increasing their autonomy indefinitely.

In order to transform a reasonable amount of energy, the system must remain tuned with the external excitation: its natural frequency has to match the external vibration frequency. To guarantee this, the system has been designed so that it is able to auto-tune itself by changing its natural frequency within the range of 30 to 70 Hz, which typically contains the vibrations generated by engines and industrial machinery.

With this objective, an initial study of the State-of-the-art models and their working principles has been carried out, and some mechanical architectures to modify the system’s natural frequency have been introduced. The architectures have been simulated, built by means of 3D printing, measured and characterized to conclude that the most adequate one is based on changing the effective vibrating length of a steel cantilever. Strategies to determine whether the system is tuned have been then studied, and the advantages of using an algorithm based on the phase difference between the external excitation and the cantilever tip have been justified. An electronic system based on a microcontroller has been designed to implement the algorithm, and the study of the transducer has shown the need for some conditioning electronics. A voltage multiplier in a parallel topology has been used for this purpose. The multiplier has been designed so that its multiplying steps number can be altered. Finally, a supercapacitor has been proven to fit the application more adequately than a battery, so it has been used as the energy storage solution.

Once the system has been developed, a fully functional auto tuned prototype has been achieved. The prototype is able to power an electronic system. However, due to the great power consumption the electromechanical actuator imposes, the auto-powering of the system is only feasible in environments where tuning is seldom required. This would most likely change with the reduction in electromechanical actuators consumption, which would allow the use of systems as the one described in other fields where vibrations change in a more frequent fashion.