You are on page 1of 61

Acknowledgment

First of all, my thanks are directed to

ALLAH ,
.for His uncountable gifts

Thesatisfactionandeuphoriathataccompany thesuccessful
completionofany
taskwouldbeincompletewithoutamentionofthepeoplewhomadeitpossibl
e, whoseconstantguidanceandencouragementcrownallthe
.effortswithsuccess
We are grateful Commodure Dr. Hatem Khater for his unlimited
help and useful advices, and for providing me the opportunity to
undertake this thesis. I am highly indebted to Brig Dr. Hayman
Elsayed Hassan, for taking keen interest in my work and for his
constant monitoring, valuable guidance, and support throughout the
course of this work. I profusely thank him for having patience to clear
my doubts and channelize my efforts.

Finally, our deep thanks to all Stuff in Air Defense College


.for their continuous support during this project

Dedication

To all our families

Abstract

Contents
Chapter1SKYGUARD

Chapter 1
SKYGUARD
1.1 Introduction
This chapter represents the overall operational systems of the fire control
unit the SKYGUARD unit consists of:
1234-

Fire control unit (FCU).


Two launchers.
Two guns.
Eight power supplies.

The SKYGUARD unit is illustrated in figure 1.1, 1.2 and 1.3

Fig 1.1

Fig 1.2

Fig 1.3

1.2 General Specifications


1.2.1Purpose
The fire control unit SKYGUARD forms with the launcher and the 35
mm AA twin guns a mobile all weather fire control system for antimissile
defense.

1.2.2 The fire control unit performs the


following tasks:
1. Target detection and target acquisition up to arrange
of 20 km with the help of the built in search radar.
2. Target recognition and acquisition by means of an
optical sight (OS).
3. Automatic target tracking in all three coordinates
(bearing, angle of sight and range) by radar.
4. Automatic target tracking in two coordinates (bearing
and angle of sight) by TV range by radar.
5. Manual target tracking in two coordinates (bearing
and angle of sight) by joystick and TV range by radar.
6. Determination of bearing and elevation for control of
up to two guns and two launchers.

1.3 General Survey


The fire unit comprises:
1.
2.
3.
4.

The FCU SKYGUARD (with built in PSU).


Two sparrow's launcher (with built in PSU).
Two 35 mm AA twin guns with the associated PSU.
Three loaders for missile launchers.

The SKYGUARD also includes an optical sight (OS) among the standard
accessories included in the delivery.

The connection between the FCU and the launcher as well as between the
FCU and the guns is established with one data transmission receiver each
and each of the latter is equipped with two field cables.
One the first field cabals the data line the entire data exchange (angle data
switch on and fire commands measurement data) are transferred between
the FCU and the weapons.
The second field cables the intercom line ensures the telephone
communications between the operating crew of the FCU and the
operating crew of the weapons.
The optical sight (OS) transmits the bearing and elevation angle via a 20
m long signal cable to the FCU.

1.4 The Subsystem of the Fire Control Unit


The FCU is subdivided into subsystem each subsystem represents a
functional unit which is largely self contained (e.g. hydraulic system,
radar system ) this functional subdivision facilitates testing of the unit and
troubleshooting the test concept is therefore based on this subdivision
certain overlaps especially at interface points between different
subsystem can of course not be avoided. The following sections illustrate
all subsystem with their essential assemblies for each assembly a list of
included subassemblies is indicted items labeled with an arrow are
described in the pages following the list .All operating elements are
supplied with a short text they are described under the subsystem to
which they relate function allying. This means that certain operation
panels appear several times although they are part of only one subsystem
to provide clear survey all elements of the operators consol are
summarized with text and illustrations on an operatories console diagram
this diagram is enclosed in the drill book .All subsystem of the FCU are

listed with their subsystem numbers on the next page the numbers of the
subsystem are kept constant throughout the whole documentation
therefore subsystem on 11 is always the radar system on 15 is always the
intercom system.

1.5 Objective
Upgrade SKYGUARD wired communication system between station and
launchers based on wireless data transmission technique. Novel system to
convert the wired data to be wireless, Extend the distance between the
station and the launcher and increase the performance of the operational
situation of the SKYGUARD unit.

1.6 Problem Research


Due to limited wiring lengths between FCU and LR , we face many
troubles such as limited cable length as the maximum length of the wired
connections between the FCU and LR is (500m) , that makes mobility
constrains for the system , environment conditions due to rough terrain
where the units of the SKYGUARD system established , high impedance
as the cable getting old , its impedance increases and then BER increases
financial cost as the import process of the spare parts , maintenance and
experts is very expensive , political problem as the system is European
made and due to the current circumstances , it is difficult to offer spare
parts and technical supports .

1.7 SKY Guard system

Chapter 2
Network communication systems
2.1 Introductions
This chapter consists of two of parts, This first one is
network communication protocols, This part takes about
the difference between the transmission control protocol
(TCP) and user diagram protocol (UDP), The second part is
the

network

communication

system,

and

this

part

represent the difference communication system which is


LAN, WLAN, WAN, MAN.

2.2 Type of network


1- Local area network
A local area network (LAN) is a computer network that interconnects
computers within a limited area such as a home, school, computer
laboratory, or office building using network media. The defining
characteristics of LANs, in contrast to wide area networks (WANs) ,
include their smaller geographic area ,and non-inclusion of leased
telecommunication lines .ARCNET, Token Ring and other technology
standards have been used in the past , but Ethernet over twisted pair
cabling , and Wi-Fi are the two most common technologies currently used
to build LANs .

2- Wide area network

A wide area network (WAN) is a network that covers abroad area (i.e.,
any telecommunications network that links across metropolitan, regional,
or national boundaries) using leased telecommunication lines. Business
and government entities utilize WANs to relay data among employees,
clients, buyers, and suppliers from various geographical locations. In
essence, this mode of telecommunication allows business to effectively
carry out its daily function regardless of location. The internet can be
considered a WAN as well, and is used by businesses, governments,
organizations, and individuals for almost any purpose imaginable.
Related terms for other types of networks are personal area networks
(PANs) , local area networks (LANs) which are usually limited to a
room , building , campus or specific metropolitan area (e.g., a city )
respectively .

1. Sky Guard

2.2222. Trailer and tracker support

Body
2.3 Wireless3.LAN
A wireless local area network
(WLAN) linksconsol,
two or more
devices using
4. Operators
mechanical
some wireless distribution method (typically spread-spectrum or OFDM

5. Power supply unit (PSU)

radio), and usually providing a connection through an access point to the


wider internet.

6. Power distribution system

This gives users the ability


to move around
within a local coverage area
7. Hydraulic
system
and still be connected to the network. Most modern WLANs are based on

8. Ventilation and heating system

IEEE802.11 standards, marketed under the Wi-Fi brand name. Wireless

9. Computer system

LANs have become popular in the home due to ease of installation, and in

10.
Tracker
system
commercial complexes
offering
wireless
access to their customers; often
for free. New York11.
City,Radar
for instance,
has begun a pilot program to
system
provide city workers in all five boroughs of the city with wireless internet
access.

12. Plan-position Indicator (PPI)

13. Electro-optical system (EOS)


( 14. Data transmission (DT
15. Intercom system
16. General cabling

17. Test equipment


18. Search-radar-data-extractor
19. IFF

2.4 Network communication protocols


2.4.1 User Datagram Protocol
The User Datagram Protocol (UDP) is one of the core members of the
Internet protocol suits (the set of network protocols used for the internet).
With UDP, computer applications can send messages, in this case referred
to as datagram's, to other hosts on an internet protocol (IP) network
without prior

communications to set up special transmission channels

or data paths.UDP users a simple transmission model with a minimum of


protocol mechanism. It has no handshaking dialogues, and thus exposes
any unreliability of the underlying network protocol to the users program.
As this is normally IP over unreliable media, there is no guarantee of
delivering, ordering. Or duplicate protection. UDP provides checksums
for data integrity, and port numbers for addressing different function at
the source and destination of the datagram .UDP is suitable for purposes
where error checking and correction is either not necessary or performed
in the application , avoiding the overhead of such processing at the
network interface level . time sensitivity application often uses UDP
because dropping packets is preferable to waiting for delaying packets,
which may not be an option in a real time system. If error correction
facilities are needed at the network interface level, an application may use
the transmission control protocol (TCP) or stream control transmission
protocol (SCTP)which are designed for this purpose, a number of UDP is
attributes make it especially suited for certain application.

2.4.2 Transmission Control Protocol


The transmission control protocol (TCP) is one of the core protocols of
the internet protocol suite (IP), and is so common that the entire is often
called TCP/IP. TCP provides reliable, ordered and error checked

delivery of a stream of octets between program running on computers


connected to a local area network, intranet or the public internet .it resides
at the transport layer .
Web browsers use TCP when they connect to servers on the world wide
web, and it is used to deliver email and transfer files from one location to
another. HTTP, HTTPS,SMTP, POP3,IMAP,SSH,FTP, telnet and a variety
of other protocol are typically encapsulated in TCP.Application that dont
required the reliability of a TCP connection may instead use the
connectionless user datagram protocol (UDP) , which emphasizes lowoverhead operation and reduced latency rather than error checking and
delivery validation.

This table difference between TCP and UDP


Point of

TCP

UDP

Acronym

Transmission control

User datagram protocol or

Connection

protocol.
TCP is connection

universal datagram protocol.


UDP is connectionless

Function

orientated protocol.
A message makes its

protocol.
UDP is also a protocol used

way across the internet

in message transport or

from one computer to

transfer this is not

another this is

connection based which

connection based.

means that one program can

comparison

send a load of packets to


another and that would be

Usage

TSP is suited for

end of the relationship.


UDP is suitable for

application that requires

applications that need fast

high reliability, and

efficient transmission such

transmission time

as games.

relatively less critical.

Chapter 3
Sky guard data transmission technique
3.1 Data transmission FCU-Weapons
3.1.1 Purpose
The data transmission (DT) ensures exchanging data
between the fire control unit (FCU) and the weapons
connected (Gun and Launcher).The data is exchanged
serially and synchronously via a 2-wire line.Data is
transmitted from the FCU to the weapon (Forward
direction) and from the weapon to the FCU (Backward
direction).This type of data is called half duplex operation.

3.1.2 Components of the data transmission


system
The DT consists of the following principal components: DT
transmitter, DT receiver Gun, and DT receiver Launcher.

3.1.2DT transmitter
The DT transmitter is located in the FCU in the rear part of
the control desk on the right side .It is equipped with nine
PCBs in CORA format .
Four PCBs "DDT Arms I/O" form the interface. Two guns
and two launchers can be connected. The four transmitter
channels receiver. The timing signals from a common
program PCB.

3.1.3 DT receiver gun


The DT receiver gun is located in the PSU gun. It contains
13 PCBs. The receiver is equipped with the receiver itself
with the synchronization circuit, memory for angle data, a
digital synch converter, a rectifier unit, and voltages
regulators. For the measurement purposes all the supply
voltages are fed to test connector. The receiver of the gun
is additionally equipped with the PCB "V.measuring unit"
.this PCB measures the muzzle velocity of the shell. The
value measured is sent back to the FCU in channel 7. If
necessary, attest PCB with 4 LEDs can be inserted in the
receiver of the gun. This PCB provides data about the
state of the receiver.

3.2 Basic mode of operation


3.2.1 Organization of the transmission
All the data exchanged between the FCU and the weapons
is presented in digital form. The data, however, must be
transmitted serially bit by-bit because digital data cannot
be transmitted simultaneously over a two-wire field line.
Whole transmitted data packet, i.e. frame, is divided into
12 channels of 8 bits each (organization of the basic
frame) .A frame contains all the data which a weapon
requires for operation . The transmission of one frame (12
channels) lasts ca 40 ms . This results in a baud rate of
2400 bit / sec.

Frames are continuously transmitted at arate of 25 per


second .The operating sequence , the position of the
parity bits p1,p2,and p3 , the position of the fire word 1
and 2 , and the position of the synchronization word within
the frame are identical for both the gun and the launcher (
organization of the basic frame ) .

3.2.2 The parity bits


Parity bits p1 and p2 are generated in the DT transmitter
p1 is added to the number of one's transmitted in the
forward channels 1,2and3 (24 bits) to attain an odd
number of ones. Parity bit, p3 is generated in the DT
receiver. It is added to the number of one's sent back in
the backward channels 7 and 8 bit 1 (10 bits) to attain an
odd number of ones.

3.2.3 The fire Word


The 16 bit five words in transmitted in channels 10 and 11.
To release fire, at least 12 of the 16 bits must be correctly
received. If the command NO FIRE is transmitted, the first
fire word is transmitted inversely. The fire word indicated
in table 1 corresponds to frame 0.

3.2.4 The synchronization word


To permit the correct interpretation of the data, the
receiver must know when a given channel is used for
transmission.

Therefore,

the

transmitter

sends

the

synchronization word in channel 12. The synchronization

word is alternately transmitted normally and inversely. The


word indicated in table 1 corresponds to frame 0.

3.2.5 DT test
For the automatic test of the data transmission by the
computer, the latter is using the order "DT test" via the
board "relay output" in the interface. This order is
transmitted through channel 9 to the DT receiver. In the
subsequent data output from the computer, zeros are fed
out for channels 1 and 2, and the bit combination 1010101
is emitted for channel 3 in the bits 16 to 22.
In addition to this, bit 8 of channel 3 carries the parity bit
p1 so that DT tests the following bit combination is
transmitted all together from the DT transmitter to the DT
receiver 10101011.
In the DT receiver this test word is decoded at the end of
channel 3, on the board "shift register DT receiver ". If it is
not recognized as correct, or if a parity error has appeared
the bit 0 in channel 8 is set as an error message and
transmitted during channel 8 from the DT receiver to the
DT transmitter. By calling the contents of the register the
computer is able to evaluate the error message.
If the transmission line from DT receiver to DT transmitter
is not working, the parity monitoring in the DT transmitter
sets the bit 0 in channel 8 and thus originates the error
message.

3.3 DT transmitter
3.3.1 Transmission of data (Channel 1 to 6)
Shortly before the frame starts, DT transmitter calls the
data for the channel 1 to 3 delivers the data Via "Cable
terminal board" and the output highway OH00 to OH22
from the computer using a special signal (interrupt signal).
The computer then in the PCB "DTT arms I/O". Caused by
the control board and the program FTT in the DT
transmitter the 23 bits are read into the data register, in
the form of 2x8 and 1x7 bits.
For transmission to the receiver the first eight bits (bit 00
to 07) are transmitted in parallel to transmission shift
register.

For

there

they

are

fed

in

series

to

the

transmission circuit.
The transmission circuit generates a transmission pulse
when a "1". This o be transmitted, alternating positive and
negative pulses. If a "0" is to be transmitted, no signal is
generated by the transmission circuit. This mode of
transmission is designed to keep the DC voltage levels
down in line.
The 24 bit to be transmitted is the parity bit. The transmit
parity circuit in the "DDT Arms I/O" ensures that the
number of once within the 24 bits to be transmitted is odd.
The parity circuit therefore has gene rate a "1" if the
preceding 23 bits contained an even number of ones and,
if it was an even number, it is use fault message. In this

case the following digital to-synch converter uses the


data previously received in the frame.
Bits 16 to 22 are transmitted in channel 3. During the third
channel the data register in "DDT Arms I/O" is therefore
vacant and free to accept the next data from the
computer. At the start of channel 3 the DT transmitter
calls for the data which is then given by the computer
during channel 3.

3.3.2

Reception

of

backward

channels

(channel 7 and 8)
During the transmission of channels 7 and 8 the DDT in
the FCU receivers the back information from the weapons.
The contents of channel 7 are fed via receiver circuit and
receiver shift register into the register for backward
channel 7. The data are stored here until the register is
written again. Whenever the signal LPVO becomes active,
the data are fed to the computer via the input highway
IH01 to IH08. The contents of the channel 8 are similarly
received and stored in the register for backward channel 8
for the duration of one frame. The stored data control the
relay on the PCB "DDT Arms I/O". The relay contact
switches the corresponding lamps on the operation and
indication panel. The result of the parity control of P3 is
linked in an OR circuit with bit 0 channel 8 and fed via the
input highway IH00 with the data from 7 to the computer.

3.3.4 Transmission of commands (channel 9)


From the computer system relay output circuits the data
flows via opt couplers on the PCB "DDT Arms I/O" into the
register for commands. Then the data are sent to the
weapons in the same manner as the data of channel 1 to
6.

3.3.5 Transmission of the fire order (channel


10 and 11)
The order fire first of all energizes a relay on the board
"DDT Arms I/O". The passing-on of the order is dependant
up on an ascent to fire. This assent to fire is given by
board "Program DT transmitter" when the DT transmitter
has received the data of angles from the computer and
the DT test is not in progress. If these criteria are met the
fire word is output from the PROM at the right time to the
transmitter shift register.
If these criteria are not met, the complementary bit
combination of the fore order is sent to the weapons in the
same manner as the data of channel 1 to 6.

3.3.6 Transmission of the synchronization


word (channel 12)
The synchronization word for frame 0 and frame 1 are
stored in PROM on the board "DDT Arms I/O". It is subject
to the frame counter (frame 0, frame 1) transferred
alternately as per table "Organization of basic frame" or as
a complement to the transmission shift registers and

transmitted through channel 12 to the DT receiver. Via the


"Shift

register

DT

receiver"

the

synchronizing

word

reaches the board " Frame synchronization " , where it is


evaluated for frame synchronization (i.e. synchronization
the program in the DT receiver with that in the DT
transmitter) .

3.3.7 Data traffic computer - DT transmitter


The DT transmitter requests the data from the computer
data from the computer with each one of the active
interrupts for Alpha and lama, which are generated on the
PCB program DDT. These two interrupts are generated in
each frame.
Within the next 2.5 ms after the interrupt the computer
must have supplied the data for each of the four weapons
channels.
For this purpose, the computer emits an EMT instruction
over the output highway. This instruction also contains the
address for the weapon channel. In the PCB control board
an address signal and a group signal are generated from
this address. In the I/O control logic on the PCB program
DDT the select signal (n=1 to 4) for the corresponding
weapon channel is generated. Thus the data subsequently
transmitted by the computer are taken over by the
selected weapon channel.
For the backward data of channel 7 a positive interrupt is
generated on the PCB program DDT. The computer con
then read the backward data via the input highway. For

this purpose, the computer emits an ACT instruction via


the output highway. Similarly read signal LPV is generated.
In the following cycle the computer reads the data of the
corresponding weapon channel.

3.4 Summary of interlocks and safety circuit


The fire order is, as was mentioned, transmitted only if fire
permission

is

given

from

the

board

"program

DT

transmitter". Fire permission is given when the last


request for data (interrupt) has been answered by the
computer, except during DT test. The fire word is passed
on in the DT receiver, if the receiver is synchronized, and if
there are less than three parity errors (DT transmitter to
DT receiver), and if the DT test is not in progress.
In data from DT transmitter to DT receiver, the information
carried by the data register in "store 2" (DT receiver) is not
considered for forming the synch output voltage if there
are one or two parity errors. The data register in "store 2"
is cleared and its contents (zero) again taken into
consideration as soon as three consecutive parity errors
occur, i.e. the gun moves into its zero position.
Data from the DT receiver to DT transmitter are only
transmitted if the DT receiver is synchronized with the DT
transmitter. A protection circuit on the boards " input /
output circuits " ensures i.e. in case of a fault in the
timing program that transmission does not continue and
the resulting overloading does not destroy the transmitter
circuits.

Examples

HTTP, HTTPS,

DNS, DHCP, TFTP,

Orderings of data

FTP,SMTP,Telnet.
TCP rearranges data

SNMP, RIP, VOIP.


UDP has no inherent

packets

packets in the order

order as all packets

specified.

are independent of
each other. if ordering
is required , it has to
be managed by the

Speed of transfer

Reliability

The speed for TCP is

application layer.
UDP is faster because

slower than UDP.

there is no error-

There is absolute

checking for packets.


There is no guarantee

guarantee that the

that the messages or

data transferred

packets sent would

remains intact and

reach at all.

arrives in the same


order in which it was

Header size

send.
TCP header size is 20

UDP header size is 8

Common header

bytes.
Source port,

bytes.
Source port,

fields

destination port,

destination port,

Streaming of data

checksum.
Data s read as a byte

checksum.
Packets are sent

stream, no

individually and are

distinguishing

checked for integrity

inductions are

only if they arrive.

transmitted to signal

Packets have definite

message (segment)

boundaries which are

boundaries.

honored upon receipt,


meaning read
operation at the

Table 3.1 Organization of the basic frame receiver socket will


yield an entire
message as it was

Weight

TCP is heavy-weight.

originally sent.
UDP is lightweight.

TCP requires three

there is no ordering of

packets to set up a

message , no tracking

socket collection,

connections , etc. it is

before any user data

a small transport layer

can be sent. TCP

designed on top of it.

000000000066555handless reliability
and congestion

Data flow control

control.
TCP does flow

UDP does not have an

control. TCP requires

option for flow

three packets to set up

control.

a socket collection,
before any user data
can be sent. TCP
handless reliability
and congestion

Error checking

Fields

control.
TCP does error

UDP does error

checking.

checking , but no

1. Sequence

recovery options.
1. Length.

number.

2. Source port.

2. ACK
number.
3. Data offset.

3. Destination
port.
4. Checksum.

4. Reserved.
5. Control bit.
6. Window.
7. Urgent
pointer.
8. Options.

Acknowledgement

9. Padding.
Acknowledgement

No

Handshake

segments.
SYN,SYN-

acknowledgement.
No handshake

ACK,ACK.

(connectionless

Checksum.

protocol).
To detect errors.

Checksum

2.4 Summary
At the end of this chapter we conclude that in the network communication
protocols that the TCP is better protocol than UDP due to it is suited for

application that requires high reliability, and transmission time relatively


less critical .And there is absolute guarantee that the data transferred
remains intact and arrives in the same order in which it was sent .And for
the network communication systems we choose WLAN system due to its
performance that is usually providing a connection through an access
point to the wider internet .This gives users the ability to move around
within a local coverage area and still be connected to the network .

Chapter 4
Experimental setup & Result
Research component 4.1
4.1.1Stepper Motor Basics
4.1.1.1 Introduction
A stepper motor is an electromechanical device which
converts

electrical

pulses

into

discrete

mechanical

movements. The shaft or spindle of a stepper motor


rotates

in

discrete

step

increments

when

electrical

command pulses are applied to it in the proper sequence.


The motors rotation has several direct relationships to
these applied input pulses. The sequence of the applied
pulses is directly related to the direction of motor shafts
rotation. The speed of the motor shafts rotation is directly
related to the frequency of the input pulses and the length
of rotation is directly related to thenumber of input pulses
applied.

4.1.1.2

Stepper

Motor

Advantages

and

Disadvantages
4.1.1.2.1 Advantages
1. The rotation angle of the motor is proportional to the
input pulse.
2. The motor has full torque at standstill (if the windings
are energized)
3. Precise positioning and repeatability of movement since
good stepper

motors have an accuracy of 3 5% of a step and this


error is noncumulative from one step to the next.
4. Excellent response to starting/ stopping/reversing.
5. Very reliable since there are no contact brushes in the
motor. Therefore, the life of the motor is simply dependent
on the life of the bearing.
6. The motors response to digital input pulses provides
open-loop control, making the motor simpler and less
costly to control.
7. It is possible to achieve very low speed synchronous
rotation with a load that is directly coupled to the shaft.
8. A wide range of rotational speeds can be realized as the
speed is proportional to the frequency of the input pulses.

4.1.1.2.2 Disadvantages
1. Resonances can occur if not properly controlled.
2. Not easy to operate at extremely high speeds.
4.1.1.3 Open Loop Operation
One of the most significant advantages of a stepper motor
is its ability to be accurately controlled in an open loop
system. Open loop control means no feedback information
about position is needed. This type of control eliminates
the need for expensive sensing and feedback devices such
as optical encoders. Your position is known simply by
keeping track of the input step pulses.

4.1.1.4 Stepper Motor Types


There are three basic stepper motor types. They are:
Variable-reluctance
Permanent-magnet
Hybrid

4.1.1.5 Stepper Motor Theory of Operation


Stepper motors provide a means for precise positioning
and speed control without the use of feedback sensors.
The basic operation of a stepper motor allows the shaft to
move a precise number of degrees each
Time a pulse of electricity is sent to the motor. Since the
shaft of the motor moves only the number of degrees that
it was designed for when each pulse is delivered, you can
control the pulses that are sent and control the positioning
and speed. The rotor of the motor produces torque from
the interaction between the magnetic field in the stator
and

rotor.

The

strength

of

the

magnetic

fields

is

proportional to the amount of current sent to the stator


and the number of turns in the windings.
The stepper motor uses the theory of operation for
magnets to make the motor shaft turn a precise distance
when a pulse of electricity is provided. You learned
previously that like poles of a magnet repel and unlike
poles attract. Figure 1 shows a typical cross-sectional view

of the rotor and stator of a stepper motor. From this


diagram you can see that the stator (stationary winding)
has eight poles, and the rotor has six poles(three complete
magnets). The rotor will require 24 pulses of electricity to
move the 24 steps to make onecomplete revolution.
Another way to say this is that the rotor will move
precisely 15 for each pulse ofelectricity that the motor
receives. The number of degrees the rotor will turn when a
pulse of electricity isdelivered to the motor can be
calculated by dividing the number of degrees in one
revolution of the shaft(360) by the number of poles (north
and south) in the rotor. In this stepper motor 360 is
divided by 24 to get15.
When no power is applied to the motor, the residual
magnetism in the rotor magnets will cause the rotor
todetent or align one set of its magnetic poles with the
magnetic poles of one of the stator magnets. This
meansthat the rotor will have 24 possible detent positions.
When the rotor is in a detent position, it will have
enoughmagnetic force to keep the shaft from moving to
the next position. This is what makes the rotor feel like it
isclicking from one position to the next as you rotate the
rotor by hand with no power applied.
When power is applied, it is directed to only one of the
stator pairs of windings, which will cause that windingpair
to become a magnet. One of the coils for the pair will
become the North Pole, and the other will becomethe
South Pole. When this occurs, the stator coil that is the

North Pole will attract the closest rotor tooth thathas the
opposite polarity, and the stator coil that is the South Pole
will attract the closest rotor tooth that hasthe opposite
polarity. When current is flowing through these poles, the
rotor will now have a much strongerattraction to the stator
winding, and the increased torque is called holding torque.
By changing the current flow to the next stator winding,
the magnetic field will be changed 45. The rotor willonly
move 15 before its magnetic fields will again align with
the change in the stator field. The magnetic fieldin the
stator is continually changed as the rotor moves through
the 24 steps to move a total of 360. Figure 2shows the
position of the rotor changing as the current supplied to
the stator changes.when current is applied to the A and A
stator windings, they will become a magnetwith the top
part of the winding being the North Pole, and the bottom
part of the winding being the South Pole.
You should notice that this will cause the rotor to move a
small amount so that one of its south poles isaligned with
the north stator pole (at A), and the opposite end of the
rotor pole, which is the north pole, willalign with the south
pole of the stator (at A). A line is placed on the south-pole
piece so that you can follow itsmovement as current is
moved from one stator winding to the next. In Fig. 2b
current has been turned off tothe A and A windings, and
current is now applied to the stator windings shown at the
B and B sides of themotor. When this occurs, the stator
winding at the B position will have the polarity for the

south pole of the stator magnet, and the winding at the B


position will have the north-pole polarity. In this condition,
the nextrotor pole that will be able to align with the stator
magnets is the next pole in the clockwise position to
theprevious pole. This means that the rotor will only need
to rotate 15 in the clockwise position for this set ofpoles
to align itself so that it attracts the stator poles.

4.1.1.6 28BYJ-48 5V Stepper Motor


The 28BYJ-48 is a small stepper motor suitable for a large range
.of applications

Rated voltage 5VDC


Number of Phase 4
Speed Variation Ratio 1/64
Stride Angle 5.625 /64
Frequency 100Hz
DC resistance 507 %( 25)
Idle In-traction Frequency > 600Hz
Idle Out-traction Frequency > 1000Hz
In-traction Torque >34.3mN.m (120Hz)

Self-positioning Torque >34.3mN.m


Friction torque 600-1200 gf.cm
Pull in torque 300 gf.cm
Insulated resistance >10M (500V)
Insulated electricity power 600VAC/1mA/1s
Insulation grade A
Rise in Temperature <40K (120Hz)
Noise <35dB (120Hz, No load, 10cm)
Model 28BYJ-48 5V

4.1.1.7SG90 9 g Micro Servo

Tiny and lightweight with high output power. Servo can


rotate approximately 180 degrees (90 in each direction),
and works just like the standard kinds but smaller. You can
use any servo code, hardware or library to control these
servos. Good for beginners who want to make
Stuff move without building a motor controller with
feedback & gear box, especially since it will fit in small
places. It comes with a 3 horns (arms) and hardware.

4.1.1.7.1 Specifications
1- Weight: 9 g
2- Dimension: 22.2 x 11.8 x 31 mm approx.
3- Stall torque: 1.8 kgcm
4- Operating speed: 0.1 s/60 degree
5- Operating voltage: 4.8 V (~5V)
6- Dead band width: 10 s

7- Temperature range: 0 C 55 C

PIC 4.2
PIC16F627A/628A/648A 4.2.1

The

PIC16F627A/628A/648A

basedmembers

is

of

18-pin

Flash-

the

PIC16F627A/628A/648Afamily

of

versatile
low-cost,

high-

performance, CMOS, fully static,8-bit microcontrollers.


All

PIC

microcontrollers

RISCarchitecture.

employ

The

an

advanced

PIC16F627A/628A/648A

hasenhanced core features, an eight-level deep stack, and


multiple internal and external interrupt sources. These
parate

instruction

and

data

buses

of

the

Harvardarchitecture allow a 14-bit wide instruction word


with

the

separate

8-bit

wide

data.

The

two-stage

instructionpipeline allows all instructions to execute in a


single cycle,except for program branches (which require

twocycles).

total

of

35

instructions

(reduced

instructionset) are available, complemented by a large


registerset.
PIC16F627A/628A/648A microcontrollers typically achieve
a 2:1 code compression and a 4:1 speed improvement
over other 8-bit microcontrollers in theirclass.
PIC16F627A/628A/648A devices have integratedfeatures
to reduce external components, thus reducingsystem cost,
enhancing

system

reliability

and

reducingpower

consumption.
The PIC16F627A/628A/648A has 8 oscillatorconfigurations.
The single-pin RC oscillator provides alow-cost solution.
The LP oscillator minimizes powerconsumption, XT is a
standard crystal, and INTOSC isa self-contained precision
two-speed internal oscillator.
The HS mode is for High-Speed crystals. The EC modeis for
an external clock source.
The Sleep (Power-down) mode offers power savings.Users
can wake-up the chip from Sleep through severalexternal
interrupts, internal interrupts and Resets.A highly reliable
Watchdog Timer with its own on-chip
RC

oscillator

lockup.Table

provides
1-1

protection

shows

the

against
features

software
of

the

PIC16F627A/628A/648A mid-range microcontroller family.A


simplified block diagram of the PIC16F627A/628A/648A is
shown in Figure 3-1.

The

PIC16F627A/628A/648A

series

fits

in

applicationsranging from battery chargers to low power


remotesensors.
The Flash technology makes customizingapplication
programs (detection levels, pulse generation,timers, etc.)
extremely fast and convenient. Thesmall footprint package
makes this microcontrollerseries ideal for all applications
with

space

limitations.

Low

cost,

low

power,

high

performance, ease of use and I/O flexibility make the


PIC16F627A/628A/648Avery versatile.

4.2.2 ULN2803APG

The

ULN2803APG

AFWG

Series

are

highvoltage,highcurrent Darlington drivers comprised


of eight NPNDarlington pairs.
All units feature integral clamp diodes for switching
inductiveloads.
Applications include relay, hammer, lamp and display
(LED)drivers.
The suffix (G) appended to the part number represents a
Lead(Pb)-Free product.

4.2.2.1 Features
1- Output current (single output) 500 mA (Max.)
2- High sustaining voltage output50 V (Min.)
3- Output clamp diodes

4- Inputs compatible with various types of logic.


5- Package TypeAPG : DIP18pin
6- Package TypeAFWG : SOL18pin

Type

InputBaseResisto

Designation

ULN2803APG

/ 2.7 k

TTL, 5 V CMOS

AFWG
ULN2804APG

/ 10.5 k

6~15

AFWG

PMOS,

CMOS

The ULN2801A-ULN2805Aeach contain eight Darlington


transistors with common emitters and integralsuppression
diodes for inductive loads. Eachdarlington features a peak
load current rating of600mA (500mA continuous) and can
withstand at least50V in the off state. Outputsmaybe

paralleledfor higher current capability.Five versions are


available to simplify interfacing to standard logic families :
the

ULN2801Ais

designedfor

generalpurpose

applicationswith a current limitresistor ; theULN2802Ahas


a

10.5kW

inputresistorand

zenerfor

14-25VPMOS;

theULN2803Ahas a2.7kW input resistor for 5V TTL and


CMOS ; theULN2804A has a 10.5kW input resistor for 615V CMOS and the ULN2805A is designed to sink
aminimum of 350mA for standard and Schottky TTLwhere
higher output current is required.All types are supplied in a
18-lead plastic DIP witha copperleadfromandfeaturethe
convenientinputopposite- output pinout to simplify board
layout.

4.2.3 PIC16F877A

Bytes: 14.3K
Single Word Instruction : 8192
Data SRAM (Bytes): 368
EEPROM (Bytes): 256
I/O: 33
Timers 8/16-bit: 2/1
The PIC16F87XA devices have a 13-bit program counter
capable of addressing an 8K word x 14-bit program
memory space. The PIC16F876A/877A devices have 8K
words x 14 bits of Flash program
memory, while PIC16F873A/874A devices have 4K words x
14 bits. Accessing a location above the
physically implemented address will cause a wraparound.
The Reset vector is at 0000h and the interrupt vector is at
0004h.

4.3 Ultrasonic Ranging Module HC-SR04


4.3.1Product features:
Ultrasonic ranging module HC-SR04 provides 2cm-400cm
non-contact measurement function, the ranging accuracy
can reach to 3mm. The modules include ultrasonic
transmitters, receiver and control circuit. The
:basicprinciple of work
.Using IO trigger for at least 10us high level signal -1
The Module automatically sends eight 40 kHz and detect whether there -2
.is a pulse signal back
IF the signal back, through high level, time of high output IO duration -3
.is the time from sending ultrasonic to returning
.Test distance = (high level time velocity of sound (340M/S) / 2 -4

4.4 Algorithm

Fig..Block diagram for Sky Guard Fire control unit simulation


Wireless module
Launcher excussion

Prep

Sound sensor transmits sound signal through air.


Once this signal impact the target from the
reflected signal indicates the bearing and elevation
angle. Also it offers the distance for the target. this
data preprocessed through computer and
microcontroller the transmit to the launcher to
execute the order to move the launcher in to the

Chapter 5
Microcontroller
Introduction 5.1
Even at a time when Intel presented the first
microprocessor with the 4004 there was already a demand
for microcontrollers: The contemporary TMS1802 from
Texas Instruments, designed for usage in calculators, was
by the end of 1971 advertised for applications in cash
registers, watches and measuring instruments. The TMS
1000, which was introduced in 1974, already included
RAM, ROM, and I/O on-chip and can be seen as one of the
first

microcontrollers,

microcomputer.

The

even
first

though
controllers

it

was
to

called

gain

really

widespread use were the Intel 8048, which was integrated


into PC keyboards, and its successor, the Intel 8051, as
well as the 68HCxx series of microcontrollers.
Today, microcontroller production counts are in the billions per
year, and the controllers are integrated into many appliances we
have grown used to, like:
household appliances (microwave, washing machine, coffee
machine, . . .)
telecommunication (mobile phones)
automotive industry (fuel injection, ABS, . . .)
aerospace industry
industrial automation

?What is a Microcontroller 5.2

A micro-controller is a small computer on a single integrated


circuit
Containing a processor core, memory, and programmable input/
output peripherals. The important part for us is that a microcontroller contains the processor (which all computers have) and
memory, and some input/output pins that you can control. (often
called GPIO - General Purpose Input Output Pins).

5.3 Arduino
The Arduino environment has been designed to be easy to use for
beginners who have no software or electronics experience. With
Arduino, you can build objects that can respond to and/or control
light, sound, touch, and movement. Arduino has been used to create
an amazing variety of things, including musical instruments, robots,
light sculptures, games, interactive furniture, and even interactive
clothing.
Arduino is the best known for its hardware, but you also need
software to program that hardware. Both the hardware and the
software are called Arduino. The combination enables you to
create projects that sense and control the physical world. The
software is free, open source, and cross-platform. The boards are
inexpensive to buy, or you can build your own (the hardware
designs are also open source). In addition, there is an active and
supportive Arduino community that is accessible worldwide through
the.

5.4 Types of Arduino boards (Figure 5.1)

Arduino Uno

Arduino Leonardo

Arduino Nano

Arduino Mega

Arduino Lily pad

Arduino Mini

Figure 5.1
The difference between these boards to each other is the
number of input and output digits and the mass of IC of any
board.

5.5 Arduino Software


Software programs, called sketches, are created on a
computer using the Arduino integrated development environment
(IDE). The IDE enables you to write and edit code and convert this
code into instructions that Arduino hardware understands. The IDE
also transfers those instructions to the Arduino board (a process
called uploading).

5.6Arduino Hardware
The Arduino board is where the code you write is
executed. The board can only control and respond to electricity, so
specific components are attached to it to enable it to interact with

the real world. These components can be sensors, which convert


some aspect of the physical world to electricity so that the board
can sense it, or actuators, which get electricity from the board and
convert it into something that changes the world. Examples of
sensors include switches, accelerometers, and ultrasound distance
sensors. Actuators are things like lights and LEDs, speakers, motors,
and displays.
There are a variety of official boards that you can use with Arduino
software and a wide range of Arduino-compatible boards produced
by members of the community. The most popular boards contain a
USB connector that is used to provide power and connectivity for
uploading your software onto the board. (figure5.2) shows a basic
board the Arduino Uno.

Figure 5.2

5.7Installing the Integrated Development


Environment (IDE)
Problem

You want to install the Arduino development environment


on your computer.

Solution
The Arduino software for Windows, The Windows download is a
ZIP file. Unzip the file to any convenient directory Program
Files/Arduino is a sensible place. Can be downloaded from
Unzipping the file will create a folder named Arduino-00<nn>
(where <nn> is the version number of the Arduino release you
downloaded). The directory contains the executable file (named
Arduino.exe), along with various other files and folders.
DoubleClick the Arduino.exe file (figure5.3) and the splash screen
should appear (figure5.4) followed by the main program window.
Be patient, as it can take some time for the software to load.

Figure 5.3

Figure 5.4

5.8Setting up the Arduino Board


Problem
You want to power up a new board and verify that it is working.

Solution
Plug the board into a USB port on your computer and check that
the green LED power indicator on the board illuminates. Standard
Arduino boards (Uno, Duemilanove, and Mega) have a green LED
power indicator located near the reset switch. An orange LED near
the center of the board (labeled Pin 13 LED) should flash on and
off when the board is powered up (boards come from the factory
preloadedwith software to flash the LED as a simple check that the
board is working figure 5.5).

Figure 5.5

Discussion
If the power LED does not illuminate when the board is connected
to your computer, the board is probably not receiving power. The
flashing LED (connected to digital output pin 13) is being controlled
by code running on the board (new boards are preloaded with the
Blink example sketch). If the pin 13 LED is flashing, the sketch is
running correctly, which means the chip on the board is working. If
the green power LED is on but the pin 13 LED is not flashing, it could
be that the factory code is not on the chip.

5.9Using the Integrated Development Environment


(IDE) to
Prepare an Arduino Sketch
Problem
You want to get a sketch and prepare it for uploading to the board

Solution
Use the Arduino IDE to create, open, and modify sketches that
define what the board will do. You can use buttons along the top
of the IDE to perform these actions or you can use the menus or

keyboard shortcuts The Sketch Editor area is where you view and
edit
Code for sketch. After youve started the IDE, go to the
FileExamples menu and select 1. BasicsBlink The code for
blinking the built-in LED will be displayed in the Arduino board.
You should see a message that reads Compiling... in the
message area below the text editing window. After a second or
two, a message that reads Done Compiling will appear. The
black console area will contain the following additional message:
BINARY

SKETCH SIZE :

1008

BYTES

(OF

32256

BYTE MAXIMUM ).

The exact message may differ depending on the Arduino version;


it is telling you the size of the sketch and the maximum size that
your board can accept (figure 5.6)

Figure 5.6

Note:
Source code for Arduino is called a sketch. The process that takes a
sketch and converts it into a form that will work on the board is
called compilation. The IDE uses a number of command-line tools

behind the scenes to compile a sketch. For more information on this


look to (figure 5.7).

Figure 5.7

The use of arduino in our project


we use two arduino uno boards in our project one as a
transmitter and the other as a receiver.

The code of arduino receiver


void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue1 = analogRead(A0);
int sensorValue2 = analogRead(A1);
if (sensorValue1 == 1023) {
Serial.println("100");
}
if (sensorValue1 == 0) {
Serial.println("200");
}
if (sensorValue2 == 1023) {

Serial.println("300");
}
if (sensorValue2 == 0) {
Serial.println("400");
}
if (sensorValue1 == 512 && sensorValue2 == 512) {
Serial.println("500");
}
delay (100);

The code of arduino receiver


int MotorA1=10;
int MotorA2=11;
int MotorB1=12;
int MotorB2=13;
int level;
void setup() {
pinMode(MotorA1, OUTPUT);
pinMode(MotorA2, OUTPUT);
pinMode(MotorB1, OUTPUT);
pinMode(MotorB2, OUTPUT);
Serial.begin(9600);
Serial.setTimeout(50);
}
void loop() {
if (Serial.available()) {
level = Serial.parseInt();
}
if (level == 100) {
digitalWrite(MotorA1, HIGH);
digitalWrite(MotorA2, LOW);
}
if (level == 200) {
digitalWrite(MotorA1, LOW);
digitalWrite(MotorA2, HIGH);
}
if (level == 300) {
digitalWrite(MotorB1, HIGH);
digitalWrite(MotorB2, LOW);
}
if (level == 400) {
digitalWrite(MotorB1, LOW);
digitalWrite(MotorB2, HIGH);
}
if (level == 500) {
digitalWrite(MotorA1,LOW);
digitalWrite(MotorA2,LOW);
digitalWrite(MotorB1,LOW);
digitalWrite(MotorB2,LOW);

}
}

You might also like