Sie sind auf Seite 1von 5

Integration of PSoC Technology with Educational Robotics

Jingchuan Wang, Weidong Chen


Dept. of Automation, Shanghai Jiao Tong University Shanghai 200240, P.R. China jchwang@sjtu.edu.cn, wdchen@sjtu.edu.cn

(Demonstration Paper)
Abstract To keep up with the wide-ranging, fast-moving robotics field, education must be adaptive and multidisciplinary. In this paper, integration of PSoC technology with educational robotics is presented. Both of the advantage: flexibility in hardware for PSoC and modularized robot components are fused. This integration balances research and implementation fundamentals by reinforcing course work with intensive projects focused on robotics technology. This education fostered students teamwork skills, while project completion and competition success greatly enhanced the students self-confidence.

I. INTRODUCTION Robotics is a true multidisciplinary field that forces us to cross traditional disciplinary boundaries to develop working systems. In addition to the electromechanical systems that endow mobility, most autonomous robots also contain one or more computers and the software and hardware scaffolding necessary to support them. The field has evolved quickly over the past decade, largely because of the tremendous increase in computing power and the availability of an improved variety of sensors. We are now sending robots to Mars, to the depths of the ocean floor, and into hazardous nuclear reactors. We are giving robots the capability to learn, to act autonomously, and to interact with humans and their environment. These attributes are necessary if they are to successfully accomplish their tasks. Both graduate programs and industry need students who are ready for this challenge. The two most important things we can give students as undergraduates are a strong knowledge of the fundamentals and experience with real robot systems [1]. Cypresss revolutionary Programmable System on a Chip (PSoC) mixed-signal array is a complete system-level solution with configurable digital and analog peripherals, an 8-bit microcontroller and three types of embedded memory [2]. It is a very powerful and versatile tool for tackling projects. PSoC combines maximum design flexibility with ease of use. It has many communication, analog and digital modules which can be directly accessed, while the sensors, controllers and effectors of a robot are modularized as well, which makes it easier to assemble the required modules without much restriction both in terms of hardware and software, to build the robot with desired function, hence the modularized robot design can be realized. PSoC has the advantages such as: flexibility in hardware, convenience for programming, low cost and etc. Robot as a new inter-discipline subject, integrates new achievements of
___________________________________ 978-1-4244-8983-1/10/$26.00 2010 IEEE

multiple disciplines, and is a good medium of innovation ability training for college students. Through the integration of PSoC technology with robot, students will focus on the robot programming and robot technology design. In this paper the implementation of robotics education using PSoC and modularized robot components successfully illustrated the above advantages of the combination. The results showed that this integration revolutionized robotics education and was propitious to student learning experience and fostering innovation ability. Three undergraduate group projects are presented, two of them are conducted as result of robot practice project and one of them is conducted as result of summer research project. II. INTEGRATION OF PSOC AND ROBOT COMPONENTS Robots are mechanical systems with electrical controls and sensors, given intelligence through software. In this project, robot programming as a software design problem is an essential part. However, robot suffers from uncertainty in sensing, unreliability in action, real-time environmental interactions and almost non-deterministic world behaviour [3]. In order to fulfill these characters in our projects, the VEX robot components are used to build up the body of robots and integrated with PSoC.

Fig.1 Robot Components

Through our experience, VEX robot components highlights the following issues: (1) There are abundant components for robot practice. Mechanisms, sensors, effectors and batteries are essential components for robots. Most of them can be provided by VEX, which includes:

Mechanism components: driving wheel, omnidirection wheel, gear, linker and joining element. z Sensor components: light sensor, line tracker, bumper, sonar and encoder. z Effectors component: motor kit and servo kit. z Battery: 7.2v DC battery 9.6v DC battery and charger. (2) Most components have uniform electric or mechanics interface. (3) It is easily assembled and modified to different shapes of robot. (4) It is convenient for integrated with PSoC. The other kinds of sensors are also used, such as Sharp GP2D12 infrared distance sensors, CCD camera and etc. All components are shown in Fig.1. All of these modules can be flexibly assembled. The PSoC Eval 1 development board provides the user with the basic hardware required to develop and test a multitude of projects. This board is ideal for learning the basics of PSoC applications. The board provides three different options for powering the project, a RS232 serial port connection, a potentiometer for analog voltage input, LEDs for output indicators, a pushbutton for input, a liquid crystal display, a breadboard for building small circuits, and headers to make connections to the various port pins of the Cypress PSoC [2]. The PSoC Designer IDE is used for the robot program. C programming language is used to write the software in chip level design. In system level design, PSoC device and low level firmware are configured in the visual programmer interface. The input and output models and their behaviour are defined according to the robots device. The 4th chapter shows the robot sample and PSoC devices which are selected in the project case. III. COURSE ORGANIZATION We offered an upper-level robotics course at School of Electronic Information and Electrical Engineering (SEIEE) in Shanghai Jiao Tong University (SJTU) in the spring semester after 2007 academic year. The course was cross-listed under Automation, Computer Science, Electronic and Electrical Engineering departments. Students were expected to have some background in programming and to have had at least one related upper-level course such as control theory and electronics. We developed this course, in part, to prepare students for summer research projects in robotics like those described above. Robotics is well served by having multiple instructors handle the teaching. In our case, one teacher is an engineer whose research focus is electronics, and the other one is a technician whose research focus is control method. Teamteaching let us cover more material than either of us could have done alone. The course outline follows: z Introduction to robots Basic robot and sensor concepts z Introduction to Cypress PSoC and PSoC designer Experiment on PSoC Eval 1 development board

Introduction to robot programming Robot motion program Robot behaviour and task program z Robot sensor and motor integration Experiment with analog and digital sensors Experiment with motors Motion detection and tracking z Robot practice projects Multiple-layer designs z Summer research projects Innovation projects for robot competition We taught the topics as an 18 sections weekly: 4 two-hour sessions for lectures as course phase and 14 three-hour sessions for labs as lab phase. In course phase, students learn new techniques for transforming a sequence of sensory inputs to desired outputs. They begin at the lowest level and most real-time aspect of this transformation, implementing closed-loop controllers and functional or reactive algorithms for robot motion and behaviour control. Then, they take exercise for PSoC Designer. The students not only end with some skills for robot programming but experience for PSoC technology. In lab phase, 30 students in all in this program are divided into 10 teams (3 members per team). Our goal in organizing the teams was to decentralize different backgrounds of them. The multidisciplinary nature of robotics makes it ideal for teaching collaborative teamwork and the integration of different fields of science, computing, and engineering. Students who participate in these projects will graduate with a deeper and broader exposure to their chosen major than students who work solely within their single discipline. Students in this program will also have a more realistic perspective of the type of team demographic they will encounter when they enter the workforce [4]. Our course work organization loosely followed the structure of our chosen text, Development and Practice of Intelligent Robot. To combine the history of robotics with current research, we supplemented a summer research period after the spring semester. Some outstanding students are chosen to achieve high-level designs for the robot competition. Ideally, students in a robotics class have frequent hands-on laboratory experience with physical robots. When class size and equipment availability constraints prevent hands-on work, simulation serves as an initial test bed for design and implementation. Ultimately, however, students must be able to test their control code on an actual robot. IV. DEMONSTRATION DESCRIPTION Three undergraduate group projects are described in this chapter, two of them are conducted as result of robot practice project and one of them is conducted as result of summer research project.

4.1 Race Car


This robot is an actually race car with three line tracker sensors, which is driven by double wheels. A line tracker consists of an infrared light sensor and an infrared LED. It

works by illuminating a surface with infrared light; the sensor then picks up the reflected infrared radiation and, based on its intensity, determines the reflectivity of the surface in question. Light-colored surfaces will reflect more light than dark surfaces, resulting in their appearing brighter to the sensor. This allows the sensor to detect a dark line on a pale surface, or a pale line on a dark surface. Control algorithm is programmed in the software to control the car tacking a black line. The race car model is shown in Fig.2. The modules we use in the PSoC Designer are as follow: z 2 PWM_16 modules: Generate two PWM signals for motor control, both with a period of 20ms. z 3 PGA modules: Get input signal from line trackers, adjust them, and output to ADCINC12 modules. z 3 ADCINC12 modules: Sample and get the results of line trackers.

Vx Z The kinematics model is: 1 Z2 A Vy A M Z3

1 1  2  1 2

0 
3 2 3 2

l1 l2 l3

In this case, 3 IR sensors are used to detect the obstacles. 2 light sensors are used to track and localize the light goal. Motor-Schema [6] is used for tracking and obstacle avoiding: z Fg : Vector of light goals gravitation. z Foi : Exclusion vector of obstacles which are detected by i

JJ K

JJK

JK zF

IR sensor.

: Motion control force can be fused: F

JK

(F
i 1

JK JJK g , Foi )

The modules we use in PSoC Designer are as follow: z 3 PWM_16 modules: Generate 3 PWM signals for motor control with a period of 20ms. z 4 PGA modules: 3 of them for IR sensor and the other for light sensor. z 4 ADCINC12 modules: Change the data from PGA modules to digital signals.

4.3 Intelligent Wheelchair


Fig.2 Race car model Fig.3Omni-direction Light follower

4.2 Omni-direction Light Follower


Three DC motors and omni-wheels are used as driver wheels of the robot, which make it move freely on any direction indoor. By using Sharp GP2D12 as distance sensors, they can detect the obstacles while moving. 2 light sensors are fixed on the front of the robot to detect the light goal. The model is shown in Fig.3. This type of omni-wheels has small rollers to allow the wheels to move freely on any direction. They move along the primary diameter, just as any other wheel. Though, the smaller rollers along the outside of this diameter allow free rotation along an orthogonal direction to the powered rotation.
Z2
l2
Vy

The intelligent wheelchair control system is a production of summer research projects. Shown in Fig.5, it is developed for the handicapped and the elderly people, and equipped with a multi-sensor system including IR sensors, bumpers, as well as an embedded control system to provide more safety and comfortableness to users.

Z3
l3
Vx

M
l1

Fig.5 Intelligent wheelchair

Z1
Fig.4 Kinematics model of omni-direction robot

The intelligent wheelchair based on PSoC can avoid obstacles and collisions. Different operation modes in the control system will provide handicapped people of different levels with appropriate moving manners. Capacitive switches can make it convenient for handicapped people to operate [7].

The kinematics model can be shown in Fig.4. It was considered that the representative coordinates of the robot were located in its center. Each wheel is placed in such orientation that its axis of rotation points towards the centre of the robot and there is an angle of 120 between the wheels [5].

Vx ,Vy , M : Robot motion parameters. T >Z1 , Z2 , Z3 @ : The contribution of 3 motors.

Fig.6 Overview of intelligent wheelchair

The overview of the whole system is shown in Fig.6. It can be divided into 3 parts: z Electric Wheelchair: Electric wheelchair consists of battery, 2 200W DC Motors and Joystick. z Sensor System: Sensor system consists of IR sensors, bumpers and encoders. It can be used to avoid obstacles and collisions. z Control System: Control system consists of PSoC control system and PC. PSoC control system can be divided into two parts: PSoC CapSense and PSoC Controller. PSoC CapSense panel is provided to choose different operation modes for different users. Users can use PC to control the wheelchair as well as the joystick. 1) PSoC Control System Multi-mode manipulate control system is provided in intelligent wheelchair. Users can choose different manipulate mode to operate the wheelchair according to their conditions. PSoC CapSense technology is used for users choosing manipulate mode of wheelchair. It can meet every users requirement, even their disability degree and environment for use are different. PSoC controller is the brain of wheelchair, consists of collecting signal of sensors, motion control and computing according to user mode. PSoC control system is shown in Fig.7, PSoC CY8C21434 is used in PSoC CapSense and PSoC CY8C29866 is used in PSoC Controller. The modules we use in PSoC Designer are as follow: z CSD module: Obtain the choices of the user. z ADCINC12, PGA module: Obtain signals from IR sensors and joystick. z Counter8 module: Get information from encoders. z UART module: Communicate with PC through series port. z DAC8 module: Analog signal used to control motor driver. z LED module: Show user's choice of different modes. z LCD module: Facilitate designing and debugging process.

2) Multi-mode Design The PSoC control system has four manipulate control modes: Manual Mode, Shared Control Mode, Low-level Autonomy Mode and High-level Autonomy Mode. a. Manual Mode: In this mode, PSoC controller gets the signals from joystick and then converts them into linear and angular velocity. So users can use the typical joystick to control the wheelchair directly. b. Shared Control Mode: In this mode, control system will get information form IR sensors, bumpers and joystick. Based on the information, the intelligent wheelchair will follow the direction of the joystick as well as avoid obstacles and collisions. Motor-Schema has been designed for integrating wheelchair behaviors, such as following the wall, obstacle and collision avoidance. This mode will guarantee the safety of both the users and the wheelchair during operation. c. Low-Level Autonomy Mode In this mode, the wheelchair will get information from IR sensors and bumpers and other sensors. According to the information, wheelchair can move autonomously, such as follow the wall as well as avoid obstacles and collisions. Lowlevel autonomy mode provides a convenient function to move, which is very important and useful for handicapped people in some fixed environments. d. High-level Autonomy Mode In this mode, PSoC controller communicates with PC via RS232. Wheelchair will get information form IR sensors, bumpers and joystick. Then, with this protocol, the control system will send information of all sensors to PC. PC can use its control algorithms to compute linear and angular velocity and then send this information back toPSoC controller. In this way, users can use PC to control the wheelchair. This mode can also provide extensive use for intelligent wheelchair. With the help of PC, any sensors that can be used by PC can also be used as sensors for the wheelchair, such as applying camera, laser range finder into the system. V. CONCLUSION In this paper, the integration of PSoC technology with educational robotics is presented. The implementation of robotics education using PSoC and modularized robot components successfully illustrated this integration. The course organization and project results verified that this integration revolutionized robotics education and was propitious to student learning experience and fostering innovation ability. ACKNOWLEDGMENT
This work has been partly sponsored by the National High Technology Research and Development Program of China (Grant No. 2006AA040203) and the National Natural Science Foundation of China (Grant No. 60934006).

REFERENCES
Fig.7 PSoC control system

[1] B. A. Maxwell and L. A. Meeden, "Integrating Robotics Research with Undergraduate Education", IEEE Intelligent Systems, 15(6), pp. 22-27, Nov. 2000. [2] R. Ashby, Designers Guide to the Cypress PSoC (Embedded Technology), Newnes, Aug. 5, 2005. [3] I. Nourbakhsh, "Robots and Education in the Classroom and in the Museum: On the Study of Robots, and Obots for Study", IEEE Int'l Conf. on Robots and Automation, IEEE Press, Piscataway, N.J., 2000. [4] J. DeVault, "Robot Stories: Interdisciplinary Design with Autonomous Mobile Robots", Computers in Education Journal, Vol. 10, No.4, pp. 21-27, 2000. [5] F. Ribeiro, I. Moutinho, P. Silva, C. Fraga and N. Pereira, "Three Omni-Directional Wheels Control on a Mobile Robot", Control 2004, University of Bath, UK, Sept. 2004 [6] R.C. Arkin. "Motor Scheme Based Mobile Robot Navigation". International Journal of Robotics Research, Vol. 8, No. 4, pp. 92-112, 1987. [7] J. Wang, W. Chen, "Design and Implementation of a Multi-Sensor Based Autonomous Wheelchair", Journal of Nanjing University of Science and Technology (Natural Science), Vol.33 Sup, pp. 104-409, Aug. 2009.

Das könnte Ihnen auch gefallen