59
ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA Y SISTEMAS DE TELECOMUNICACIÓN PROYECTO FIN DE GRADO TÍTULO: IMPLEMENTATION OF DIFFERENT KIND OF SENSORS IN AN ARM-FPGA ARCHITECTURE ALLOWING ROOM DATA MONITORING AUTOR: ANDRÉS MOLINA GARGANTILLA TITULACIÓN: ELECTRÓNICA DE COMUNICACIONES TUTOR: PROF. DR HAB. INZ. WOJCIECH KUCEWICZ UNIVERSIDAD: AKADEMIA GÓRNICZO-HUTNICZA IM. STANISLAWA STASZICA W KRAKOWIE CENTRO: IET PAÍS: POLAND Fecha de lectura: Calificación: El Coordinador de Movilidad ,

PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA Y SISTEMAS DE

TELECOMUNICACIÓN

PROYECTO FIN DE GRADO

TÍTULO: IMPLEMENTATION OF DIFFERENT KIND OF SENSORS IN AN ARM-FPGA ARCHITECTURE ALLOWING ROOM DATA MONITORING

AUTOR: ANDRÉS MOLINA GARGANTILLA

TITULACIÓN: ELECTRÓNICA DE COMUNICACIONES

TUTOR: PROF. DR HAB. INZ. WOJCIECH KUCEWICZ

UNIVERSIDAD: AKADEMIA GÓRNICZO-HUTNICZA IM. STANISLAWA STASZICA W KRAKOWIE

CENTRO: IET

PAÍS: POLAND

Fecha de lectura:

Calificación:

El Coordinador de Movilidad

,

Page 2: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 2

INDEX OF CONTENTS

INDEX OF CONTENTS ................................................................................................................................................... 2

INDEX OF FIGURES ....................................................................................................................................................... 4

INDEX OF TABLES ........................................................................................................................................................ 6

REFERENCES ................................................................................................................................................................ 7

ACRONYMS .................................................................................................................................................................... 9

RESUMEN (ESPAÑOL) ................................................................................................................................................ 11

ABSTRACT ................................................................................................................................................................... 12

STATE OF the ART ...................................................................................................................................................... 14

Inception .................................................................................................................................................................... 14

Actually ...................................................................................................................................................................... 14

DESIGN SPECIFICATIONS AND RESTRICTIONS ..................................................................................................... 17

Zybo .......................................................................................................................................................................... 19

Power Supply ......................................................................................................................................................... 23

Zynq configuration .................................................................................................................................................. 23

Ethernet PHY ......................................................................................................................................................... 24

PMOD Ports ........................................................................................................................................................... 24

DESCRIPTION OF THE PROPOSED SOLUTION ....................................................................................................... 27

Own Made Sensor .................................................................................................................................................... 27

Temperature Sensor .............................................................................................................................................. 27

LighTing Sensor ............................................................................................................................................................ 33

Humidity Sensor ..................................................................................................................................................... 34

PMOD Sensor ........................................................................................................................................................... 35

Temperature Sensor .............................................................................................................................................. 35

Lighting Sensor ...................................................................................................................................................... 37

Humidity Sensor ..................................................................................................................................................... 39

Method Chosen ......................................................................................................................................................... 41

Page 3: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 3

SOFTWARE .................................................................................................................................................................. 42

VIVADO ..................................................................................................................................................................... 42

Zybo ....................................................................................................................................................................... 42

Pmods .................................................................................................................................................................... 48

SDK ........................................................................................................................................................................... 53

CONCLUSION AND FUTURE IMPROVEMENTS ........................................................................................................ 56

BUDGET ....................................................................................................................................................................... 58

Page 4: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 4

INDEX OF FIGURES

Figure 1: Philips Hue Bulbs (Ref [4]) ............................................................................................................................. 15

Figure 2: Sensor third-gen Nest (Ref [4]) ...................................................................................................................... 15

Figure 3:Device Remote Control App (Ref [4]) .............................................................................................................. 15

Figure 4: Netatmo Weather station (Ref [5]) ................................................................................................................. 16

Figure 5: Schematic Zynq-7000 SoC (Ref [7]) .............................................................................................................. 18

Figure 6: ZyBO Zynq-7000 ARM/FPGA SoC Trainer Board (Ref [6]) ........................................................................... 20

Figure 7: ZyBO Zynq-7000 ARM/FPGA SoC Trainer Board (Ref [7]) ........................................................................... 21

Figure 8: Schematic Power Supply (Ref [7]) ................................................................................................................. 23

Figure 9: Schematic boot modes (Ref [7]) ..................................................................................................................... 23

Figure 10: Schematic Ethernet PHY (Ref [7]) ............................................................................................................... 24

Figure 11: PMOD Diagram (Ref [7]) .............................................................................................................................. 24

Figure 12: PMOD peripherals Diagram (Ref [7]) ........................................................................................................... 25

Figure 13: Source of current .......................................................................................................................................... 28

Figure 14: Instrumentation Amplifier ............................................................................................................................. 30

Figure 15: Reference voltage ........................................................................................................................................ 31

Figure 16: NON INVERTING ......................................................................................................................................... 32

Figure 17: LDR Schematic ............................................................................................................................................ 33

Figure 18: Format of each packet sent by the humidity sensor (Ref [10]) ..................................................................... 34

Figure 19: Electric schematic of Humidity sensor (Ref [10]) ......................................................................................... 34

Figure 20: Pmod TMP3 top view (Ref [11]) ................................................................................................................... 35

Figure 21: Pmod TMP3 general view (Ref [11]) ............................................................................................................ 35

Figure 22: Sketch about how to connect our sensor to the development board (Ref [13]) ........................................... 36

Figure 23: Electrical schematic of our temperature sensor (Ref [13]) ........................................................................... 36

Figure 24: Block diagram ADC081S02 (Ref [14]) ......................................................................................................... 37

Figure 25: Pmod ALS top view (Ref [11]) ...................................................................................................................... 38

Figure 26: Pmod ALS general view (Ref [11]) ............................................................................................................... 38

Figure 27: Sketch about how to connect our sensor to the development board (Ref [16]) ........................................... 38

Figure 28: Electrical schematic of our lighting sensor (Ref [16]) ................................................................................... 38

Figure 29: Block diagram (Ref [17]) ............................................................................................................................... 39

Page 5: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 5

Figure 30: Pmod ALS top view (Ref [18]) ...................................................................................................................... 40

Figure 31: Pmod ALS general view (Ref [18]) ............................................................................................................... 40

Figure 32: Sketch about how to connect our sensor to the development board (Ref [18]) ........................................... 40

Figure 33: Electrical schematic of our humidity sensor (Ref [18]) ................................................................................. 40

Figure 34: Screenshot New Project ............................................................................................................................... 43

Figure 35: Screenshot name and location ..................................................................................................................... 43

Figure 36: Screenshot Project type ............................................................................................................................... 44

Figure 37: Screenshot board type ................................................................................................................................. 44

Figure 38: Screenshot Project summary ....................................................................................................................... 45

Figure 39: Screenshot create block design ................................................................................................................... 45

Figure 40: Screenshot chosen our IP board .................................................................................................................. 46

Figure 41: Screenshot add clock ................................................................................................................................... 46

Figure 42: Screenshot add library ................................................................................................................................. 48

Figure 43: Screenshot select port ................................................................................................................................. 49

Figure 44: Screenshot select PMOD for each port ........................................................................................................ 49

Figure 45: Screenshot with all the PMOD ..................................................................................................................... 50

Figure 46: Screenshot auto-routing ............................................................................................................................... 50

Figure 47: Screenshot Clock1 ....................................................................................................................................... 51

Figure 48: Screenshot final step .................................................................................................................................... 52

Figure 49: First window of SDK ..................................................................................................................................... 53

Figure 50: Hello world project ........................................................................................................................................ 54

Figure 51: Program FPGA ............................................................................................................................................. 54

Figure 52: Code of how to obtain temperature from PMODTMP3 ................................................................................ 54

Figure 53: Code of how to obtain lighting from PMODALS ........................................................................................... 55

Figure 54: Code of how to obtain humidity from our Honeywell sensor ........................................................................ 55

Page 6: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 6

INDEX OF TABLES

Table 1: Reference Documents. ...................................................................................................................................... 8

Table 2: Reference Documents. .................................................................................................................................... 10

Table 3: Comparison processing system between Zynq-7000 SoC and Zynq UltraScale MPSoC .............................. 17

Table 4: comparison programmable logic between Zynq-7000 SoC and Zynq UltraScale MPSoC ............................. 17

Table 5: ZyBO Device Diagram ..................................................................................................................................... 22

Table 6: Value of RTD and VRTD in function of Temperature ......................................................................................... 28

Table 7: Value of VRTD in function of the output ............................................................................................................. 29

Table 8: Final value of VRTD in function of the output .................................................................................................... 30

Table 9: Cost of workforce ............................................................................................................................................. 58

Table 10: Cost of materials ............................................................................................................................................ 58

Table 11: Cost of software licenses ............................................................................................................................... 59

Table 12: Total cost ....................................................................................................................................................... 59

Page 7: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 7

REFERENCES

Ref. Description

[1] Domótica: Recovered on 14 of March of 2017from: http://www.rae.es

[2] Actualidad sobre domótica: Recovered on 14 of March of 2017 from: http://www.domotica365.com/articulos/la-domotica-inteligencia-artificial-desde-los-anos-70

[3] Smart home market: Recovered on 14 of March of 2017 from: http://www.marketsandmarkets.com/PressReleases/global-smart-homes-market.asp

[4] Best smart home devices: Recovered on 14 of March of 2017 from: http://www.pcmag.com/article2/0,2817,2410889,00.asp

[5] Home automation humidity: Recovered on 14 of March of 2017 from: https://www.safety.com/blog/best-home-automation-software-products/

[6] Digilentic: Recovered on 18 of March of 2017 from: http://store.digilentinc.com/zybo-zynq-7000-arm-fpga-soc-trainer-board/

[7] Reference Manual Digilentic: Recovered on 18 of March of 2017 from: https://reference.digilentinc.com/reference/programmable-logic/zybo/reference-manual

[8] INA128 Datasheet: Recovered on 4 of May of 2017 from: http://www.ti.com/lit/ds/symlink/ina129.pdf

[9] Voltage References: Recovered on 6 of May of 2017 from: http://www.ti.com/lit/ds/snvs741f/snvs741f.pdf

[10] Humidity Sensor: Recovered on 6 of May of 2017 from: https://sensing.honeywell.com/honeywell-sensing-humidicon-hih7000-series-product-sheet-009074-6-en.pdf

[11] Temperature sensor: Recovered on 6 of May of 2017 from: http://store.digilentinc.com/pmod-tmp3-temperature-sensor/

[12] TCN75A: Recovered on 6 of May of 2017 from: http://www.microchip.com/wwwproducts/en/TCN75A

[13] PMOD TMP3: Recovered on 6 of May of 2017 from: https://reference.digilentinc.com/reference/pmod/pmodtmp3/reference-manual

[14] ADC081S021: Recovered on 6 of May of 2017 from: http://www.ti.com/lit/ds/symlink/adc081s021.pdf

Page 8: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 8

Ref. Description

[15] Ambient Light sensor: Recovered on 6 of May of 2017 from:

http://www.vishay.com/docs/81579/temt6000.pdf

[16] Light sensor: Recovered on 7 of May of 2017 from: http://store.digilentinc.com/pmod-als-ambient-light-sensor/

[17] HDC1080: Recovered on 7 of May of 2017 from: http://www.ti.com/lit/ds/symlink/hdc1080.pdf

[18] PMOD HYGRO: Recovered on 8 of May of 2017 from: http://store.digilentinc.com/pmod-hygro-digital-humidity-and-temperature-sensor/

[19] VIVADO: Recovered on 8 of May of 2017 from: https://en.wikipedia.org/wiki/Xilinx_Vivado

[20] IP LIBRARY: Recovered on 8 of May of 2017 from: https://github.com/Digilent/vivado-library/tree/master/ip/Pmods

Table 1: Reference Documents.

Page 9: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 9

ACRONYMS

Acronyms Definition

ADC Analog Digital Converter

AGH AKADEMIA GÓRNICZO-HUTNICZA

App Application

ARM Architecture Reduced Instruction Set Computer

CAN Controller Area Network

COTS Commercial Of The Shelf

DAC Digital Analog Converter

DDR3 Dynamic Ram

DMA Direct Memory Access

DSP Digital Signal Processing

EEPROM Electrically Erasable Programmable Read Only Memory

ETSIST Escuela Técnica Superior de Ingeniería y Sistemas de Telecomunicación

FPGA Field Programmable Gate Array

GPIO General Purpose Input/Output

GUI Graphical User Interface

HDL Hardware Description Language

HDMI High Definition Media Interface

HW Hardware

I2C Inter-Integrated Circuit

IDE Integrated Development Environment

IoT Internet Of Thing

ISE Ingenieria Sistemas Electrónicos

Page 10: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 10

Acronyms Definition

JTAG Joint Test Action Group

LED Light Emitter Diode

LUT Look Up Table

MMCM Mixed-mode clock manager.

PC Personal Computer

PHY Physical Layer Component of Ethernet

PL Programmable Logic

PLL Phase Locked Loop

PS Processing System

PSU Power Supply Unit

QSPI Quick Serial Parallel Interface

Q-SPI Quad Serial Peripheral Interface

RAM Random Access Memory

RF Radio Frequency

SDK Software Development Kit

Siri Intelligent personal assistant part of Apple operating system

SoC System On Chip

SW Software

UART Universal Asynchronous Receive Transmit

USB Universal Serial Bus

VGA Video Grid Array

Wi-Fi Wireless fidelity

Table 2: Reference Documents.

Page 11: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 11

RESUMEN (ESPAÑOL) Actualmente, la domótica (Conjunto de sistemas que automatizan las diferentes instalaciones de

una vivienda [1]) está en auge tanto en España como en la mayoría de los países. Podemos

definir un sistema domótico como un sistema que recoge la información proveniente de unos

sensores o entradas, la procesa, y puede emitir ordenes a unos actuadores o salidas.

Con este proyecto por tanto, se ha decidido dar una solución a esta demanda, de manera sencilla

e introductoria en el mundo de la monitorización y control de sistemas aplicado a las viviendas

domesticas.

El proyecto consistirá en la implementación de una plataforma operativa en ARM-FPGA

(Concretamente en la placa Digilent ZYBO) para varios sensores. El objetivo principal es dotar a

una aplicación previamente diseñada de distintos sensores para que así se puedan monitorear

distintas condiciones de entorno a una vivienda/habitación como son la temperatura, humedad,

luminosidad, etc.....

Se llevará a cabo la monitorización de las distintas condiciones de una sala (Temperatura,

humedad, luminosidad...). Para ello se implementará una Interfaz Gráfica de Usuario desde la

cual el usuario podrá obtener toda la información sobre medidas de manera sencilla y a su vez

recibir información de diagnosis relativas a posibles anomalías tanto en la placa como en el

entorno en la que esta se encuentre. El alcance y objetivo de este proyecto es abordar los

elementos Hardware (HW) y o Software (SW) de los sensores que permitirán medir, almacenar y

comunicar la transmisión de esos datos a la placa ZYBO.

Otro objetivo de este proyecto es facilitar el uso de hardware, proveer un núcleo base (HW y SW)

de trabajo basado en arquitecturas ARM-FPGA de la familia Xilinx como plataforma de desarrollo

posterior de lo futuros alumnos de la escuela AGH en Cracovia, este tipo de dispositivo (Digilent

ZYBO) y la novedad de las arquitecturas ZYNQ© (2014) aún no ha sido empleadas por los

alumnos actualmente y los profesores del departamento de electrónica están interesados en el

uso académico de esta herramienta y del desarrollo posterior de aplicaciones (IoT, Distributed

System, Remote Control, etc…) por parte los alumnos.

Page 12: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 12

ABSTRACT

Nowadays, home automation (systems that automate the different installations of a house) is

booming both in Spain and in most countries. Therefore it could be said that a home automation

system collects the information coming from external world (sensors and or any inputs), processes

such inputs and issue a set of commands to actuators, outputs and or external devices to fulfil the

desired control function (i.e.: temperature control, security control,….).

This project, provides a simple, cost, effective framework solution (HW and SW) that can be used

as an introductory way to the world of monitoring and control (control systems).

The project consists in the use of an ARM-FPGA operating platform that provides the entire

development framework (HW and SW artefacts) where a set of specific sensors are integrated;

ARM-FPGA architecture is placed on the Digilent ZYBO evaluation boards. The main objective is

to equip a previously designed application with different sensors, in such way so that the

application will monitor different environmental conditions of a room.

The project is focused mainly on the following environmental parameters:

• Temperature

• Humidity

• Light Conditions

Once the proof of concept will be done, the modular and scalable approach of the project will

allow any upgrade of this basic core to address in the future any new parameters that can be

measured and acquired, IoT sensors is for sure a potential candidate that must be explored in the

future.

To this end, my colleague Javier Peña Algarra, will implement the Graphical User Interface (GUI).

Through the GUI, the user in a friendly way will be able to see and check all the recorded and

acquired data and in turn a specific diagnosis function will gave to the user the situational

awareness of any anomalies and or malfunction that may appears either in the CORE system

(ZyBO) or in its environment. The scope and aim of this project is to address both the Hardware

(HW) and Software (SW) part of the sensors used that will measure, store and communicate

(Transmit/Reception) these data to the ZYBO board.

Page 13: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 13

Another objective of this project is to provide a core baseline framework (HW and SW) based on

this ARM-FPGA architecture for future students of the AGH-UST in Krakow. The main reason is

that such type of SoC device are still not commonly used by AGH students due to their novelty. In

addition the academics of the Electronics Department are highly interested in:

- The academic usage of the platform

- The development of future application (IoT, Distributed System, Remote Control, etc.…) by

next students promotion.

Page 14: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 14

STATE OF THE ART

In this section, you will see the tools-set, artefacts and different product lines that are used today

to provide the same functions as this application. Furthermore, a brief explanation regarding the

field of application of such devices and the most common sectors that use it

INCEPTION

The term “Smart home” or home automation appears around the 70’s. This term born to join the

different technologies evolution, that manages to make life in each home easier.

The X10 systems is considered one of the first automation systems (1978). It was a complete

“wireless” system, it main function was to allow the control of the lights of the different rooms and

that all the domestic appliances communicates between them. [2]. The X10 protocol is/was based

on RF burst (120KHz) conveying the digital information, it is/was widely used since there is no

needs for additional wiring and it use as physical layer the main power supply. Main limitation

comes from its low bandwidth and the maximum number of subscribers.

ACTUALLY

Nowadays we have many studies regarding Domotic and or Smart Homes market. The forecast

and marketing studies for such products say that the smart home market is expected to grow from

USD 46.97 Billion in 2015 to USD 121.73 Billion by 2022 [3], this market explosion is mainly

driven by the usage of a huge number of App and the popularity of Smartphone devices.

Below you will find some data, regarding the sensors we have used:

One of the sectors where this increase is clear would be the lighting control. This market is

expected to grow with a sustained high rate during the forecast period. Over the years, the

growing of environmental concerns from civilian, have helped spread awareness regarding the

importance of:

a) Smart homes and

b) Home energy management measures.

One of the most popular device home automation over lighting would be the Philips Hue Bulbs,

the Philips Hue line delivers with bulbs that let you control not only the intensity of the light, but

Page 15: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 15

also the colour. It works with just about every other system out there, from Alexa, to IFTTT, to Siri

[4].

Figure 1: Philips Hue Bulbs (Ref [4])

Temperature sensors, it is very usual to have at home one thermostat to regulate the temperature

easily and quickly. This sector is in a permanent developing phase so that the latest devices of the

market provides high technology like built-in Wi-Fi so you can remotely control the temperature

from phone, tablet, or PC and it checks multiple sensors in multiple rooms [4].

Figure 2: Sensor third-gen Nest (Ref [4]) Figure 3:Device Remote Control App (Ref [4])

Humidity sensors, humidity systems add or remove water vapour from indoor air, to stay within

proper humidity ranges. The control of this environment parameter is a matter of concern in

different sector likes the food industry, hospitals, and public buildings.

One of the most used nowadays is “Netatmo Weather Station”, it’s unique set of sensors allows

the monitoring of any room. The “Netatmo Weather Station” use wireless technology to transmit

data from your living environment to your smartphone, it measure, track, and monitor the weather

Page 16: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 16

and environment for both indoor and outdoor condition. The Netatmo App is available at iTunes

and Google Play Store providing access to Weather Station’s measurements on the dashboard, in

graphs, or in notifications [5].

Figure 4: Netatmo Weather station (Ref [5])

Page 17: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 17

DESIGN SPECIFICATIONS AND RESTRICTIONS

There are many HW platforms available in the market, which may be used to develop our project;

Raspberry pi, Arduino, Texas Instrument AM3359, as weel as a set of development board

implementing ALTERA and or XILINX new generation SOC. In my home university (ETSIST), the

trend these last years, was to use the development platform and the Integrated Development

Environment provided by ALTERA, therefore our main technical background comes from the

usage of Altera devices. Our coordinator said us that they have already some projects running

using Xilinx family, and that this will add some interesting challenges that will adds “diversity”, new

knowledge capture, and new way of working with this different platform of SoC.

The table below provide some characteristics and benchmark of Xilinx SoC platforms.

Table 3: Comparison processing system between Zynq-7000 SoC and Zynq UltraScale MPSoC

Table 4: comparison programmable logic between Zynq-7000 SoC and Zynq UltraScale MPSoC

Finally, for our objective of monitoring a whole room, we have selected Zynq-7000 SoC, more

specifically the Trainer Board known as ZYBO, although its characteristics and performance are

lower than Zynq UltraScale MPSoC is but powerful enough to be successfully and to carry out our

goal.

Page 18: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 18

The Zynq AP SoC is divided into two distinct subsystems:

• The Processing System (PS), and

• The Programmable Logic (PL)

Figure 5 describes the Zynq AP SoC architecture, with the PS coloured light green and the PL in

yellow.

Figure 5: Schematic Zynq-7000 SoC (Ref [7])

Page 19: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 19

ZYBO This chapter is dedicated to explain main architecture and aspects related to our Trainer Board.

The ZyBO (Zynq™ Board) is a feature-rich, ready-to-use, entry-level embedded software and

digital circuit development platform built around the smallest member of the Xilinx Zynq-7000

family that is the Z-7010.

The Z-7010 is based on the Xilinx: All Programmable System-on-Chip (AP SoC) architecture,

which tightly integrates:

• A dual-core ARM Cortex-A9 processor with

• Xilinx 7-series field programmable gate array (FPGA) logic.

When coupled with the rich set of multimedia and connectivity peripherals available on the ZyBO,

the Zynq Z-7010 can host a whole system design:

• on-board memories

• Video and audio I/O

• Dual-role USB

• Ethernet

• SD slot

• …

All these rich I/O features will gave our design with an up-and-ready solution with no additional

hardware needed. Additionally, six Pmod connectors are available to put any new design on an

easy growth path.

The ZyBO provides an ultra-low cost alternative to the ZedBoard for designers that do not require

the high-density I/O of the FMC connector, but still wish to leverage the massive processing power

and extensibility of the Zynq AP SoC architecture [6].

Page 20: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 20

Figure 6: ZyBO Zynq-7000 ARM/FPGA SoC Trainer Board (Ref [6])

These are some detailed technical features about our Trainer Board:

• 650MHz Dual-Core Cortex-A9 processor

• DDR3 memory controller with 8 DMA channels

• High-bandwidth peripheral controllers: 1G Ethernet, USB 2.0, SDIO

• Low-bandwidth peripheral controller: SPI, UART, CAN, I2C

• Reprogrammable logic equivalent to Artix-7 FPGA

• 4,400 logic slices, each with four 6-input LUTs and 8 flip-flops

• 240 KB of fast block RAM

• Two clock management tiles, each with a phase-locked loop (PLL) and mixed-mode clock

manager (MMCM)

• 80 DSP slices

• Internal clock speeds exceeding 450MHz

• On-chip analogue-to-digital converter (XADC)

• ZYNQ XC7Z010-1CLG400C

Page 21: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 21

• 512MB x32 DDR3 w/ 1050Mbps bandwidth

• Dual-role (Source/Sink) HDMI port

• 16-bits per pixel VGA source port

• Trimode (1Gbit/100Mbit/10Mbit) Ethernet PHY

• MicroSD slot (supports Linux file system)

• OTG USB 2.0 PHY (supports host and device)

• External EEPROM (programmed with 48-bit globally unique EUI-48/64™ compatible

identifier)

• Audio codec with headphone out, microphone and line in jacks

• 128Mb Serial Flash w/ QSPI interface

• On-board JTAG programming and UART to USB converter

• GPIO: 6 pushbuttons, 4 slide switches, 5 LEDs

• Six Pmod ports (1 processor-dedicated, 1 dual analogue/digital, 3 high-speed differential, 1

logic-dedicated).

Figure 7 and Table 5 provide a visual cross reference between logical description and the physical

devices implementing such function in the board, and then the rich set of multimedia and

connectivity peripherals available in the ZYBO may be clearly identified.

Figure 7: ZyBO Zynq-7000 ARM/FPGA SoC Trainer Board (Ref [7])

Page 22: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 22

Callout Component Description Callout Component Description

1 Power Switch 15 Processor Reset Pushbutton

2 Power Select Jumper and battery header 16 Logic configuration reset

Pushbutton

3 Shared UART/JTAG USB port 17 Audio Codec Connectors

4 MIO LED 18 Logic Configuration Done LED

5 MIO Pushbuttons (2) 19 Board Power Good LED

6 MIO Pmod 20 JTAG Port for optional external cable

7 USB OTG Connectors 21 Programming Mode Jumper

8 Logic LEDs (4) 22 Independent JTAG Mode Enable Jumper

9 Logic Slide switches (4) 23 PLL Bypass Jumper

10 USB OTG Host/Device Select Jumpers 24 VGA connector

11 Standard Pmod 25 microSD connector (Reverse side)

12 High-speed Pmods (3) 26 HDMI Sink/Source Connector

13 Logic Pushbuttons (4) 27 Ethernet RJ45 Connector

14 XADC Pmod 28 Power Jack

Table 5: ZyBO Device Diagram

Once all the peripherals are identified, we will describe the functionality, and how they should be

used to carry out our project, this will be divided and described into the following 5 subchapters.

Page 23: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 23

POWER SUPPLY

The ZYBO can be powered from two different sources: a) the Digilent USB-JTAG-UART port

(J11), or b) from an external power supply. Jumper JP7 (near the power switch) determines which

power source is used. In our project the USB-JTAG-UART was selected since a standard USB 2.0

port can deliver up to a maximum 0.5A of current according to USB 2.0 specification. This

provides enough power for our design, USB ports are widely available, and in addition, this will

avoid incorporating a specific external PSU.

Figure 8: Schematic Power Supply (Ref [7])

ZYNQ CONFIGURATION

The Zynq Boot Image is created using Vivado and Xilinx Software Development Kit (Xilinx SDK,

which we will explain in more detail in later chapters). The ZYBO supports three different boot

modes: microSD, QSPI Flash, and JTAG. The boot mode is selected using the Mode jumper

(JP5), which affects the state of the Zynq configuration pins after power-on. Figure 9 shows how

the Zynq configuration pins are connected on the ZYBO.

Figure 9: Schematic boot modes (Ref [7])

Page 24: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 24

When placed in JTAG boot mode, the processor will wait until a host computer using the Xilinx

tools loads software. After software has been loaded, it is possible to either let the software begin

executing, or step through it line by line using Xilinx SDK [7].

ETHERNET PHY

To establish the communication between the ZyBO and our Computer we have used the Ethernet

connection. A short explanation is provided below to illustrate how it works: the ZYBO uses a

Realtek RTL8211E-VL PHY to implement a 10/100/1000 Ethernet port for network connection.

The PHY is clocked from the same 50 MHz oscillator (I2C) that clocks the PS too. The parasitic

capacitance of the two loads is low enough to be driven from a single source.

Figure 10: Schematic Ethernet PHY (Ref [7])

PMOD PORTS

This subchapter will be explained in more detail than the previous ones, since it is essential to

understand how these peripherals work for the development of our project.

Pmod ports are 2×6, right-angle, 100-mil spaced female connectors that mate with standard 2×6

pin headers. Each 12-pin Pmod port provides two 3.3V VCC signals (pins 6 and 12), two Ground

signals (pins 5 and 11), and eight logic signals, as shown in Figure 11. The VCC and Ground pins

can deliver up to 1A of current.

Figure 11: PMOD Diagram (Ref [7])

Page 25: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 25

The ZYBO has six Pmod ports, some of which behave differently than others. Each Pmod port

falls into one of four categories:

• Standard

• MIO connected

• XADC or

• High-Speed.

Figure 12 provide layout and location of the Pmod ports:

Figure 12: PMOD peripherals Diagram (Ref [7])

Now I will explain the different categories to choose the best option for our goals.

1. Standard PMOD

The standard Pmod port is connected to the PL of the Zynq via a 200 Ohms series resistor. The

series resistors prevent short circuits that can occur if the user accidently drives a signal that is

supposed to be used as an input. If the Pmod being used does not require high-speed access,

then the standard Pmod port should be used to help prevent damage to the devices.

Page 26: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 26

2. MIO Pmod

The MIO Pmod port is connected to the MIO bus in the PS of the Zynq via a 200 Ohms series

resistor. The GPIO, UART, I2C, and SPI cores can be used to drive devices connected to this

Pmod. UART or I2C devices connected to this Pmod may require some of the pins to be swapped

around externally, using individual wires between the ZYBO and the Pmod.

3. Dual Analog/Digital Pmod (XADC Pmod)

The on-board Pmod expansion connector labelled “JA” is wired to the auxiliary analogue input

pins of the PL. Depending on the configuration, this connector can be used to input differential

analogue signals to the analogue-to-digital converter inside the Zynq (XADC). Any or all pairs in

the connector can be configured as either analogue input or digital input-output.

4. High-Speed Pmod

The High-speed Pmods use the standard Pmod port, but have their data signals routed as

impedance matched differential pairs for maximum switching speeds. They have pads for loading

resistors that can be used for additional protection; the ZYBO is fitted by default with these pads

with 0-Ohm shunts. The signals are paired to the adjacent signals in the same row: pins 1 and 2,

pins 3 and 4, pins 7 and 8, and pins 9 and 10. Since the High-Speed Pmods have 0-ohm shunts

instead of protection resistors, the operator must take precaution to ensure that they do not cause

any shorts.

Digilent produces a large collection of Pmod accessory boards that can be attached to the Pmod

expansion connectors to add ready-made functions like A/D’s, D/A’s, Motor Drivers, Sensors, and

other functions. In the following chapters, we will study the advantages and disadvantages of

using Commercial of the Shelf (COTS) Pmod accessories or own made accessories.

Page 27: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 27

DESCRIPTION OF THE PROPOSED SOLUTION

In this chapter, we will see two methods to carry out the project. Both will be explained and then

evaluating, the advantages and inconveniences of both, the decision will be made how to do it.

The first method will consist of build up the sensors from the beginning. We will make the

necessary calculations, the necessary designs and the necessary material will be shown. On the

other hand, the second method will consist of the explanation of the sensors developed by Xilinx

specifically for our development board. We will investigate the different components that they use

and the programming of these devices.

OWN MADE SENSOR

In this sub-chapter, we will explain the method performed manually from the beginning. This sub-

chapter is divided into three different chapters, one per each sensor (Temperature, Lighting, and

Humidity. Chapter will includes mathematical analysis, components required and schematics.

TEMPERATURE SENSOR

In the design of the conditioning circuit of the RTD, two stages can be distinguished. First, we

have chosen to make a current source to excite the RTD. This current source will supply 1mA and

the RTD will be exposed to temperatures between -10°C and 50°C. The formula used to calculate

which resistance value corresponds to the chosen temperature is as follows:

R = R! ∙ 1+ α ∙ ∆T ,where R! = 100R

These values comes from the usage of a PT1000 sensor. Subsequent to having the value of the

resistance for each value of the temperature we will only have to multiply the current that will

supply our current source (1mA) by the value of the resistance, and thus, we will obtain the

voltage that will be in terminals of the RTD. We can observe below the variation of the voltage

obtained in the RTD:

Page 28: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 28

Temperature (°C) RTD Value (𝛀) VRTD(mV)

-10 96.15 96.15

0 100.00 100.00

10 103.85 103.85

20 107.70 107.70

30 111.55 111.55

40 115.40 115.40

50 119.25 119.25

Table 6: Value of RTD and VRTD in function of Temperature

The schematic for the source of current (current generator) is detailed below.

Figure 13: Source of current

To obtain the reference voltage from which we obtain the current we have chosen to use an

LM385 [9] which gives us a fixed voltage of 1.24V. We have opted for this component due to the

problems obtained in previous projects to get the desired voltage from the Zener diodes. This is

because it is difficult to make the diode work in its Zener zone and to provide a stable voltage at

its output. In order to be able to polarize said LM385 we have placed a resistance of 221KΩ to

make sure that we reach the 13μA that marks the manufacturer as the minimum current of

operation. As we have already explained, the LM385 will provide 1.24V, and then by virtual short

Page 29: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 29

circuit we will have the same voltage in the positive pin as in the negative of our Operational

amplifier. As we want our RTD to flow 1mA, we have placed a resistance of 1.24kΩ to get this

current. Finally, to know the voltage that we will have in terminals of our RTD, it will only be

necessary to multiply the current (1mA) by the value of the RTD.

Secondly, I have designed a signal conditioner provided by our RTD. For its implementation, I

have chosen to use an amplifier of instrumentation. The first thing I did for its design was to

calculate our gain necessary to obtain at the output of the conditioner a voltage that covered the

entire range of the ADC of our development board that is 1.8 V [7].

G =ΔV!ΔV!

=1.8V− 0V

119.25mV− 96.15mV = 77.92 V/V

Depending on this gain and the input voltage in the amplifier, we obtain the next range of voltages at the output.

V!"#$%" = V!"# ∙ G

VRTD (mV) VSALIDA (V)

96.15 7.49

100.00 7.79

103.85 8.09

107.70 8.39

111.55 8.69

115.40 8.99

119.25 9.29

Table 7: Value of VRTD in function of the output

As we see, the offset that we should correct would be 7.49 V, which is too large so we have

chosen to perform the amplification in two stages. A first stage builds around the nstrumentation

amplifier and a second stage with a non-inverting amplifier. The first stage will have a gain of

11V/V and we will use for this an INA128, according to the information of the manufacturer the

formula is the following [8]:

Page 30: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 30

𝐺 = 1+50𝑘Ω𝑅!

→ 𝑅! = 5𝑘Ω

Figure 14: Instrumentation Amplifier

The next thing to analyse is the offset to be corrected for the new calculated gain. The formula

used is the same as above, but now, instead of a gain of 77.92V/V, this stage will have a gain of

11V/V.

VRTD (mV) VSALIDA (V)

96.15 1.057

100.00 1.100

103.85 1.142

107.70 1.185

111.55 1.227

115.40 1.269

119.25 1.311

Table 8: Final value of VRTD in function of the output

The new offset to be corrected will be 1.057 V and for this we have used a voltage divider

attached to a voltage follower (the voltage follower, we implemented it for impedance matching,

Page 31: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 31

and thus to reduce power losses by reflection since the load and that the maximum transfer of

tension takes place). For the implementation of the voltage divider, we have reused a polarized

LM385.

However, the difference is that in this circuit, we have a voltage divider to get the 1.057V that we

need as a reference voltage, and therefore we have another branch that will also flow the current.

Therefore, we will go almost all the current for the branch that is in parallel with the LM385 and not

get the desired 1.24V. As a solution, I will reduce the value of the resistor in charge of supplying

the current to the two branches, and raise the value of the resistors of the voltage divider. With a

resistance of 1MΩ and another of 173kΩ is enough to obtain 1.24V of the LM385.

Figure 15: Reference voltage

Finally, I have the second stage of amplification that will have a gain of 7.08 V/V to get the total gain of 77.92 V/V.

𝐺!"!#$ = 𝐺!"#$%&'("$)$!*" !"#$%&%'( ∙ 𝐺!"! !"#$%&'"(

𝐺!"! !"#$%&'"( = 1+𝑅!𝑅!

𝐺!"! !"#$%&'"( = 7.08 → 𝑅! = 25𝑘Ω2R! = 4.1𝑘Ω

Page 32: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 32

Figure 16: NO-INVERTING

Components needed for the implementation of the temperature sensor:

• 3 x Operational Amplifier (OP07) • 2 x Adjustable Micropower Voltage References (LM385) • 1 x Instrumentation Amplifier (INA 128) • Resistors of different value (2 x 221KΩ), 1.24KΩ, 1.24K2 x 221kion Amplifier (I • 8 x Ceramic Decoupling Capacitors (100nF)

Page 33: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 33

LIGHTING SENSOR

For the signal conditioner of the LDR we have chosen to use a voltage divider accompanied by a

voltage follower to adapt impedances. The value of the resistance that accompanies the LDR in

the voltage divider we have calculated 500kΩ so that our board cannot reach more than 2.5V.

The resistance variation of the LDR is between 30kΩ and 450kΩ. Below we can see the diagram

of the conditioner.

Figure 17: LDR Schematic

Components needed for the implementation of the lighting sensor:

• 1 x LDR (Light-Dependent Resistor) • 1 x Resistor (500KΩ) • 1 x Operational Amplifier (OP07) • 2 x Ceramic decoupling capacitors (100nF)

Page 34: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 34

HUMIDITY SENSOR

In order to implement the humidity sensor HIH-6120-021-001, it was first necessary to document the sensor and the communication protocol (I2C) which is a serial connection via a communications bus.

On one hand, the sensor specifications were consulted, since the code needs to interpret the received bits to obtain the humidity in percentage. For this, the datasheet was observed and the following formulas were found [10]:

𝐻𝑢𝑚𝑖𝑑𝑖𝑡𝑦 % =𝐻𝑢𝑚𝑖𝑑𝑖𝑡𝑦_14_𝑏𝑖𝑡_𝐴𝐷𝐶_𝑜𝑢𝑡𝑝𝑢𝑡

2!" − 2 𝑥100

On the other hand, the documentation provided on the I2C module was used to see the format of

each of the packets sent and thus to take only those that are necessary. Figure 15 shows this

format (For our Project only the bits generated by Master, Data Byte 1, and Data Byte 2 make

sense, the other ones are for temperature, which, we obtain as I explained before):

Figure 18: Format of each packet sent by the humidity sensor (Ref [10])

The hardware connection of the sensor and the identification of its pins were also obtained from the datasheet as shown in Figure 19:

Figure 19: Electric schematic of Humidity sensor (Ref [10])

Components needed for the implementation of the humidity sensor:

• Humidity sensor (HIH-6120-021-001) • 2 x Resistors (2.2kΩ) • 1 x capacitor (0.22 𝜇F)

Page 35: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 35

PMOD SENSOR

In this this sub-chapter, as explained above, We will explain the method performed with the

PMODS. As before, It will be divided into different chapters, each chapter will address on type of

sensor: Temperature, Lighting and Humidity. Each chapters will describes the different

components used to build-up the PMOD, the different specifications and how it works.

TEMPERATURE SENSOR

The Pmod TMP3 is an ambient temperature sensor built around Microchip device TCN75A [12].

Users may configure the output through I2C to up to 12 bits of resolution.

The Microchip TCN75A is a digital temperature sensor capable of reading temperatures from -

40°C to +125°C. Temperature data is measured from an integrated temperature sensor and

converted to digital word with a user selectable 9 to 12-bit Sigma Delta Analog to Digital

Converter.

Some features of the Pmod TMP3 are:

• Uses the Microchip TCN75A • Ambient temperature sensor with up to 12-bit resolution • Typical accuracy of ±1 °C • Programmable temperature alert pin • Multiple jumpers for eight selectable addresses • 30ms to 240ms typical conversion times • Small PCB size for flexible designs 1.0“ × 0.8” (2.54 cm × 2.0 cm)

2×4-pin connector with I2C interface

Figure 20: Pmod TMP3 top view (Ref [11]) Figure 21: Pmod TMP3 general view (Ref [11])

About how to connect that device in our development board here we can see a simple schematic about how to do it:

Page 36: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 36

Figure 22: Sketch about how to connect our sensor to the development board (Ref [13])

The electrical schematic of the Pmod TMP3 is shown below to understand better the connections:

Figure 23: Electrical schematic of our temperature sensor (Ref [13])

Page 37: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 37

LIGHTING SENSOR

The Digilent Pmod ALS performs a light-to-digital sensing through a single ambient light sensor.

Digilent Engineers designed this Pmod around Texas Instrument's ADC081S021 [14] analogue-

to-digital converter and Vishay Semiconductor's TEMT6000X01 [15].

The Texas Instrument’s ADC081S021 device is a low-power, single- channel CMOS 8-bit

analogue-to-digital converter with a high-speed serial interface. Unlike the conventional practice of

specifying performance at a single sample rate only, the ADC081S021 is fully specified over a

sample rate range of 50 ksps to 200 ksps. Below is shown the block diagram:

Figure 24: Block diagram ADC081S02 (Ref [14])

About the TEMT6000X01 ambient light sensor is a silicon NPN epitaxial planar phototransistor in

a miniature transparent 1206 package for surface mounting. It is sensitive to visible light much like

the human eye and has peak sensitivity at 570 nm.

Some features of the Pmod ALS are:

• Simple ambient light sensor • Convert light to digital data with 8-bit resolution • Small PCB size for flexible designs 0.8 in × 0.8 in (2.0 cm × 2.0 cm) • 6-pin Pmod connector with SPI interface

Page 38: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 38

Figure 25: Pmod ALS top view (Ref [11]) Figure 26: Pmod ALS general view (Ref [11])

About how to connect that device in our development board here we can see a simple schematic about how to do it:

Figure 27: Sketch about how to connect our sensor to the development board (Ref [16])

The electrical schematic of the Pmod ALS is shown below:

Figure 28: Electrical schematic of our lighting sensor (Ref [16])

Page 39: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 39

HUMIDITY SENSOR

The Pmod HYGRO is a relative humidity sensor with integrated temperature sensor for highly

accurate measurements at low power. With the TI HDC1080 [17], you can determine the relative

humidity of the environment with up to 14 bits of resolution. The Pmod HYGRO is designed to

digitally report the relative humidity and ambient temperature upon request by the host board. Up

to 14 bits of resolution for each sensor may be collected by allowing for longer conversion times. A

resistive heating element can be enabled to test the sensor or to drive off condensation that

accumulates on the sensor after being consistently exposed to high humidity conditions [18].

About the HDC1080 is a digital humidity sensor with integrated temperature sensor that provides

excellent measurement accuracy at very low power. The HDC1080 operates over a wide supply

range, and is a low cost, low power alternative to competitive solution in a wide range of common

applications. The humidity and temperature sensors are factory calibrated. The block diagram is

shown below:

Figure 29: Block diagram (Ref [17])

Some features of the Pmod HYGRO are:

• Relative Humidity Accuracy ±2% • Temperature Sensor Accuracy ±0.2 °C • Good stability at high humidity • 14-bit measurement resolution • Internal resistive heating element • 6-pin Pmod connector with I²C interface

Page 40: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 40

Figure 30: Pmod ALS top view (Ref [18]) Figure 31: Pmod ALS general view (Ref [18])

About how to connect that device in our development board here we can see a simple schematic about how to do it:

Figure 32: Sketch about how to connect our sensor to the development board (Ref [18])

The electrical schematic of the Pmod HYGRO is shown below:

Figure 33: Electrical schematic of our humidity sensor (Ref [18])

Page 41: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 41

METHOD CHOSEN

Once both methods are evaluated (own made method or using PMOD), we have to choose in

which way we are going to carry out our project.

On one hand the first method requires production techniques, since we must work with layouts,

welding PCBs, assembly and integration trough Acceptance Test Procedure.

On the other hand the PMOD method provides significant time reduction since the design is

already available allowing focusing mainly in the integration with SW development, in addition

knowledge and learning about components used is a plus.

The final decision was assessed and taken into account recommendation of our supervisors we

decide to implement mixed solution using both techniques.

Temperature and Lightning sensors will be implemented using COTS Pmod solution provided by

Digilent, whereas for the humidity sensor, we choose to realize it from the beginning, using a

PMOD proto-board to facilitate the interconnection of our circuit to the development board.

The final system is therefore built around:

• Two PMOD sensors that will integrate our system of temperature and luminosity

• One PMOD proto-board embedding our design for the humidity sensor, interconnecting our

circuit and the development board.

The combination of these techniques provide a broad knowledge of the Vivado and SDK

development tools for programming the FPGA, as well as programming both the PMOD and our

own design.

The following chapters explain as a tutorial how to carry out both configurations.

Page 42: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 42

SOFTWARE

This chapter will explain all the steps needed to program the FPGA and our sensors. For this it

has been divided into two sub-chapters, which in turn are also divided so that everything is well

outlined and clear.

Firstly in the section VIVADO will explain the functionalities and some characteristics of this tool.

Later it will be explained as a tutorial how to configure both, the main development board, ZYBO,

and then the same way to configure the different sensors.

Finally in the section SDK will be shown the different parts of the detailed code to program the

sensors and obtain the corresponding values necessary for our application to work.

VIVADO

Vivado Design Suite is software produced by Xilinx for synthesis and analysis of HDL designs,

superseding Xilinx ISE with additional features for system on a chip development and high-level

synthesis. The Vivado System Edition includes an in-built logic simulator. Vivado also introduces

high-level synthesis, with a toolchain that converts C code into programmable logic.

Vivado enables developers to “compile” their designs, perform timing analysis, examine RTL

diagrams, simulate a design's reaction to different stimulations and configure the target device

with the programmer. Vivado is a design environment for FPGA products from Xilinx, and is

tightly-coupled to the architecture of such chips, and cannot be used with FPGA products from

other sellers [19].

ZYBO

In this chapter I will explain as a tutorial how to configure our ZYBO step by step with a brief

definition. When you open the program, this will be the first window that we will find. We have

different options like opening projects already created, opening already created examples ... For

our functionality, we will click on the Create a new Project window.

Page 43: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 43

Figure 34: Screenshot New Project

In this second window we will give name and location to our project.

Figure 35: Screenshot name and location

In this window we will choose the Project type. In our case, RTL Project (RTL sources can be

used to create a project for development and analysis, synthesis, implementation, and bit file

Page 44: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 44

creation) that allow design in IP integrator, generate our own IP, run RTL analysis, fundamental to

implement our sensors.

Figure 36: Screenshot Project type

In this window we have to choose the board on which we want to make our project. In our case

the ZyBO, but in this section you can find a lot of boards of the Xilinx family.

Figure 37: Screenshot board type

Page 45: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 45

Here we can see our specifications chosen. Click on finish and your device will be ready to start

with the configuration.

Figure 38: Screenshot Project summary

The first step once our device is indicated is to create a block design. Clicking on the create block

tab will open a new window where we will have to indicate the name of our new block.

Figure 39: Screenshot create block design

Page 46: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 46

Once the block design is created, we will now have to add the IPs we need to develop our

objective. This chapter will only address the implementation of our board, the ZYBO. To do this we

click on the IP add button of the IP catalogue, and select the ZYNQ7 Processing System option.

Figure 40: Screenshot chosen our IP board

Once the ZYNQ7 Processing System is selected, double click on the IP to add a clock to our

system, since we will need one to synchronize the temperature sensor and another to synchronize

our lighting sensor. To do this we will put the second clock at a frequency of 4MHz.

Figure 41: Screenshot add clock

Page 47: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 47

Once all the previous steps are done, our device is ready to add all the sensors we want, in our

case three, temperature, humidity and lighting.

Page 48: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 48

PMODS

This subchapter, explain as a tutorial, how to add the different sensors to our block diagram. For

this we will show step by step all the operations to be carried out. Finally, it will be shown that

once all the blocks have been added the operations to be performed to launch our application to

the SDK platform, where the sensors will be coded in C code.

First of all we have to add an IP library to have all the PMOD available that Xilinx offers us. To do

this we will download the internet library of PMOD from Digilent's own page [20]. To carry out this

step we have to click on Project settings, then click on IP, add the library that we already

downloaded previously click on Apply and finally on OK.

Figure 42: Screenshot add library

Now once loaded the library with all the IP of the PMOD, we have to click on the board tab in the

block diagram. As you can see in the cap below, connectors of our board are tagged JA, JB, JC,

JD, JE, and JF. We must select the one we want for each sensor and this will assign a sensor to

each port.

Page 49: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 49

Figure 43: Screenshot select port

Once we have selected the Connector, we will skip a popup window with all available PMODs to connect to the selected connector.

Figure 44: Screenshot select PMOD for each port

Once the procedure is seen, it will be necessary to do the same with the 3 sensors, selecting for

each one a connector and the different PMODs. In the figure below, you can see the 3 PMODS,

two of them created by DIGILENTIC, and one of them created by us. It is based on the PMOD

Page 50: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 50

TMP3 that is already done, since seeing our humidity sensor and temperature sensor have the

same inputs and outputs, as well as the same communication protocol, I2C. Then clicking on Run

Block Automation and Run Connection Automation, which will adds the necessary blocks and

routing path to interconnect the sensors with our main board. The block design will be as shown

the figure 45 and 46:

Figure 45: Screenshot with all the PMOD

Figure 46: Screenshot auto-routing

Page 51: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 51

As I explained above, we added a clock for the lighting sensor, since in our board only one is active by default, and we need two, one to synchronize the temperature sensor and the other for the lighting. These two ports will have to be joined manually as shown below:

Figure 47: Screenshot Clock1

Once this process is finished, click on the valid design button in the left sidebar, and if all is

correct, a message should appear validating the design. With all the connections already made, it

only remains to generate the bit-stream and launch the SDK. To do this, just click on the button,

generate bit-stream. This process may take some time, but once it is finished you will be ready to

export the hardware and launch the SDK software.

Page 52: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 52

Figure 48: Screenshot final step

Page 53: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 53

SDK

In this chapter, I will show how to create a project based on the configuration already made in

VIVADO. Later also the main code will be displayed to obtain the temperature, humidity and

luminosity that will later be seen in a GUI already implemented by another colleague.

I will show a brief tutorial about how to create a project .c where I will later incorporate the code

implemented to obtain the different measurements coming from our sensors.

The first window that we will find once the SDK application launched from VIVADO will be the one

shown in the figure below. In it you can find all our development board already configured as we

had previously ordered in VIVADO.

Figure 49: First window of SDK

The next steps will be to add a new project of type .C to the previously launched project. For this

the steps that have to be done are the following. As shown in Figure 50, we will create a Hello

World project, then delete the generated code automatically and implement our own code to

obtain the desired values. Once this step is done, we will have to load the program on our

development board. To do so, click on the icon shown in Figure 51. Our development board will

indicate us by LED (PGOOD LD11) that our program is ready to use, and will only need to compile

the program, run it and open the command console to see that there is a connection between our

environment and the board.

Page 54: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 54

Figure 50: Hello world project Figure 51: Program FPGA

Finally show only the code of the routines for obtaining the temperature, luminosity and humidity.

The rest of the code will be included in the digital format.

Figure 52: Code of how to obtain temperature from PMODTMP3

Page 55: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 55

Figure 53: Code of how to obtain lighting from PMODALS

Regarding the code to obtain the humidity, we will not have to use registers of the PMOD since as

explained in previous chapters, in this case we have made own made. I have been used are the

read and write functions, since our humidity system works very similar to the temperature sensor,

then much of the code has been reused. In the capture of the code used only the part where we

initialize the sensor, we write in it, and read the data of the humidity.

Figure 54: Code of how to obtain humidity from our Honeywell sensor

Page 56: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 56

CONCLUSION AND FUTURE IMPROVEMENTS

The aim of this project is to familiarize itself with the tools of the XILINX family, to learn how to

design devices of medium-high complexity, and to know how to use commercial devices already

designed, understanding their characteristics, their functions and how to handle all of them

together. In addition, another of the main objectives is to be able to provide a guide / point of

support for future students in the field of FPGAs programming, as well as the implementation of

measurement systems. The final tool allows knowing the temperature, humidity and luminosity of

a room, which motivates the student since it is a tangible thing, applicable to real life Far from

some projects that are purely virtual and the result cannot be checked final.

As already seen in the section of the State of Art there are many devices that currently have

similar functionality and even superior, but this approach allows both the owner and the user to

handle in a simple way and with a deeper understanding how to manage control comercial

sensor, since once you join this project with the user interface developed around the same

framework, just by clicking a button you will get the desired measures. The user can also access

the code and modify it to make improvements (Filtering, statistics, recording, etc…) or change,

modify and or adds new parameters.

All the students who pass through an engineering (more specifically in my case, electronic

communications), are asked to develop the project within the field of their specific technologies

and or related background (in my case Telecommunications Engineering), requirement imposed

to project is that the project consider application of the Knowledge and skills acquired during the

the teachings of the Degree. In addition, the project must have; a) a design component side, b)

must be done under realistic conditions and limitations.

In this case all these objectives are fulfilled, since the project has the design component (three

possibilities are studied and analysed but only one is implemented, the design component is

adapted with commercial sensors applying realistics conditions and limitations of the electronic

sector.

The designed application works correctly, acquisition, monitoring and display of the

enviroenmental conditions (temperature, humidity and brightness) works fine. In addition the

project was also addressed as a “didactic” platform for future students, working as an enabling

tool to faciliate future development and or new application (i.e: IoT, Distributed System, Wi-Fi App,

etc…). So far we have no real feedabck since no deployment has been launched and therefore

Page 57: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 57

we have no feedabck from others potential user (AGH Students), I am confident that the tool will

be profitable and hope that he will be enhanced by future AGH engineers, since it is expected that

this part will be just the “core” and the HW performance are pretty good to adapt to existing and

future technology.

Regarding future improvements, we will mention several possible improvements that would give

our system a greater complexity and a more complete operation.

There is the possibility of implementing other types of sensors that will automatically govern any

environment, the most interesting part would be to provide our system with different sensors;

managing them remotely. This can be done either with IoT technology using any smartphone

acting as a controller; this will provide a set of an infinite possibility only limited by the idea and

new challenge of this interconnected world.

Page 58: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 58

BUDGET

In this section we will disaggregate the budget of our project, from the point of view that a junior

engineer would have to do without much experience in this area. For this the budget will be

broken down into 3 groups:

• Workforce • Hardware material • Software License

The value of the costs associated with the purchase of the material necessary for the

implementation of the system present in this budget coincides with the retail price given by each

one of the manufacturers. Similarly, the cost value of the various software licenses specified in

this budget matches the value of sales price to students, as it is the type of license we have used.

Type of workforce Quantity [Hours] Unit cost [€/h] Total cost [€]

Engineer 240 30,0€ 7200€

Supervision 20 38,0€ 760€

Subtotal 7960€

Table 9: Cost of workforce

ITEM Concept Quantity Unit cost [€/u] Total cost [€]

ZYBO Development board 1 143.60€ 143.60€

PMODTMP3 Temperature sensor 1 9.00€ 9.00€

PMODALS Lighting sensor 1 6.30€ 6.30€

PMODBB Pmod Board 1 9.00€ 9.00€

HIH7120-021-001 Humidity sensor 3* 9.10€ 27.30€

Resistors Humidity sensor 100** 0.0072€ 7.20€

Capacitors Humidity sensor 10** 0.11247€ 1.13€

Subtotal 203.53€

Table 10: Cost of materials

Page 59: PROYECTO FIN DE GRADO - Archivo Digital UPMoa.upm.es/52424/1/TFG_ANDRES_MOLINA_GARGANTILLA.pdf · EEPROM Electrically Erasable Programmable Read Only Memory ETSIST Escuela Técnica

AGH – University of Science and Technology

ARM-FPGA ARCHITECTURE Sensors allowing room data monitoring Page 59

Software license Type Quantity Unit cost [€/u] Total cost [€]

VIVADO/SDK Student 1 0 0

Subtotal 0

Table 11: Cost of software licenses

Type of cost Total cost [€]

Workforce 7960.00€

Hardware material 203.53€

Software license 0€

TOTAL 8163.53€

Table 12: Total cost