OpenWRT operating system based controllers for mobile robot and ...

4 downloads 237827 Views 940KB Size Report
Sep 9, 2014 - The Android operating system for. smartphones and PDAs also is based on Linus kernel. The. base structure of such systems is similar so it is ...
15th International Workshop on Research and Education in Mechatronics (REM), Elgouna, Egypt, September 9-11, 2014

OpenWRT operating system based controllers for mobile robot and building automation system students projects realization PhD ing. Marek Kciuk Silesian University of Technology (SUT), Faculty of Electrical Engineering, Chair of Mechatronics Gliwice, Poland e-mail: [email protected] Abstract— Two projects were described and compared. Both of them are students projects. Experience gained during the first project realization enabled to realize second one. The common part of the projects is programming system controller in OpenWRT operating system. Both devices are controlled using website control panel, so they do not need dedicated software on the remote computer installed, typical web browser is enough. All functionality for controlling and management is implemented in router. Keywords—OpenWRT, mobile robot, building automation system, router, internet station.

I.

INTRODUCTION

Problem based learning is quite new but more and more popular didactic method [9]. Interesting idea is to realize different projects using the same or similar technology. It presents wide variety of appliance technical solutions and increase students creativity. Other strength is: student does not waste time for learning new technology but deep knowledge. New project is better and more sophisticated than previous one. Mobile robots are very popular diploma thesis, students like to design and assemble different variations of ones. Traditional actuators like servodrives or DC motors are still most popular but up to date actuators like SMA became more popular. It is result of didactic and research in SMART materials[11][12]. Generally robots work in autonomous way or they are controlled using wireless communication (e.g. Bluetooth, radio control modules). There are many tasks for robots: simple line followers, sumo robots, football robots, pocket collect robots, micro mouse robots, inspection robots, cooperating robots. Building automation system is not so popular diploma thesis. Intelligent building should be sustainable, healthy, save and flexible [4]. Different types of the buildings needs different level of management. Human – building interaction is one of the most important factors. Not only technical abilities are important for that kind of projects but imagination and intuition as well.

978-1-4799-3029-6/14/$31.00 ©2014 IEEE

Is it possible to use similar technology and experience in mobile robot construction for building automation system construction? II.

OPENWRT SYSTEM SHORT DESCRIPTION

An OpenWRT system is a free open source GNU/Linux distribution for embedded devices. The idea of OpenWRT project is free, functional, build from the ground operating system, the system do not use external pieces of code which need additional licence or payment. It is possible to create new software dedicated for the system. There are many types of devices where you can find it: network devices e.g. routers or internet stations, embedded devices e.g. RasberyPI board, mobile phones and many more. Full list of actual devices is presented in the project website [1]. In general OpenWRT is not basic but alternative software for previously mentioned devices. The system can be managed by command window or in graphical way. It is possible to begin OpenWRT system in two ways. First way (easier) is: download compiled operating system for dedicated device, download into the device and run. Second way is: download system scripts, configure Linux kernel with dedicated options, compile new system, download into the device and run. OpenWRT is generally dedicated for network devices so it supports wire and wireless network communication and internet functions of the device i.e. using standard software of Iomega Iconnect internet station it is possible to connect the station to existing wireless network but it is not possible to set up new network. OpenWrt enables the station to set up and control its own wireless network. There are many Linux versions (e.g. Ubuntu, Mandriva, Red Hat), there are many Linux based operating systems. OpenWRT is only one example of them. The Android operating system for smartphones and PDAs also is based on Linus kernel. The base structure of such systems is similar so it is relatively easy to change one Linux based operating system into other one. III.

WHEEL ROBOT PROJECT

Full name of the project is: Wheel robot for inspection task, remotely controlled via the Internet [3]. The goal of the project is to create, assemble and program wheel robot which is able to realize inspection task in buildings (e.g. home when

owner is away). The final view of the robot is presented in fig. 1, the block scheme of control is presented in fig. 2.

Fig. 3. Data acquisition results (battery monitoring) The robot is a “server on wheel”, user opens web-page which exists in the Iomega Iconnect station memory. The station runs servers http, ftp and other, which are necessary for this project. The main control application exist in Iomega station as well. The station communicate with other modules to send or exchange data in one or bidirectional way. Communication with the drivers controller is based on Fig. 1. Final view of inspection robot network variables. The drivers controller checks values of the variables and do the task coded by the value (e.g. “0” – do nothing, “1” – run forward, “2” – turn left, etc.). Communication with the USB-1-Wire converter is bidirectional. The station sends question (e.g. “read sensor DS18B20” and module receives answer – value of measured temperature). All the robot functionality may be switched on or off using control panel. Vision monitoring is set up for registering only frames which change each other. If there is no change in the view the screen is not Fig. 2. Block scheme of robot control system and modules acquired. When robot is moving or something else is moving in front of the The project assumptions: robot the screen is acquired in ftp server. - Construction of wheel robot, Robot may be used in some kinds danger areas as well to - Remote control of the robot using website, keep user save during exploration. If the robot is broken but - Wireless communication, Iomega station works, it is possible receive data using FTP - Two cameras (front one and rear one), server. The robot is able to make simple decision as well. - Robot self-monitoring (e.g. batteries energy), Drivers controller uses Sharp distance sensors to avoid obstacles in front of the robot or behind the robot, when robot Ambient parameters monitoring (e.g. temperature, moves. pressure, humidity) It is possible to add new functionality. Robot - Voice monitoring, communicates with user using Wi-Fi. There is possibility to - Vision monitoring. add or change wireless network to 3G. This solution increases application range of the robot and increases safeties. 3G The robot was assembled and built with modules available communication possibilities were used in project described in in the Chair of Mechatronics. The wheeled platform is chapter IV. A4WD1, servo control module is an Atom Bot-Board with Basic Atom Pro processor module, main control module is IV. BUILDING AUTOMATION SYSTEM PROJECT Iomega Iconnect internet station, two web-cameras are the main modules which provide proper working of the robot. The Full name of the project is: Idea, project and realization of main task of the project was to program each module and a building automation system using Internet and GSM prepare GUI as a website. The example of realization networks [4]. The goal of the project is to create, assemble and monitoring task is battery monitoring result presented in fig. 3. program building automation system based on low cost The actual value of battery voltage is presented in gauge and internet device – router. The router is the main controller of historical changes of battery voltage is presented in the graph. the system. The system is designed for residential building. Battery power monitoring is useful to monitor working time of New functionality cannot influence on basic functionality of the robot. Other 1-wire sensors are applied as well. the device. Temperature sensor DS18B20 acquires environment temperature. The temperature is presented in the same way like battery voltage.

The project assumptions: -

Control panel based on website, Remote control using Internet, Intuitive GUI, Main and backup remote access using network and GSM technology, System controlling with SMS commands and notifications, System controlling with typical RC5 remote controller, Simple two state device controlling (e.g. relays) Simple two state sensors reading (e.g. switches), 1-Wire sensors reading (e.g. DS18B20) Whether station communication, Different methods of controlling devices (user actions, rules, schedule, based on sensors signals), archiving of selected values (e.g. weather parameters). Vision monitoring, Voice signalization and voice streaming handling (e.g. Internet radio), The presence of an user simulation, Scalability of the system.

connection into home wireless network, building automation controller function. There are four methods of controlling algorithm implemented. The first method is user action based method – user can send an order using website GUI or SMS to switch on/off an output (e.g. switch on light) or ask question about input/output state (e.g. if the light is on). The second method is rules based method – user can define rules (e.g. if gateway is open, switch on external light). The third method is schedule – user can define timestamps when actions start/stop/toggle (e.g. switch on Internet radio at 7:30 in weekdays – wake up the user). The fourth method is based on signals controlling method. The example is switching on/off schedule of the garden watering subsystem when there is sunny/raining. With above mentioned controlling methods it is possible to realize additional functionality – the presence of an user simulation. Dedicated rules and schedule can manage devices like: light, radio, blinds to simulate user presence (e.g. if there is a dark outside switch on light and close blinds, when there is a 11:45 PM switch off the light). The user can be notified about some actions (e.g. door open or movement detection when all occupants should be outside). The presence of a user simulation is a part of bigger safeties topic. Internet and SMS communication have to be save. User can define password and log in into router if he wants control system remotely. Dedicated SMS commands with nonstandard chars increase safeties in SMS communication method (e.g. “switch off light” SMS order may be coded “sw**ch off lig?t”). The last part of the project is router performance analyse. CPU and RAM resources were analysed in different states (different scripts run). Fig. 5 and fig. 6 present results. The numbers in fig. 5 and fig. 6 describe which scripts are analyzed: 1) Web server (lighttpd) runs, 2) Two state inputs/outputs module and SMS module run, 3) 1-Wire module and graph module run, 4) Weather station module and graph module run, 5) Sound card and Internet radio modules run, 6) Vision monitoring and movement detection module run, 7) All above process run simultaneously,

Fig. 4. Block scheme of building automation structure. The structure of the project is presented in fig. 4. The main element of the system is WR-1043nd router which is the main controller of the system. The router works based on OpenWRT operating system and it realizes two functions: typical router function – set up and distribute Internet

The most important modules – web server (1), I/O and SMS modules (2) have least influence on router resource usage. It is big advantage because the modules run all the time. They run every about 1s. The most resources consuming modules are weather station and graph module (4). The module runs every 10 minutes. Other resources consuming module – vision monitoring and movement detection module (6) is switch on/off by the user when needed. Above analyzes confirm thesis: the typical

internet router may be used as building automation controller without influence on basic functionality of the device.

TABLE I.

COMPARISON OF MODULES APPLIED IN PRESENTED PROJECTS

Wheel robot

building automation system

1

the device: Iomega Iconnect

the device: TP Link WR-1043nd

2

web panel to control

web panel to control

3

wireless communication 3G communication based on SMS messages

4

Fig. 6. RAM usage when different scripts run.

5

two USB cameras

One camera

6

drives controller

relay contro ller

7

USB-1-Wire converter

USB-1-Wire converter

8

sound card

sound card

9

flash drive

flash drive weather station communication

10

VI. Fig. 5. CPU usage when different scripts run. The figure 7 shows demo version of the system with the most important modules.

with

USB

SUMMARY

The presented projects where described in Polish journals and were presented in Polish conferences. They won a second (robot) and first (automation system) price in University level of electricity diploma thesis competitions in proper years. The automation system took third place in nationwide level of the competition. Both projects were constructed of modules currently available in Chair of Mechatronics. Student had to demonstrate not only knowledge and skills but also creativity in the selection of appropriate modules. Now days similar projects may be done much easier using new technology. But still the most important is to promote creativity of the students.

References

Fig. 7. Demo version of the building automation system.

[1] [2] [3] [4]

V.

PROJECTS ASSUMPTION AND COMPARISON

The both presented projects are generally done as software developing projects. They apply the same operating system (OpenWRT) for quite different applications – wheel robot and building automation system. Common issue is providing proper communication with the device over the Internet. There is a different scale of the project. First of them is engineering thesis, second one is M.Sc. thesis. Both of them use almost the same modules (see table 1).

[5]

One of the most important actions is the identification of strengths and weaknesses of applied solution. In the robot project the main strength is variety of robot appliance, the main weakness is huge delay of camera view refreshment and online controlling. This weakness in first project is not important in second one. The main strength of building automation project is very low price of the system in comparison with commercial systems. Internet based controlling system and delay of control signal is interesting problem but it was not taken into account in that projects.

[10]

[6] [7] [8] [9]

[11] [12]

[13]

https://openwrt.org/ Raspberry PI – Start Guide Czura K.: Wheel robot for inspection task, remotely controlled via the Internet. Ing thesis, Department of Mechatronics, Gliwice 2012 Czura K.: Idea, project and realization of a building automation system using Internet and GSM networks. MSc thesis, Department of Mechatronics, Gliwice 2013 Clements D.: Intelligent Buildings: Design, Management and Operation. Thomas Telford Publishing, London, 2014 Derek Clements – Croome: Intelligent buildings – Essentialfm report 12, Butterworths Tolley by The Eclipse Group, Nov/Dec 2001 Welling L., Thomson L.: PHP and MySQL web developement. Helion 2009 Newham C., Rosenblatt B.: Learning the bash Shell. Helion 2006 Kluszczyński K.: Mechatronics – the most important features. Przegląd Elektrotechniczny Vol. 85 Issue 9, 2009 Kielan P., Kluszczyński K.: The criterion for the evaluation the cooperation given control system at the given nodes in the Internet. Przegląd Elektrotechniczny. Vol. 89 Issue 12, 2013 Kluszczyński K. Kciuk M.: SMA actuators: theory, performance curves and design problems. COMPEL. Vol. 32 Issue 4, 2013 Kluszczyński K., Nadolski R., Kłapyta G., Pudłowski ZJ.: Devices that employ shape memory alloys: laboratory stands and case studies in mechatronics education. 8th UICEE annual conference on engineering education. Jamica 2005 Czura K., Kciuk M.: Idea, project and realization of a building automation system using the Internet and GSM networks. Measurement Automation and Monitoring. Vol 60. 2014

Suggest Documents