Вы находитесь на странице: 1из 7

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: mimchitko@gmail.com.
2
Dept of Electronics Engineering, Mandalay Technological University, Mandalay, Myanmar,
E-mail: kyawsoelwin007@gmail.com.

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 this hardware we have used visual basic or PIC Basic Pro
In the modern world of science and technology most of language.
the industry is dependent on the robotics and computer II. SYSTEM DESIGN
related devices. One of such methods is performing a full Overall block diagram of the present project is shown in
rotation into a number of equal steps. Stepper motors are Fig.1. From the block diagram it is clear that two PIC
viewed as the electric motors without commutators. microcontrollers (16F877A) have been used, one is with
Commutator is a rotary electrical switch in certain types of transmitter side and the other is in the receiver side which
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 re-
initialization 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
Fig.1.System block diagram of the wireless two stepper
transmitting and receiving capabilities. In order to program
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 mid-
two stepper motors for motor rotation. range microcontroller from the Microchip Technology. The
PICmicrocontroller architecture is based on RISC
III. FUNCTIONAL REQUIREMENTS
Following are the main components of this project: (ReducedInstruction Set Computer) instruction set. The PIC
16F877A is a 40- pin device and is one of the popular
 RF Module
microcontrollers used in complex applications. The device
 16F877A PIC Microcontrollers
offers 8192x14 fash program, 368 bytes of RAM , 256 bytes
 Stepper motors of non-volatile EEPROM memory, 33 I/O pins,
 L298N motor drivers multiplexed A/D converters with 10-bits resolution, PWM
generator, 3 times, anologue capture and comparator circuit,
A. RF Module
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.

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
Fig.2(b). RF receiver (KST-Rx 706). have multiple "toothed" electromagnets arranged around a
central gear-shaped piece of iron as shown in Fig.4. An
Features of RF Module: RF module is as shown in external control circuit, such as a microcontroller, energizes
Fig.2(a), (b). the electromagnets. To make the motor shaft turn, first one
 Range in open space(Standard Conditions) : 100 electromagnet is given power, which makes the gear's teeth
Meters magnetically attracted to the electromagnet's teeth. When
 RX Receiver Frequency : 433 MHz the gear's teeth are thus aligned to the first electromagnet,
 RX Typical Sensitivity : 105 Dbm 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
turned by a precise angle. motors. Two enable inputs are provided to Enable or disable
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 Fig.5(b). L298N pins layout.
one position to another.
 This vibration can become very bad at some speeds Circuit Diagram Of The Transmitter And Receiver:
5V
and can cause the motor to lose torque.
 The effect can be mitigated by accelerating quickly 3 VEE
through the problem speeds range, physically 16*2 LINE LCD MODULE
2 VDD
damping the system, or using a micro-stepping 10k
driver. 1 11 32 1
VSS D4 D5 D6 D7 RS E
 Motors with a greater number of phases also exhibit 5V MCLR VDD VDD
15 11 12 13 14 4 6 5,16
smoother operation than those with fewer phases. 10K RC0
16 RD0 19
RC1
10K 5V
17 RD1 20
RC2
10K
RD2 21
18
RC3
10K RD3 22

RC4
16F877A 27
10K Microcontroller RD4
RD5 28
5V
22P
13
OSC1

4M
34 data
HZ RB0 TX01
14
OSC2
22P RF TRANSMITTER
VSS VSS

12 31

Fig.5(a). L298N motor driver. Fig.6. Circuit diagram of transmitter.


International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.24, September-2014, Pages: 4737-4743
MIN CHIT KO, KYAW SOE LWIN
5V
5V
470uF
12V 100nF
languages. Both PIC Basic and PIC Basic Pro have been
developed by Micro Engineering Labs Inc. PIC Basic is a
3
9 8 4 2 low-cost compiler and aimed at the lower end of the market,
RX706 7 3 mainly for students and programmers.
STEPPER
RF 10 MOTOR
5V WINDINGS
RECEIVER 12
13
data
L298N C. Flow Chart of the System
14

1 15 6 11 5V
1 11 32
35
MCLR/ VDD VDD RB2
VPP
34
RB1 36
RB3

37 5V 12V
RB4 100nF
470uF
38
RB5

RC2 8 4 2
3
RC3 7 3
16F877A STEPPER
RC4 10 MOTOR
Microcontroller 12 WINDINGS
RC5 13
L298N
RD0
RD1 14
RD2
22P 13 RD3
OSC1 1 15 6 11
RD4 5V
4MHZ RD5

14
OSC2
22P 1
VSS VSS VEE

12 31 2 16*2 LINE LCD MODULE


VDD

3
VSS D4 D5 D6 D7 RS E
11 12 13 14 4 6
5,16

Fig.8. Flow Chart for the system.


The system can be recognized easily by seeing the flow
Fig.7. Circuit diagram of the receiver. chart of the over all system shown in fig.8. At the start of
the program, the input/output ports of the microcontroller
Circuit diagram of the transmitter and receiver as shown are configured. The LCD drive mode is also set as 4-bit
in Figs.6 and 7. mode. The PIC microcontroller at transmitter side sends the
serial data to the receiver via RF transmitter. The serial data
IV. SOFTWARE IMPLEMENTATION FOR THE input (or serial receive) is checked. If the serial data input is
SYSTEM present, it is converted into parallel data format and received
To accomplish the system, the choosing of software is data is displayed on the LCD module. If the serial data input
very important. All PIC microcontrollers require a program is not present, the program checks whether the switch is
or software for their operation. This program is developed pressed or not. If the switch is not pressed, the program
and tested by the programmer or users. The following skips to the LCD display section. The serial data is then
software tools are normally required in a PIC converted into parallel data and displayed on the LCD
microcontroller-based project development cycle: module. If the .switch is pressed at one time, the motor
 A text editor corresponding rotates one step at 7.5 degree. If the switch is
 PIC Basic Pro compilers pressing, the motor continuously rotates one step at 7.5
 PIC programmer device software degree until the switch is pressing. The program wait about
one second to be conveniently displayed on the LCD
A. Micro Code Studio module and the program is repeated as long as power is
Micro Code Studio is a powerful, visual Integrated turned on.
Development Environment (IDE) with In Circuit Debugging
(ICD) capability designed specifically for micro V. SIMULATION RESULTS OF THE SYSTEM
Engineering Labs PICBASIC and PICBASIC PRO The wireless stepper motor control system built based
compilers. This IDE also provides a syntax highlighted to the PIC 16F877A microcontroller is simulated using Proteus
PIC Basic or PIC Pro compilers so that the user and easily software. Proteus consists of two main parts, ISIS and
and very quickly compile programs. 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.11. The ISIS simulated screen of the system in data


Fig.9. The ISIS simulated screen of the wireless two transmit and receive mode sending request “ motor A
stepper motor control system. rotating anticlockwise”.

Fig.10. The ISIS simulated screen of the system in data Fig.12. The ISIS simulated screen of the system in data
transmit and receive mode sending request “ motor A transmit and receive mode sending request “ motor B
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 Fig.18. Harding testing result in data transmit and
clockwise”. 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

Вам также может понравиться