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

1.

INTRODUCTION

2. BLOCK DIAGRAM

Fig 2.1 Block Diagram of Microcontroller base satellite tracking

Circuit Diagram

Fig. Shows circuit Diagram of our project Microcontroller base satellite tracking system. In this project we can control or track dish Antenna towards frequency. In our project dish can rotated and cover total orbit of 360 degree of angle so that it can receive signal from each direction (North, South, East and West) for these purpose we use two steeper motor 1& 2 .In our project for demo purpose we use fixed infra red receiver of 36KHz frequency on dish .This receiver response only 36KHz infrared signal and it is directional sensor and other hand we make a infra red transmitter of 36KHz frequency using 555 a stable multivibratior. So that we transmute a frequency in particular angle and when rotating dish come in that direction it receive this signal and give audio, and visual indication of catch frequency. For audio indication we connect a buzzer at pin P1.2 of micro controller and for visual indication we use LED at port P3 pin P1.3 when only 36KHz frequency signal of infrared is receive then dish is lock or hold in that direction and turn on buzzer & LED to indicate that required frequency is catch or detected. In actual system such there is number of frequency selection key on front panel when we set or select frequency then rotating dish catch or response only that particular frequency and ignore all other frequency. In our project we can use simple light weighted plastic rounded dish which will assume as dish antenna for project demo module the dish antenna is attach or joint to steeper motor 1 thro mechanical assemble & whole system is mounted on second steeper motor as shown in basic block diagram. When steeper motor 2 rotted the steeper motor 1 & dish rotated and when steeper motor 1 rotted only dish is rotes i.e. weight of steeper motor 1 + dish is on steeper motor 2 so we select steeper motor 1 for 0.5 Kg. torque and steeper motor 2 of 1 Kg torque To move steeper motor we use steeper motor driving card. Because steeper motor operated ON +12V D.C. And required more current ( near about 500 mA) to operate which is not provided by micro controller IC 89C2051 so to amplify this signal from o/p of micro controller unit we use Darlington pair transistor combination of transistor BC 547 and BD139 for card 1 & 2 in this Darlington pair emitter of first transistor is connected to base of next transistor so current flowing through steeper motor winding is IC2 + IC1 (Collector current of T1 & T2) so total current is increases or amplify. Resistance R2 to R9 are base biasing (current limiting) Resistance for transistor T1 to T8 steeper motor driving card 1 is connected to port P0 pin P0.7 & P0.6 & steeper motor driving card 2 is connected to port P0 pin P0.0 & P0.1. To rated a steeper motor is clockwise direction following sequence of logical pulse are provided

00H O1H O3H O2H

A1 1 1 0 0

B1 0 0 1 1

A2 1 0 0 1

B2 0 1 1 0

P0.0 P0.1 0 0 0 1 1 1 1 0

This table (00H, 01H, 03H, 02H) is feed in software store in electrically erasable programmable read only memory (EEPROM) of IC 89C2051 of micro controller this is called step table. Similarly step table 2 (00H, 40H, C0H, 80H) for steeper motor 2 is

feed in programme. To generate this logical level we use NOT gate IC1 a & b, IC2 a & b. In steeper motor driving card. To move steeper motor in clockwise direction this table is executed in sequence as shown in fig. With step delay between two step & to rotted motor in anticlockwise direction this table executed in reverse order. As steeper motor 1 rotted in clockwise direction dish antenna move in North direction & as motor move in anticlockwise direction dish antenna move in south direction. Similarly for motor 2 dish antenna move in east & west direction for clockwise & anticlockwise rotation. Diode D1, D2, D3, D4 across each winding of steeper motor 1 and diode D5, D6, D7, D8 across each winding of steeper motor 2 are connected as free wheeling diode to circulate current store in winding when motor is ON. When power is turn ON motor 1 & motor 2 are stop and software programmed in memory of IC89C2051 can detected any one key press by JNB (jump if beat is not set ) instruction. As each key is connected to micro controller port & ground initially all pin P3.2 to P3.5 are set i.e. logically 1 when any 1 key is press is detected by JNB instruction and programme jump on subroutine to roted motor 1 or 2 in corresponding key press direction In software we give fixed number of steep(50) for steeper motor 1 to rotate from starting(North) direction to end(south)direction. when this scanning of orbit is complete steeper motor 2 give 4 step for slightly move in east to west direction and again dish rotated from end (south)direction to start (north)direction .This is done continues until dish receive or catch signal of 36KHz frequency and when signal receive dish is lock or stop in that direction and turn on buzzer and LED. to indicate required frequency signal is catch by dish. Capacitor C1 and Resistance R1 are connected between RST (reset) pin of micro controller. So that when power is turn ON programmed execution start from starting memory location 000H between pin 4 & 5 (XTAL1 & XTAL2) quartz ceramic crystal of 12 MHz freq. Are connected to generate oscillation req. for machine cycle to fetch decode & execution of instruction in micro controller. In our project there are two types of power supply 1 is + 5V D.C. Require For micro controller IC89C2051 and IC 7404 and other is +12v D.C. Require for steeper motor. Both are generated by using step down transformer, full wave bridge type rectifier, filter condenser and voltage regulator.

DESIGNING Power supply design:


Power supply is the first and the most important part of our project. For our project we require +5V regulated power supply with maximum current rating 500mA Following basic building blocks are required to generate regulated power supply.
Mains 230 V A.C.

Step-down transformer

Rectifi er

Filter Ckt.

Three Terminal Voltage req.

Regulated O/P Voltage

Step Down Transformer Step down transformer is the first part of regulated power supply. To step down the mains 230V A.C. we require step down transformer. Following are the main characteristic of electronic transformer. 1) Power transformers are usually designed to operate from source of low impedance at a single freq. 2) It is required to construct with sufficient insulation of necessary dielectric strength. 3) Transformer ratings are expressed in voltamp. The volt-amp of each secondary winding or windings are added for the total secondary VA. To this are added the load losses. 4) Temperature rise of a transformer is decided on two well-known factors i.e. losses on transformer and heat dissipating or cooling facility
provided unit.

Rectifier Unit Rectifier unit is a ckt. which converts A.C. into pulsating D.C. Generally semi-conducting diode is used as rectifying element due to its property of conducting current in one direction only. Generally there are two types of rectifier. 1) Half wave rectifier 2) Full wave rectifier. In half wave rectifier only half cycle of mains A.C. is rectified so its efficiency is very poor. So we use full wave bridge type rectifier, in which four diodes are used. In each half cycle, two diodes conduct at a time and we get maximum efficiency at o/p. Following are the main advantages and disadvantages of a fullwave bridge type rectifier ckt.

Advantages: 1) The need of center tapped transformer is eliminated. 2) The o/p is twice that of center tap circuit for the same secondary voltage. 3) The PIV rating of diode is half of the center tap circuit. Disadvantages: 1) It requires four diodes. 2) As during each half cycle of A.C. input, two diodes are conducting therefore voltage drop in internal resistance of rectifying unit will be twice as compared to center tap circuit. Filter Circuit Generally a rectifier is required to produce pure D.C. supply for using at various places in the electronic circuit. However, the o/p of rectifier has pulsating character i.e. if such a D.C. is applied to electronic circuit it will produce a hum i.e. it will contain A.C. and D.C. components. The A.C. components are undesirable and must be kept away from the load. To do so a filter circuit is used which removes (or filters out) the A.C. components reaching the load. Obviously a filter circuit is installed between rectifier and voltage regulator. In our project we use capacitor filter because of its low cost, small size and little weight and good characteristic. Capacitors are connected in parallel to the rectifier o/p because it passes A.C. but does not pass D.C. at all. Three terminal voltage regulator A voltage regulator is a ckt. that supplies constant voltage regardless of change in load current. IC voltage regulators are versatile and relatively cheaper. The 7800 series consists of three terminal positive voltage regulator. These ICs are designed as fixed voltage regulator and with adequate heat sink, can deliver o/p current in excess of 1A. These devices do not require external component. This IC also has internal thermal overload protection and internal short circuit and current limiting protection. For our project we use 7805 voltage regulator IC.

Design of Step down Transformer The following information must be available to the designer before he commences for the design of transformer. 1) Power Output. 2) Operating Voltage. 3) Frequency Range. 4) Efficiency and Regulation. Size of core Size of core is one of the first considerations in regard of weight and volume of transformer. This depends on type of core and winding configuration used. Generally following formula is used to find area or size of core. P1 Ai = ----------0.87 Ai P1 = Area of cross - section in Sq. cm. and = Primary voltage. In transformer P1 = P 2 8

For our project we required +5V regulated output. So transformer secondary rating is 12V, 500mA. So secondary power wattage is, = 12 x 500 x 10-3 w. P2 = 6w.

6 So Ai = 0.87
= 2.62 Generally 10% of area should be added to core to accommodate all turns for low Iron losses and compact size. So Ai = 2.88. Turns per volt Turns per volt of transformer are given by relation
Turns / Volt 10,000 = ----------------------4.44 f Bm Ai

Here, f is the frequency in Hz Bm is flux density in Wb/m2 Ai is net area of cross section. Following table gives the value of turns per volt for 50 Hz frequency.
Flux density Wb/m2 Turns per volt 1.14 40/Ai 1.01 45/Ai 0.91 50/Ai 0.83 55/Ai 0.76 60/Ai

Generally lower the flux density better be quality of transformer. For project for 50 Hz the turns per Volt for 0.91 Wb/m2 from above table. Turns per Volt = 50 / Ai

50 = 2.88
17

Thus for Primary winding = 220 x 17 = 3800. & for Secondary winding = 12 x 17 = 204.

Wire size
As stated above size depends upon the current to be carried out by the winding, which depends upon current density of 3.1 A/mm2. For less copper losses 1.6 A/mm2 or 2.4 A/mm2 may be used. Generally even size guage of wire are used.

Rectifier Design R.M.S. Secondary voltage at secondary of transformer is 12V. So maximum voltage Vm across Secondary is = Rms. Voltage x 2 = 12 x 2 = 16.97 D.C. O/p Voltage at rectifier O/p is Vdc = 2 Vm --------- 2 x 16.97 ---------------------- 10.80 V

= = PIV rating of each diode is PIV

= 2 Vm. = 2 x 16.97

10

= 34 V & maximum forward current which flow from each diode is 500mA. So from above parameter we select diode IN 4007 from diode selection manual. Design of Filter Capacitor Formula for calculating filter capacitor is, C r F RL = 1 ---------------------43 r f RL.

= ripple present at o/p of rectifier. (Which is maximum 0.1 for full wave rectifier.) = frequency of mains A.C. = I/p impedance of voltage regulator IC. 1 -----------------------------43 x 0.1 x 50 x 28

= 1030 f 1000 f. And voltage rating of filter capacitor is double of Vdc i.e. rectifier o/p which is 20V. So we choose 1000 f / 25V filter capacitor.

11

IC 7805 (Voltage Regulator IC.)

12 3 Specifications : Available o/p D.C. Voltage Line Regulation Load Regulation Vin maximum Ripple Rejection = + 5V. = 0.03 = 0.5 = 35 V = 66-80 (db)

12

DESIGNE FOR BUZZER CKT.

13

Specification of buzzer is Sound o/p > 95d at 12v d.c. Oscillator frequency= 4kHz Current consumption<20mA Operating temp. range = -20 deg. To +50 deg. Centigrade Operating voltage range = 3v to 15 v dc From specification of buzzer current consumption of buzzer coil is 20mA So Ic max =20 mA Again we select transistor BC 547 for buzzer driver because its ic max is 80 mA and it is low cost ,easily avaible in market. For common emitter configuration of transistor its current equation is IB = Ic/ = 110 for BC 547 transistor = 20 mA / 110 = 0.18mA applying kickoffs voltage low to loop of base of transistor Vcc1 = IB RB + VBE Vcc1=+5v dc RB = 5 - 0.7 / IB RB = 4.3 / 0.18mA RB = 23K VBE=0.7v for silicon transistor

14

Design of I.R. Transmitter

In infrared transmission section IC 555 is wired as an As table multivibrator with a center freq. Of an about 36 KHz. O/p of 555 is in square wave infrared LED is connected to its o/p pin 3. The oscillator freq. Can be shifted slightly using variable resistance VR1. For calculation of resistance, capacitor & o/p freq. Of As table multivibrator using 555 the capacitor connected between pin 2.6 & GND is periodically charge and discharge between 2 VCC/3 and VCC/3 respectively. During charging period o< t < TC the voltage across capacitor will given by

15

Vx = 2VCC/3 [ 1 exp { - t / RA + RB} C1] + VCC /3 At time t = TC capacitor voltage Vx reaches to threshold level of 2 VCC/3 so that 2/3 VCC = 2VCC/3 [ 1 exp { - TC /(RA + RB)C1} ] = VCC/3 solving charging time TC gives TC = (RA + RB ) C1 Ln 2 = 0.693 (RA + RB) C1 During discharge period 0 < t < TD we have that Vx = 2VCC /3 exp (-t1/ RBC1) At time t1 = TD the voltage across the capacitor reaches the trigger level of VCC/3 50 we have that Vx ( t = TD) VCC/3 = 2VCC/3 exp ( -TD/ RBC1) From this we obtain TD = RBC1 ln2 = 0.693 RBC1 where, TD & TC are charge & discharge Time so that total time T is T = TD + TC T = 0.693 (RA + 2RB) C1 So final equation for o/p freq. Is F0 = 1/T = 1/ 0.693 (RA + 2RB) C1 F0 = 1.44 (RA + 2RB) C1

16

From this formula, We know that req. freq. Of 36 KHz We assume C1 = 0.001 uf So 36 K Hz = 1.44 ( RA + 2RB ) 0.001uf (RA + 2RB = 1.44 36 x 103 x 0.001 x 10 -6 = 1.44 x 10-05 ( RA + 2RB ) = 40 k ohm

if we again assume RA = 4.7 k ohm 50 2RB = 35.3 K ohm so we select RB = 10 k ohm variable + 10 k ohm fix Resistance i.e. RB = 20 k ohm 2 RB = 40 k ohm, = 35.3 K ohm by charging RB variable 10 k ohm pot we adjust o/p freq. From 33 KHz to 38 KHz . which is sufficient. (Ref : Integrated circuit. By K.R. botkar page 591) The receiver uses an infrared sensor module which is commonly used in color television for sensing the I. R. Signals from transmitter section.

17

Design of Darlington pair transistor

RL = coil resistance of steeper motor which is 75 VCC= +12v dc Applying ohms low to ckt1. VCC = R l x IC 12v = 75 x IC IC=160mA That is maximum current flowing through collector of transistor is 160mA so we must select transistor T1&T2 which has IC max. grater than200mA from transistor selection manual we select BC 547 & BD 139 transistor which are matching b &max IC current

18

From transistor current equation configuration) =IC/I b (for ideal transistor =100) 100 = 160mA/Ib Ib = 1.6mA

(for common emitter

Applying kickoffs voltage low to base of transistor Vo = i/p to transistor base which is logical 1 i.e. 5 Vdc VBE=0.7 v for silicon transistor V0=IbRB+VBE RB=Vo-VBE/IB RB =5-0.7/1.6mA RB=2.68k So we select value of resistance R1 to R4=2.68k

19

DETAILS OF STEPPER MOTOR GENERAL SPECIFICATIONS


1) Type :- Hybrid type, Permanent rotor type, and Unipoiar type. 2) Phase :- Four phase, eight phases. 3) Step Angle :- 1.8 Degree for full step rotation, 0.9 Degree for half step rotation. 4) Angular Accuracy: - +_5% (unloaded). 5) Switching Sequence: - 4 step (full step) 8 step (half step). 6) Winding Configuration: - Dual baffler winding; 6lead. 7) Operating Temperature :- -10 degree to +50 degree centigrade 8) Temperature rise: - max. 80c 9) Insulation class :- class B 10) Insulation resistance: - 100M ohm. At 500v D.C. 11) Holding torque: - 3.5 to 60 Kg-cm. Maximum holding torque: - Torque created on out put shaft in the starter winding exciting state. It is maximum torque that woks to change the angle. Resonance: - When stepper motor is operated at its natural frequency typically 90 to 160 steps per second depending on motor type an increases in audio and vibration level of motor may occur. Transient Voltage Suppression: - Transient voltage are generated, as current are switched through the winding during stepping this voltage may cause faulty operation and damage to motor or driving compound unless a means of limiting them is provided the most common method is shunting diode. PRINCIPAL OF OPRATION Stepper motor can not be driven by connection to the power score like any other motors stepper motor is the electro magnetic device which convert digital input pulses in to discrete mechanical rotational movement the out put shaft of motor rotates in equal increment in response to input train pulses. The stepping action is caused by sequential switching of supply to the two phase of motor as shown in switching logic sequence table the specified torque of any stepper motor is the torque at stand still. This torque is directly proportional to the current in winding. As Th switching sequence start the inductive reactance of winding is increases with the freelance of switching. This impedance opposes rise of current to related level with in the time given for one step. This is mainly due to L/R time the motor shaft advance 200 step/rev. (1.8 deg. Per step) when a four step input sequence (full step mode) is use and 400 step per/ver (0.9 Deg. Per step) when an eight step input sequence is (half step mode) is use.

20

SWITHCING LOGICS SEQUANCE

FULL STEP SEQUANCE SEPT 1 2 3 4 5 A0 0 1 1 0 0 A1 1 0 0 1 1 A2 o 0 1 1 0

HALF STEP SEQUENCE A3 1 1 0 0 1 STEP A0 A1 A2 A3

5 6 7 8 1

Stepping motor is different from conventional D.C. servomotors in the following respect. 1. There is no control winding in stepping motors both winding are identical. 2. The stepping rate (speed of rotation) is control by frequency of switching and not by supply voltage. 3. A single pulse input will move the shaft of motor by one step. Thus number of step can be precisely control by number of pulse. 4. When there is no pulse of input the rotor will locked remains in the position in which last step was taken since at any time always two winding are energized which lock the rotor electromechanically. 5. Stepper motor is brush less so no wear and tear.

21

List of component
1)IC 1, IC27400 (NAND gate) 1) IC 3 --- 89C2051 Micro controller (20 pin DIP ) 2) IC 4 --- 7805 Voltage Regulator for 5v dc 3) X3-- 12MHz Quartz crystal 4) Transistor T1 to T8- BC 547 T9 to T 16- BD 139 5) Diode D1 to T8 1N4007 & D9 to D121N4007 D13 to D165408 6) RESISTANCE R1 to R910K R10- 680 7) capacitors C1- 10mf/ 63v electrolytic C2,C3- 22pf disc type ceramic C4- 1000mF/25v electrolytic C5- 2200mf/ 25v electrolytic 8) Infra red TRINSMITER- RECIVER 9) Steeper motor 1&2 - 12v ,1.8 degree stap angle ,1kg torque 10) Transformer --- 230v AC primary & 0-12 v AC/2A secondary 230v AC primary & 0-12v ACc/500mA secondary

22

Microcontroller 89c2051 Features


Compatible with MCS-51 Products 2K Bytes of Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles 2.7V to 6V Operating Range Fully Static Operation: 0 Hz to 24 MHz Two-level Program Memory Lock 128 x 8-bit Internal RAM 15 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Programmable Serial UART Channel Direct LED Drive Outputs On-chip Analog Comparator Low-power Idle and Power-down Modes

Description
The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2K bytes of Flash, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 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.

23

Pin Configuration

Block Diagram of PDIP/SOIC

24

Fig. Block Diagram of Microcontroller 89c2051

Pin Description

VCC Supply voltage. GND Ground. Port 1 Port 1 is an 8-bit bi-irectional I/O port. Port pins P1.2 to P1.7 provide internal pullups. P1.0 and P1.1 require external pullups. P1.0 and P1.1 also serve as the positive input (AIN0) and the negative input (AIN1), respectively, of the on-chip precision analog comparator. The Port 1 output buffers can sink 20 mA and can drive LED displays directly. When 1s are written to Port 1 pins, they can be used as inputs.

25

When pins P1.2 to P1.7 are used as inputs and are externally pulled low, they will source current (IIL) because of the internal pullups. Port 1 also receives code data during Flash programming and verification. Port 3 Port 3 pins P3.0 to P3.5, P3.7 are seven bi-irectional I/O pins with internal pullups. P3.6 is hard-wired as an input to the output of the on-chip comparator and is not accessible as a general purpose I/O pin. The Port 3 output buffers can sink 20 mA. When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of various special features of the AT89C2051 as listed below: Port Pin P3.0 P3.1 Alternate Functions RXD (serial input port) TXD (serial output port) INT0 (external interrupt 0) INT1 (external interrupt 1) T0 (timer 0 external input) T1 (timer 1 external input)

Port 3 also receives some control signals for Flash programming and verification. RST Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding the RST pin high for two machine cycles while the oscillator is running resets the device. Each machine cycle takes 12 oscillator or clock cycles. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier. Oscillator Characteristics

26

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 Figure 1. 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 2. There are no requirements on the duty cycle of the external clock signal, since 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. Figure 1. Oscillator Connections

Note: C1, C2 = 30 pF 10 pF for Crystals = 40 pF 10 pF for Ceramic Resonators Figure 2. External Clock Drive Configuration

Special Function Registers

27

A map of the on-chip memory area called the Special Function Register (SFR) space is shown in the table below. Note that not all of the addresses are occupied, and unoccupied addresses may not be implemented on the chip. Read accesses to these addresses will in general return random data, and write accesses will have an indeterminate effect. User software should not write 1s to these unlisted locations, since they may be used in future products to invoke new features. In that case, the reset or inactive values of the new bits will always be 0.

28

Table 1. AT89C2051 SFR Map and Reset Values

Restrictions on Certain Instructions


The AT89C2051 and is an economical and cost-effective member of Atmels growing family of microcontrollers. It contains 2K bytes of flash program memory. It is fully compatible with the MCS-51 architecture, and can be programmed using the MCS-51 instruction set. However, there are a few considerations one must keep in mind when utilizing certain instructions to program this device. All the instructions related to jumping or branching should be restricted such that the destination address falls within the physical program memory space of the device, which is 2K for the AT89C2051. This should be the responsibility of the software programmer. For example, LJMP 7E0H would be a valid instruction for the AT89C2051 (with 2K of memory), whereas LJMP 900H would not. 1. Branching instructions:

29

LCALL, LJMP, ACALL, AJMP, SJMP, JMP @A+DPTR These unconditional branching instructions will execute correctly as long as the programmer keeps in mind that the destination branching address must fall within the physical boundaries of the program memory size (locations 00H to 7FFH for the 89C2051). Violating the physical space limits may cause unknown program behavior. CJNE [...], DJNZ [...], JB, JNB, JC, JNC, JBC, JZ, JNZ With these conditional branching instructions the same rule above applies. Again, violating the memory boundaries may cause erratic execution. For applications involving interrupts the normal interrupt service routine address locations of the 80C51 family architecture have been preserved. 2. MOVX-related instructions, Data Memory: The AT89C2051 contains 128 bytes of internal data memory. Thus, in the AT89C2051 the stack depth is limited to 128 bytes, the amount of available RAM. External DATA memory access is not supported in this device, nor is external PROGRAM memory execution. Therefore, no MOVX [...] instructions should be included in the program. A typical 80C51 assembler will still assemble instructions, even if they are written in violation of the restrictions mentioned above. It is the responsibility of the controller user to know the physical features and limitations of the device being used and adjust the ins t ructions used correspondingly. Program Memory Lock Bits On the chip are two lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below:

Lock Bit Protection Modes(1)

Note: 1. The Lock Bits can only be erased with the Chip Erase operation.

Idle Mode In idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all

30

the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. P1.0 and P1.1 should be set to 0 if no external pullups are used, or set to 1 if external pullups are used. It should be noted that when idle is terminated by a hardware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory. Power-down Mode In the power down mode the oscillator is stopped, and the instruction that invokes power down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power down mode is terminated. The only exit from power down is a hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize. P1.0 and P1.1 should be set to 0 if no external pullups are used, or set to 1 if external pullups are used. Programming The Flash The AT89C2051 is shipped with the 2K bytes of on-chip PEROM code memory array in the erased state (i.e., contents = FFH) and ready to be programmed. The code memory array is programmed one byte at a time. Once the array is programmed, to re-program any non-blank byte, the entire memory array needs to be erased electrically. Internal Address Counter: The AT89C2051 contains an internal PEROM address counter which is always reset to 000H on the rising edge of RST and is advanced by applying a positive going pulse to pin XTAL1. Programming Algorithm: To program the AT89C2051, the following sequence is recommended. 1. Power-up sequence: Apply power between VCC and GND pins Set RST and XTAL1 to GND 2. Set pin RST to H Set pin P3.2 to H 3. Apply the appropriate combination of H or L logic levels to pins P3.3, P3.4, P3.5, P3.7 to select one of the programming operations shown in the PEROM Programming Modes table. To Program and Verify the Array: 4. Apply data for Code byte at location 000H to P1.0 to P1.7. 31

5. Raise RST to 12V to enable programming. 6. Pulse P3.2 once to program a byte in the PEROM array or the lock bits. The byte-write cycle is self-timed and typically takes 1.2 ms. 7. To verify the programmed data, lower RST from 12V to logic H level and set pins P3.3 to P3.7 to the appropriate levels. Output data can be read at the port P1 pins. 8. To program a byte at the next address location, pulse XTAL1 pin once to advance the internal address counter. Apply new data to the port P1 pins. 9. Repeat steps 5 through 8, changing data and advancing the address counter for the entire 2K bytes array or until the end of the object file is reached. 10.Power-off sequence: set XTAL1 to L set RST to L Turn VCC power off Data Polling: The AT89C2051 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written data on P1.7. Once the write cycle has been completed, true data is valid on all outputs, and the next cycle may begin. Data Polling may begin any time after a write cycle has been initiated. Ready/Busy: The Progress of byte programming can also be monitored by the RDY/BSY output signal. Pin P3.1 is pulled low after P3.2 goes High during programming to indicate BUSY. P3.1 is pulled High again when programming is done to indicate READY. Program Verify: If lock bits LB1 and LB2 have not been programmed code data can be read back via the data lines for verification: 1. Reset the internal address counter to 000H by bringing RST from L to H. 2. Apply the appropriate control signals for Read Code data and read the output data at the port P1 pins. 3. Pulse pin XTAL1 once to advance the internal address counter. 4. Read the next code data byte at the port P1 pins. 5. Repeat steps 3 and 4 until the entire array is read. The lock bits cannot be verified directly. Verification of the lock bits is achieved by observing that their features are enabled.

Chip Erase: The entire PEROM array (2K bytes) and the two Lock Bits are erased electrically by using the proper combination of control signals and by holding P3.2 low for 10 ms. The code array is written with all 1s in the Chip Erase operation and must be executed before any nonblank memory byte can be re-programmed. 32

Reading the Signature Bytes: The signature bytes are read by the same procedure as a normal verification of locations 000H, 001H, and 002H, except that P3.5 and P3.7 must be pulled to a logic low. The values returned are as follows. (000H) = 1EH indicates manufactured by Atmel (001H) = 21H indicates 89C2051 Programming Interface Every code byte in the Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operation cycle is selftimed and once initiated, will automatically time itself to completion. All major programming vendors offer worldwide support for the Atmel microcontroller series. Please contact your local programming vendor for the appropriate software revision.

Flash Programming Modes

Notes: 1. The internal PEROM address counter is reset to 000H on the rising edge of RST and is advanced by a positive pulse at XTAL 1 pin. 2. Chip Erase requires a 10 ms PROG pulse. 3. P3.1 is pulled Low during programming to indicate RDY/BSY.

33

Figure 3. Programming the Flash Memory

34

Figure 4. Verifying the Flash Memory

Flash Programming and Verification Characteristics TA = 0C to 70C, VCC = 5.0 0% 1

Note: 1. Only used in 12-volt programming mode.

35

Flash Programming and Verification Waveforms

Absolute Maximum Ratings*

36

37

*NOTICE: Stresses beyond those listed under Absolute Maximum Ratings may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. DC Characteristics TA = -40C to 85C, VCC = 2.0V to 6.0V (unless otherwise noted)

Notes: 1. Under steady state (non-transient) conditions, IOL must be externally limited as follows: Maximum IOL per port pin: 20 mA Maximum total IOL for all output pins: 80 mA If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test conditions. 2. Minimum VCC for Power-down is 2V.

38

External Clock Drive Waveforms

External Clock Drive

Serial Port Timing: Shift Register Mode Test Conditions


VCC = 5.0V 20%; Load Capacitance = 80 pF

39

Shift Register Mode Timing Waveforms

AC Testing Input/Output Waveforms(1)

Note: 1. AC Inputs during testing are driven at VCC - 0.5V for a logic 1 and 0.45V for a logic 0. Timing measurements are made at VIH min. for a logic 1 and VIL max. for a logic 0.

Float Waveforms(1)

Note: 1. For timing purposes, a port pin is no longer floating when a 100 mV change from load voltage occurs. A port pin begins to float when 100 mV change fro the loaded VOH/VOL level occurs.

40

AT89C2051
TYPICAL ICC - ACTIVE (85C)

AT89C2051
TYPICAL ICC - IDLE (85C)

41

Notes: 1. XTAL1 tied to GND for ICC (power-down) 2. P.1.0 and P1.1 = VCC or GND 3. Lock bits programmed

Ordering Information

42

Packaging Information

43

44

45

46

47

48

49

THIS IS PROGRAM FOR PROJECT SYSTEM.

50

PCB Layout

Figure.

51

PCB Layout

Figure

52

Final PCB Layout

Fig.

53

PCB LAYOUT

COMPONUNT MOUNTING SIDE

54

PCB DESIGNING AND FABRICATION


Introduction to printed circuit boards It is caller PCB in short, printed circuit pattern applied to one or both sides of an insulating base, depending upon that, that, and it is called single sided PCB or doublesided PCB. Conductor materials available are silver, brass, aluminum and copper; copper is most widely used which is used here also. The thickness of conducting material depends upon the current carrying capacity of the circuit. The printed circuit board usually serves three functions: 1. 2. 3. Cu clad The base of laminate is either paper of glass fiber cloth. Cu foil, which is produced by the method of electroplating, is placed on laminate and both are kept under hydraulic pressure for proper adhesive pressure for proper adhesive. These Cu clad are easily available in the market. It provides mechanical support to the components mounted on it. It provides necessary electrical interconnection. It acts as heat sink i.e. it provides a conduction path leading to removal of most of the heat generated in the circuit.

Types of Laminates National Electrical Manufacturers Association (NEMA) has various grades of laminates that are obtained by different resins & filters. 1. Phenol Phenol & Formaldehyde produce phenolic paper base laminate it has phenolic resins with proper filter. This is Brown in color & opaque. Disadvantage is poor moisture resistance 2. Epoxy Laminates Epoxy paper this is also paper based but impregnated with epoxy resin, yellowish white & translucent.

55

Epoxy Glass; This base material has high mechanical strength and good electrical properties usually green in color & semitransparent. There are a variety of laminates available. We have selected Fiber Glass epoxy laminate. PCB fabrication includes following steps: 1) 2) 3) 4) 5) 6) 7) Layout of the circuit Artwork designing Printing Etching Drilling Mounting of components & soldering Finishing

1) Layout The layout of a PCB has to incorporate all the information on the board before one can go onto the all work preparation. Detailed circuit diagram, the design concept and the philosophy behind the equipment are very important for the layout. Layout Scale Depending on the accuracy required artwork should be produced at a 1:1 or 2:1 or even 4:1 scale. The layout is best prepared on the same scale as the artwork to prevent the entire problem, which might be caused by redrawing of the layout to the artwork scale. The layout/artwork scale commonly applied is 2:1 with a 1:1 scale, no demanding single sided boards can be designed but sufficient care should be taken, particularly during the artwork preparation. Procedure The first rule is to replace each and every PCB layout as viewed from the component side. This rule must be strictly followed to avoid confusion, which would otherwise be caused. Another important rule is not to start the designing of a layout unless an absolutely clear circuit diagram is available. Among the components, the larger ones are placed first and the space in between is filled with smaller ones. Components requiring input/output connecting come near the connector. All components are placed in such a manner that de-soldering of other components is not necessary if they have to be replaced.

56

Layout sketch The end product of the layout designing is the pencil sketched component and conductor drawing which is caller layout sketch. It contains all information for the preparation of the network. Component holes In a given PCB, most of the holes required are one particular diameter. Holes of a different are shown with a code in the actual layout sketch. Conductor Holes A code can be used for the conductor with a special width. Minimum spacing should also be provided. A) Holes Standard holes 1.1 mm 1.5 mm 3.2 mm (2) Artwork The generation of PCB artwork should be considered as the first step of the PCB manufacturing process. The importance of a perfect artwork should not be under estimated. Problems like inaccurate registration, broken annular rings or too critical spacing are often due to bad artwork. And even with the most sophisticated PCB production facilities, PCB can be made better than the quality of the artwork used. Basic Approaches For ink drawing on white cardboard paper, good quality Indian ink and ink-pen set are minimum requirements. Drawing practice drawing procedure is very at-least by 0.1 0.2, and solder pad locations. And conductors can easily be displaced by 0.3 0.5 mm B) Conductor Widths

Standard width, 0.5 mm 1 mm 2 mm 4 mm

57

(3) Screen Printing The process of screen printing is well known to the printing industry because of its inherent capabilities of printing a wide range of inks on almost any kind of surface including glass, metal, plastic fabrics, wooer, etc. Found their way into an extremely broad field of applications. Screen printing offers the advantages of wide control on the ink deposition, thickness though the selection of suitable mass density and composition. In the production of PCBs. It is successfully employed in printing of Etch resists Plate resists Solder stop lacquers Notation printing

In its basic form, the screen-printing process is very simple. A screen fabric with uniform meshes and opening is stretched and fixed on a solid frame of metal or wood. The circuit pattern area open, while the meshes in the rest of the area is closed. In the actual printing step, ink is forced by the moving squeeze thorough the open meshes onto the surface of the material to be printed. The ink deposition, in a magnified cross section, shows the shape of a trapezoid. Pattern Transfer onto the Screen There are two different methods in use, and each method has its own advantages and disadvantages. With the direct method, the screen is prepared, by coating a photographic emulsion directly onto the screen fabric and exposing it in the pattern area. The indirect method makes use of a separate screen process film, supported on a backing sheet. The film on its backing sheet that is there after pressed onto the screen fabric and sticks there. Finally, the backing sheet is peeled off, opening all those screen meshes, which are not covered by the film pattern. The direct method provides very durable screen stencils with a higher dimensional accuracy but the finest details are not reproduced The indirect method is more suitable for smaller series and where the finest details to be reproduced.

58

The indirect method is faster but dimensionally less accurate and the screen stencils are less durable, more sensitive to mechanical damages and interruption in printing. (4) Etching In all subtractive PCB process, etching is one of the most important steps. The final copper pattern is formed by selective removal of all the unwanted copper, which is not protected by an etching unit. Solutions, which are used in etching process, are known as enchants. 1. 2. 3. 4. Ferric Chloride Cupric Chloride Chromic Acid Alkaline Ammonia

Of these Ferric Chloride is widely used because it has short etching time and it can be stored for a long time. Etching of PCBs as required in modern electronic equipment production, is usually done in spray type etching machines. Tank or bubble etching, in which the boards kept in tank, were lowered and fully immersed into the agitated, has almost disappeared. (5) Component Mounting Careful mounting of components on PCB increases the reliability of assembly. 1. One leads must be cleaned before they are inserted in PCB holes. Asymmetric lead bending must be avoided; the ENT leads must fit into holes properly so that they can be soldered. 2. When the space is to be saved then vertical mounting is preferred. The vertical lead must have an insulating sleeve. 3. Where jumper wire crosses over conductors, they must be insulted. 4. For mounting of PCBs, TO5, DIP packages special jigs must be used of easy insertion. 5. While mounting transistors, each lead must have insulating sleeve. All the flat radial components such as resistors, diodes, and inductors are mounted and soldered. Then IC bases are soldered. The vertical components such as transistors, gang condenser and FET are mounted & soldered.

59

(6) Soldering The next process after the component mounting is soldering; solder pint is achieved by heating the solder and base metal about he melting point of the solders used. The necessary heat depends upon: 1. 2. 3. The nature and type of joints Melting temperature of solder Flux

Soldering techniques are of so many types but we are using iron soldering. Iron soldering Soldering iron consists of an insulating handle connected through a metal shaft, of a bit accurately makes contact with the component parts of the joint and solder and heats them up. The electrical heating element is located in the hollow shank or handle to heat the bit. Functions of the Bit It stores heat and convey it from the heat source to the work. It may be required to store surplus solder from the joint. It may be required to store molten solder and flux to the work. The it surface must be lined or wetted; this encourages flow of solder into the joint. When the surface of the work becomes estted by solder, a continuous film of liquid metal between the bit and the work provides a path of high thermal conductivity through which heat can flow into the work piece. Solder bit are made up of copper; this metal has good wetting properly, heat capability ad thermal conductivity. Tin-lead solder affects copper during soldering operation. Production of copper bit can be made with thick iron coating followed by Ni/Tin plating. The life of the bit is increased by a factor of 10 to 15. Solder irons are specified in terms of wattage. Depending on heat input intended for working and types of work (Continuous or individual) the choice of the solder iron can be made.

60

Procedure of Soldering The points to be joined must be cleaned first and fluxed. The hard solder iron and solder wire is applied to the work. The melted solder becomes bright and fluid. The iron must be removed after sufficient time and joint is allowed to coal. At the end, finishing is done. PCB. Designing using computer aided designing (CAD):

CAD has many advantages over manual designing, important among them is: 1. 2. 3. Changes can be easily made because we dont have to erase our pencil work on paper repeatedly. Time is saved. Before taking printout we can have preview of the design etc. The software which we have used is Quick-route.

61

Troubleshooting

1) After etching check continuity of each track of P.C.B. 2) At time of mounting check polarity of diode, transistor and other component 3) Check o/p of power supply must be +5v D.C. 4) Check steeper motor coil using millimeter 5) Check o/p signal at C.R.O. 6) Check transmitter frequency of 36Khz on frequency counter 7) Check transistor on transistor tester

62

Future scope

1) By using 12v 4.5AH dry battery we provide battery back up 6 hours for our system 2) By adding number of filter at out put of receiver and by selecting filter band we received any type of frequency 3) We also use high cost small step angle motor for more precious scanning 4) We replace infrared transmitter and receiver by using ultrasonic transmitter and receiver so it can penetrated through any medium 5) Total scan speed can be reduces by decreasing time delay between two step of steeper motor 6) By making current amplification at output stage of amplifier we increase range of transmitter

63

Advantages of project

1) In our project we use Both Auto and manual mode to searching global frequency so system is easy to operate 2) Total 360 degree of scan is possible by using two steeper motor one for north south direction and other is for ease west direction 3) We use 1.8-degree step angle steeper motor so precious scanning is possible 4) After detecting required frequency we give audio (buzzer) and visual indication (using LED) so required frequency is catch is understand easily 5) As we use small micro controller only 20-pin system is compact 6) Transmitter is operated on battery so for demonstration it is easy to handle it any where in room 7) Total system is work only on +5v D.C. power supply so it consume less power

64

Disadvantages
1) We does not provide any type of battery back up to our system so after power loss it does not work 2) In our project we received only one frequency of 36Khz 3) Transmitter range is 10 to 15 feet above that area it does not detect 4) Total time duration to search global is large as our time duration between to step of steeper motor is long 5) In transmitter and receiver if any obstacles then there is no reception because signal is not penetrated through obstacle

65

Application

1) We use these project for receiving frequency for military purpose 2) We use same system for radar be cons 3) For receiving number of cable television channel using single dish we use this system 4) We use this system for whether monitoring and reporting system 5) In airplane to detect position of surrounding before landing

66

References
1)Programming and customizing the 8051 microcontroller Authore---Myke Predko Publecation---TATA McGRAW-HILL 2)The 8051 Microcontroller Architecture,Programming & Application Authore---Kenneth J.Ayala Publecation---Penram Inter national publication 3)Opto Electronic Ckt Manual Authore---R.M. Marston Publecation---B.P.B. publication 4)Microprocesser Data Hand book B.P.B. Publecation 5)Towers International Transistor Seclector B.P.B. Publecation 6)A Monogram on Electronic ckt. dDesigne Princepal Authore---N.C.GOYAL-- R.K.KHETAN Publecation--- KHANNA publication 7) Linear Intefrated ckt. Authore---Ramakant Gayakwad Publecation--- PH hall publication 8) WWW.ATMEL.com

67

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