Proceedings of the 13th IFAC Conference on Proceedings the IFAC Conference on Programmable Systems Proceedings of of Devices the 13th 13thand IFACEmbedded Conference on Proceedings of the 13th IFAC Conference on Programmable Devices and Embedded Systems May 13-15, 2015. Cracow, Poland Available online at www.sciencedirect.com Programmable Devices and Embedded Systems Programmable Devices and Embedded Systems May 13-15, 2015. Cracow, Poland May May 13-15, 13-15, 2015. 2015. Cracow, Cracow, Poland Poland
ScienceDirect
IFAC-PapersOnLine 48-4 (2015) 101–106
Embedded Embedded Embedded presentation presentation presentation ∗
Telemetry System with data Telemetry System with data Telemetry System withlogging data using HTTP and data using HTTP and data logging using HTTP and data logging ∗∗ ∗∗∗ ∗∗∗∗
S. Misik ∗ Z. Bradac ∗∗ J. Arm ∗∗∗ L. Stastny ∗∗∗∗ ∗∗ J. Arm ∗∗∗ L. Stastny ∗∗∗∗ S. Misik ∗∗ Z. Bradac ∗∗ S. S. Misik Misik Z. Z. Bradac Bradac J. J. Arm Arm ∗∗∗ L. L. Stastny Stastny ∗∗∗∗ ∗ Department of Control and Instrumentation, Faculty of Electrical ∗ ∗ Department of Control and Instrumentation, Faculty of Electrical ∗Engineering Department of Control and Instrumentation, Faculty of and Communication, Brno University of Technology, Department and of Control and Instrumentation, Faculty of Electrical Electrical Engineering Communication, Brno University of Technology, Engineering and Communication, Brno University of Technology, Brno, Czech Republic (e-mail:
[email protected]) Engineering and Communication, Brno University of Technology, ∗∗ Brno, CzechofRepublic
[email protected]) Brno, (e-mail:
[email protected]) Department Control (e-mail: and Instrumentation, Faculty of Electrical Brno, Czech Czech Republic Republic (e-mail:
[email protected]) ∗∗ ∗∗ Department of Control and Instrumentation, Faculty of Electrical ∗∗Engineering Department of Control and Instrumentation, Faculty of and Communication, Brno University of Technology, Department of Control and Instrumentation, Faculty of Electrical Electrical Engineering and Communication, Brno University of Technology, Engineering and Communication, Brno University of Technology, Brno, Czech Republic (e-mail:
[email protected]) Engineering and Communication, Brno University of Technology, ∗∗∗ Brno, Czech Republic
[email protected]) Brno, Republic (e-mail:
[email protected]) Department of Control and(e-mail: Instrumentation, Faculty of Electrical Brno, Czech Czech Republic (e-mail:
[email protected]) ∗∗∗ ∗∗∗ Department of Control and Instrumentation, Faculty of Electrical ∗∗∗ Departmentand of Control Control and Instrumentation, Instrumentation, Faculty of Electrical Electrical Engineering Communication, Brno University of Technology, Department of and Faculty of Engineering and Communication, Brno University of Technology, Engineering and Communication, Brno University of Technology, Brno, Czech Republic (e-mail:
[email protected]) Engineering and Communication, Brno University of Technology, ∗∗∗∗ Brno, CzechofRepublic
[email protected]) Brno, (e-mail:
[email protected]) Department Control (e-mail: and Instrumentation, Faculty of Electrical Brno, Czech Czech Republic Republic (e-mail:
[email protected]) ∗∗∗∗ ∗∗∗∗ Department of Control and Instrumentation, Faculty of Electrical ∗∗∗∗ Department of Control and Instrumentation, Faculty of Engineering and Communication, Brno University of Technology, Department of Communication, Control and Instrumentation, Faculty of Electrical Electrical Engineering Brno Engineering and Communication, Brno University University of of Technology, Technology, Brno, Czech and Republic (e-mail:
[email protected]) Engineering and Communication, Brno University of Technology, Brno, Czech Republic (e-mail:
[email protected]) Brno, Brno, Czech Czech Republic Republic (e-mail: (e-mail:
[email protected])
[email protected]) Abstract: Traditional way of communication on the Internet is human (or human-made Abstract: way of communication on the Internet is humancontent (or human-made Abstract: Traditional way communication on is (or content) to Traditional another human. Another frequent alternative is device-made to human Abstract: Traditional way of of communication on the the Internet Internet is human humancontent (or human-made human-made content) to another human. Another frequent alternative is device-made to human content) to another human. Another frequent alternative is device-made content to or another device, which is often referred to as The Internet of Things. This paper focuses on content) todevice, another human. Another frequent alternative isofdevice-made content to human human or another which is often referred to as The Internet Things. This paper focuses on or another device, which is often referred to as The Internet of Things. This paper focuses on the whole design of embedded telemetry device based on microcontroller system, which uses or another device,ofwhich is oftentelemetry referred device to as The Internet of Things. This paper which focusesuses on the whole design embedded based on microcontroller system, the whole whole design design of Protocol embeddedfortelemetry telemetry device based on on microcontroller microcontroller system, which uses Hypertext Transfer remote data presentation. Proposed solution alsowhich allowsuses for the of embedded device based system, Hypertext Transfer Protocol for remote data presentation. Proposed solution also allows for Hypertext Transfer Protocol for remote data Proposed solution also allows for data logging and processing. solution proposed this paper equipped Hypertext Transfer Protocol For for added remotereliability, data presentation. presentation. Proposedin solution alsois allows for data logging and processing. For added reliability, solution proposed in this paper is equipped data logging and processing. For added reliability, solution proposed in this paper is equipped with uninterrupted power supply module. This solution can also be used as main platform for data logging and processing. For added reliability, solution proposed in this paper is equipped with uninterrupted power supply module. This solution can also be used as main platform for with uninterrupted power supply module. This solution can also be used as main platform developing Internet of Things devices. with uninterrupted power supply module. This solution can also be used as main platform for for developing Internet of Things devices. developing Internet Internet of of Things Things devices. devices. developing © 2015, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Keywords: Telemetry, Embedded systems, Data transmission, Data logging, Communication Keywords: Microprocessor Telemetry, Embedded Embedded systems, Data Data transmission, Data logging, Communication Keywords: Telemetry, systems, transmission, Data logging, Communication protocols, chips, Operating systems (computers), Data acquisition, Ethernet Keywords: Telemetry, Embedded systems, Data transmission, Data logging, Communication protocols, Microprocessor chips, Operating systems (computers), Data acquisition, Ethernet protocols, Microprocessor chips, Operating systems (computers), Data acquisition, Ethernet networks protocols, Microprocessor chips, Operating systems (computers), Data acquisition, Ethernet networks networks networks 1. INTRODUCTION interface Ethernet can establish connection between net1. INTRODUCTION INTRODUCTION interface Ethernet can establish connection between net1. interface establish connection between networks andEthernet network can nodes, and hence carry the embedded 1. INTRODUCTION interface Ethernet can establish connection between networks and network nodes, and hence carry the embedded and network nodes, and hence embedded systems forward a brand new era, thecarry era ofthe the Internet In industrial automatic control systems, it is often neces- works works and network nodes, and hence carry the embedded systems forward brand new era, era, the era era of the the Internet In industrial industrial automatic controlfrom systems, it is is often neces- systems forward brand new In control systems, it necesThings. Guo etaaa al. (2013). sary to obtainautomatic measurements inaccessible or distant systems forward brand new era, the the era of of the Internet Internet In industrial automatic controlfrom systems, it is often often neces- of of Things. Things. Guo et et al. al. (2013). sary to For obtain measurements inaccessible or distant distant of Guo (2013). sary to obtain measurements from inaccessible or places. this purpose are telemetry devices being used. of Things. Guo et al. (2013). sary to obtain measurements from inaccessible or distant There are some important issues to address, while develplaces. For For this thisterm purpose are telemetry telemetry devices being used. places. purpose are used. Although telemetry is oftendevices used being to refer to There are some important issues to address, while develplaces. Forthe thisterm purpose are telemetry devices being used. There are issues to while oping embedded system with ethernet connectivity. These Although the telemetry is often used to refer to There are some some important important issues to address, address, while develdevelAlthough the term telemetry is often used to refer to wireless readings transfer mechanisms, it also encompasses oping embedded embedded system with with ethernet connectivity. These Although the term telemetry is often used to refer to oping system ethernet connectivity. These include system architecture, selection of microcontroller wireless readings transfer mechanisms, it also encompasses oping embedded system with ethernet connectivity. These wireless readings it also encompasses data transfer overtransfer media mechanisms, such as a computer network or include system architecture, selection of microcontroller wireless readings transfer mechanisms, it also encompasses include system architecture, selection of microcontroller and other important hardware parts, selection of operating data transfer transfer over and media such (1988), as aa computer computer network or include system architecture, selection of microcontroller data over media such as network or telephone. Bajcsy Vitovec Bakshi and Bakshi and other otherstacks, important hardware parts, selection of of operating operating data transfer over and media such (1988), as a computer network or and important parts, selection systems, etc. hardware One option in connecting telephone. Bajcsy Vitovec Bakshi and Bakshi otherstacks, important hardware parts, selection of microconoperating telephone. Bajcsy and Vitovec (1988), Bakshi Bakshi (2008). With the new technological trend calledand Internet of and systems, etc. One option in connecting microcontelephone. Bajcsy and Vitovec (1988), Bakshi and Bakshi systems, stacks, etc. One option in connecting microconto stacks, Ethernet-based to use external Eth(2008). With With the new technological technological trendway called Internet of troller systems, etc. One network option inis connecting microcon(2008). the new trend called Internet of Things, these devices are finding their into everyday troller to Ethernet-based network is to use external Eth(2008). With the new technological trendway called Internet of troller to Ethernet-based network is to use external Ethernet controller connected to microcontroller through one Things, these devices are finding their into everyday troller to Ethernet-based network is to use external Things, these devices are finding into everyday life. Karimi and Atkinson (2013),their Tan way and Wang (2010). ernet controller connected to microcontroller throughEthone Things, these devices are finding their way into everyday ernet controller connected to microcontroller through one of the microcontroller’s buses e.g. SPI. Wani and Chaudlife. Karimi Karimithe and Atkinsonof(2013), (2013), Tanofand and Wangdoes (2010). controller connected to microcontroller through one life. and Atkinson Tan Wang (2010). Although definition Internet Things not ernet of the microcontroller’s buses e.g. SPI. Wani and Chaudlife. Karimi and Atkinson (2013), Tan and Wang (2010). the microcontroller’s buses e.g. SPI. Wani and hari (2012), Mei et al. (2009). Another option is Chaudto pick Although the devices definition of Internet Internet of Things Things character, does not not of of the microcontroller’s buses e.g. SPI. Wani and ChaudAlthough the definition of of does restrict these to only have telemetrical hari (2012), (2012), Meimicrocontroller et al. al. (2009). Another Another option is is to to pick pick Although the devices definition of Internet of Things character, does not hari Mei et option more advanced with integrated restrict these to only only have telemetrical Meimicrocontroller et al. (2009). (2009). Another option isEthernet to pick restrict these devices to have it can logically be assumed that telemetrical they mostly character, do. This hari more(2012), advanced with using integrated Ethernet restrict these devices to only have telemetrical character, more advanced microcontroller with integrated Ethernet controller and connect it to Ethernet Physical Layer it can can logically logically be made, assumed that they mostly do. This more advanced microcontroller with integrated Ethernet it assumed that mostly This assumption can be when wethey realize, that do. Internet controller and connect it it to tothe Ethernet using Physical Physical Layer it can logically be made, assumed that mostly This controller connect Ethernet using Layer chip whichand is connected microcontroller through one assumption can be when wethey realize, that do. Internet controller and connect itto tothe Ethernet using Physical Layer assumption can be made, when we realize, that Internet of Things are devices which produce content (information) chip which is connected to microcontroller through one assumption can be made, when we realize, that Internet chip which is connected to the microcontroller through one of the subtypes of Media Independent Interface. The secof Things are devices which produce content (information) which is connected to Independent the microcontroller through one of Things are devices which produce content (information) and the only way for devices (machines) to produce useful chip of the the subtypes of Media Media Interface. The secsecof Things are devices which produce content (information) of subtypes of Independent Interface. The ond of these options has the benefit of better performance. and the the only only way for devices devices (machines) to produce produce useful of the subtypes of Media Independent Interface. The secand way for (machines) to useful content, apart from redistributing content provided by ond of these options has the benefit of better performance. and the only way for devices (machines) to produce useful ofetthese options has benefit Fang al. (2006), (2014) content, apart from redistributing content provided by ond ond optionsMisik has the the benefit of of better better performance. performance. content, from redistributing content provided human orapart another machine, is to measure something. Fangofet etthese al. (2006), (2006), Misik (2014) content, apart from redistributing content provided by by Fang al. Misik (2014) human or another machine, is to measure something. Fang paper et al. deals (2006), Misik (2014) human or another machine, is to measure something. This with whole design of embedded telemetry human another machine, to Things measuredevices something. As the or name of the Internetis of suggests, This paper deals with whole design of embedded telemetry This paper deals with whole design of embedded telemetry system with data logging subsystem and HTTP server As the the name of the the Internet of Things Things devices suggests, paper deals with wholesubsystem design of embedded telemetry As of Internet of suggests, they arename meant to be connected to thedevices Internet which This system with data logging and includes HTTP server As the name of the Internet of Things devices suggests, system with data logging subsystem and HTTP server which is used for data presentation. This hardthey are meant to be connected to the Internet which with data logging subsystemThis and includes HTTP server they meant to be connected the Internet is theare biggest computer network. to Presumably, the which most system which is used for data presentation. hardthey are meant to be connected to the Internet which which is used for data presentation. This includes hardware design and also software design. In solution proposed is the biggest computer network. Presumably, the most which is used for data presentation. This includes hardis the biggest Presumably, the most important datacomputer link layernetwork. technology for computer net- ware design and also software design. In solution proposed is the biggest computer network. Presumably, the most ware design and also software design. In solution proposed in this paper, the network connectivity is provided by important data link layer technology for computer netware design and also software design. In solution proposed important data link layer for computer networks (including Internet) istechnology Ethernet which is designed to in this paper, the network connectivity is provided by important data link layer technology for computer netin this paper, the network connectivity is provided by Ethernet interface. works (including (including Internet) is Ethernet which is designed designed to in this paper, the network connectivity is provided by works Internet) which is achieve high transfer rate is asEthernet well as long communication Ethernet interface. interface. works Internet) which is designed to to Ethernet achieve(including high transfer rate is asEthernet well as as long communication achieve high transfer rate as well long communication distance. Embedded systems that have the peripherals to Ethernet interface. achieve high transfer rate as well as long communication distance. Embedded Embedded systems that that have the the peripherals to to distance. distance. Embedded systems systems that have have the peripherals peripherals to Copyright © 2015, IFAC IFAC 2015 (International Federation of Automatic Control) 101Hosting by Elsevier Ltd. All rights reserved. 2405-8963 © Copyright © IFAC 2015 101 Copyright © IFAC 2015 101 Peer review under responsibility of International Federation of Automatic Copyright © IFAC 2015 101Control. 10.1016/j.ifacol.2015.07.015
PDeS 2015 102 May 13-15, 2015. Cracow, Poland
S. Misik et al. / IFAC-PapersOnLine 48-4 (2015) 101–106
2. HARDWARE DESIGN To achieve maximum reliability and satisfactory performance/price ratio, device proposed in this paper is fitted with industrial grade components, i.a. these components are able to withstand temperatures in range from -40 ◦ C to +80 ◦ C. Performance of the solution depends mainly on parameters of microcontroller, which is used as central processing unit. This component needs to provide necessary connectivity and performance. 2.1 Microcontroller STM32F417IGT6 is member of STM32F417 family of microcontrollers which is produced by STMicroelectronics. This microcontroller is based on ARM CortexTM M4 core which can be clocked up to 168 MHz and possesses 112 + 16 KiB of SRAM, 64 of KiB Core Coupled Memory, 4 KiB of Backup SRAM and 1 MiB of Flash memory. It provides various kinds of communication interfaces. Most important for proposed solution are Ethernet MAC, SDIO, IIC, SPI and External Memory controller. STMicroelectronics (2013b). Compact design, high performance and rich interfaces are the key factors in choice of STM32F417IGT6 microcontroller for proposed solution. Ethernet controller on STM32F417IGT6 complies to the IEEE802.3 Media Access Control layer standard and contains designated DMA channel and FIFO buffers. It also takes care of sending and receiving of Ethernet frames which includes frame padding and checksums generating and checking. STMicroelectronics (2013b). Proposed hardware structure with STM32F417IGT6 microcontroller is shown in Fig. 1.
This network physical Layer can communicate with the ethernet MAC inside microcontroller through both MII and RMII interfaces and allows for automatic negotiation between 10 and 100 Mbps half/full duplex ethernet. Texas Instruments (2008a). 2.3 Memories Fig. 1 shows hardware architecture of proposed solution, where several external memories of different types are connected to the microcontroller. Following paragraphs shortly describe these memories and their usage in proposed solution. For both easier debugging and better scalability, proposed solution is equipped with external SRAM memory. As Fig. 6 suggests, this memory can be used, during process of application debugging, as storage for code which is being debugged. After debugging is done, this memory can be used to scale the application up and make it able to process bigger amounts of work. External SRAM is connected to the microcontroller using its configurable external memory controller which consists of up to 26-bit wide address bus, 8-bit or 16-bit data bus and control bus. STMicroelectronics (2013b). Serial Flash memory, connected to microcontroller through SPI bus, is meant to store HTTP server’s static contents, i.e. images, html files, javascript files, cascading style sheets, etc. As the title of this paper suggests hardware of the solution shall provide ability to record measured data. For this purpose, proposed hardware structure (Fig. 1) contains SD card reader, connected to microcontroller with SDIO interface. 2.4 Power Supply
Fig. 1. Hardware structure of proposed solution 2.2 Ethernet PHY
Fig. 2. Power supply with backup battery
The required electrical signals, line status, clock, data encoding and data sending and receiving circuits are defined by the Physical Layer (PHY). It can also automatically negotiate performance of the link to the highest possible values. IEEE (2010) In proposed solution, it is used industrial grade network Physical Layer chip DP83848I by Texas Instruments. 102
Power supply subsystem of solution consists of several blocks which are shown in Fig. 2. Proposed design of power supply subsystem is able to provide power from battery, in case when no external power is supplied and keep battery charged, when there is external power supply. To achieve this, power supply subsystem contains two voltage converters: Switching converter and Buck / Boost
PDeS 2015 May 13-15, 2015. Cracow, Poland
S. Misik et al. / IFAC-PapersOnLine 48-4 (2015) 101–106
converter. First of these converters is connected right after reverse polarity protection and serves as voltage converter for battery charger which needs 4.5 V to 5.2 V. If external power supply can be secured to be within specified range, first voltage converter can be omitted. Second voltage converter is used to convert voltage from external power supply or battery to voltage levels necessary for main microcontroller and other peripherals. Proposed design of power supply provides output voltage of 3.3 V and current up to 1.2 A which is more than enough for proposed solution. Also the output voltage is stable while powered by battery discharged to as low as 2.9 V. Texas Instruments (2008b). Information about external power presence, charging status and battery level are carried to microcontroller. Microcontroller has the ability to enable or disable battery charging process. This is useful for use with Li-Pol batteries which may be charged only within temperature range defined by manufacturer. 2.5 Sensors Sensors can be connected to all the microcontroller’s buses, IOs and peripherals, that are not used by proposed design. These include UARTs, SPIs, IIC, timers, general purpose IOs, etc. 3. SOFTWARE DESIGN It seems clear that the data measurement, HTTP data presentation layer and other supporting operations, on proposed telemetrical device, need to run concurrently. One relatively easy way to ensure this is to use operating system to govern these tasks. It is even possible to allow for deterministic behavior of the whole application by using Real Time Operating System. Structure of software proposed in this paper is shown in Fig. 3.
103
For it’s simplicity and existing port for the ARM CortexTM M4 core (which is also officially supported by the developers of the operating system), the FreeRTOSTM real time operating system is used in proposed solution. This is very powerful operating system, but it only contains drivers for hardware necessary to run the operating system. Real Time Engineers ltd. (2014). This means that the driver for Ethernet MAC and TCP/IP needs to be provided by the application running on the operating system. Another often important low level software component is standard C library. In this case is used newlib (Red Hat (2014)) which is optimized for use on embedded systems. To make this library properly work inside multitask environment, the operating system needs to allocate data structure for each task. This functionality, even though is not essential for FreeRTOS, can be enabled in operating system’s configuration file. Enabling this feature has significant impact on size of the Task Control Block of every task Misik (2014). This is huge waste of resources, considering the fact that many tasks in proposed solution does not use critical standard library functions. To minimize memory footprint and simultaneously maintain full functionality of standard library, some modifications were made to the operating system. These include addition of xTaskNewlibAllocateReent function in the operating system. Misik (2014). Calling this function causes operating system to allocate data structure, necessary for full operation of the newlib, for task that calls the function. Tasks that do not call this function, can still use even these critical functions of newlib but they put themselves at risk of overwriting each other’s data. This is because they share one global data structure for newlib. 3.2 TCP/IP As it is mentioned in 3.1, selected operating system contains neither implementation of TCP/IP stack (which is essential for HTTP), nor drivers for Ethernet MAC. These need to be provided by application running on the operating system. There are many TCP/IP stacks for embedded applications, but LwIP was chosen due to it’s lightweightness and already existing port for combination of selected operating system and microcontroller STMicroelectronics (2013a). LwIP stack offers three programming interfaces Misik (2014): Raw API Most complex, native interface, best performance Netconn API Higher level API for multi-threaded applications, requires services of the operating system, maintains good performance BSD Socket API Berkeley-like Socket API
Fig. 3. Software structure of proposed solution 3.1 Operating System There are many aspects to consider while selecting operating system for a particular solution. In this case, very important is the portability of the operating system because the selected operating system needs to run on microcontroller used in proposed solution which has ARM CortexTM M4 core. 103
To implement network communication proposed solution uses Netconn API which has good performance and utilizes services of operating system to block tasks waiting for IO operations on TCP/IP to complete. 3.3 HTTP server As the Fig. 4 shows, the HTTP server consists of several tasks. The most important one, called httpd, listens on
PDeS 2015 104 May 13-15, 2015. Cracow, Poland
S. Misik et al. / IFAC-PapersOnLine 48-4 (2015) 101–106
port 80 for incoming connections. After the connection is made, httpd pushes netconn handle of the new connection into Queue of TCP/IP connections. At the end of Queue of TCP/IP connections, there are several tasks, called HTTP server threads, waiting for the new connections to arrive. HTTP server threads have each the same job: to serve incoming HTTP requests on received TCP/IP connections.
In the proposed solution, are these memories used as follows (Fig. 6): CCM RAM This memory is connected directly to the core of the microcontroller which means access to this memory can not be interrupted by DMA and the DMA can not access this memory. This memory is in proposed solution used to store operating system’s main stack and memory for all objects of operating system is allocated here. SRAM1 Linker is configured to place here all the global variables and static variables inside functions. SRAM2 Driver for the Ethernet MAC is modified to place here it’s DMA descriptors and buffers. This is to enable for DMA of the Ethernet MAC to access this memory uninterruptedly. BKPSRAM Backup battery can preserve contents of this memory during power losses. This memory can be used to store configuration data. Ext. RAM As the Fig. 6 suggests, this memory can be used, during process of application debugging, as storage for code which is being debugged. After debugging is done, this memory can be used to scale the application up and make it able to process bigger amounts of work.
Fig. 4. HTTP Server architecture This approach was chosen to make it possible for several connections to be processed concurrently. Proposed solution also contains minimalistic implementation of HTTP protocol which uses system resources economically and is able to directly interface the LwIP TCP/IP stack through Netconn API. 3.4 Application Measurement application can create separate task in operating system and perform reading of sensors and data processing. It also can use interface provided by proposed solution to log measured data and present them through HTTP protocol. 3.5 Memory layout As the Fig. 5 shows, there are several separate memories differently connected to ARM CortexTM M4 core inside STM32F417IGT6 microcontroller. To ensure maximal utilization of microcontroller’s features, every memory type needs to be properly used.
Fig. 6. Memory layout of proposed solution 4. IMPLEMENTATION OF A DEVICE BASED ON THE PROPOSED DESIGN The Weather station implemented using the proposed design will be shortly described in this section. 4.1 Sensors There are five sensor connected to device (Fig. 7). These sensors are capable of measuring following values: Wind velocity Measured using microcontroller’s timer; is proportional to frequency of impulses generated by sensor Wind direction Measured using microcontroller’s Analog to digital converter; encoded as resistance of the sensor Rainfalls Measured as time between impulses
Fig. 5. STM32F4 Bus Matrix 104
PDeS 2015 May 13-15, 2015. Cracow, Poland
S. Misik et al. / IFAC-PapersOnLine 48-4 (2015) 101–106
105
Atmospheric pressure Digital sensor connected to device using I2C bus Relative humidity Digital I2C sensor Temperature Each of the I2C sensors is capable of measuring temperature
Fig. 9. Hardware platform for Weather station
Fig. 7. Weather station sensors 4.2 Measurement Application Measured data are stored in device’s memory and upon request transferred using HTTP. Request and response example is shown in Fig. 8.
Fig. 10. HTML based user interface generated using static resources stored inside embedded device along with HTTP server such as computer applications, mobile applications, data concentrators, etc. 5. CONCLUSIONS This paper describe whole design process of telemetrical device with data presentation using HTTP. Proposed design covers software and hardware design. Fig. 8. Example of embedded HTTP server response 4.3 Result Hardware device implemented on design proposed in this paper is shown in Fig. 9. Exemplary interface, build as web application by using static resources which automatically fetch the dynamic data using AJAX technology, is shown in Fig. 10. Interface of dynamic data (new measurements) is implemented as RESTful API to allow for variety of clients types to connect. These may include another applications 105
Central part of the hardware design is ARM CortexTM M4 based microcontroller STM32F417IGT6 which is capable of connecting to computer networks through Ethernet interface. This design is also capable of data logging. The power supply of proposed design is backed up by Li-Pol battery which can also be charged when external power supply is present. Software part of proposed design consists of real time operating system, TCP/IP stack, support subsystems, HTTP server and measurement application along with necessary driver software. All of the software components are either designed or optimized to work with proposed conception.
PDeS 2015 106 May 13-15, 2015. Cracow, Poland
S. Misik et al. / IFAC-PapersOnLine 48-4 (2015) 101–106
In the last chapter of this paper, it is described implementation of proposed design which results in weather station with web interface. Results of this implementation is shown in Fig. 9 and Fig. 10. ACKNOWLEDGEMENTS The research was financially supported by Brno University of Technology and the European Regional Development Fund under project No. CZ.1.05/2.1.00/01.0014. The above-mentioned funds and institutions facilitated efficient performance of the presented research and associated tasks. This work was supported also by the project “TA02010864 - Research and development of motorized ventilation for the human protection against chemical agents, dust and biological agents”, project “TA03020907 - REVYT - Recuperation of the lift loss energy for the lift idle consumption” and project “TA04021653 - Automatic Lift Inspection” granted by Technology Agency of the ˇ Czech Republic (TA CR). Part of the work was supported by project “FR-TI4/642 - MISE - Employment of Modern Intelligent MEMS Sensors for Buildings Automation and Security” granted by Ministry of Industry and Trade of Czech Republic (MPO). Part of the work was carried out with the support of core facilities of CEITEC – Central European Institute of Technology under CEITEC – open access project, ID number LM2011020, funded by the Ministry of Education, Youth and Sports of the Czech Republic under the activity “Projects of major infrastructures for research, development and innovations”. Part of this paper was made possible by grant No. FEKTS-14-2429 - “The research of new control methods, measurement procedures and intelligent instruments in automation”, and the related financial assistance was provided from the internal science fund of Brno University of Technology. REFERENCES Bajcsy, J. and Vitovec, J. (1988). Telemetria a prenos udajov. Alfa. Bakshi, A. and Bakshi, U. (2008). Electronic Measurements & Instrumentation. Technical Publications Pune, Pune. Fang, Y., Xi, B., Chen, M., and Liu, J. (2006). Implementation of industrial ethernet communication based
106
on embedded systems. In Industrial Electronics and Applications, 2006 1ST IEEE Conference on, 1–4. doi: 10.1109/ICIEA.2006.257287. Guo, Z., Shi, C., and Wu, G. (2013). Design and implementation of embedded ethernet based on the rx62n microcontroller. In Chinese Automation Congress (CAC), 2013, 206–211. doi:10.1109/CAC.2013.6775729. IEEE (2010). Ieee standard for information technology– telecommunications and information exchange between systems–local and metropolitan area networks–specific requirements part 3: Carrier sense multiple access with collision detection (csma/cd) access method and physical layer specifications corrigendum 1: Timing considerations for pause operation. IEEE Std 802.3-2008/Cor 1-2009 (Corrigendum to IEEE Std 802.3-2008), 1–12. doi:10.1109/IEEESTD.2010.5752990. Karimi, K. and Atkinson, G. (2013). What the internet of things (iot) needs to become a reality. Technical report, Freescale. Real Time Engineers ltd. (2014). The FreertosTM Reference Manual. Red Hat (2014). The Red Hat newlib C Library. Texas Instruments (2008a). DP83848i Datasheet. Texas Instruments (2008b). TPS63001 Datasheet. Mei, W., Ruimei, Z., and Huiting, D. (2009). Design and realization of embedded ethernet communication system based on arm. In Information Science and Engineering (ISISE), 2009 Second International Symposium on, 287– 289. doi:10.1109/ISISE.2009.98. Misik, S. (2014). Weather station with Ethernet interface. Master’s thesis, Brno University of Technology, Brno. STMicroelectronics (2013a). LwIP TCP/IP stack demonstration for STM32F4x7 microcontrollers. STMicroelectronics (2013b). Reference Manual: STM32F405xx/07xx, STM32F415xx/17xx, STM32F42xxx and STM32F43xxx advanced ARMbased 32-bit MCUs. Tan, L. and Wang, N. (2010). Future internet: The internet of things. In Advanced Computer Theory and Engineering (ICACTE), 2010 3rd International Conference on Advanced Computer Theory and Engineering, volume 5, V5–376–V5–380. doi:10.1109/ICACTE.2010.5579543. Wani, S. and Chaudhari, R. (2012). Ethernet enabled digital i/o control in embedded systems. In Computing, Electronics and Electrical Technologies (ICCEET), 2012 International Conference on, 634–637. doi:10.1109/ICCEET.2012.6203907.