Professional Documents
Culture Documents
59-71 2011
Gerard Rushingabigwi*
Department of Electrical & Electronics Engineering, KIST, 1 Av. de laArme P.O.
Box: 3900 Kigali-Rwanda.. E-mail: g.rushingabigwi@kist.ac.rw
KEYWORDS
Microcontroller,
dieless drawing
system, 2-phase
step motor,
embedded
systems
INTRODUCTION
Microcontrollers are found in almost all smart
electronic devices. From microwaves to automotive braking systems, they are doing jobs that
make peoples lives more convenient and safer.
Microcontrollers are essentially small computers. Unlike the desktop computer, microcontrollers interact with other machines rather
than humans. A microcontroller might be used
to control the temperature of a toast at breakfast and when the temperature reaches a predetermined measure, the toaster could be automatically turned off. A microcontroller could
also be used to count the number of customers
entering the ball park through a turnstile, thereby keeping track of ticket sales (Martin, 2002).
The microcontroller is utilized in this work to
control the speed of a hybrid step motor because the gap between the step motor-driven
cooling system and the work piece needs to
be precisely controlled. During dieless drawing
process, a tube is fixed at one end, heated and
cooled at a part. It is then pulled at the other
end with a certain tensile force, allowing the
heater and cooler to move in the opposite direction, with all movements being motivated by
the step motor.
METHODOLOGY
Different control methods were reviewed such
as intelligent control method, microcontroller
control method, etc. Finally a microcontroller
control method was chosen to be utilized in this
work after assessing different process control
modes and finding that On/Off process control
mode is suitable for the microcontroller based
on the control of the step motor.
Intelligent control method is any system that is
able to effectively access, transmit, process, recycle and use information, in any given environment to successfully achieve the intended purpose. The intelligent core is a thinking activity
based on whats known as inference engine.With
the inference engine or simply if .. then statement while programming, the purpose of intelligent technologies is to design and manufacture
the high level of artificial intelligence systems to
serve the community according to the needs.
Such systems can be used to carry out various
tasks even more accurately than human beings
(Michael, 2005; Cai, 2003, 2002).
Microcontroller based motor control system for the dieless drawing process
Five common process control modes as mentioned in the Table 1 are On/Off, Differential
Gap, Proportional, Integral, and Derivative; while
for the PID is a combination of the three modes
(Proportional-integral-Derivative).
On-Off control
On/Off control is the simplest of the five control modes. Full output action is taken based on
whether the measured value is above or below
the desired value. As a result, the output action
drives the measurement back towards the set
point. When the measured value passes the set
point, the error polarity changes and the output is driven fully to the opposite direction. The
process cycles back and forth past the set point
based on this action. At an incubator for example, it needs to maintain the temperature between 100C and 110C. To get a median value,
a set point of 105C may be used. If temperature
falls below 105C, the heater will turn on. At
105C or above, the heater will shut off.
On/Off control is suitable for processes that
have large capacity, sluggish response, and a relatively constant level of disturbance.
Differential-gap control
Differential-gap control is similar to On/Off
control in that only full output action is taken.
Differential gap control does not take this ac-
61
Microcontroller based motor control system for the dieless drawing process
Through repetitive inputs by the user and readjustments of the control instructions, the
accurate positioning of the cooling system is
successfully realized to simulate the dieless
drawing process. From the users inputs, the upper machine structure or dieless drawing system which is a constructed intelligent control
system, must give the relevant instructions (to
run or stop) to the lower machine system, as
Microcontroller based motor control system for the dieless drawing process
Fig. 6. The flow diagram for the communication of the microcontroller with the step motor
65
notably when 2 is followed by a hexadecimal digit put in the command window, 2F for example.
3) case 0x3: runFlag = 0; break; // The motor
stops, notably when 3 is followed by a hexadecimal digit put in the command window, 3F for
example.
The pictured window in Fig. 7 shows the results
displayed to the user when the instructions 1),
2) and 3) are respectively given to the microcontroller. The target is to attain a high speed and
a quick response for the basic requirements of
On/Off control mode; this is attained when F is
given as hexadecimal digit.
Microcontroller based motor control system for the dieless drawing process
Here the source code is manipulated, and according to calculations with reference to the
commonly known formula shown in Equation 2
(Hui., 2008; Wang, 2008; Zhou, 2009), the vibration and overshoot problems were completely
Let
Table 2 Data for the step motor speeding up & speeding down processes
solved
The value of 65535 is considered instead of
65536 simply because counting in this work
starts from 0 not from 1. After making a number
of calculations by the formula shown in Equation
2 above, and trying several times running the
motor, a better positioning of the dieless drawings cooler is found. The good rotational moment (torque) is obtained with the nth trial; it is
68
Microcontroller based motor control system for the dieless drawing process
This is successfully achieved through simulation performed with a microcontroller and a step motor as
the main materials.The microcontroller is first configured with the personal computer through the RS232
serial ports and then a program is written, compiled
and run in accord with microcontroller to drive the
step motor (Chandy, 2008; Carbondale, 1999, 2000).
The microcontroller communicates with the step motor through the motor drive that is properly micro
stepped to minimize the problem of overshooting.
Though overshooting is normal to the step motors
functioning because of inertia, it causes the step loosing unless minimized.
The big challenge is about the problems of overshooting and vibration which are however solved.The vibration is the inevitable working principle of step motors especially while it is stepping to another pulse.
It means that the stepper motor rotates according
to the initially set angle of rotation. The step-losing
phenomenon occurs when the step motor is not normally started. Normally, the speed of stepper motor
requires the direct starting just because the corresponding frequency must not exceed the utmost limit
of the starting frequency (Hui, 2008). The immediate
motor start up and the final critical stopping point
are the motor running stages certainly characterized
by overshooting phenomenon just because of inertia
reasons (Wang, 2008).
To solve the problems, the motor drives micro stepping technology and coding methods are the two ways
REFERENCES
Beijing Blue Ocean Microchip Co., Ltd, 2009.
LJD-SY-5100
experimental
development
boards manual to the user. See more
at http://www.bluemcu.com/en/company.asppp.
Cai, Z., 2003, Artificial Intelligence and Applications.
Tsinghua
University
Press, pp. 73-121.
Carbondale,
1999,
2000.
Application
of
microcontrollers. Electronics management labs.
At http://www.technology.heartland.edu/faculty/
chrism/automation
and
control/siulabs.pdf
[Accessed in April 2010]
Chawakorn, Y., 2008. Microstepping Bipolar Drive
of Two-Phase
Hybrid
Stepping
Motor
on TMS320F2808 DSC. Application report.
Dallas,Texas 75265. USA. Available online at http://
www.ti.com. [Lastly accessed on 14 October
2011]
Hui, T. et al., 2008. Microcontroller and Serial ports
communication to drive the step motor.
Jianchuan Science and technology. Hubei,
Wuhan 430064. China
John, A., 2008. Microcontroller Introduction.
University of Connecticut. Available at
http://www.engr.uconn.edu/~chandy/courses/
110s08/L01/Intro ToMicrocontrollers-012408.pdf.
[Lastly accessed on 12 October 2011]
Kawaguchi,Y. et al., 1991. Applications of dieless
drawing to. Ti-Ni wire drawing and tapered steel
wire manufacturing. (Wire Journal International
paper available in the Internet)
Martin, D., 2002. An introduction to PIC
microcontrollers, Available at http://www.
many ppt.com/05/An-Introduction-to-PICMicrocontrollers.html.Spring2002
Michael, N., 2005. Artificial Intelligence Intelligent
System guide, Beijing Electromechanical &
Industrial publisher. Pan, Y. and Fan, L., 2002.
Research on shape memory alloys and
applications, Masters Thesis. Suzhou Universitys
academic journal. China.
Shotwell, A., 1999. An introduction to fiber
optics, New Delhi: Prentice Hall of India.
Wang, Y. et al., 2008. Control System Design of
Acceleration and Deceleration curves of
Stepping
motor
and
its
Applications.
Zhao, H. et al, 2009. Design of Micro stepping of
the Motor Drive by FPGA, Instrument
Technique and Sensor. Available online at
http://g.wanfangdata.com.cn. [lastly accessed
on 14 October 2011]
Zhou, Y., 2009. Research on Step motors
positioning technology, Masters Thesis. Dalian
Jiaotong University. China
Microcontroller based motor control system for the dieless drawing process
APPENDIX:
Coding for microcontroller
The code was written with fixed values of:
Crystal oscillator: 11.0592MHz;
Baud rate 9600.
# Include reg51.h
# Define uchar unsigned char
# Define uint unsigned int
sbit FM = P3 ^ 7;
sbit ch451_din = P1 ^ 0;
sbit ch451_dclk = P1 ^ 1;
sbit ch451_load = P1 ^ 2;
sbit ch451_dout = P3 ^ 3;
sbit P00 = P0 ^ 0;
sbit P01 = P0 ^ 1;
sbit P02 = P0 ^ 2;
sbit P03 = P0 ^ 3;
sbit P04 = P0 ^ 4;
sbit P05 = P0 ^ 5;
sbit P06 = P0 ^ 6;
sbit P07 = P0 ^ 7;
/*
This Program is allowing the communication between
the present microchip and the PC through the motor drive. It stands for the non-linear speeding up and
speeding down process. The timer 0 is a pulse maker.
We need the control flag as value that helps to deal
with conditional expressions; a control flag is used to
determine when the looping process must stop.
*/
void initialization()
{
SCON=0x50;
TMOD = 0x21;
TH0=(65535-120)/256; //set the initial parameter to
timer 0 on the high 8 bit
TL0=(65535-120)%256; //set the initial parameter to
timer 0 on the low 8 bit
TR0=1;
T0=1;
EA = 1;
ES=1;
P00=1; //pulses serial port
P01=0; //directions serial port
P02=1; //out of controls serial port
}
// this is the main function; it is the
systems entrance.
void main()
{
initialization();
while(1)
{
if(RI)
{
RI=0;
varReciever=SBUF;
SBUF=varReciever;
controlFlag=varReciever&0xf0;
controlCounter=varReciever&0x0f;
71
}
switch(controlFlag)
{
case 0x10:P01=1;
runFlag=1;
P02=1;
break;
// forward direction
case 0x20:P01=0;
runFlag=1;
P02=1;
break;
// opposite direction
case 0x30:runFlag=0;
FM=1;
P02=1;
break; //stop the motor
case 0x40:P02=0;
FM=1;
break;
//out of control
default:;
}
controlFlag=0;
if(time>controlCounter*300)
{
time=0;
runFlag=0;
SBUF=0x00;
FM=1;
}
if(TF0==1)
{
TF0=0;
TH0=(65535-120)/256;
TL0=(65535-120)%256;
if(runFlag==1)
{
P00=0;
time++;
FM=0;
}
}
else
{P00=1;
}
}
return;
}