Vous êtes sur la page 1sur 6

Design and development of a Cartesian plotter as a way to teach Mechatronics to Mechanical Engineering students

M. Camposaragna, S. Chatterton, P. Righettini


Politecnico di Milano Department of Electrical Engineering Piazza L. da Vinci 32, Milan, 20133, Italy camposaragna@mech.polimi.it chatterton@mech.polimi.it paolo.righettini@polimi.it http://mech.polimi.it

R. Riva, R. Strada, B. Zappa


University of Bergamo Department of Design and Technologies Viale Marconi 5, Dalmine (Bg), 24044, Italy riccardo.riva@unibg.it roberto.strada@unibg.it bruno.zappa@unibg.it http://mech.unibg.it

Abstract The need for interdisciplinary skills in mechanics, electronics, control theory and computer science was recognized as becoming more and more important for mechanical designers. At this aim, it is since the academic year 2002/2003 that a course on Mechatronic Systems is delivered at Bergamo University as an option in the BS curriculum for Mechanical Engineering students. The course is mainly based on Project Oriented Learning activities; actually a practical project is developed each year. This paper mainly deals with the description of the Mechatronics education activity at Bergamo University, with reference to the 2005/2006 academic year course project: a Cartesian plotter driven by stepper motors.

I. Introduction Mechatronics is becoming more and more important in the design process of high performances machines and devices. A synergic cooperation between dierent disciplines like mechanics, control theory, electronics and computer science is therefore needed. It is well known that a mechatronic system is not just the marriage of electrical and mechanical systems but a complete integration of them all. The designer should adopt a global approach to those disciplines instead of a sequential one [1] (the mechanical design, then the electrical one and nally the control one):a mechatronic system is not an electromechanical system and is more than a control system[2]. The contribution of the University of Bergamo to mechatronic design concept is the Mechatronic Systems course. It is a 7.5 ECTS credits course delivered, since the academic year 2002/2003, to Mechanical Engineering students during their fth semester, when they have already acquired knowledge in the main topics of mechanics: motion and equilibrium of rigid bodies, mechanics of machines, mechanical technology, mechanics of materials, mechanical design, technical drawing. On the contrary, as far as it concerns subjects involved in mechatronics other than mechanics, students have just a basic knowledge from previous semesters, after courses

dealing with the fundamentals of electricity, electronics, control theory and computer science. The aim of the course is to complete the students skills by means of theoretical lectures on electric drives, sensors, body dynamics, control techniques and large experimental activities. To make the course more eective it is designed as a ProjectOriented one: the students, gathered in small groups, have to design and develop a mechatronic device to accomplish their requirements. The amount of work necessary to fulll a detailed project is far beyond the scope of the course and the personal readiness of everybody; hence the responsibilities are spread within the team members; each student is given a dierent task in the group: overall coordination, design of mechanical parts, control scheme, software coding, model development and simulation, documentation. This paper deals with the project developed during the 2005/2006 academic year: a Cartesian plotter driven by stepper motors. Fig. 1 shows a 3D model of the device developed by one of the student teams. Some project constraints were given to students (straight roller plotter conguration, working area dimensions, rollers diameter, motors type) but they were free to choose the type of mechanical transmission (gear transmission, belt transmission,...), the transmission ratios, the motors size. The choice of the parameters was made keeping in mind the main target of the project: to develop a device able to draw simple geometric shapes in the shortest time. At this aim students had to: choose a draft conguration of the system; develop a kinematic and dynamic analysis; apply synthesis criteria to choose the proper transmissions and the proper motors size; develop a trajectory planning program; code the motors driving software. The next three sections report a brief description of the suggestions given to students to perform the synthesis of

1-4244-0136-4/06/$20.00 '2006 IEEE

4474

Tmx

X x cy pen
pulley Tmy x y R roller

cx Y y

Fig. 1. Device conguration

the device and to plan the trajectory to be followed by the pen. Section II describes the kinematic and dynamic analysis needed by the synthesis procedure, according to the criteria later exposed in section III. Section IV summarizes the suggested strategy for trajectory planning. The last sections report the simulations results, the hardware devices used and the tests results. Finally section VIII highlights some remarks on the suitability of the course in the frame of mechatronic education of engineering students. II. Kinematic and dynamic analysis Before applying the synthesis criteria to choose the device conguration, a kinematic and dynamic analysis is needed. A. Kinematic analysis Referring to the rst draft conguration shown in Fig. 2, where belt transmissions are supposed to be used, the position of the pen, with respect to the x, y relative coordinate system, can be expressed as: x = X cx = x x cx y = Y cy = y y cy (1)

Fig. 2. First draft conguration

By dierentiating (2) with respect to time, the velocity and the acceleration of the endeector are obtained: = Jq p = Jq p (3)

From (2) and (3) the inverse kinematics equations arise: q = J1 (p + c) = J1 p q B. Dynamic analysis The dynamic equilibrium equations are obtained by applying the principle of virtual works neglecting any power loss: Tmx x + Tmy y + Fix xG + Fiy yG = 0 (6) = J1 p q (4)

(5)

where x , x are the motors rotation angle and the total transmission ratio of x axis; y , y are the y axis ones. In matrix form: p = Jq c where: p= J= x 0 x y 0 y q= c= x y cx cy (2)

where Tmx , Tmy are the motors torques, Fix , Fiy are the components of the inertia forces acting on the center of mass G of the translating device, and xG , yG are the virtual displacements of G. In matrix form it results:
T TT m q + Fi p = 0

(7)

with M = where, from (2) p = J q and Fi = Mp diag (mT x , mT y ), mT x and mT y being the masses reduced to x and y coordinates under the Lagrangian scheme. Finally, from (7), the motors torques can be evaluated as: Tm = JT Fi = JT Mp (8)

4475

III. Synthesis criteria In order to choose the best conguration of the device, synthesis criteria are needed. Those leading to a proper choice of the total transmission ratios x and y are here described. Students were suggested to take into account some kinematic and dynamic constraints; as a test case, a circular path run at constant speed was considered. A. Kinematic criterion Along x and y axis, the velocities must reach the maximal values required for the relevant movement. For our test case, top values are both equal to R with the angular speed and R the radius of the circular path. This leads to the following inequalities: x x max = x R max y max = y ymax R Introducing the trajectory run time T , it results: x R R 2/T = x xmax max (9)

Proper range of variation for x

d s d dLimit from kinematic criterion

Limits from dynamic criterion

Fig. 3. Proper range of variation for x

IV. Trajectory planning As shown in the previous section, the synthesis criteria have been applied to a circular path followed at constant speed. However students target was to set-up a device needed to draw a general path in the shortest time. The set-up procedure for trajectory planning is as follows. The target is the choice of the proper law of motion s = s(t) and, as a consequence, the laws of motion of x axis, y axis and of the motors. The procedure suggested is based on the same kinematic and dynamic criteria described in section III: velocity and acceleration on each axis must not overall some limits. Moreover, students attending the course are already familiar with the concept of curvilinear abscissa, hence its quite simple for them to write down the expressions of velocities and accelerations as functions of the position on a generic trajectory: x = x (s)s x = x (s)s 2 + x (s) s y = y (s)s y = y (s)s 2 + y (s) s

R R 2/T y = y ymax max The equations: x = R 2/T x max , y = R 2/T y max

(10)

(11)

are hyperboles when represented in (T, x ) and (T, y ) coordinates systems; the condition is satised for x and y located above the curves. B. Dynamic criterion Another constraint to be respected is the one concerning the motors torques; (8) shows that the torques required to the motors are: Tmx = mT x x x (12) T =m y my Ty y Being 2 R the maximum acceleration for both axis, the following inequalities must be satised: 2 Tmx max mT x x R (13) Tmy max mT y y 2 R The x and y values satisfying (13) respectively range between two limits, depending on the run time T . Fig. 3 represents in semilogarithmic scale, with reference only to x axis, all the limit values of x , putting in evidence the proper range of variation. Implementing these criteria inside an iterative procedure, it is possible to choose the best transmission ratio for each axis, i.e. the one that allows to obtain the minimum run time T .

(14)

where s is the curvilinear abscissa depending on time t, and x (s), x (s), y (s), y (s) are the geometric velocities and accelerations depending on the trajectorys shape. Hence, as far as x axis is concerned, the conditions to be satised for each position on the trajectory are: x x = |x (s)| s x max Tmxmax mT x |x | = mT x x (s)s 2 + x (s) s x

(15)

As well known, the maximum motors torque Tmxmax isnt constant but its related to the motors angular speed [3]. A. Velocity limits From (15) two velocity limit arise. The rst one:

4476

x x max |x (s)|

(16)
0.15

depends on the maximum motors speed; the second one (obtained by setting s = 0): Tmxmax |x (s)| s 2 mT x x Tmxmax (17) mT x x |x (s)|
[m] 0.1

Starting point

highlights that speed, even thought constant, is limited by the motors torque due to the trajectorys curvature. Similar relations should be written for y axis; the velocity limit will be the minimum value. B. Acceleration limits From the second of (15) dierent conditions arise according to the signs of x and x (s). Performing the analysis of the inequality and taking into account all the combinations due to the signs of x and x (s), the constraints summarized in Table I are obtained; columns refer to the sign of x while the rows to the sign of x (s). Another similar table should be written for y axis. C. Driving strategy Once the velocity and acceleration limit values have been dened, a driving strategy must be chosen. At the aim to make the trajectory run-time as short as possible, x and y axis must run at the best performances condition. The strategy can be summarized as follows: evaluation, in a point of the trajectory, of the speed limit (s lim ) through (16) and (17), once calculated geometric velocity and acceleration; choice of the acceleration according to the actual speed: if s actual < s lim it means that the system can accelerate and, since the target is to get the best performances, the acceleration to be chosen is the maximum one, according to the limits summarized in Table I. On the contrary, if s actual is close to s lim it means that a deceleration is needed; hence the maximum deceleration is chosen. evaluation of the next position and speed by means of numerical integration: sk+1 = sk + s k t k + s k t s k+1 = s where t = tk+1 tk . V. Simulations On the basis of the suggestions concerning the kinematic/dynamic analysis and the driving strategy, students set-up Matlab programs to simulate the plotters behavior. In this way students could evaluate the run-time according to the desired trajectory and, by means of the inverse dynamic analysis, the necessary motors torques. The evaluation of the motors torques needed is very important because the synthesis of the system was performed
[m]

0.05 0.06 0.08 0.1 0.12 0.14 [m] 0.16 0.18 0.2 0.22

Fig. 4. A simulated trajectory

0.04

0.02
Starting point

0.02 0.04

0.06

0.08

0.12

0.1

0.08 0.06 0.04 0.02

0.02

0.04

0.06

[m]

Fig. 5. A simulated trajectory

only with reference to a circular path run at constant speed. Hence simulations allow to foresee and prevent bad running states like synchronization losses of motors, not considered during the synthesis. As an example, Fig. 4 and Fig. 5 show two test trajectories; dots represent subsequent positions on the trajectory at equal intervals of time. The closer the dots the lower the speed of the pen. With reference to Fig. 4 and Fig. 5, the driving strategy seems to be eective: the speed increases along the straight parts of the trajectory, decreases close to the beginning of a curve, remains approximately constant on the curves where the trajectorys radius of curvature is constant, and decreases to zero at the end of the trajectory. The simulation program gives also results about velocities, accelerations and torques. As an example, the diagram represented in Fig. 6 shows the behaviour of the x axis motors torque for the simulation of the trajectory

4477

x <0
Tmxmax mT x x

x 0 x (s)s 2 |x (s)| 2 x (s)s s |x (s)|


Tmxmax mT x x Tmxmax mT x x

x (s) 0

+ x (s)s 2

|x (s)|

x (s)s 2

|x (s)| 2 x (s)s |x (s)|

x (s) < 0

x (s)s 2 s |x (s)|

Tmxmax mT x x

+ x (s)s 2

|x (s)|

x (s)s 2

|x (s)|

TABLE I Acceleration limits

1.5

x 10

0.5

Torque [Nm]

0.5

1.5 0

0.5

1.5

2.5

3.5

Time [s]

Fig. 6. x axis motors torque

Fig. 7. A students achievement

shown in Fig. 5. By means of these results students were able to choose the most proper motors size. VI. Hardware devices Each team was provided with two 200 steps/rev hybrid stepper motors, one manufactured by Servotecnica and the other one by Sanyo Denki, which holding torques are repectively 44 N cm and 19 N cm. The motors were driven by a commercial stepper motor driver, the IM483 from Intelligent Motion System Inc; it is a bipolar driver, with 2A peak current designed to drive stepper motors in full step, half-step or microstep mode (up to 51200 steps/rev), via hardware switch. Starting from subroutines implementing the realtime feature and the generation of the step clock, previously made ready, the students had to develop the control programme to drive the plotter. VII. Prototypes and tests The last phase of the project was the prototypes realization and test. Each team developed its own prototype according to the choices made during the synthesis. Fig. 7 shows a students achievement where belt transmissions were used for both x and y axis. In order to rate the success of the design, the plotters performances in terms of accuracy and velocity were tested

on given paths; the drawn path was compared with a reference pattern drawn on a transparency. Fig. 8 shows the performance test where the plotter actually draws the path of Fig. 4: there is an evident error in the lower part of the path, the trajectory being not precisely followed (it should be noticed that this result was the one obtained by the worst team). A better result is shown in Fig. 9: the drawn path follows with very high precision the path, where SM stands for the italian name of the course, Sistemi Meccatronici. The tests were organized as a challenge between the different teams and were of two dierent types: the rst at low speed, to evaluate the precision in following the given trajectory, the second at high speed, to seek the lowest motion time. VIII. Conclusion In this paper our way to teach Mechatronics to mechanical engineering students at the University of Bergamo has been outlined. The educational activity, mainly based on the Mechatronic Systems course, has been very successful since its beginning due to a good balance between theory and practice. The students entering the course were quite worried about their limited knowledge in topics like electronics, computer science and control theory: they felt their starting level inadequate to the course and they were afraid of

4478

Fig. 8. A test result

[2] D. Shetty and R.A. Kolk, Mechatronics system design, PWS Publishing Company, 1997. [3] T. Kenjo, Stepping motors and their microprocessor control, Oxford Press, 1984. [4] R. Siegwart, Grasping the interdisciplinarity of mechatronics, IEEE Robotics and Automation Magazine , vol. 8, pp. 2734, 2001. [5] I.C. Ume, A. Kita, S. Liu and S. Skinner, Graduate Mechatronics course in the school of mechanical engineering at Georgia Tech, Mechatronics , vol. 12, pp. 323335, 2002. [6] S. Meek, S. Field and S. Devasia, Mechatronics education in the Department of Mechanical Engineering at the University of Utah, Mechatronics , vol. 13, pp. 111, 2003. [7] M. Grimheden and M. Hanson, Mechatronics the evolution of an academic discipline in engineering education, Mechatronics , vol. 15, pp. 179192, 2005. [8] S. Chatterton, P. Righettini, R. Riva., R. Strada., B. Zappa, Teaching mechatronics from a mechanical point of view, 4th International Workshop on Research and Education in Mechatronics , Bochum, Germany, 2003. [9] M. Camposaragna, P. Righettini, R. Riva, F. Sibella, R. Strada and B. Zappa, Education in mechatronics for mechanical engineering students: development of a SCARA robot prototype, 5th International Workshop on Research and Education in Mechatronics , Kielce-Cedzyna, Poland, 2004. [10] P. Righettini, R. Strada, V. Lorenzi and B. Zappa, Modelling and dynamic simulation of mechanical systems driven by stepper motors, 11th International Conference on Power Electronics and Motion Control EPE-PEMC , Riga, Latvia, 2004. [11] M. Camposaragna, P. Righettini, R. Riva, R. Strada and B. Zappa, A project-oriented approach to mechatronics for mechanical engineering students: design and realization of a Parallel Kinematic Machine, 6th International Workshop on Research and Education in Mechatronics , Annecy, France, 2005.

Fig. 9. A test result

the new not mechanical topics. However, after this initial panic moment, being all the theoretical and experimental activities devoted to the projects realization, students were able to ll in the gaps in their skill in a quite short time, getting the necessary tools to successfully develop the project. As a matter of fact, as long as the course went on, enthusiasm took worrys place and students began to improve their skills by means of a funny hands-on approach. The success of the course is conrmed by the evaluation questionnaires students are asked to ll up at the end of the course; the course is considered very suitable to learn the meaning of mechatronic design since it gives an overview on what a mechatronic system is composed of and how the dierent parts interact one another. Attending the Mechatronic Systems course students can acquire competences in several areas of engineering like electronics, motion control and computer science, by means of a practical hands-on approach. Moreover, being gathered into groups, they learn how to work together and how to collaborate for the sake of achieving a common target: the successful realization of the semesters project. References
[1] W. Bolton, Mechatronics: electronic control systems in mechanical and electrical engineering, Addison Wesley Prentice Hall, 3rd edition, 2004.

4479

Vous aimerez peut-être aussi