Design and Construction of Wireless Two Stepper Motors

advertisement
ISSN 2319-8885
Vol.03,Issue.24
September-2014,
Pages:4737-4743
www.semargroup.org,
www.ijsetr.com
Design and Construction of Wireless Two Stepper Motors Control System
Based PIC Microcontroller using RF Module
MIN CHIT KO1, KYAW SOE LWIN2
1
Dept of Electronics Engineering, Mandalay Technological University, Mandalay, Myanmar,
E-mail: [email protected]
2
Dept of Electronics Engineering, Mandalay Technological University, Mandalay, Myanmar,
E-mail: [email protected]
Abstract: A Stepper motor is the most useable tool applied in process control, machine tools and robotics. Especially in robotics
and process control, it is necessary to control the stepper motor from a remote place. The radio frequency module is basically a
PIC microcontroller based wireless communication system. The control switches are used to control the direction of stepper
motors corresponding angle. The resolution of motors is 7.5 degree/step. The status of these switches is transmitted by using RF
transmitter and receiver. The RF modules used in this project are KST ( Tx-01) transmitter and KST (Rx-706) receiver. The four
switches are interfaced to the RF transmitter through the 16F877A PIC microcontroller. The microcontroller continuously reads
the status of the switches, pass data through the RF transmitter displayed on LCD module and the transmitter transmits the data.
At the receiving end, the RF receiver receives this data, gives to the microcontroller. The microcontroller reads the data and after
processing, performs the corresponding action i.e., to rotate the motors clockwise and anticlockwise. 16x2 Liquid Crystal display
(LCD) display is provided at the transmitter side to display the status of the stepper motors.L298N driver is used to drive the
stepper motor. This project uses regulated 5V, 500mA power supply, and 12 V for motors driver supply.
Keywords: 16F877A PIC Microcontroller, RF Module, Stepper Motor Driver (L298N), Bipolar Stepper Motors.
I. INTRODUCTION
In the modern world of science and technology most of
the industry is dependent on the robotics and computer
related devices. One of such methods is performing a full
rotation into a number of equal steps. Stepper motors are
viewed as the electric motors without commutators.
Commutator is a rotary electrical switch in certain types of
electric motors or electric generators that periodically
reverses the current direction between the rotor and the
external circuit. A commutator is a common feature of
direct current rotating machines.[3] In a motor all the
windings are part of stator. The rotor is a permanent magnet
or a tooth block of some magnetically soft material. The
motor controller should handle all the commutation
extremely. Audio frequencies are used to step most of the
stepper motors. In such cases they spin quickly. They can be
stopped and started at controlled orientations. Stepper
motors are used in simple open loop control systems,
suitable for the systems operating at low accelerations with
static loads. A stepper over-torqued in an open loop system
will result in losing all knowledge of rotor position and a reinitialization of system is required. In this project we have
used RF modules in order to control the system wirelessly
from a remote area. We have designed hardware with
transmitting and receiving capabilities. In order to program
this hardware we have used visual basic or PIC Basic Pro
language.
II. SYSTEM DESIGN
Overall block diagram of the present project is shown in
Fig.1. From the block diagram it is clear that two PIC
microcontrollers (16F877A) have been used, one is with
transmitter side and the other is in the receiver side which
Fig.1.System block diagram of the wireless two stepper
motors control system.
Copyright @ 2014 SEMAR GROUPS TECHNICAL SOCIETY. All rights reserved.
MIN CHIT KO, KYAW SOE LWIN
may be located at 100 meters distance and connected
 RX Supply Current : 3.5 mA
through the RF (radio frequency) module. The system is
 RX IF Frequency : 1MHz
used in four control switches. The two represent for rotation
 Low Power Consumption
of motor A corresponding at clockwise and anticlockwise.
 Easy For Application
The other represent for motor B similar to motor A. The
 RX Operating Voltage : 5V
microcontroller at the transmitter acts to encode the serial
 TX Frequency Range : 433.92 MHz
data and send to the RF transmitter.16x2 line LCD display
 TX Supply Voltage : 3V ~ 6V
is connected to the microcontroller to describe the status of
 TX Out Put Power : 4 ~ 12 Dbm
switches on display. The other at the receiver acts to decode
the serial data giving from the RF receiver. Two L298N
B. 16F877A PIC Microcontroller
motor drivers are interfaced with the microcontroller and
The PIC 16F877A is the 14-bit instrction word midtwo stepper motors for motor rotation.
range microcontroller from the Microchip Technology. The
III. FUNCTIONAL REQUIREMENTS
Following are the main components of this project:
 RF Module
 16F877A PIC Microcontrollers
 Stepper motors
 L298N motor drivers
A. RF Module
PICmicrocontroller architecture is based on RISC
(ReducedInstruction Set Computer) instruction set. The PIC
16F877A is a 40- pin device and is one of the popular
microcontrollers used in complex applications. The device
offers 8192x14 fash program, 368 bytes of RAM , 256 bytes
of non-volatile EEPROM memory, 33 I/O pins,
multiplexed A/D converters with 10-bits resolution, PWM
generator, 3 times, anologue capture and comparator circuit,
USART, and internal and external interrupt facilities. The
pin configuration of the PIC 16F877A is shown in Fig.3
Fig.2(a).RF transmitter ( KST-Tx01).
Fig.3.PIC 16F877A.
Fig.2(b). RF receiver (KST-Rx 706).
Features of RF Module: RF module is as shown in
Fig.2(a), (b).
 Range in open space(Standard Conditions) : 100
Meters
 RX Receiver Frequency : 433 MHz
 RX Typical Sensitivity : 105 Dbm
C. Stepper Motor
Stepper motors operate differently from DC brush
motors, which rotate when voltage is applied to their
terminals. Stepper motors, on the other hand, effectively
have multiple "toothed" electromagnets arranged around a
central gear-shaped piece of iron as shown in Fig.4. An
external control circuit, such as a microcontroller, energizes
the electromagnets. To make the motor shaft turn, first one
electromagnet is given power, which makes the gear's teeth
magnetically attracted to the electromagnet's teeth. When
the gear's teeth are thus aligned to the first electromagnet,
they are slightly offset from the next electromagnet. So,
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.24, September-2014, Pages: 4737-4743
Design and Construction of Wireless Two Stepper Motors Control System Based PIC Microcontroller using RF Module
when the next electromagnet is turned on and the first is
turned off, the gear rotates slightly to align with the next
D. Motor Driver (L298n)
one, and from there the process is repeated. Each of those
It is a high voltage, high current dual full-bridge driver
slight rotations is called a "step," with an integer number of
designed to accept standard TTL logic levels and drive
steps making a full rotation. In that way, the motor can be
inductive loads such as relays, solenoids, DC and stepping
motors. Two enable inputs are provided to Enable or disable
turned by a precise angle.
the device independently of the input signals as shown in
Fig.5. The emitters of the lower transistors of each bridge
are connected together and the corresponding external
terminal can be used for the connection of an external
sensing resistor. An additional supply input is provided so
that the logic works at a lower voltage.
Fig.4. Bipolar stepper motor.
Degree of rotation = Resolution x Number of pulses
 Stepper motors are constant power devices.
 As motor speed increases, torque decreases.
 The torque curve may be extended by using current
limiting drivers and increasing the driving voltage.
 Steppers exhibit more vibration than other motor
types, as the discrete step tends to snap the rotor from
one position to another.
 This vibration can become very bad at some speeds
and can cause the motor to lose torque.
 The effect can be mitigated by accelerating quickly
through the problem speeds range, physically
damping the system, or using a micro-stepping
driver.
 Motors with a greater number of phases also exhibit
smoother operation than those with fewer phases.
Fig.5(b). L298N pins layout.
Circuit Diagram Of The Transmitter And Receiver:
5V
3
VEE
16*2 LINE LCD MODULE
2 VDD
10k
5V
15
10K
1
1
11
32
MCLR VDD VDD
RC0
VSS
D4 D5 D6
11
12
13
D7 RS
14
4
E
6
5,16
RD0 19
16
RC1
10K
5V
RD1 20
17
RC2
10K
18
RD2 21
RC3
RD3 22
10K
16F877A
27
Microcontroller RD4
RC4
10K
RD5 28
22P
5V
13
OSC1
4M
HZ
RB0
14
22P
34
data
TX01
OSC2
VSS
VSS
12
31
Fig.6. Circuit diagram of transmitter.
Fig.5(a). L298N motor driver.
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.24, September-2014, Pages: 4737-4743
RF TRANSMITTER
12V 100nF
5V
5V
470uF
8
9
3
RX706
RF
RECEIVER
4
2
7
10
12
5V
3
MIN CHIT KO, KYAW SOE LWIN
languages. Both PIC Basic and PIC Basic Pro have been
developed by Micro Engineering Labs Inc. PIC Basic is a
low-cost compiler and aimed at the lower end of the market,
mainly for students and programmers.
STEPPER
MOTOR
WINDINGS
13
L298N
data
C. Flow Chart of the System
14
1
34
MCLR/
VPP
11
32
VDD VDD
RB1
RB3
RB4
RB5
16F877A
Microcontroller
15 6
1
RB2
5V
11
35
36
37
5V
12V
100nF
470uF
38
RC2
3
RC3
7
10
12
RC4
RC5
8
4
2
3
L298N
STEPPER
MOTOR
WINDINGS
13
RD0
14
RD1
RD2
22P
13
RD3
OSC1
1
RD4
15 6
11
5V
RD5
4MHZ
14
OSC2
22P
VSS
VSS
12
31
1
2
3
VEE
16*2 LINE LCD MODULE
VDD
VSS
D4
11
D5
12
D6
13
D7
14
RS
4
E
6
5,16
Fig.8. Flow Chart for the system.
Fig.7. Circuit diagram of the receiver.
Circuit diagram of the transmitter and receiver as shown
in Figs.6 and 7.
IV. SOFTWARE IMPLEMENTATION FOR THE
SYSTEM
To accomplish the system, the choosing of software is
very important. All PIC microcontrollers require a program
or software for their operation. This program is developed
and tested by the programmer or users. The following
software tools are normally required in a PIC
microcontroller-based project development cycle:
 A text editor
 PIC Basic Pro compilers
 PIC programmer device software
A. Micro Code Studio
Micro Code Studio is a powerful, visual Integrated
Development Environment (IDE) with In Circuit Debugging
(ICD) capability designed specifically for micro
Engineering Labs PICBASIC and PICBASIC PRO
compilers. This IDE also provides a syntax highlighted to
PIC Basic or PIC Pro compilers so that the user and easily
and very quickly compile programs.
The system can be recognized easily by seeing the flow
chart of the over all system shown in fig.8. At the start of
the program, the input/output ports of the microcontroller
are configured. The LCD drive mode is also set as 4-bit
mode. The PIC microcontroller at transmitter side sends the
serial data to the receiver via RF transmitter. The serial data
input (or serial receive) is checked. If the serial data input is
present, it is converted into parallel data format and received
data is displayed on the LCD module. If the serial data input
is not present, the program checks whether the switch is
pressed or not. If the switch is not pressed, the program
skips to the LCD display section. The serial data is then
converted into parallel data and displayed on the LCD
module. If the .switch is pressed at one time, the motor
corresponding rotates one step at 7.5 degree. If the switch is
pressing, the motor continuously rotates one step at 7.5
degree until the switch is pressing. The program wait about
one second to be conveniently displayed on the LCD
module and the program is repeated as long as power is
turned on.
V. SIMULATION RESULTS OF THE SYSTEM
The wireless stepper motor control system built based
the PIC 16F877A microcontroller is simulated using Proteus
software. Proteus consists of two main parts, ISIS and
ARES. ARES is a layout package, which is used to create a
PCB when the circuit has been designed. The schematic
B. PIC Basic Pro Language
diagram of the main components of the wireless motor
In this project, PIC Basic and PIC Basic Pro languages
control system including the microcontroller circuit is drawn
are used to program PIC microcontrollers. BASIC is one of
in the ISIS software and then run the simulator program. A
the oldest and widely known high-level programming
screenshot of the ISIS schematic capture and the motor
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.24, September-2014, Pages: 4737-4743
Design and Construction of Wireless Two Stepper Motors Control System Based PIC Microcontroller using RF Module
control simulation environment is shown in the following
Figs.9 to 13.
Fig.9. The ISIS simulated screen of the wireless two
stepper motor control system.
Fig.11. The ISIS simulated screen of the system in data
transmit and receive mode sending request “ motor A
rotating anticlockwise”.
Fig.12. The ISIS simulated screen of the system in data
Fig.10. The ISIS simulated screen of the system in data
transmit and receive mode sending request “ motor B
transmit and receive mode sending request “ motor A
rotating clockwise”.
rotating clockwise”.
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.24, September-2014, Pages: 4737-4743
MIN CHIT KO, KYAW SOE LWIN
Fig.16. Harding testing result in data transmit and
receive mode
sending request “motor A rotating
anticlockwise”.
Fig.13. The ISIS simulated screen of the system in data
transmit and receive mode sending request “ motor A
rotating anticlockwise.
VI. HARDWARE TEST
Hardware testing results as shown in bellow figs.14 to 18.
Fig.17. Harding testing result in data transmit and
receive mode
sending request “motor B rotating
clockwise”.
Fig.14. Hardware tesing result in data transmit and
recive mode.
Fig.15. Harding testing result in data transmit and
receive mode sending request “motor A rotating
clockwise”.
Fig.18. Harding testing result in data transmit and
receive mode
sending request “motor B rotating
anticlockwise”.
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.24, September-2014, Pages: 4737-4743
Design and Construction of Wireless Two Stepper Motors Control System Based PIC Microcontroller using RF Module
VII. CONCLUSION
In this project 16F877A PIC microcontroller and RF
wireless technology has been used to position the shaft of
the stepper motor at a desired angle which in turn may be
used in deferent application areas. As conventional IR
wireless system has short distance limitation. IR technology
has been required at line of sight. RF technology can pass
through many obstacles not required line of sight. That, , RF
technology has been used here. It can more advance that and
than other applications can be used such as robot
technology, remote control systems, remote open door
system, etc. Application of such control system of stepper
motor in remote surveillance system is the future scope of
this work.
VIII. REFERENCE
[1] Hausila Singh and Sudhansu Sharma, “Some Novel
microprocessor based configurations for controlling
Remotely Located stepper Motors as Actuators of control
valves”, IEEE Transaction on industrial electronics,
AUGUST 1991, 38(4), PP 283-287.
[2] Joao Neves Moutinho, Fernando David Mesquita, Nuno
Martins and Rui Esteves Araaujo. “Progresses On The
Design of a Surveillance System to Protect Forests from
Fire”, IEEE Conference on Emerging Technologies and
Factory Automation, 2, 16-19 Sept.2003, PP 191-194,
10.1109/ETFA.2003.1248696.
[3] D. Manojkumar, P. Mathankumar, E. Saranya and S.
pavithradevi, “Mobile Controlled Robot using DTMF
Technology for Industrial Application”, International
Journal of Electronics Engineering Research, 2010, 2( 3),
PP. 349-355.
[4] Stepping Motors and their Microprocessor controls,
Takashi Kenjo, 1994.
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.24, September-2014, Pages: 4737-4743
Download