+ All Categories
Home > Documents > 23736695 Project Report on Repaired

23736695 Project Report on Repaired

Date post: 21-Apr-2015
Category:
Upload: ravi-sharma
View: 46 times
Download: 3 times
Share this document with a friend
58
PROJECT REPORT ON “ AUTOMATIC PLANT IRRIGATOR” A MINOR PROJECT UNDER MR. D.K.RAHEJA (LECTURER,DEPTT OF ECE,AIT) DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 1
Transcript
Page 1: 23736695 Project Report on Repaired

SUBMITTED BY :-

RITESH BATRA (0571012806)

RAMESHWAR SHARMA (0471012806)

VINOD CHATURVEDI (0751012806)

B.TECH 7TH SEM,ECE,AIT.

PROJECT REPORT ON

“ AUTOMATIC PLANT IRRIGATOR”

A MINOR PROJECT UNDER

MR. D.K.RAHEJA

(LECTURER,DEPTT OF ECE,AIT)

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

AMBEDKAR INSTITUTE OF TECHNOLOGY,DELHI

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 1

Page 2: 23736695 Project Report on Repaired

CONTENTS OF REPORT1. CERTIFICATE2. INTRODUCTION3. PROJECT IMPLEMENTATION4. OVERALL BLOCK DIAGRAM5. MICROCONTROLLER BLOCK6. DTMF BLOCK7. OP AMP BLOCK(SENSOR)8. RELAY AND OPTOCOUPLER BLOCK9. OTHER REQUIREMENTS10.SOFTWARE REQUIREMENTS11.FLOW CHART12.ASM FILE13.HEX CODE14.REFERENCES

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 2

Page 3: 23736695 Project Report on Repaired

CERTIFICATETHIS IS TO CERTIFY THAT RITESH BATRA (0571012806),RAMESHWAR SHARMA(0471012806),VINOD CHATURVEDI(0751012806) STUDENTS OF 7TH SEMESTER,ECE HAS COMPLETED “AUTOMATIC PLANT CONTROLLER” PROJECT UNDER MY GUIDANCE.I WISH THEM SUCCESS THROUGHOUT THEIR LIVES.

(D.K.RAHEJA,LECTURER,DEPTT. OF ECE,AIT)

ACKNOWLEDGEMENTWE EXPRESS OUR GRATITUDE TOWARDS D.K. RAHEJA SIR FOR HIS OVERWHELMING SUPPORT AND VISIONARY GUIDANCE.THANK YOU SIR FOR MOTIVATING US AT EVERY POINT OF TIME TO ACHIEVE THE BEST STANDARDS.

WITH REGARDS,

(TEAM MEMBERS)

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 3

Page 4: 23736695 Project Report on Repaired

INTRODUCTIONIN THIS FAST PACED WORLD,HUMAN BEINGS REQUIRE EVERYTHING TO BE AUTOMATED.OUR LIFESTYLE DEMANDS EVERYTHING TO BE REMOTE CONTROLLED.APART FROM FEW THINGS MAN HAS MADE HIS LIFE AUTOMATED.AND WHY NOT? IN THIS WORLD OF ADVANCE ELECTRONICS,LIFE OF HUMAN BEINGS SHOULD BE SIMPLER.

HENCE,TO MAKE LIFE MORE SIMPLER AND CONVINIENT,WE HAVE MADE “AUTOMATIC PLANT IRRIGATOR”,A MODEL OF CONTROLLING IRRIGATION FACILITIES TO HELP MILLIONS OF PEOPLE.

THIS MODEL USES ADVANCED DTMF TECHNIQUES,SENSOR TECHNOLOGY WITH MICROCONTROLLER TO MAKE A SMART SWITCHING DEVICE.

THE MODEL SHOWS THE BASIC SWITCHING MECHANISM OF BULBS BY USING MOBILE PHONES,FROM ANY PART OF WORLD AND BY SENSING THE MOISTURE PRESENT IN THE SOIL.

OUR BASIC MODEL CAN BE EXTENDED TO ANY LEVEL OF SWITCHING & CONTROLLING BY USING DTMF,SENSOR TECHNOLOGY.

APPLICATIONS:-

1.IRRIGATION IN FIELDS.

2.IRRIGATION IN GARDENS,PARKS.

3.VERY EFFICIENT FOR PADDY(RICE) FIELDS.

4.PICSICULTURE.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 4

Page 5: 23736695 Project Report on Repaired

THIS REPORT CONTAINS THE DETAILED INVESTIGATION OF AFORESTATED PROJECT.

THE FOLLOWING PAGES WOULD GIVE YOU AN IDEA HOW SIMPLE LIFE COULD BE…………………..

PROJECT IMPLEMENTATION

1.The project implementation begins with brain storming.After a good session of brainstorming,We got an idea for hardware design(involves R&D).

2.After the hardware design,the overall hardware was divided into 5 sections,and work on every section was done separately.

3.Then came the phase of programming and debugging.Thanks to Raheja sir for helping us in turning every stone into a milestone.Programming and debugging was a cakewalk for us as we had visionary support of Raheja sir.

4.Then came transferring on board and Raheja sir’s knowledge and experience came handy that really helped us by providing handy circuits for our project.

5.Finally the overall prototype was tested by us.The overall project was successful,except small errors that were rectified in due time.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 5

Page 6: 23736695 Project Report on Repaired

BLOCK DIAGRAM

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 6

MCU BLOCK

SENSOR BLOCK(LM324)

DTMF BLOCK

MOTR1

MOTR2

MOTR3

MOTR4

RELAY AND OPTOCOUPLOR BLOCK

SOIL

CELL PHONE

1 2 3

4 5 6

7 8 9

IF WE PRESS THE FOLLOWING KEYS OF CELL PHONE THEN FOLLOWING BULBS WOULD BE ON/OFF.

2-MOTOR1 -ON 1- MOTOR1-OFF

4- MOTOR2-ON 3- MOTOR2-OFF

6- MOTOR3-ON 7- MOTOR3-OFF

8- MOTOR4-ON 9- MOTOR4-OFF

5-ALL OFF

Page 7: 23736695 Project Report on Repaired

THE PROJECT CONSISTS OF 4 BLOCKS.

1.MICROCONTROLLER BLOCK (AT89S52).

2.DTMF BLOCK(CM8870).

3.OP-AMP BLOCK.

4.RELAY AND OPTOCOUPLER UNIT.

5.LOAD BLOCK(BULBS).

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 7

MCU BLOCK DTMF BLOCK

RELAY AND OPOPTOCOUPLER

OP AMP BLOCK(SENSOR)

Page 8: 23736695 Project Report on Repaired

MICROCONTROLLER BLOCKTHIS BLOCK CONSISTS OF FOLLOWING

AT89S52:-

PIN DESCRIPTION:-

VCCSupply voltage-5V

GNDGround.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 8

Page 9: 23736695 Project Report on Repaired

Port 0Pin 32-39 is port 0 of 8052.Port 0 is an 8-bit open-drain bi-directional I/O port. Port 0 receives the code bytes during Flash programming, and outputs the code bytes during program verifICation. External pullups are required during program verifICation.Here we are using port 0 as output port to give control signals to relay block.when the pins on port 0 becomes low ie.logICal zero,it gives o/p to relay block for switching on/off the load.

Port 1Port 1 is an 8-bit bi-directional I/O port with internal pullups.Port 1 also receives the low-order address bytes during Flash programming and verifICation.Here we are using port 1 as sensing port that detects dtmf signal,and gives control signal to port zero.

Port 2Port 2 is an 8-bit bi-directional I/O port with internal pullups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this applICation, it uses strong internal pull-ups when emitting 1s.During accesses to external data memory 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.

Port 3Port 3 is an 8-bit bi-directional I/O port with internal pullups.we have used port 3 for interrupt as our sensor will continuosly sense the moisture present and it will give control signal to p3.3 whICh is an external interrupt enable pin,i.e. INT1. Port 3 also receives some control signals for Flash programming and verifICation Port 3 also serves the functions of various special features of the AT89C52 as listed below:

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 9

Page 10: 23736695 Project Report on Repaired

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 10

Page 11: 23736695 Project Report on Repaired

RSTReset input. A high on this pin for two machine cycles while the oscillator is running resets the devICe.

ALE/PROGAddress 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/6 the oscillator 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 isweakly pulled high. Setting the ALE-disable bit has no effect if the mICrocontroller is in external execution mode.

PSENProgram Store Enable is the read strobe to external program memory. When the AT89C52 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.EA/VPPExternal 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 alsoreceives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP.XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 11

Page 12: 23736695 Project Report on Repaired

Crystal

The crystal we are using here is to provide clock frequency to the mICrocontroller.Its no is-624-21 11.0592 kdsi ok.It gives 11.0592mhz of frequency whICh is divided by 12.

Other capacitances n resistances are used to filter spikes and to provide appropriate loads.also there is a port for adapter that provides 12 v.Output pins are also embedded on the board.

Hence we can see that how small components joined together forms the most important part of our project i.e. mcu block.

POWER SUPPLY UNITThe power supply unit consists of bridge rectifier,voltage regulator IC-7805,capacitor-1000uf 25 v,0.1 uf.we have made power supply unit from bridge rectifier whICh converts 12 volt to 5 volt constant current.There is a single 5v o/p pin & one ground-5-12v pin for relay and optocoupler block.hence power supply is ready with ground,5v,12v.

Do remember that all IC’s work on 5v.so IC’s should be connected to 5v supply,else they will get damaged.

Next is an easy diagram to make power supply.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 12

Page 13: 23736695 Project Report on Repaired

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 13

Page 14: 23736695 Project Report on Repaired

DTMF BLOCKDtmf:-it means dual tone multi frequency.

It is a technique through whICh the keys of the telephonIC key pad is decoded.In this technique we have two frequencies,one high and one low.Based on these frequencies the inputted or pressed key is detected as 1 or 2 and so on…………..

Dtmf is used in present days mobile phones,and we have used this technique to detect the keys pressed on the phone.

KeypadThe DTMF keypad is laid out in a 4×3 matrix, with each row representing a low frequency, and each column representing a high frequency. Pressing a single key such as '1' will send a sinusoidal tone of the two frequencies 697 and 1209 hertz (Hz). The original keypads had levers inside, so each button activated two contacts. The multiple tones are the reason for calling the system multi frequency. These tones are then decoded by the switching center to determine whICh key was pressed.

DTMF keypad frequencies (with sound clips) 1209 Hz 1336 Hz 1477 Hz

697 Hz 1 2 3

770 Hz 4 5 6

852 Hz 7 8 9

941 Hz * 0 #

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 14

Page 15: 23736695 Project Report on Repaired

DTMF DECODER IC 8870.DescriptionThe M-8870 is a full DTMF Receiver that integrates both bandsplit filter and decoder functions into a single 18-pin DIP or SOIC package. Manufactured using CMOS process technology, the M-8870 offers low power consumption (35 mW max) and precise data handling. Its filter section uses switched capacitor technology for both the high and low group filters and for dial tone rejection. Its decoder uses digital countingtechniques to detect and decode all 16 DTMF tone pairs into a 4-bit code. External component count is minimized by provision of an on-chip differential input amplifier,clock generator, and latched tri-state interface bus. Minimal external components required include a low-cost 3.579545 MHz color burst crystal, a timing resistor, and a timing capacitor. The M-8870-02 provides a “power-down” option whICh, when enabled,drops consumption to less than 0.5 mW.Features• Low Power Consumption• Adjustable Acquisition and Release Times• Central OffICe Quality and Performance• Power-down and Inhibit Modes (-02 only)• Inexpensive 3.58 MHz Time Base• Single 5 Volt Power Supply• Dial Tone SuppressionApplICations• Telephone switch equipment• Remote data entry• Paging systems• Personal computers• Credit card systems

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 15

Page 16: 23736695 Project Report on Repaired

Pin Configuration

Block Diagram

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 16

Page 17: 23736695 Project Report on Repaired

Functional DescriptionM-8870 operating functions (see block diagram on page 1) include a bandsplit filter that separates the high and low tones of the received pair, and a digital decoder that verifies both the frequency and duration of the received tones before passing the resulting 4-bit code to the output bus.

FilterThe low and high group tones are separated by applying the dual-tone signal to the inputs of two 6th order switched capacitor bandpass filters with bandwidths that correspond to the bands enclosing the low and high group tones. The filter also incorporates notches at 350 and 440 Hz, providing excellent dial tone rejection. Each filter output is followed by a single-order switched capacitor section that smooths the

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 17

Page 18: 23736695 Project Report on Repaired

signals prior to limiting. Signal limiting is performed by highgain comparators provided with hysteresis to prevent detection of unwanted low-level signals and noise. The comparator outputs provide full-rail logIC swings at the frequencies of the incoming tones.

DecoderThe M-8870 decoder uses a digital counting technique to determine thefrequencies of the limited tones and to verify that they correspond to standard DTMF frequencies. A complex averaging algorithm is used to protect against tone simulation by extraneous signals (such as voICe) while tolerating small frequency variations. The algorithm ensures an optimum combination of immunity to talkoff and tolerance to interfering signals (third tones) and noise. When the detector recognizes the simultaneous presence of two valid tones (known as signal condition), it raises the Early Steering flag (ESt). Any subsequent loss of signal condition will cause ESt to fall.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 18

Page 19: 23736695 Project Report on Repaired

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 19

Page 20: 23736695 Project Report on Repaired

Working of circuit:- here IC 8870 is used as decoder.now when the keys are pressed on the phone,a dtmf signal is generated that goes to dtmf decoder through input pins.The input is given to pin 2,3,therby output is obtained at pin 11,12,13,14,and pin 15 is used to detect change of o/p.pin 5,6,9 are connected to ground and crystal is connected to pin 7.pin 16,17,18 are connected to power supply.further resistors and capacitors are used to avoid spikes & provide appropriate load.also we have used 4 red led’s to know the o/p value.one yellow led is there to detect the change in o/p.A 5 v power supply is given to the IC whICh detects the keys pressed.

Depending on the input the output value is taken from o/p pins and the value is given to port 1,where comparison is done and control signals are given to port 0.the circuit we have designed works on high logIC.do remember that input to the IC is given through an earphone lead that should be capable to detect the output coming from the phone.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 20

Page 21: 23736695 Project Report on Repaired

OP AMP BLOCK(SENSOR)we have designed our sensor using IC LM 324(quad op amp).This is a powerful op amp IC that can be used for variety of sensors.This IC is 14 pin,with four opamps that can be used sensors.The opamp’s are used in inverting mode as a comparator.it compares the input with 5v signals,and depending on comparison it gives a low or high output.

The whole circuit is made on a readymade PCB readily available in market.the whole circuit is designed in a manner that any type of sensor can be used on it.Here our sensor is two pin metal probes,that is used in soil,and it is connected to op amp using resistors so that low or high signal can be detected.Finally the output from sensor is given to pin 3.3 whICh is external interrupt1 i.e. int1.and from int1 control signal is given to relay that switches on/off the motor for irrigation purposes.

Following is the overall diagram for op amp block.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 21

Page 22: 23736695 Project Report on Repaired

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 22

Page 23: 23736695 Project Report on Repaired

WORKING OF OVERALL CIRCUIT:-

1.The input from probe 1 is given to pin 2 of LM 324 IC.Pin 3 is connected to 5v,the opamp compares the input with 5v and gives output as inverted logIC of comparison.

2.Similarly pin 6,9,13 is connected to other probes and same comparison with 5v is done to provide the appropriate logIC.

3.outputs are taken from pin 1,7,3,14.the output is inverted.

4.Pin 4 is connected to +vcc and pin 11 is connected to ground.

5.resisters of 20k and 470k are used to provide appropriate connections.

6.Pin 3,8,10,12 are connected to 5v for comparison.

7.Further led’s are connected,so that output can be easily detected.

8.Two pins are used for input vcc.

9.A common ground and common –ve pins are provided to make necessary connections.

10.A variable resistor is embedded to provide appropriate load.

11.Hence after making the connections,the output is taken from respective pin,and given to mICrocontroller for further switching.

12.Please note that 5v should be given to Lm324,a high voltage would damage the IC,and may lead to IC burst.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 23

Page 24: 23736695 Project Report on Repaired

RELAY AND OPTOCOUPLER UNITThis unit provides the actual switching of appliances.the mechanical on off is done by this unit only.The overall relay and optocoupler board consists of1.RELAY(JQC-3FC(T73)DC 12V.2.OPTOCOUPLER(VT 38T Q5627) 3.DIODES AND TRANSISTORS

Relay is an electromagnetic switch.hence it makes bulbs on/off.And optocouplers are used to isolate 5v to 12v.Our relay and optocoupler board consists of 4 semiconductor relays,which are actually electromechanical switches,4 optocupler,4 diodes.Diodes are used so that signal always flow in 1 direction,else it may harm microcontroller,due to leakage current.Then comes optocouplers that takes the input from port 0 at pin1 and the led present inside the optocoupler drives the transistors by giving optical signals,hence o/p is taken from pin 4 which is given to another transistor that drives the relay.Optocouplers are used because our microcontroller works on 5v,where as led works on 12v.Hence to provide isolation between the two voltages,optocuplers are used.but if we directly connect microcontroller to relay,then it will harm mcu.Finally relay switches on/off our motors used for irrigation.its one end is connected to electrical main,and other end to motor.relays are of two types normally open/close.we have used normally closed relay.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 24

Page 25: 23736695 Project Report on Repaired

Following is the circuit diagram of relay and optocoupler.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 25

Page 26: 23736695 Project Report on Repaired

OTHER CIRCUIT ELEMENTS USED1. 4 bulb holders.2. 2 meter household electrical wire,220 v(enamled).3. 4.bakelite sheet.4. 5.double sided tape5. 6.two pin plug.6. 7.connecting wires.7. 8.mobile phone.8. 9.handsfree wire.9. 12 v adapter.

OVERALL WORKING OF PROJECT.

1.Connect the two pin plug to normal power supply i.e. 220 v,50 Hz Ac.2.Also connect the microcontroller board to 12 v adapter.3.Now the setup is ready for use.

FOR DTMF TECHNOLOGY:-

1.Dial the phone number of phone connected with mcu.

2.The dtmf kit will get activated,as a result of which port 1 of mcu will receive some bi value like 11110011.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 26

Page 27: 23736695 Project Report on Repaired

3.After receiving bit value’s on port 1,the values are moved to accumulator A.

4.Then the accumulator value is compared with predefined bit pattern.

Like if 1 is pressed then comparison is done with 11110001,n so on…….

5.Microcontroller after getting the required signal makes port 0 bits ie.p0.0,p0.1,p0.2,p0.3 to set or clear depending on logic.

6.And finally port 0 pins give signal to optocoupler,that gives 12 v to relay circuit,as a result of it,the bulb depending on logic gets switched on/off.

7.Key 5 0n phone keypad is used to switch all appliances off.

FOR SENSOR TECHNOLOGY:-1.After making the necessary connections,the sensor is placed inside the soil.

2.It senses the moisture present in the soil and gives interrupt to microcontroller.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 27

Page 28: 23736695 Project Report on Repaired

3.On detecting the interrupt,microcontroller executes interrupt service routine.

4.This routine provides control signals to port 0,that gives signals to relay block for switching motor on/off.

5.if the soil is dry,motor would get on automatically,else it will remain off due to presence of moisture.

NOTE:- controller signals can be given on any port depending on requirements.

This is the overall working of our project.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 28

Page 29: 23736695 Project Report on Repaired

CIRCUIT DIAGRAM:- DTMF TECHNOLOGY

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 29

Control signals are given from port 0 to the relay block

These are signals from dtmf block to port1

Page 30: 23736695 Project Report on Repaired

CIRCUIT DIAGRAM:- SENSOR TECHNOLOGY

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 30

P3 P0

ATB9S52

P3

Page 31: 23736695 Project Report on Repaired

USB DEVELOPMENT KIT

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 31

Page 32: 23736695 Project Report on Repaired

The 8051 Development Kit is a multipurpose kit. It can be used to run various 8051 programs and burn them into the microcontroller. It can also be used in practical Robotic/Automation applications where implementation of Actuators and Sensors may be required.

The development kit provided by us is shown below with the different parts labeled.

1. AT89S52 Microcontroller2. Port 0 Connector3. Port 1 Connector4. Port 2 Connector5. Port 3 Connector6. 5V Power Supply Connector7. 5V Power Supply Connector8. Black Wire points to the LSB of each Port9. EEPROM 24Cxx (optional)10. LCD (optional)11. 5V Power Supply Connector12. 9 pin D-Shell Female Connector to get the input from the

controller to the computer. 13. MAX 232 for serial communication with PC ( optional )14. 25 pin D-Shell male connector to transfer the HEX code from PC to

the microcontroller15. DC Jack for 12V Power supply16. Power Indication LED17. Buffer IC to toggle between the Programming mode and the Run

mode18. Jumper19. LED that signifies whether the Jumper is connected or not

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 32

Page 33: 23736695 Project Report on Repaired

How to make the connections?

The adopter should be connected to the DC Jack (in the development kit) while the other end is to be connected with the AC supply. There is a 25 pin D-Shell Connector in the development kit that is to be connected with the parallel port of the PC through a cable. The corresponding LED on the development kit will indicate the supply of power or the successful connection of the kit with the PC.

IMPORTANT NOTE: Any input or output pin should NOT be connected with the Vcc (5V Supply) directly.

Peripherals That Can Be Connected

Seven Segment LCD (Liquid Crystal Display) LED (Light Emitting Diode) Actuators (along with their driver circuitry like H-Bridge)

DC Motor Stepper Motor

Limit Switch ADC (Analog to Digital Converter) DAC (Digital to Analog Converter) Proximity Sensors

Metal Proximity Sensor Infra-Red Proximity Sensor Magnetic Proximity Sensor Ultrasonic Proximity Sensor

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 33

Page 34: 23736695 Project Report on Repaired

DTMF (Dual Tone Multiple Frequency) Decoder- used especially for wireless control

Matrix Keyboard Any electrical home appliances to be switched ON/OFF

Troubleshooting

If the development kit is not working then Check if the connector of the 12V adopter is connected

properly Check if the 25 pin D-Shell connector is connected properly If still the program is not able to burn then either the

microcontroller is faulty or under rare circumstances the buffer IC is faulty.

If the program is able to burn, but not able to run, then it means that the jumper near the 5V supply is not connected properly. If the jumper is connected properly then the LED (marked 19 in the diagram above) will glow.

Select the correct device (AT89S52) in the SpiPgm up.After that the hex file can be easily burn into microcontroller using spigm.

SOFTWARE DEVELOPMENT DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 34

Page 35: 23736695 Project Report on Repaired

The hex file for microcontroller was generated using following software tools.1.8051 IDE:- It is an integrated development environment,that consists of a compiler,editor,linker.Here the code is written in assembly language,which is converted to hex file by 8051IDE.

2.FLIP 2.6:- It is a software designed by atmel,to burn the microcontroller of usb kit.It stores hex file into rom for execution purposes.FLIP 2.6 can be used for variety of microcontrollers.Flip 2.6 was used during development of hex files,i.e. during testing phase.

3.SPIGM:- It is a flash programmer,that writes the hex file to 8052 rom.

Hence all the code was developed using above software and usb kits provided by plc institute of electronics.The code was tested on the kit,and Final code was burn in microcontroller using spigm burner.

FLOWCHART

ASM FILE

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 35

Page 36: 23736695 Project Report on Repaired

ORG 0000H ;ORIGIN

LJMP MAIN1 ;JUMPING TO DTMF CODE. ORG 0013H ;INT1 SERVICE ADDRESS. CLR P0.0 ;SWITCHING IN MOTOR ACALL DELAY ;DELAYS ACALL DELAY SETB P0.0 ;SWITCHING MOTOR OFF RETI ;RETURN FROM INTERRUPT

DELAY: MOV R7,#250 ;KEEPING COUNT VALUE IN R7L3: MOV R6,#250 ; R6=250L4: DJNZ R6,L4 ;DECREMENT R6 DJNZ R7,L3 ;DECREMENT R7 RET ;RETURN FROM ACALL

ORG 30H ;MAIN PROGRAM’S ADDRESS MAIN1: MOV IE,#10000100B ;ENABLING INT1

MOV A,P1 ;GETTING VALUE FROM DTMF CJNE A,#11110001B,NEXT ;COMPARISON WITH KEY PRESSED

AJMP BULB1

NEXT: CJNE A,#11110010B,NEXT1 ;COMPARISONAJMP BULB2

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 36

Page 37: 23736695 Project Report on Repaired

NEXT1: CJNE A,#11110011B,NEXT2 ;COMPARISON AJMP BULB3

NEXT2: CJNE A,#11110100B,NEXT3 ;COMPARISON AJMP BULB4

NEXT3: CJNE A,#11110101B,NEXT4 ;COMPARISON AJMP BULB5

NEXT4: CJNE A,#11110110B,NEXT5 ;COMPARISON AJMP BULB6

NEXT5: CJNE A,#11110111B,NEXT6 ;COMPARISON AJMP BULB7

NEXT6: CJNE A,#11111000B,NEXT7 ;COMPARISON AJMP BULB8

NEXT7: CJNE A,#11111001B,MAIN1 ;COMPARISON AJMP BULB9

BULB1: SETB P0.0 ;MOTOR1 OFF AJMP MAIN1

BULB2: CLR P0.0 ;MOTOR1 ON AJMP MAIN1

BULB3: SETB P0.1 ;MOTOR2 OFF AJMP MAIN1

BULB4: CLR P0.1 ;MOTOR2 ON AJMP MAIN1

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 37

Page 38: 23736695 Project Report on Repaired

BULB7: SETB P0.2 ;MOTOR3 OFF AJMP MAIN1

BULB6: CLR P0.2 ;MOTOR3 ON AJMP MAIN1

BULB9: SETB P0.3 ;MOTOR4 OFF AJMP MAIN1

BULB8: CLR P0.3 ;MOTOR4 ON AJMP MAIN1

BULB5: SETB P0.0 SETB P0.1 ;ALL MOTORS OFF SETB P0.2 SETB P0.3 AJMP MAIN1

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 38

Page 39: 23736695 Project Report on Repaired

HEX FILE:03000000020030CB

:10001300C280111C111CD280327FFA7EFADEFEDF11

:02002300FA22BF

:1000300075A884E590B4F1020162B4F2020166B4DD

:10004000F302016AB4F402016EB4F5020182B4F65F

:10005000020176B4F7020172B4F802017EB4F9D05D

:10006000017AD2800130C2800130D2810130C28158

:100070000130D2820130C2820130D2830130C2838A

:0C0080000130D280D281D282D2830130C4

:00000001FF

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 39

Page 40: 23736695 Project Report on Repaired

REFERENCES1.WWW.PLCIE.COM

2.WWW.8051PROJECTS.COM

3.WWW.PROJECTREPORTS.COM

4.MICROCONTROLLERS-MAZZIDI

5.WWW.8052PROJECTS.COM

6.WWW.RICKEYSWORLD.COM

7.WWW.ATMEL.COM

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AIT Page 40


Recommended