
Slovak University of Technology in Bratislava Institute of Information Engineering, Automation, and Mathematics PROCEEDINGS 17th International Conference on Process Control 2009 Hotel Baník, Štrbské Pleso, Slovakia, June 9 – 12, 2009 ISBN 978-80-227-3081-5 http://www.kirp.chtf.stuba.sk/pc09 Editors: M. Fikar and M. Kvasnica Ježek, O., Balda, P.: An Embedded Multifunction Board for Automatic Control Applications, Editors: Fikar, M., Kvasnica, M., In Proceedings of the 17th International Conference on Process Control ’09, Štrbské Pleso, Slovakia, 484–490, 2009. Full paper online: http://www.kirp.chtf.stuba.sk/pc09/data/abstracts/039.html 17th International Conference on Process Control 2009 June 9–12, 2009, Strbskˇ e´ Pleso, Slovakia Po-Th-6, 039.pdf AN EMBEDDED MULTIFUNCTION BOARD FOR AUTOMATIC CONTROL APPLICATIONS O. Jeˇzek ∗, and P. Balda ∗ ∗ University of West Bohemia in Pilsen, Faculty of Applied Sciences, Department of Cybernetics, Univerzitni 22, Pilsen, Czech Republic fax : +420 377 632 502 and e-mails : ojezek,pbalda @kky.zcu.cz { } Abstract: This paper describes basic features of an universal embedded board developed in our university. After a brief summarization of the board hardware design, the paper focuses on presented software architecture solution. The modular firmware structure based on input/output driver model and a real time operating system (FreeRTOS in our case) is explained and the usage of the software development kit (SDK) plugged-in the Eclipse development platform is shown. Moreover, a recently developed technique for automatic generation of advanced control algoritms has been ported to this platform. This technique called MicroREX is based on the Micro RexLib function block library. Software generation is demonstrated on two examples. Keywords: embedded systems, ARM, industrial communications, automatic control, function block, Simulink, REX control system. 1. INTRODUCTION But development and especially maintenance of more complex real-time control applications is There are not many universal embedded control not a simple task. Recently a powerful technique devices having open architecture which are suit- for automatic control code generation from func- able for automatic control applications with rich tion block diagrams has been developed in Balda communication capabilities. That is why Georgiev (2007). The main ideas of this technique, which (Georgiev (2007)) developed his own hardware has been ported to the ARM platform, are pre- solution. The hardware features are summarized sented in section 6. in section 2. Overall application design process is demon- First software applications for board tests have strated on an example in section 7. been developed in the diploma project Jeˇzek (2008). But more serious and systematic firmware development technique is described in section 3. It 2. HARDWARE SPECIFICATION is based on the software development kit (SDK) (section 4) containing libraries and header files of At the beginning of the hardware design phase, application programming interface (API). Section there were several requirements: 5 deals with convenient development tools for Rich communication capabilities for very maximum simplicity and efficiency of application • good interconnection and interoperability – software development. ZigBee wireless communication, Ethernet, Techniques from sections 3-5 can be used for cre- USB, RS232, RS485, CAN. ating of general embedded applications using the Universal direct inputs and outputs for pro- board, including automatic control applications. • cess and machine control applications – 484 17th International Conference on Process Control 2009 June 9–12, 2009, Strbskˇ e´ Pleso, Slovakia Po-Th-6, 039.pdf Power Digital Circuit Power Circuit GPIO Relay GPO External supply 6 - 12V AC/DC USB • 4 battery pack Ni-Mh 4,8V USB • RS232 USB MCU • RS485 BAT Debug Communication interfaces LED Charge Ethernet RS232 2x - serial line in the RS232 standard 6 -12V • CAN RS485 - serial line in the RS485 standard AC/DC • LCD ZigBee multiplexed with one RS232 SPI USB in device mode SD SD • ZigBee wireless communication module sup- Thermo • porting several operation modes EEPROM ZigBee virtual serial line mode, for con- · nection of two modules Optocoupler DC-DC ZigBee mesh mode, for connection of · several modules in master/slave protocol Analog diff GPI Ethernet 100Mb/s Analog s.e. • Controller Area Network (CAN) Themocoupler • AD Analog s.e. DA Thermocoupler Digital Inputs/Outputs (GPIO, GPI, GPO) Analog Circuit RTD PT100 Magnetic relay 2x 250V/4A • Optical switch AC/DC 400mA/250V • Fig. 1. Hardware structure of the board Straight digital I/O 3.3V TTL compatible • Opto-isolated digital inputs • digital inputs and outputs, analog, RTD and thermocouple inputs, analog output, etc. Analog Inputs/Outputs The final hardware structure of the board de- Analog output 0 4V or -2V 2V, 13bit signed by Georgiev (2007) is depicted in Fig. 1. • resolution ÷ ÷ Fig. 2 is the photography of the manufactured Analog voltage differential input, 1kHz filter board. • input PT100 input • Microcontroller (MCU) 2x analog voltage single ended 0 4V • or 2x thermocouple of the J/K type÷ AT91SAM7XC512@48MHz • • ARM7TDMI® processor Configuration of each single ended analog input · 512kB of FLASH memory or thermocouple is done during the final stage of · 256kB of SRAM memory production. · many on chip integrated peripheries · Other Reset circuitry Small graphic LCD display interface • Internal on chip reset controller • External reset button • 3. FIRMWARE ARCHITECTURE Generally, the board can be equipped with arbi- trary firmware written for the given processor and used peripheries using several available assembler and/or C-language compilers, e.g. IAR C/C++ Compiler for AMR, Keil C/C++, GNU C/C++, etc. A User can start from scratch or follow the instructions of recommended development tools at the processor producer web site (Atmel (2009)). For maximum user convenience and speeding up the application development, we decided to imple- Fig. 2. Photography of the embedded board ment a software development kit (SDK) for our 485 17th International Conference on Process Control 2009 June 9–12, 2009, Strbskˇ e´ Pleso, Slovakia Po-Th-6, 039.pdf interface. This interface can also be used for SDK most hardware drivers (see below). The I/O sys- BSP Drivers tem is based on the idea of virtual file system. Board specific Character Special Moreover, I/O system functions are mapped to Low Level Init RS232 LED RS485 A/D Converter standard C-language input/output. ISR ZigBee D/A Converter Hardware Drivers are libraries which support USB UART SPI Operating system CAN onboard hardware devices (e.g. RS232 line or Socket PWM A/D converter). Drivers handle device inter- FreeRTOS Ethernet Power supply ZigBee GPIO rupts (hide them to the user) and usually im- IO System Timers plement I/O system interface because of unified Block File IO Perf. Counter SD Card access to various devices. Standard C IO EEPROM Libraries are the other miscellaneous libraries LCD which can be used for development of the SDK Libraries Modbus based applications, e.g. Ring buffer, Modbus, etc. CAN Open Ring Buffer Hardware drivers can be further (more detailed) divided into four groups corresponding to the Linked List device type: Character – for character oriented devices such Fig. 3. SDK modular architecture as RS232, RS485, USB, ZigBee in virtual serial board. Real-time operating system issues are cru- line mode, cial for predictable behavior of automatic control Socket – for BSD socket oriented devices such as applications. At present, there are many operating Ethernet or ZigBee in the mesh mode, systems for embedded applications with various Block – for block oriented devices such as disks functionalities implemented. For the present ver- (SD Card, EEPROM, LCD), sion of SDK, FreeRTOS (FreeRTOS (2009)) has Special – for devices not conforming to any pre- been chosen. FreeRTOS has very small memory vious category (timers, LED, A/D and D/A footprint but also a limited functionality. It pri- converters, General Purpose I/O (GPIO), Pulse marily implements preemptive task scheduler but Width Modulation (PWM) outputs, Serial Pe- neither interrupt handling services nor input/out- ripheral Interface (SPI), Controller Area Net- put system interface. Therefore, both functionali- work (CAN). ties has been implemented into our SDK. SDK development is a long run work. At present, BSP, OS and I/O system libraries has been devel- 4. SOFTWARE DEVELOPMENT KIT (SDK) oped. The development states of hardware drivers are the following: Simply said, our SDK is a zip file containing three Finished : RS232, RS485, GPIO, LED, Zigbee folders: in serial line mode. doc – SDK documentation in several formats Being tested : Ethernet, A/D and D/A Con- (compiled HTML *.chm and portable docu- verter, Performance Counter, SPI, Power Sup- ment format *.pdf) ply. inc – C-Language header files *.h Planned : ZigBee in mesh mode, CAN, PWM, lib – Compiled libraries *.a Timers, all block drivers. Architecture of SDK is modular, each module Note that SDK is distributed without source code is represented by at least single header file and because it contains large parts of code developed exactly one library file. SDK modules are divided without any public or grant support. However, into four categories (see Fig. 3) according to their source code organization corresponds to individ- characters: ual libraries mentioned. Board Support Package (BSP) provides board interface for board abstraction. Microcontroler
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages8 Page
-
File Size-