rapid control prototyping of embedded systems based on ... · paper shows practical application...

6
Procedia Engineering 96 (2014) 215 – 220 Available online at www.sciencedirect.com 1877-7058 © 2014 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/3.0/). Peer-review under responsibility of organizing committee of the Modelling of Mechanical and Mechatronic Systems MMaMS 2014 doi:10.1016/j.proeng.2014.12.146 ScienceDirect Modelling of Mechanical and Mechatronic Systems MMaMS 2014 Rapid Control Prototyping of Embedded Systems Based on Microcontroller Michal Kelemen a *, Tatiana Kelemenová a , Ivan Virgala a , ubica Miková a , Tomáš Lipták a a Technical university of Kosice, Faculty of Mechanical Engineering, Letna 9, 04200 Kosice, Slovakia Abstract Many products of daily use include microcontroller for obtaining of intelligent functions of products. These products are more attractive for customers than simple products. Design of these products with embedded systems based on microcontroller requires of practical experiences and skills. For these reason our students can train on practical modules with microcontrollers and other accessories. Paper shows practical application built on these systems. Keywords: microcontroller, embedded system, mechatronics, robotics 1. Introduction Rapid Control Prototyping is a process that lets engineers quickly test and iterate their control strategies. Rapid Control Prototyping decreases development time by allowing corrections to be made early in the product process. By giving engineering a look at the product early in the design process, mistakes can be corrected and changes can be made while they are still inexpensive. Rapid control prototyping (RCP) is the process of calibrating control algorithms on prototype hardware to get a device under test up and running before a production-intent electronic control unit (ECU) is available. RCP platforms typically provide a method to import mathematical models and run them on a controller with a real-time OS connected to real-world I/O [1]. * Corresponding author. Tel.: +421-556022388; fax: +421-55-6334738. E-mail address: [email protected] © 2014 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/3.0/). Peer-review under responsibility of organizing committee of the Modelling of Mechanical and Mechatronic Systems MMaMS 2014

Upload: others

Post on 09-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rapid Control Prototyping of Embedded Systems Based on ... · Paper shows practical application built on these systems. ... tools, design methodologies, test and applications [3]

Procedia Engineering 96 ( 2014 ) 215 – 220

Available online at www.sciencedirect.com

1877-7058 © 2014 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/3.0/).Peer-review under responsibility of organizing committee of the Modelling of Mechanical and Mechatronic Systems MMaMS 2014doi: 10.1016/j.proeng.2014.12.146

ScienceDirect

Modelling of Mechanical and Mechatronic Systems MMaMS 2014

Rapid Control Prototyping of Embedded Systems Based on Microcontroller

Michal Kelemena*, Tatiana Kelemenováa, Ivan Virgalaa, ubica Mikováa, Tomáš Liptáka aTechnical university of Kosice, Faculty of Mechanical Engineering, Letna 9, 04200 Kosice, Slovakia

Abstract

Many products of daily use include microcontroller for obtaining of intelligent functions of products. These products are more attractive for customers than simple products. Design of these products with embedded systems based on microcontroller requires of practical experiences and skills. For these reason our students can train on practical modules with microcontrollers and other accessories. Paper shows practical application built on these systems. © 2014 The Authors. Published by Elsevier Ltd. Peer-review under responsibility of organizing committee of the Modelling of Mechanical and Mechatronic Systems MMaMS 2014.

Keywords: microcontroller, embedded system, mechatronics, robotics

1. Introduction

Rapid Control Prototyping is a process that lets engineers quickly test and iterate their control strategies. Rapid Control Prototyping decreases development time by allowing corrections to be made early in the product process. By giving engineering a look at the product early in the design process, mistakes can be corrected and changes can be made while they are still inexpensive.

Rapid control prototyping (RCP) is the process of calibrating control algorithms on prototype hardware to get a device under test up and running before a production-intent electronic control unit (ECU) is available. RCP platforms typically provide a method to import mathematical models and run them on a controller with a real-time OS connected to real-world I/O [1].

* Corresponding author. Tel.: +421-556022388; fax: +421-55-6334738.

E-mail address: [email protected]

© 2014 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/3.0/).Peer-review under responsibility of organizing committee of the Modelling of Mechanical and Mechatronic Systems MMaMS 2014

Page 2: Rapid Control Prototyping of Embedded Systems Based on ... · Paper shows practical application built on these systems. ... tools, design methodologies, test and applications [3]

216 Michal Kelemen et al. / Procedia Engineering 96 ( 2014 ) 215 – 220

2. Rapid Prototyping for Embedded Control Systems

Rapid prototyping provides early proof that your control designs will work in the field. You test in real time on hardware, and can quickly adjust your designs until you're satisfied with the results [2].

Embedded systems are increasingly becoming a key technological component of all kinds of complex technical systems, ranging from vehicles, telephones, audio-video equipment, aircraft, toys, security systems, medical diagnostics, to weapons, pacemakers, climate control systems, manufacturing systems, intelligent power systems etc. IJES addresses the state of the art of all aspects of embedded computing systems with emphasis on algorithms, systems, models, compilers, architectures, tools, design methodologies, test and applications [3].

Microcontroller can be used for design of embedded system applications. Microcontroller is commonly used term for a small computer on a single chip, which contains the microprocessor, memory and other accessories. Microcontroller has reduced size and price in comparing with other devices used for controlling in embedded systems. While some embedded systems are very sophisticated, many have minimal requirements for memory and program length, with no operating system, and low software complexity. Microcontrollers very frequently have amount of accessories like analog-to-digital converter, digital-to-analog converter, programmable timer and counter, pulse width modulation PWM generators, Universal Asynchronous Receiver/Transmitter (UART) intrface, I2C interface, SPI interface, one wire interface etc.

3. Microcontroller modules

Our students work with two types of microcontroller. Practical exercises are oriented to obtaining of experiences and skills in area of design of microcontroller applications.

The BASIC Stamp 2 (fig. 1a) serves as the brains inside of electronics projects and applications that require a programmable microcontroller. It is able to control and monitor timers, keypads, motors, sensors, switches, relays, lights, and more. Programming is performed in an easy-to-learn language called PBASIC. It's amazing what you can accomplish with this proven microcontroller and its simple PBASIC 2 language. All vital components (processor, clock source, memory, power regulator) are provided on the BS2's tiny PCB; just connect power and go! The BS2-IC is widely used in educational, hobby, and industrial applications and is strongly recommended for first-time BASIC Stamp users because of plentiful resources (documentation, source code, and customer projects) that are available online and in print [4].

The BasicATOM 24 (fig. 1b) is a self contained micro controller. This is a Pin for Pin Hardware Drop In replacement for the Basic Stamp 2 IC BUT where as the standard BS2 runs at around 4000 Basic Instructions per Second this unit will run at 33,000 BIPS !, also the standard BS2 has 32 bytes of RAM and this device has 368 bytes, the BS2 can hold around 500 BASIC instruction in its program memory where as this unit can hold around 4000 BASIC instructions in its 14K program space, this unit also has a 256 byte EEPROM for user use. The BasicATOM Microcontroller has built in hardware such as Analog to Digital Converter (A/D), Capture / Compare (CCP), Timers, Interrupts and Pulse width modulators (PWM). With built-in hardware the Basic ATOM Microcontroller can produce faster and more accurate pulse width modulation (PWM) then can be done in software. Without the built-in hardware like the analog to digital converters (A/D), you would have to purchase additional hardware and your programs would likely increase in complexity. [5].

a) b)

Fig. 1. (a) Basic Stamp 2 [4]; (b) BasicAtom 24 [5].

Page 3: Rapid Control Prototyping of Embedded Systems Based on ... · Paper shows practical application built on these systems. ... tools, design methodologies, test and applications [3]

217 Michal Kelemen et al. / Procedia Engineering 96 ( 2014 ) 215 – 220

These modules are frequently used for our student projects and bachelor or master thesis projects. Both controller are ease to use and easy to program in simple Basic language. Fast prototyping of control systems based on these microcontrollers requires any modules for building of control systems.

4. Educational modules for fast prototyping of control systems

Both modules Basic Stamp and Basic Atom have compatible connection to serial ports and input-output pins. This is advantage, because the same circuits can be used for both microcontrollers. Prototyping board (fig. 2) enables fast building of designed wiring diagram without making of printed circuit board and soldering. Prototyping boards have banana terminals and serial RS-232 Canon connector for programming. These modules should be powered by stabilized power supply (5V). Students have more time for programming and playing with microcontroller.

Fig. 2. Basic Atom microcontroller and prototyping board.

First steps of students are oriented to training of sending and receiving of binary signals (fig. 3). Students build typical tasks and various combinations as logical systems etc. Both microcontrollers are only signal computers with limitation of maximum electric current to several miliampers. Other projects are devoted to controlling of high power systems as DC motors, relays etc (fig. 3, 4). For this purpose are available modules with transistor switch, modules with H-bridge, modules with relay etc. Typical task is controlling of DC motor via using of pulse width modulation (PWM). Also several modules with DC motors are available. Everything has banana terminals for fast connecting into circuits. LED diodes have implemented also resistors for limiting of current to maximum 2 mA. Also transistor modules and relay modules consist of transistor switch adjusted for using with microcontroller.

Fig. 3. Logical systems training via using of microcontroller.

Page 4: Rapid Control Prototyping of Embedded Systems Based on ... · Paper shows practical application built on these systems. ... tools, design methodologies, test and applications [3]

218 Michal Kelemen et al. / Procedia Engineering 96 ( 2014 ) 215 – 220

Hobby servos (fig. 4) are frequently used for actuating in students projects. The simple PWM signal is used for driving of hobby servos using the only one signal wire. The servos have been used for legged robots, manipulators. These servos have range only 180 degrees, but they can be modified to continuous rotation and it can be used for wheeled vehicles.

Fig. 4. Pulse width modulation for DC motor control and hobby servo control.

Microcontroller can be used for projects of small automation as water level regulation (fig. 5a), controlling of high voltage piezoactuators (fig. 5b), steel plate edge following (fig. 6a), robot playing on guitar (fig. 6b) etc. Also complicated projects can be arranged via using of microcontroller as didactic model of lift (fig. 7) [6].

a) b)

Fig. 5. (a) Microcontroller used for water level automation; (b) piezoactuator driver system.

a) b)

Fig. 6. (a) Microcontroller used for small automation system for steel plate edge following; (b) robot playing on guitar.

Page 5: Rapid Control Prototyping of Embedded Systems Based on ... · Paper shows practical application built on these systems. ... tools, design methodologies, test and applications [3]

219 Michal Kelemen et al. / Procedia Engineering 96 ( 2014 ) 215 – 220

Fig. 7. Didactic model of the lift controlled with Basic Stamp [6].

This model of the lift is controlled with two microcontrollers Basic Stamp 40 connected via serial port. Overall design is devoted to maximum variability for student experiments. Students can train all basic tasks and problems [6].

4. Conclusion

Our system of modules prepared for training of microcontroller application currently helping to our student to lecture understanding and helping to obtain practical experiences. All knowledge received on lectures seems to be easy and interesting, but practical experiences and skills are also interesting for teaching of mechatronics subjects. Mechatronics and also other similar sciences have to go through the hands of students. These students will be better prepared for practice for real application. That is the main task of our educational activities [7-23].

Acknowledgements

The authors would like to thank to Slovak Grant Agency – project KEGA 048TUKE-4/2014 and VEGA 1/1205/12. Paper is the result of the Project implementation: University Science Park TECHNICOM for Innovation

Page 6: Rapid Control Prototyping of Embedded Systems Based on ... · Paper shows practical application built on these systems. ... tools, design methodologies, test and applications [3]

220 Michal Kelemen et al. / Procedia Engineering 96 ( 2014 ) 215 – 220

Applications Supported by Knowledge Technology, ITMS: 26220220182, supported by the Research & Development Operational Programme funded by the ERDF.

References

[1] Rapid Control Prototyping, National Instruments Corporation., available online: http://www.ni.com/rcp/. [2] Rapid prototyping, The MathWorks, Inc., available online: http://www.mathworks.com/rapid-prototyping/embedded-control-systems.html. [3] Kuan-Ching Li, International Journal of Embedded Systems, available online: http://www.inderscience.com/jhome.php?jcode=ijes. [4] Parallax, Inc., BASIC Stamp 2 Microcontroller Module. Available online: http://www.parallax.com/product/bs2-ic [5] Basic ATOM 24 Microcontroller IC, available online: http://www.basicmicro.co.uk/Product/B0017%20Atom%2024%20CPU/Basic-

ATOM-24-Microcontroller-IC,-Turbo-BASIC-STAMP-2-BS2-Replacement-Arduino. [6] M. Kelemen, M. Fabian, T. Kelemenová, Design and Development of Lift Didactic Model Within Subjects of Mechatronics, Procedia

Engineering, Volume 48, 2012, Pages 280-286. [7] R. Pyszko, L. Koval, A. Machackova, Z. Kleckova, Z. Jedlicka, Embedded control system of apparatus for measurement of thermal

conductivity, Proceedings of the 7th WSEAS International Conference on Automatic Control, Modeling and Simulation, (2005), pp. 113-117 [8] M. Acar, R.M.Parkin, Engineering Education for Mechatronics, IEEE Trans. on Industrial Electronics, vol. 43, no. 1, (1996), pp. 106-112. [9] M. Daniels, Å. Cajander, T. Clear, A. Pears, Engineering Education Research in Practice: Evolving Use of Open Ended Group Projects as a

Pedagogical Strategy for Developing Skills in Global Collaboration, Int. J. of Eng. Education, vol. 26, no. 4, Tempus publications, (2010). [10] M. Prihoda, J. Molinek, R. Pyszko, M. Velicka, M. Vaculik, J. Burda, Heat transfer during cooling of hot surfaces by water nozzles,

Metalurgija, Vol. 48, issue 4, (2009), pp. 235-238. [11] A. Vitko, L. Jurišica, A. Babinec, F. Ducho , M. K ú ik, Some Didactic Problems of Teaching Robotics”, Proceedings of the 1st

International Conference Robotics in Education 2010. Bratislava, 16.-17. 9. 2010, Bratislava, Slovak University of Technology in Bratislava, ISBN 978-80-227-3353-3, (2010), pp. 27-30.

[12] D. Koniar, L. Hargaš, M. Hrianka, The application of DICOM 7th standard in LabView, Proc. of Biom. Eng., Kladno (2007). [13] E. Ostertagová, Computer aided teaching of math at FEI TU in Košice. In: Proceeding of Int. Conf. on Inovation Process in E-learning,

Bratislava, March, 10th (2011). pp. 1-5. - ISBN 978-80-225-3112-2. [14] D. Bradley, 2004. What is Mechatronics and Why Teach It?, Int. J. of Electrical Eng. Education, 41, (2004), pp. 275-291, 2004. [15] M. Velicka, D. Dittel, R. Pyszko, M. Prihoda, M. Vaculik, P. Fojtik, J. Burda, Research of thermal processes for the continuous casting of

steel, Materiali in Tehnologije, Vol. 47, Issue 6, 2013, pp. 815-818. [16] J. W. Lee, , 2010, Investigation of mechatronic education in South Korea, Mechatronics, vol. 20, no. 3, (2010), pp. 341–345, April 2010. [17] P. Pásztó, P. Hubinský, Mobile Robot Navigation Based on Circle Recognition, Journal of Electrical Engineering, Vol. 64, No. 2 (2013), 84-

91. [18] Y. Wang, Y. Yua, Ch. Xiea, H. Wanga, X. Feng, , 2009. Mechatronics education at CDHAW of Tongji University: Laboratory guidelines,

framework, implementations and improvements, Mechatronics, vol. 19, no. 8, pp. 1346–1352, Dec. 2009. [19] V. Baláž, E. Ostertagová, , D. Palaš áková, Using of e-learning for teaching extension at KVTaR, Acta Mechanica Slovaca. Vol.. 10, No. 2-

A (2006), pp. 47-50. - ISSN 1335-2393. [20] A. Vitko, L. Jurišica, M. K ú ik, F. Ducho , Context Based Intelligent Behaviour of Mechatronic Systems. Acta Mechanica Slovaca. - ISSN

1335-2393, Vol. 12, No. 3-B. (2008) pp. 907-916. [21] L. Hargaš, M. Hrianka, D. Koniar and P. Izák, P. Quality Assessment SMT Technology by Virtual Instrumentation, Applied Electronics

2007, Pilsen, 5. – 6. 9. 2007, (2007), ISBN 987-80-7043-537-3. [22] J. Janek, V. Rudy, Modernizácia liniek na výrobu hygienických potrieb / Jozef Janek, Vladimír Rudy - 2005. In: Transfer inovácií. . 8

(2005), s. 203-207. - ISBN 8080734615 [23] Yemei Qin, Bo Yu, Heuristic Education of Microcontroller Unit Principle and Applications, Procedia Engineering, Volume 24, 2011, pp.

708-712.