You are on page 1of 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]. Cypress’s 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:

The PSoC Eval 1 development board provides the user with the basic hardware required to develop and test a multitude of projects. which is driven by double wheels. Electronic and Electrical Engineering departments. Computer Science. Robotics is well served by having multiple instructors handle the teaching. omnidirection wheel.1. line tracker. In our case. Teamteaching let us cover more material than either of us could have done alone. The other kinds of sensors are also used. simulation serves as an initial test bed for design and implementation. gear. They begin at the lowest level and most real-time aspect of this transformation. linker and joining element. z Battery: 7. 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. The input and output models and their behaviour are defined according to the robot’s device. bumper. they take exercise for PSoC Designer. Development and Practice of Intelligent Robot. two of them are conducted as result of robot practice project and one of them is conducted as result of summer research project. In system level design. students learn new techniques for transforming a sequence of sensory inputs to desired outputs. All components are shown in Fig. We developed this course. PSoC device and low level firmware are configured in the visual programmer interface. Then. Some outstanding students are chosen to achieve high-level designs for the robot competition.1 Race Car This robot is an actually race car with three line tracker sensors. students in a robotics class have frequent hands-on laboratory experience with physical robots. The course was cross-listed under Automation. and the other one is a technician whose research focus is control method. students must be able to test their control code on an actual robot. a liquid crystal display. It . in part. LED’s for output indicators. (3) It is easily assembled and modified to different shapes of robot. A line tracker consists of an infrared light sensor and an infrared LED. implementing closed-loop controllers and functional or reactive algorithms for robot motion and behaviour control.6v DC battery and charger. The students not only end with some skills for robot programming but experience for PSoC technology. IV. Ideally. computing. one teacher is an engineer whose research focus is electronics. DEMONSTRATION DESCRIPTION Three undergraduate group projects are described in this chapter. and headers to make connections to the various port pins of the Cypress PSoC [2]. z Sensor components: light sensor. This board is ideal for learning the basics of PSoC applications. z Effectors component: motor kit and servo kit. The 4th chapter shows the robot sample and PSoC devices which are selected in the project case. a pushbutton for input. and engineering. C programming language is used to write the software in chip level design. The multidisciplinary nature of robotics makes it ideal for teaching collaborative teamwork and the integration of different fields of science. to prepare students for summer research projects in robotics like those described above. 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 z 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. Ultimately. a breadboard for building small circuits. 30 students in all in this program are divided into 10 teams (3 members per team). 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. however. The PSoC Designer IDE is used for the robot program. (2) Most components have uniform electric or mechanics interface. a potentiometer for analog voltage input. In course phase. CCD camera and etc.Mechanism components: driving wheel. 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. In lab phase. Our course work organization loosely followed the structure of our chosen text. III. we supplemented a summer research period after the spring semester. z 4. 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]. All of these modules can be flexibly assembled. sonar and encoder.2v DC battery 9. The board provides three different options for powering the project. a RS232 serial port connection. such as Sharp GP2D12 infrared distance sensors. Our goal in organizing the teams was to decentralize different backgrounds of them. To combine the history of robotics with current research. When class size and equipment availability constraints prevent hands-on work. (4) It is convenient for integrated with PSoC.

By using Sharp GP2D12 as distance sensors. adjust them.2. it is developed for the handicapped and the elderly people.2 Race car model Fig. or a pale line on a dark surface.3 Intelligent Wheelchair Fig. ªVx . bumpers. z 4 PGA modules: 3 of them for IR sensor and the other for light sensor. Capacitive switches can make it convenient for handicapped people to operate [7]. based on its intensity. z Foi : Exclusion vector of obstacles which are detected by i JJ K JJK JK zF IR sensor. This type of omni-wheels has small rollers to allow the wheels to move freely on any direction. Shown in Fig. 2 light sensors are used to track and localize the light goal. T .3. just as any other wheel. both with a period of 20ms. This allows the sensor to detect a dark line on a pale surface.5.Vy . and equipped with a multi-sensor system including IR sensors. the smaller rollers along the outside of this diameter allow free rotation along an orthogonal direction to the powered rotation. Z3 l3 Vx M l1 Fig. 4.5 Intelligent wheelchair Z1 Fig. Motor-Schema [6] is used for tracking and obstacle avoiding: z Fg : Vector of light goal’s gravitation. the sensor then picks up the reflected infrared radiation and. Though. : Motion control force can be fused: F JK ¦ (F i 1 3 JK JJK g .3Omni-direction Light follower 4. The kinematics model can be shown in Fig. Z2 l2 Vy The intelligent wheelchair control system is a production of summer research projects. which make it move freely on any direction indoor. M º : Robot motion parameters. Light-colored surfaces will reflect more light than dark surfaces.4 Kinematics model of omni-direction robot The intelligent wheelchair based on PSoC can avoid obstacles and collisions. 2 light sensors are fixed on the front of the robot to detect the light goal. and output to ADCINC12 modules. as well as an embedded control system to provide more safety and comfortableness to users.2 Omni-direction Light Follower Three DC motors and omni-wheels are used as driver wheels of the robot. The modules we use in the PSoC Designer are as follow: z 2 PWM_16 modules: Generate two PWM signals for motor control. they can detect the obstacles while moving. resulting in their appearing brighter to the sensor. z 4 ADCINC12 modules: Change the data from PGA modules to digital signals. z 3 ADCINC12 modules: Sample and get the results of line trackers.works by illuminating a surface with infrared light. They move along the primary diameter. Z2 . The race car model is shown in Fig. z 3 PGA modules: Get input signal from line trackers. Z3 @ : The contribution of 3 motors. 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. Different operation modes in the control system will provide handicapped people of different levels with appropriate moving manners. It was considered that the representative coordinates of the robot were located in its center. determines the reflectivity of the surface in question. 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].4. ¼ ¬ T >Z1 . Control algorithm is programmed in the software to control the car tacking a black line. 3 IR sensors are used to detect the obstacles. ª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. The model is shown in Fig.

Users can choose different manipulate mode to operate the wheelchair according to their conditions. Motor-Schema has been designed for integrating wheelchair behaviors. Wheelchair will get information form IR sensors. which is very important and useful for handicapped people in some fixed environments. With the help of PC. PSoC CapSense technology is used for users’ choosing manipulate mode of wheelchair. z ADCINC12. It can be divided into 3 parts: z Electric Wheelchair: Electric wheelchair consists of battery. Lowlevel autonomy mode provides a convenient function to move. users can use PC to control the wheelchair. 2006AA040203) and the National Natural Science Foundation of China (Grant No. PSoC CY8C21434 is used in PSoC CapSense and PSoC CY8C29866 is used in PSoC Controller. PSoC CapSense panel is provided to choose different operation modes for different users. c. z LCD module: Facilitate designing and debugging process. PSoC control system can be divided into two parts: PSoC CapSense and PSoC Controller. It can be used to avoid obstacles and collisions.6. According to the information. d. control system will get information form IR sensors. bumpers and joystick. the wheelchair will get information from IR sensors and bumpers and other sensors.7 PSoC control system . Users can use PC to control the wheelchair as well as the joystick. z DAC8 module: Analog signal used to control motor driver. PSoC controller gets the signals from joystick and then converts them into linear and angular velocity. High-level Autonomy Mode In this mode.6 Overview of intelligent wheelchair The overview of the whole system is shown in Fig. It can meet every user’s requirement. This mode can also provide extensive use for intelligent wheelchair.7. laser range finder into the system. consists of collecting signal of sensors. any sensors that can be used by PC can also be used as sensors for the wheelchair. Low-level Autonomy Mode and High-level Autonomy Mode. Then. wheelchair can move autonomously. PC can use its control algorithms to compute linear and angular velocity and then send this information back toPSoC controller. obstacle and collision avoidance. The implementation of robotics education using PSoC and modularized robot components successfully illustrated this integration. such as following the wall. The course organization and project results verified that this integration revolutionized robotics education and was propitious to student learning experience and fostering innovation ability. motion control and computing according to user mode. This mode will guarantee the safety of both the users and the wheelchair during operation. such as applying camera. PGA module: Obtain signals from IR sensors and joystick. PSoC controller communicates with PC via RS232.Fig. 2) Multi-mode Design The PSoC control system has four manipulate control modes: Manual Mode. z Sensor System: Sensor system consists of IR sensors. REFERENCES Fig. Manual Mode: In this mode. 60934006). with this protocol. even their disability degree and environment for use are different. So users can use the typical joystick to control the wheelchair directly. The modules we use in PSoC Designer are as follow: z CSD module: Obtain the choices of the user. z Counter8 module: Get information from encoders. z UART module: Communicate with PC through series port. V. the control system will send information of all sensors to PC. the integration of PSoC technology with educational robotics is presented. 2 200W DC Motors and Joystick. bumpers and encoders. PSoC control system is shown in Fig. In this way. 1) PSoC Control System Multi-mode manipulate control system is provided in intelligent wheelchair. Shared Control Mode. CONCLUSION In this paper. PSoC controller is the brain of wheelchair. Shared Control Mode: In this mode. Low-Level Autonomy Mode In this mode. z LED module: Show user's choice of different modes. bumpers and joystick. a. the intelligent wheelchair will follow the direction of the joystick as well as avoid obstacles and collisions. Based on the information. ACKNOWLEDGMENT This work has been partly sponsored by the National High Technology Research and Development Program of China (Grant No. such as follow the wall as well as avoid obstacles and collisions. b. z Control System: Control system consists of PSoC control system and PC.

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