Sie sind auf Seite 1von 46

c ‘Ò Ò 

The advances in the technologies related to wireless communication has


led to the emergence of several engineering designs to aid the human
requirements. Thus with the creeping interests in the wireless and GSM based
projects, we came up with this idea of developing a simpler, multipurpose,
cost-effective design to control the on -off mechanism of various devices in the
field via short message service (sms).

There is a growing interest in intelligent home network as a way to offer a


comfortable, convenient and safe environment for occupants [1]. In order to
enhance the occupants¶ convenience and safety, home security system is
indispensable in the field of intelligent home network. The requirements of a
home security system include low cost, low power consumption, easy
installation and rapid response to alarm incidents. According to connecting
mode, home network can be divided into two kinds: wireless network and non -
wireless network. The wireless technology has some remarkable benefits
comparing with non-wireless technology. For example, it makes the
installation and maintenance easier and reduces the system cost. Bluetooth,
Zigbee, and wireless USB are the most popular technologies in the field of
home wireless network Introduces a method to form a home network which
provides flexible and dynamic services via Bluetooth. However, the system
mentioned in is high power consumption and high cost so that it is not
convenient to use in security system.

How to inform user in real time when alarm incidents occur has become a
crucial feature of home security system. This can be done via internet or
GSM/GPRS. GSM/GPRS is more convenient than internet. The main reason
is that the GSM/GPRS network has wide spread coverage making the whole
system available for almost all the time. Furthermore, GSM/GPRS network
has high security infrastructure which makes sure that the information sent or
received cannot be monitored. The network examples mentioned in and send

c
the information to remote users via internet. An d are examples of home
systems using GSM/GPRS network for remote controlling. However, only
illustrates that GSM is communication method between remote user and
home network server but doesn¶t apply it to home security system. The
system in [9] only applie s GSM/GPRS technology to intrusion detecting and its
communication is non-wireless.

~
~ ‘Ò
 

E ‘
‘


 ‘

‘

‘‘
‘‘
‘

‘ "‘

‘‘
 !‘ ‘!‘

‘‘

¬
¬ ‘ÒÒÒ
 




‘
‘
‘
‘
‘
‘
‘
‘
‘
‘
‘
‘
‘

©
© ‘ÒÒÒ Ò Ò 

This project consists of GSM modem, microcontroller, Motor, led, and


display. If the user wants to control some devices in his house he/she have to
send the SMS indicating the operation of the device and then the system
password, while the MODEM embedded with the system microcontroller
receives SMS. The microcontroller will read SMS and check for the password
the user had sent with the SMS.
The DB 9 connecter is used to interface between the gsm modem and
micro controller. Gsm modem is a follows the USART protocol means it
follows the serial communication protocol.
The output of the DB 9 connecter is given to the max 232 IC to drive the
micro controller and to convert the signal levels, the data received from the
modem is converted to digital voltage levels is converted by using max 232 ic.
The output of the max 232 is given to the port 1 of the micro controller,
according to the message retrie ved from the gsm modem next function will be
performed. Commands given to the gsm modem are through the sms , which
is sent by the user or any gsm subscriber.
AT commands are sent to gsm modem to operate the devices and switch
on and switch off on loads, de vices etc,
According to the commands received from the modem to micro controller,
micro controller will read the sms(message) which is in the memory of the
micro controller, it follows the commands like switch on and switch off the
devices which are connected to the micro controller.
Port o of the micro controller is connected to Lcd display, port 0 is
connected to pull up resisters, the out put of port 0 is open drain configured so
the value of 10K is connected to port 0. Read, write, enable pins of micro
controller are connected to the write, read, EA pins of the LCD display.

In this project dc motor, led is used as a peripherals. These two devices


are switched on and switched off, according to the message received from

’
the user the modem will sends tha t signals to micro controller. Micro controller
will drive all the peripherals which are connected to the micro controller.
Commands which are used in gsm modem are called as AT commands.
To switch on the led .........................................#LON!
To switch off the led...........................................#LOF!
To switch on the dc motor................................ #FON!
To switch off the dc motor..................................#FOF!

m
’ ‘Ò     
‘

RESISTORS:
1 KŸ----------------- 1 no.
8.2 kŸ----------------1 no.
CAPACITORS:
22 µf----------------2 no.
10 µf----------------3 no.
30 pf----------------2 no.
Semiconductors:
Max 232 ------------------ IC 1 no.
89c51 ----------------------- IC 1 no.
Crystal--------------------- 1 no.
Diodes (1n4007) ----------1 no.
Regulator (7805) ----------1 no.
Miscellaneous:
Dc motor(5v)---------------1 no.
Db 9 connecter pin--------2 no.
2x16 LCD display----------1 no.
Gsm modem----------------1 no.

M
’.1 #‘ " 
‘$‘#‘

%‘& '‘(‘

$(‘
‘
GSM, which stands for Global System for Mobile communications,
reigns (important) as the world¶s most widely used cell phone technology. Cell
phones use a cell phone service carrier¶s GSM network by searching for cell
phone towers in the nearby area. Global system for mobile communication
(GSM) is a globally accepted standard for digital cellular communication.

GSM is the name of a standardization group


established in 1982 to create a common European mobile telephone standard
that would formulate specifications for a pan-European mobile cellular radio
system operating at 900 MHz. It is estimated that many countries outside of
Europe will join the GSM partnership.

)‘$‘ (‘
The GSM study group aimed to provide the followings through the GSM:
S Improved spectrum efficiency.
S International roaming.
S Low-cost mobile sets and base stations (BS)
S High-quality speech
S Compatibility with Integrated Services Digital Network (ISDN) and other
telephone company services.
S Support for new services.

{
 ‘$‘* "(
Following table shows many of the important events in the
rollout of the GSM system; other events were introduced, but had less
significant impact on the overall systems.

Years Events

CEPT establishes a GSM group in order to develop the standards


1982
for a pan-European cellular mobile system.

A list of recommendations to be generated by the group is


198’
accepted.

Field tests are performed to test the different radio techniques


1986
proposed for the air interface.

Time Division Multiple Access (TDMA) is chosen as the access


method (with Frequency Division Multiple Access [FDMA]). The initial
1987
Memorandum of Understanding (MoU) is signed by telecommunication
operators representing 12 countries.

1988 GSM system is validated.

The responsibility of the GSM specifications is passed to the


1989
European Telecommunications Standards Institute (ETSI).

1990 Phase 1 of the GSM specifications is delivered.

Commercial launch of the GSM service occurs. The DCS1800


1991
specifications are finalized.

The addition of the countries that signed the GSM Memorandum of


1992 Understanding takes place. Coverage spreads to larger cities and
airports.

1993 Coverage of main roads' GSM services starts outside Europe.

•
Data transmission capabilities launched. The number of networks
1994
raises to 69 in 43 countries by the end of 1994.

Phase 2 of the GSM specifications occurs. Coverage is extended to


199’
rural areas.

1996 June: 133 network in 81 countries operational.

July: 200 network in 109 countries operational, around 44 million


1997
subscribers worldwide.

Wireless Application Protocol came into existence and 130


1999
countries operational with 260 million subscribers

2000 General Packet Radio Service (GPRS) came into existence.

As of May 2001, over ’’0 million people were subscribers to


2001
mobile telecommunications

Th‘ ‘ $ (‘
Specifications for different Personal Communication Services
(PCS) systems vary among the different PCS networks. The GSM
specification is listed below with important characteristics.
‘
%(‘
Modulation is a form of change process where we change the input
information into a suitable format for the transmission medium. We also
changed the information by demodulating the signal at the receiving end.
The GSM uses Gaussian Minimum Shift Keying (GMSK) modulation
method.
 ‘h (‘
Because radio spectrum is a limited resource shared by all users,
a method must be devised to divide up the bandwidth among as many users
as possible.
c
GSM chose a combination of TDMA/FDMA as its method. The
FDMA part involves the division by frequency of the total 2’ MHz bandwidth
into 124 carrier frequencies of 200 kHz bandwidth.
One or more carrier frequencies are then assigned to each BS.
Each of these carrier frequencies is then divided in time, using a TDMA
scheme, into eight time slots. One time slot is used for transmission by the
mobile and one for reception. They are separated in time so that the mobile
unit does not receive and transmit at the same time.
T
 ‘(‘
The total symbol rate for GSM at 1 bit per symbol in GMSK produces
270.833 K symbols/second. The gross transmission rate of the time slot is
22.8 Kbps.
GSM is a digital system with an over -the-air bit rate of 270 kbps.
+,%"‘(‘
The uplink frequency range specified for GSM is 933 - 960 MHz
(basic 900 MHz band only). The downlink frequency band 890 - 91’ MHz
(basic 900 MHz band only).
h‘  (‘
This indicates separation between adjacent carrier frequen cies. In
GSM, this is 200 kHz.
h‘ (‘
GSM uses linear predictive coding (LPC). The purpose of LPC is to
reduce the bit rate. The LPC provides parameters for a filter that mimics the
vocal tract. The signal passes through this filter, le aving behind a residual
signal. Speech is encoded at 13 kbps.
% ‘ (‘
The duplex distance is 80 MHz. Duplex distance is the distance
between the uplink and downlink frequencies. A channel has two frequencies,
80 MHz apart.
 (‘
S Frame duration: 4.61’ ms

cc
S Duplex Technique: Frequency Division Duplexing (FDD) access mode
previously known as WCDMA.
S Speech channels per RF channel: 8.

‘  ‘%  ‘T‘

 ‘
Some advanced GSM modems like WaveCom and Multitech, support the
SMS text mode. This mode allows you to send SMS messages using AT
commands, without the need to encode the binairy PDU field of the SMS first.
This is done by the GSM modem

h-‘$‘"%‘ ‘ h‘‘

‘ %  ‘  ‘‘
(‘
To check if your modem supports this te xt mode, you can try the following
command:

T++.!‘/)T0

If the modem reponds with "OK" this mode is supported. Please note that
using this mode it is onluy possible to send simple text messages. It is not
possible to send multipart, Unicode, data and other types of messages.

 ‘% ‘h‘

‘
If the modem contains a SIM card with is secured with a PIN code, we
have to enter this pin code first:

T+1).233332‘ /)T0 (replace 0000 with your PIN code).


Please not that in most cases you have only 3 attemps to set the correct PIN
code. After setting the PIN code, wait some seconds before issueing the next
command to give the modem some time to register with the GSM network.
In order to send a SMS, the modem has to be put in SMS text mode first using
the following command:
T++.!/)T0

In text mode there are some additional parameters that can be set.
Using the following command we can read the current values:

c~
T+ 14/)T0

The modem will response with a string like this:

+ 1(‘!5‘!65‘35‘3‘
‘
7‘
To send a message with a validity period of 1 day, the parameters have to be
set like this:

Bit 0 and 4 of the first field has to be set, so the first value will become 1 + 16
= 17.
Send the following command to the modem to set this parameters:

T+ 1.!85!68535!6‘/)T0‘

If the modem responds with "OK" ,the modem is ready to send (flash) text
messages with a validity period of 1 day.
 ‘h‘
  ‘
To send the SMS message, type the following command:

T+ .2+!6893!6!2‘/)T0‘
Replace the above phone number with your own cell phone number. The
modem will respond with:
0
You can now type the message text and send the message using the
<CTRL>-<Z> key combination:

*‘:‘;‘/T<=0‘


After some seconds the modem will respond with the message ID of the
message, indicating that the message was sent correctly:
+ (‘6‘
The message will arrive on the mobile phone shortly.

 ‘‘E‘  ‘
  ‘
Some modems also have the capability to send Unicode or UCS2
messages without encoding a PDU.
You can send Unicode messages by only converting the Unicode data to a
HEX string and send this string to the modem.
To check whether your modem supports this mode, just type the following
command:

T+  .4

This commands displays the c odepages supported by the modem. The


modem will respond like this:
+  (‘&2 2521198252E T252*>2'‘
If this string contains "HEX" or "UCS2", Unicode seems to be supported.
To specify that you will use an HEX string to send the message, set the
codepage to "HEX" or "UCS2" depending on the modem response.
In our example we will set the modem to "HEX" :

T+  .2*>2‘/)T0‘

Next, we have to specify the correct DCS (Data Coding Scheme) for
Unicode messages, which is 0x08. We can set this value by changing the
fourth parameter of the AT+CSMP command to '8':

T+ 1.!5!68535‘/)T0‘


The modem is now ready to send messages as Unicode. Now is the time
to send the actual message:

T+ .2+!6893!6!2‘/)T0‘

Replace the above phone number with you r own cell phone number. The
modem will respond with:
0
The only thing you have to program by yourself, is a simple routine which
converts the Unicode string to an hexadecimal string like this:

Which is 'Hello' in Arabic will be converted like this:


"064’0631062D06280627"

You can send this hexidecimal string to the modem:


369 36!3636368‘/T<=0
after some seconds the modem will respond with the message ID of the
message, indicating that the message was sent correctly:

+ (‘6‘
The message will arrive on the mobile phone shortly.
‘


‘)T (‘
The first microprocessor introduced in 1981/1971, was made possible by
high levels of integration of digital circuits. Continued integration of peripherals
and memory on the same integrated circuit as the microprocessor core led to
the creation of micro controllers.
A micro controller is an integrated circuit composed of a CPU, various
peripheral devices, and typically memory, all in one chip. Using one chip that
contains all the necessary functions in place of a microprocessor and multiple
peripheral chips has reduced the size and the power consumption of control
oriented applications. A micro controller is different from a microprocessor
both in hardware and software. In hardware it includes peripherals such as
I/O, memory, and analog and digital interface. Micro con trollers are more
suited for small applications with specific control functions requiring
specialized peripherals and interfaces. They are designed for process control
and are required to interface to the real world processes.
Many of the peripheral devices integrated on a micro controller are for that
specific purpose. Analog to digital converters perform the task of converting
an analog signal to digital for use by the CPU, and digital to analog converters
perform the task of converting digital data into analog value and waveforms to
control analog functions.
In addition to the analog interface, micro controllers contain peripheral
devices that enable them to communicate to other digital components within a
system or to monitor and control digital functi ons. Communication interfaces,
digital I/O and interrupt controllers fall into this category of peripheral devices.
Other peripheral devices often included on the same chip include clocks and
timers.
In terms of the software, micro controllers have a more compact set of
instructions with commands more suited to process control such as input and
output from. Single bit operations such as set and reset, bit -wise logical
functions or branching instructions that depend on a single bit are commonly

cm
available as part of the instruction set to allow for reading input switch status
or on/off control of an external event. Since in a given application the micro
controller is programmed for one task, it only has one control program.
In a microprocessor based system va rious programs are stored in a mass
storage device and then loaded into the RAM for execution. In contrast the
micro controller program is typically stored in a ROM or PROM and RAM is
used for temporary storage of data.Compared with discrete implementation of
a system, the micro controller based approach provides shorter system
development time, reduced implementation cost, lower power consumption,
and higher reliability.
The only drawback, which is often not important, is the lower speed of
execution. For example, for a micro controller system to perform a logical
operation, several clock cycles are needed to read the inputs, perform the
function and output the results. The same operation when implemented with
discrete components will provide the results a s soon as the signals have
propagated through the logic gates.

Micro-controllers are used in a variety of process control applications,


replacing complex digital circuits and sometimes -analog functions while
providing more flexibility due to their program mability. Portable electronic
devices such as personal audio devices (CD players, MP3 players), mobile
telephones, digital cameras and video camcorders rely heavily on the reduced
size and low power consumption of micro controller based electronics.
These features are crucial to applications like implantable medical devices
such as pacemakers, or personal medical monitoring devices like gluco
meters (electronic devices used for the measurement of blood glucose).
In other applications such as appliances, h ome audio and video,
automotive, power management, and temperature control, using a micro
controller results in reduced board level circuit complexity and consequently
reduced cost. With the growing number of applications using micro controllers,
it is not surprising that there are such a wide variety of these components. In

cM
addition to those commonly available, many manufacturers custom -design a
micro controller to suit a specific application.
‘
‘
‘
h%‘
Architecturally all micro controllers share cer tain features. They all contain
a CPU, memory and I/O on the same chip. Another common feature is the
interrupt handling capability. What sets them apart from one another is the
choice of CPU, the structure of memory, and choice of peripheral devices, I/O
and interrupt handling hardware. The major distinguishing architectural
characteristic of micro controllers is the word size. Micro -controllers are
available in 4, 8, 16, or 32 bit wide words. The width of the data path impacts
several features of the micro controller. The complexity of the instruction set
(number of available instructions and addressing modes), program efficiency
(code generation and storage space), execution speed, as well as chip
implementation and interfacing complexity are all influen ced by the width of
the data path.
For simple control tasks 4-bit, and for a vast number of control and
measurement applications 8 -bit micro controllers would be sufficient. For
higher precision and speed applications like speech and video processing, or
complex instrumentation, 16 -bit and 32-bit micro controllers are more
appropriate.

Another distinction between micro controllers is the instruction set. Micro -


controllers with complex instruction set (CISC) provide capability to perform
complex computations rapidly. The extensive set of instructions, allow
complex operations to be perfor med with few instructions. On the other hand
reduced instruction set computers (RISC) decrease program execution time
by having fewer less complex instructions. Fewer available instructions results

c{
in faster execution due to smaller size of the op -code and less decoding time
needed for each instruction.
The trade-off depends on the complexity of operations needed for a
specific application. In simple control applications a RISC based micro
controller is more suitable because of its lower overhead for each instruction.
In more complex applications, the availability of a more diverse instruction set
results in a more efficient and faster executing code because fewer
instructions are needed to accomplish a complicated task. For micro controller
applications the instruction set should include common computational
instructions plus instructions optimized for the specific application at hand.
Just as in microprocessors, micro controllers are also differentiated
according to their memory structure. Von Neumann arc hitecture maps the
data and program to same memory address space. In the Harvard
architecture the instructions are stored in a separate memory space than that
used for data storage. Another memory related architectural characteristic of a
processor is the addressing scheme. In linear addressing there is a one to one
correspondence between an address and a memory location. So with an 8 -bit
address register, 2 8 distinct address locations can be accessed.
In segmented addressing a separate register is used to point to a segment
in memory, and the address register is used to point to an offset from that
segment¶s start point. This way if all of the program or data are in the same
segment, in order to access them, only the address register need to be used
and the segment register can remain pointing to the start point of that
segment.
Widely used group of micro controllers is Intel¶s MCS’1 family. These
micro controllers are also 8 -bit processors, but with a separate 64Kbyte of
data and 64Kbyte of program memory space. As implied by this statement,
devices in the MCS’1 utilize Harvard architecture. All of I/O addresses as well
as CPU registers and various peripheral devices¶ registers are mapped in the
same space as the data.


The 80’1, which is one of the option s in this family, has ’ interrupt
sources, 2 external, two timer interrupts and one serial port interrupt. Interrupt
priority is resolved through a priority scheme and ranking in the polling
sequence. The priority scheme allows each interrupt to be program med to one
of two priority levels.

Furthermore if two interrupts with the same priority occur simultaneously,


they are serviced based on their rank in the polling sequence. Other
manufacturers such as AMD, Dallas Semiconductor, Fujitsu and Philips also
supply micro controllers in the MCS’1 family. Dallas Semiconductor¶s
DC87C’’0 provides increased performance over Intel¶s 80’1 while
maintaining instruction set compatibility. Many instructions that execute in 12
CPU clock cycles in an 80’1, will execute in only 4 clocks for the DC87C’’0
therefore resulting in increased execution speeds of up to three times.
Additionally, the DC87C’’0 has a power management mode that allows
slowing of the processor in order to reduce power consumption. This mode
can be utilized in battery operated or otherwise low power applications. The
architecture of the instruction set varies greatly from one micro controller to
another. The choices made in designing the instruction set impact program
memory space usage, code execution sp eed, and ease of programming.

??‘ ‘‘&‘ !'(‘


+% ‘
 Compatible with MCS-’1Œ Products
 4K Bytes of In-System Reprogrammable Flash Memory
 Endurance: 1,000 Write/Erase Cycles
 Fully Static Operation: 0 Hz to 24 MHz
 Three-level Program Memory Lock
 128 x 8-bit Internal RAM
 32 Programmable I/O Lines
 Two 16-bit Timer/Counters

~
 Six Interrupt Sources
 Programmable Serial Channel
 Low-power Idle and Power-down Modes
  ‘
The AT89C’1 is a low-power, high-performance CMOS 8-bit
microcomputer with 4K
Bytes of Flash programmable and erasable read only memory (PEROM).
The device
Is manufactured using Atmel¶s high -density non-volatile memory
technology and is
Compatible with the industry-standard MCS-’1 instruction set and pin out.
The on-chip Flash allows the program memory to be reprogrammed in -system
or by a conventional non-volatile memory programmer. By combining a
versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C’1 is a
powerful microcomputer which provides a highly -flexible and cost-effective
solution to many embedded control applications.

The AT89C’1 provides the following standard features: 4K bytes of Flash,


128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, five vector two-level
interrupt architecture, a full dupl ex serial port, on-chip oscillator and clock
circuitry. In addition, the AT89C’1 is designed with static logic for operation
down to zero frequency and supports two software selectable power saving
modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters,
serial port and interrupt system to continue functioning. The Power -down
Mode saves the RAM contents but freezes the oscillator disabling all other
chip functions until the next hardware reset.

~c
Fig: pin diagram:
1‘  (‘
@(‘
Supply voltage.
)(‘
Ground.
1‘3(‘
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each
pin can sink eight TTL inputs. When 1sare written to port 0 pins, the pins can
be used as high impedance inputs. Port 0 may also be configured to be the
multiplexed low order address/data bus during accesses to external program
and data memory. In this mode P0 has internal pull -ups. Port 0 also receives
the code bytes during Flash programming, and outputs the code bytes during

~~
program verification. External pull -ups are required during program
verification.
1‘!(‘
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1
output buffers can sink/source four TTL inputs. When 1s are written to Port 1
pins they are pulled high by the internal pull -ups and can be used as inputs.
As inputs, Port 1 pins that are externally being pulled low will source current
(IIL) because of the internal pull -ups. Port 1 also receives the low-order
address bytes during Flash programming and verification.
1‘(‘
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2
output buffers can sink/source four TTL inputs. When 1s are written to Port 2
pins they are pulled high by the internal pull -ups and can be used as inputs.
As inputs, Port 2 pins that are externally being pulled low will source current
(IIL) because of the internal pull -ups. Port 2 emits the high-order address byte
during fetches from external program memory and during accesses to external
data memories that use 16-bit addresses (MOVX @DPTR). In this application,
it uses strong internal pull -ups when emitting 1s. During accesses to external
data memories that use 8-bit addresses (MOVX @ RI), Port 2 emits the
contents of the P2 Special Function Register. Port 2 also receives the high -
order address bits and some control signals during Flash programming and
verification.
1‘(‘
Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3
output buffers can sink/source four TTL inputs. When 1s are written to Port 3
pins they are pulled high by the internal pull-ups and can be used as inputs.
As inputs, Port 3 pins that are externally being pulled low will source current
(IIL) because of the pull-ups.
Port 3 also serves the functions of various special features of the AT89C’1
as listed below:


Port 3 also receives some control signals for Flash programming and
verification

Tab 6.2.1 Port pins and their alternate functions


 T(‘
Reset input. A high on this pin for two machine cycles while the oscillator is
running resets the device.
 1(‘
Address Latch Enable output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input
(PROG) during Flash programming. In normal operation ALE is emitted at a
constant rate of 1/6the oscillato r frequency, and may be used for external
timing or clocking purposes. Note, however, that one ALE pulse is skipped
during each access to external Data Memory.
If desired, ALE operation can be disabled by setting bit 0 of SFR location
8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction.
Otherwise, the pin is
weakly pulled high. Setting the ALE-disable bit has no effect if the
microcontroller is in external execution mode.
1 )(‘
Program Store Enable is the read strobe to external prog ram memory.
When the AT89C’1 is executing code from external program memory, PSEN


is activated twice each machine cycle, except that two PSEN activations are
skipped during each access to external data memory.
 @11(‘
External Access Enable. EA must be strapped to GND in order to enable
the device to fetch code from external program memory locations starting at
0000H up to FFFFH.
Note, however, that if lock bit 1 is programmed, EA will be internally
latched on reset.
EA should be strapped to VCC for internal program executions. This pin
also receives the 12-volt programming enable voltage (VPP) during Flash
programming, for parts that require 12 -volt VPP.
>T!(‘
Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.
>T(‘
Output from the inverting oscillator amplifier.
 ‘h  (‘
XTAL1 and XTAL2 are the input and output, respectively, of an inverting
amplifier which can be configured for use as an on -chip oscillator, as shown in
Figs 6.2.3. Either a quartz crystal or ceramic resonator may be used. To drive
the device from an external clock source, XTAL2 should be left unconnected
while XTAL1 is driven as shown in Figure 6.2.4.There are no requirements on
the duty cycle of the external clock signal, si nce the input to the internal
clocking circuitry is through a divide -by-two flip-flop, but minimum and
maximum voltage high and low time specifications must be observed.


+ (‘ ‘ ‘‘‘‘+ (‘‘‘-‘A‘$ %‘

) :
!? Under steady state (non-transient) conditions, IOL must be externally
limited as follows:
S Maximum IOL per port pin: 10 mA
S Maximum IOL per 8-bit port: Port 0: 26 mA
S Ports 1, 2, 3: 1’ mA
S Maximum total IOL for all output pins: 71 mA
S If IOL exceeds the test c ondition, VOL may exceed the related
specification. Pins are not guaranteed to sink current greater than the listed
test conditions.
? Minimum VCC for Power-down is 2V.

~m
’ ¬ ‘  

DC motors are configured in many types and sizes, including brush less,
servo, and gear motor types. A motor consists of a rotor and a permanent
magnetic field stator. The magnetic field is maintained using either permanent
magnets or electromagnetic windings. DC motors are most commonly used in
variable speed and torque.
Motion and controls cover a wide range of components that in some way
are used to generate and/or control motion. Areas within this category include
bearings and bushings, clutches and brakes, controls and drives, drive
components, encoders and resolves, Integrated motion control, limit switches,
linear actuators, linear and rotary motion components, linear position sensing,
motors (both AC and DC motors), orientation position sensing, pneumatics
and pneumatic components, positioning stages, slides and guides, power
transmission (mechanical), seals, slip rings, solenoids, springs.

Motors are the devices that provide the actual speed and torque in a
drive system. This family includes AC motor types (single and multiphase
motors, universal, servo motors, induction, synchronous, and gear motor) and
DC motors (brush less, servo motor, and gear motor) as well as linear,
stepper and air motors, and motor contactors and starters.
In any electric motor, operation is based on simple electromagnetism. A
current-carrying conductor generates a magnetic field; when this is then
placed in an external magnetic field, i t will experience a force proportional to
the current in the conductor, and to the strength of the external magnetic field.
As you are well aware of from playing with magnets as a kid, opposite (North
and South) polarities attract, while like polarities (North and North, South and
South) repel. The internal configuration of a DC motor is designed to harness
the magnetic interaction between a current-carrying conductor and an external
magnetic field to generate rotational motion.

~M
Let's start by looking at a simple 2-pole DC electric motor (here red
represents a magnet or winding with a "North" polarization, while green
represents a magnet or winding with a "South" polarization).

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator,
commutator, field magnet(s), and brushes. In most common DC motors (and
all that Beamers will see), the external magnetic field is produced by high-
strength permanent magnets 1. The stator is the stationary part of the motor --
this includes the motor casing, as well as two or more permanent magnet pole
pieces. The rotor (together with the axle and atta ched commutator) rotates
with respect to the stator. The rotor consists of windings (generally on a core),
the windings being electrically connected to the commutator. The above
diagram shows a common motor layout -- with the rotor inside the stator (field)
magnets.

The geometry of the brushes, commutator contacts, and rotor windings are
such that when power is applied, the polarities of the energized winding and
the stator magnet(s) are misaligned, and the rotor will rotate until it is almost
aligned with the stator's field magnets. As the rotor reaches alignment, the
brushes move to the next commutator contacts, and energize the next
winding. Given our example two-pole motor, the rotation reverses the direction
of current through the rotor winding, leading to a "flip" of the rotor's magnetic
field, and driving it to continue rotating.
In real life, though, DC motors will always have more than two poles (three
is a very common number). In particular, this avoids "dead spots" in the
commutator. You can imagine how with our example two -pole motor, if the

~{
Ì t Ì i tl t t i l f it Ì t ti  Ìf tl li  it t  fil
t , it ill t t t Ì. il, it  t  l t Ì, tÌ i 
t Ì t
tt Ì  Ìt
t t  Ì
l i.., t Ì

t
 t
tt Ì t t i
lt
l . i 
l   f Ì t
 Ì
l ,  t Ì ,     t Ì  t  ll. Yt
 tÌ i t  f
  i l t Ì i tt it 
l i it  i 

t f t Ì
 Ìil t 
t f t Ì
 it
l Ì 
 i  li it
t  iti  f t Ì t Ì.

S i  t ll t Ì Ì f  tÌ l  i , lt tiÌ it


t  Ìi f  i  itÌ ti i ti  S Ìit Ì
iÌ:

Y
ll  ti   f ti fÌ ti   l,   l i f
ll Ì i  t
 ti 
t t tÌ Ì Ìtill Ì i . A   Ì
 tÌ iti 
fÌ 
tt Ì t t t t t,  il fil ill Ìil ll ,
 t t il fil ill Ìil Ì 
 ti
Ì iti  f
i Ì  . ll  Ì 
t t ff t f ti ltÌ, 
t i t
ti  
  tt ti i  iÌ t Ì
lt f t il ii  Ìi
iÌi :


There's probably no better way to see how an average dc motor is put
together, than by just opening one up. Unfortunately this is tedious work, as
well as requiring the destruction of a perfectly good motor.
This is a basic 3-pole dc motor, with 2 brushes and three commutator
contacts.

’ © ‘ Ò   Ò Ò 


  ‘+‘ ‘E)T)‘
Computer transfers data in two ways these are
1. Parallel (‘ Often 8 or more lines (wire conductors) are used to transfer
data to a device that is only few feet away.
2. Serial (‘ To transfer to a device located many meters away, the serial
method is used. The data is sent one bit at a time.

Fig: Mode of Communication

¬
At the transmitting end, the byte of data must be converted to serial bits using
parallel-in-serial-out shift register. At the receiving end, there is a serial -in-
parallel-out shift register to receive the serial data and pack them into byte.
When the distance is short, the digital signal ca n be transferred as it is on a
simple wire and requires no modulation. If data is to be transferred on the
telephone line, it must be converted from 0s and 1s to audio tones. This
conversion is performed by a device called a modem,
Modulator/demodulator´.

Serial data communication uses two methods. First are synchronous


method transfers a block of data at a time. Second is an asynchronous
method transfer a single byte at a time.

It is possible to write software to use either of these methods, but the


programs can be tedious and long. There are special IC chips made by many
manufacturers for serial communications namely UART (universal
asynchronous Receiver-transmitter) & USART (universal synchronous-
asynchronous Receiver-transmitter).

Fig: Diagrammatic Simplex & Duplex Transmission

¬c
A protocol is a set of rules agreed by both the sender and receiver.
Asynchronous serial data communication is widely used for character -oriented
transmissions where each character is placed in between start and stop bits,
this is called framing and block-oriented data transfers use the synchronous
method. The start bit is always one bit, but the stop bit can be one or two bits
the start bit is always a 0 (low) and the stop bit(s) is 1 (high).

Fig: Transmissions of Data

Due to the extended ASCII characters, 8-bit ASCII data is common in


modern PCs the use of one stop bit is standard. Assuming that we are
transferring a text file of ASCII characters using 1 stop bit, we have a total of
10 bits for each character. In some s ystems in order to maintain data integrity,
the parity bit of the character byte is included in the data frame. The rate of
data transfer in serial data communication is stated in bps (bits per second).

Another widely used terminology for bps is baud rate. As far as the
conductor wire is concerned, the baud rate and bps are the same, and we use
the terms interchangeably. The data transfer rate of given computer system
depends on communication ports incorporated into that system.

An interfacing standard RS232 was set by the Electronics Industries


Association (EIA) in 1960. The standard was set long before the advent of the
TTL logic family, its input and output voltage levels is not TTL compatible

¬~
where a 1 is represented by -3 ~ -2’ V, while a 0 bit is +3 ~ +2’ V, making -3
to +3 undefined.

80’1 has two pins that are used specifically for transferring and receiving data
serially. These two pins are called TxD and RxD and are part of the port 3
group (P3.0 and P3.1).These pins are TTL compatible; therefore, they require
a line driver to make them RS232 compatible. To allow data transfer between
the PC and an 80’1 system without any error, we must make sure that the
baud rate of 80’1 system matches the baud rate of the PC¶s COM port.

’ ’‘ ~¬~ 
The > is an integrated circuit that converts signals from an RS-
232 serial port to signals suitable for use in TTL compatible digital logic
circuits. The MAX232 is a dual driver/receiver and typically converts the RX,
TX, CTS and RTS signals. The drivers provide RS-232 voltage level outputs
(approx. ± 7.’ V) from a single + ’ V supply via on-chip charge pumps and
external capacitors. This makes it useful for implementing RS -232 in devices
that otherwise do not need any voltages outside the 0 V to + ’ V range,
as power supply design does not need to be made more complicated just for
driving the RS-232 in this case.
The receivers reduce RS-232 inputs (which may be as high as ± 2’ V), to
standard ’ V TTL levels. These receivers have a typical threshold of 1.3 V,
and a typical hysteresis of 0.’ V.The later MAX232A is backwards compatible
with the original MAX232 but may operate at higher baud rates and can use
smaller external capacitors 0.1 ȝF in place of the 1.0 ȝF capacitors used
with the original device. The newer MAX3232 is also backwards compatible,
but operates at a broader voltage range, from 3 to ’.’V. Voltage levels It is
helpful to understand what occurs to the voltage levels. When a MAX232 IC
receives a TTL level to convert, it changes a TTL Logic 0 to betwee n +3 and
+1’V, and changes TTL Logic 1 to between -3 to -1’V, and vice versa for
converting from RS232 to TTL.

¬¬
Ti   f
i  
Ìli  tt t S t TÌ i i 
 lt  t  Ìti l i tt Ì  it fÌ t S tÌ l i
 lt  t t   l i tt. T lÌif t ttÌ,  t tl l . Ì
Ì if Ì ti  S V lt  l

R ‘ BB ‘ @  ‘
R ‘  ‘B ‘C‘  ‘ ‘
@  ‘
‘ > ‘

\t TÌ i i  /T i V t


V
5V

\t TÌ i i  /T i


V t 5V 5V

tÌ l Si l
V t 5V 5V
TS/ TS/\T/\S i

tÌ l Si l V t
V
TS/ TS/\T/\S i  5V
‘
 B ‘ ‘ >‘ ‘

‘
‘
‘
©
‘))T(‘

The  (originally \ ) connector is an analog 9-pin plug of the D-


Subminiature connector family (D-Sub or Sub-D).
The DB9 connector is mainly used for serial connections, allowing for the
asynchronous transmission of data as provided for by standard RS -232 (RS-
232C).
Note that there are DB9-DB2’ adapters for easily converting a DB9 plug into a
DB2’, and vice versa.
‘

1‘
‘
%
#‘ )

‘
‘ 1 CD - Carrier Detect

‘ 2 RXD - Receive Data


‘
3 TXD - Transmit Data
‘
‘ 4 DTR - Data Terminal Ready
‘ ’ GND - Signal Ground
‘
6 DSR - Data Set Ready
‘
‘ 7 RTS - Request To Send
‘
8 CTS - Clear To Send
‘
‘ 9 RI - Ring Indicator Shield

¬’
m?‘ET‘1:‘ E11D‘
 1T)‘
A variable regulated power supply, also called a variable bench power
supply, is one where you can continuously adjust the output voltage to your
requirements. Varying the output of the power supply is the recommended
way to test a project after having double checked parts placement against
circuit drawings and the parts placement guide.

This type of regulation is ideal for having a simple variable bench power
supply. Actually this is quite important because one of the first projects a
hobbyist should undertake is the construction of a variable regulated power
supply. While a dedicated supply is quite handy e.g. ’V or 12V, it's much
handier to have a variable supply on hand, especially for testing.

Most digital logic circuits and processors need a ’ -volt power supply. To
use these parts we need to build a regulated ’-volt source. Usually you start
with an unregulated power supply ranging from 9 volts to 24 volts DC (A 12
volt power supply is included with the Beginner Kit and the Microcontroller
Beginner Kit.). To make a ’ volt power supply, we use a LM 780’ voltage
regulator IC (Integrated Circuit). The IC is shown below.

The LM780’ is simple to use. You simply connect the positive lead of your
unregulated DC power supply (anything from 9VDC to 24VDC) to the Input

¬m
pin, connect the negative lead to the Common pin and then when you turn on
the power, you get a ’ volt supply from the Output pin.

ET‘+TE (‘

$‘   ‘ $‘  ( Gives out well regulated +’V output, output
current capability of 100 mA

%‘ ( Built-in overheating protection shuts down output when


regulator IC gets too hot

%‘
"( Very simple and easy to build

%‘ $
( Very stable +’V output voltage, reliable operation

A#"‘ $‘ 
 ( Easy to get, uses only v ery common basic
components

  ‘   ( Based on datasheet example circuit, I have used this circuit


successfully as part of many electronics projects

  ( Part of electronics devices, small laboratory power supply

1F‘ % "‘A ( Unregulated DC 8-18V power supply

1F‘ % "‘%( Needed output current + ’ mA


‘   ( Few dollars for the electronics components + the input
transformer cost.

‘
‘
‘
‘
‘
‘
¬M
BLOCK‘  RAM:

Ý ‘:‘1 ‘  ‘C ‘ 
‘
‘
Ti 5V   t  V t t i Ì tÌ llÌ. T    lt  i i it
 t i  Al
i
t i tt  t t  lt  Ì
lt Ì.

BÌi   tifiÌ:

A i  Ìi  i  ÌÌ  t f f


Ì i   t i  Ìi  iÌ
it
   l , tt Ì i t    lÌit f
t
t  lt  f Ì 
 lÌit f t i
t  lt . 
 i it t  li ti , f Ì
Ì i  f ltÌti
ÌÌt A  i
t it iÌ t
ÌÌt \ 
t
t, it i

¬{
    Ìi  Ì tifiÌ. T i Ì  Ìi  i Ìi   i 
    f
ll Ì tifiÌ. Ti  i   
 t Ì tif i l  
A   tÌ f Ì Ì tÌ t i ill. A Ìi  Ì tifiÌ 

f f
Ì i  i  Ìi  ÌÌ  t t  i f
ll Ì tifi ti . Ti
i  il
 fi
Ìti ,  t it iii
l i  iÌ    
it i l  t Ìi  Ì t i  Ìi  i iÌ itÌll.

B  ‘Br ‘Rect er‘

Ý Ì  t  iti   ti i f t tÌ f Ì Ì, tÌ i  Ý ÌÌ


t tÌ
 t i  Ìi . B t 
ti  t 

ÌÌt t fl  i
t   iÌ ti  tÌ
 t l  Ì i t Ì,  li i f
ll
Ì tifi ti . il  t f i  i f ÌÌ i , t tÌ t i
ÌÌ  i   ff til li it fÌ t iÌ
it.

Current‘Ý ‘n‘the‘Br e‘Rect er‘

Current‘n‘Br e‘Rect er‘ r‘G e‘ha ‘cyce‘

¥
Current‘n‘Br e‘Rect er‘ r‘ e‘ha ‘cyce‘

LM7805‘

Ber
na‘ A‘1 t e‘@ tage‘Reguator‘

Ýeatures‘

ë
t
t
ÌÌt
 t A

ë TÌ l Ìl  PÌ t ti 

ë S Ìt iÌ
it PÌ t ti 

ë
t
t TÌ i t Ì Sf Ìti AÌ PÌ t ti 

escr ton‘

T 5 tÌ tÌ il  iti Ì


lt Ì Ì ill i t TO/\
PAK     it Ìl fi
t
t  lt  , i t
f
l i 
i Ì  f li ti  . E  t  l  itÌl
ÌÌt li iti ,
tÌ l 
t    f Ìti Ì Ì t ti , i it  till
i tÌ
til. If 
t t ii i Ì i, t  liÌ Ì A

t
t
ÌÌt. Alt
  i  Ìi Ìil  fi  lt  Ì
lt Ì , t 
i   
 it tÌl  t t ti j
tl  lt 

ÌÌt .

©
+ ‘$$‘1-  ‘

‘-‘ 
‘

©c
‘

‘h  ‘$‘83 83 ‘

)(‘

Load and line regulation are specified at constant junction temperature.


Changes in Vo due to heating effects must be taken into account separately.
Pulse testing with low duty is used.

‘
©~
)(‘

Load and line regulation are specified at constant junction temperature.


Change in VO due to heating effects must be taken into account separately.
Pulse testing with low duty is used.

Quiescent Current Peak Output Current

Output Voltage Qui escent Current ‘

©¬
 ‘
ý 
  

   
 

     
 
 

   
  !"#$%  &&'  
 
  
  ($)*+ + , -  .  
  
   
   /   0 %  &&'  
   
    
  ($)+ + 
,-  .  
    
   
   1
   22 
 1
  
 
  
    
 - 
   %
  
   &' '
  
 3(4( 56  - 
   /   76'  
   
     %  
     & 
  
   1
 1


1

‘‘‘ ‘
‘

‘ ‘
‘
‘

‘‘‘  ‘‘
 
ý 
  

     
 
 
 ($) 
 
89:;< 
 
  
 
 ý  ==ý 

.,>

0 
  &   
 ?& @$$  
 
  
&
 .  
 .  
      
 
 ý    
  &86:< 
  ý&86A< BC'C
   &86;< 
  
 !## D3E+
 +ý
+- ý  
   & BF
 

©©
  /   
   C! C* 
     &FG 
    


   C! C*  
     &9A 
    

   
    *  
    

  1

  
  &+ -   
 
    H BF 
   IJF'  ý  
   IJF'     
  1

   %
  
   &'' 
  
 3(4( 56  - 
 
  /   76'  
  
    %  
    & 
  
  1

 1

  
 
  
 ý   - 
 1
 

 
 @
.  
1
1

‘

‘ ‘ ‘‘
‘ 
‘‘
ý IJF' 
K L, 

"  
" &43:965E '0M'''2  K  %'0F 77M 2L,  
1

  ‘  ‘ ‘
 ‘
‘‘  ‘‘
43:965E D( 



#!NJD( 
( 4E /
(

 
#!NJ 
1


 
1


©’


M ÒÒ
 
‘
1. HAND BOOK OF ELECTRONICS BY Ramakanth Gaikwada.
2. 101science.com
3. Datasheets4u.com
4. Wikipedia.com
’. Scribd.com
6. www.seminarprojects.com

©m

Das könnte Ihnen auch gefallen