Académique Documents
Professionnel Documents
Culture Documents
4
Nice, France, October 6-8, 2010
Abstract—This paper explains the whole process of a the gear's teeth to magnetically be attracted to
system design for the remote control of a stepper motor electromagnet's teeth. When the gear's teeth are thus aligned
via web server. For this purpose a hardware structure is to the first electromagnet, they are slightly offset from the
fully designed and implemented. Two types of next electromagnet. So when the next electromagnet is
communications were used to operate with the stepper turned on and the first is turned off, the gear rotates slightly
motor. The first is realized by serial RS-232 protocol and to align with the next one, and from there the process is
the second one uses TCP/IP protocol for remote control. repeated. Each of those slight rotations is called a "step"
The TCP/IP protocol provides communication between with an integer number of steps making a full rotation. In
server and client computers. The proposed control that way, the motor can be turned by a precise angle [13].
system is connected to the server. The main objective of This paper describes implementation of the proposed
this paper was to obtain a precise control of velocity or remote control of the stepper motor via web server (one
number of steps of the stepper motor. Validity and client). The realized system exhibits the following:
effectiveness of the used algorithm were verified through • implementation based on PIC16F877a microcontroller,
both simulations and experiments.
• adjustment of the velocity, number of steps and rotation
direction of the stepper motor,
I. INTRODUCTION
• precise control over RS-232 serial communication,
911
created. This handler was used in combination with m-files Microcontroller interprets those commands and generates
pnet_putvar and pnet_getvar to send the necessary data to trigger impulses on PORT D. These impulses are sent to
the connection and to collect that data from connection unipolar transistors which are combined to form a power
respectively. Two m-files were created (for host and client) amplifier. This power amplifier is directly connected to the
using these previously mentioned m-files. The required stepper motor. The stepper motor has an encoder disc
toolbox can be found in the references along with all mounted on its shaft. The encoder recognizes alterations
explanations for each m-file [15]. from encoder disc and sends them as impulses to the analog
For the establishment of correct remote control input on PIC. These impulses are used to determine proper
connection, first of all the connection between the work of the stepper motor. Fig. 7 represents the realized
system.
microcontroller and server need to be provided (RS232). The
next step is to setup the connection between server and client
(TCP/IP). If there is no connection between server and
client, stop command is active. After successful connection
between server and client, only correct messages are send
through the server, and there via RS232 to the
microcontroller and executed.
PROGRAMMER
SUPPLY
P COMMUNICATION Fig. 7. The realized stepper motor control system.
60000
Twidth = [ms ] (1)
RPM ⋅ 200
(b)
(a) Timer1 is set to appropriate value so it overflows every
100 ms and an interrupt is generated. In Timer1 Interrupt
(d) Service Routine microcontroller sends number of steps made
(c)
in last 100 ms to server PC via RS-232. Timer0 is used as
Fig. 6. Main components used for construction of the system (a) counter. Because the timer0 requires analog signals, output
PIC16F877a; (b) IRF639; (c) MAX 232; (d) Encoder.
from encoder is led to analog pin RA4/T0CKI. Timer0
The system is operated from the client’s computer GUI. The increments on every step. Client PC uses received
commands from host are sent through serial connection. information about number of steps made, calculate the
912
velocity and shows it on GUI. The similar GUI can be set at
the server and used in directly control of the stepper motor.
CLIENT PC
ETHERNET
SERVER PC
RS232
RECEIVE DATA
AVAILABLE
MICRCONTROLLER
INTERRUPT PIC16F877A
SERVICE ROUTINE
TIMER0
Fig. 9. Graphical user interface.
No INTERRUPT
Detect start
SERVICE
message '#' ?
ROUTINE The experimental verification of the proposed stepper
Yes
motor control will be demonstrated in the next section.
Read Timer0 value
TIMER 1
COUNTER
MAIN PROGRAM
No
Is START
bit=1?
Yes D0
D1
Reset Timer0, Timer1
D2
D3
t
Generate appropriate
Different direction of rotation
sequence of 4 impluses.
D0 Fig. 10. Time response of the motor voltage (desired velocity = 30 RPM).
Yes D1
Is START bit=1 AND D2
total number of steps
< required D3
t
No
ENCODER
913
As shown in Figs. 10, 12 and 14, the responses are almost
instant. The small deviation is the result of mechanical
characteristics of stepper motor. The noise in those figures is
caused by imperfection of the encoder and its disc. The
response signal collected from encoder is raised from logical
“0” (0.5 [V]) to logical “one” (4.75 [V]) within a short
period of time (see Figs. 10, 12 and 14).
Figures 11, 13 and 15 show various measurements of
desired and actual velocities. It can be seen that the actual
velocity follows the desired one. At certain moments there
are deviations of actual velocity. These deviations are caused
by restrictions of the used encoder. The shape of those
Fig. 12. Time response of the motor voltage (desired velocity = 60 RPM).
deviations is the result of linear approximation of the
characteristic.
VI. CONCLUSION
This paper presented the design of a remotely controlled
stepper motor via web server. An operating algorithm and
GUI were created for this purpose. Through the GUI user
can operate the motor in two modes: velocity and positional.
The feedback received from the encoder is sent through the
established connection from server to the client.
Experimental results demonstrate the effectiveness of the
remotely controlled stepper motor system.
REFERENCES
Fig. 13. Desired and actual velocities (desired velocity = 60 RPM). [1] T. B. Sheridan, “Space teleoperation through time delay review and
prognosis,” IEEE Transaction on Robotics and Automation, vol. 9, pp.
592-606, October 1993.
[2] C. Sayers, Remote Control Robotics, New York: Springer Verlag,
1996.
[3] J. Velagic, M. Coralic and M. Hebibovic, “The remote control of
robot manipulator for precise time-limited complex path tracking,” in
Proc. the IEEE International Conference on Mechatronics and
Robotics (MechRob2004), Volume 2, September 13-15, Aachen,
Germany, pp. 841-846
[4] D. Lee, and M.W. Spong, “Passive bilateral teleoperation with
constant time delay,” IEEE Transactions on Robotics and Automation,
vol. 22, no.2, pp. 269-281, April 2006.
[5] Vladimir Lucan, Petr Simacek, Jari Seppälä, Hannu Koivisto,
“Bluetooth and wireless LAN applicability for real-time control”,
September 2002.
[6] Xin Liu , Yongtian Wang , Yue Liu , Dongdong Weng, Xiaoming
Hu, “A remote control system based on real-time image processing”,
in Proc. 2009 Fifth International Conference on Image and Graphics,
Fig. 14. Time response of the motor voltage (desired velocity = 120 RPM). September 2009.
[7] Chui Yew Leong and Abdul Rahman Ramli, “Development of a real-
time embedded remote triggering and monitoring system with SC12,”
Intelligent Systems and Robotics Laboratory (ISRL), Institute Of
Advanced Technology, Universiti Putra Malaysia. 43400 Serdang,
Selangor. 2004.
[8] G. Srinivasarao and S. Sao, “Security system based on stepper motor
control using microcontroller”, November 2009.
[9] A. Altintas, ”A graphical user interface for programming stepper
motors used at different kinds of applications,” Mathematical and
Computational Applications, vol. 14, no. 2, pp. 139-146, 2009.
[10] F. Betin, D. Pinchon, and G.A. Capolino, “Fuzzy logic applied to
speed control of a stepping motor drive,” IEEE Transactions on
Industrial Electronics, June 2000.
[11] Jan B.A. Habraken, K. de Bruin, M. Shehata, J. Booij, R. Bennink, B.
L.F. van Eck Smit, and E.B. Sokole, “Evaluation of high-resolution
pinhole SPECT using a small rotating animal,” Journal of Nuclear
Medicine, vol. 42, no. pp. 1863-186, 2001.
Fig. 15. Desired and actual velocities (desired velocity = 120 RPM).
914
[12] F. Liu, Z. Hu, L. Qiu, C. Hui, C. Li, P. Zhong, and J. [14] Y. Wang, K. Yan, G. Sun, and P. Lou, “Serial communication in
Zhang, “Boosting high-intensity focused ultrasound-induced anti- DNC information systems”, The CIMS Center of NUAA, Nanjing
tumor immunity using a sparse-scan strategy that can more effectively 210016, China, Published by Moxa Technologies, January 2003.
promote dendritic cell maturation,” Journal of Translational [15] P. Rydesaeter, TCP/UDP/IP toolbox 2.0.6. user guide, March 2001.
Medicine, 2010. Available:http://www.mathworks.com/matlabcentral/fileexchange/345
[13] G. Liptak Bela, Instrument Engineers' Handbook: Process Control [16] CCS User guidance. Available: http://www.ccsinfo.com/
and Optimization. CRC Press, 2005.
915