You are on page 1of 63

ACKNOWLEDGEMENT

We place on record and warmly acknowledge the continuous encouragement, invaluable supervision, timely suggestions and inspired guidance offered by our guide Mr. Deepak Sharma, Asst. Proff, ECE Dept., in bringing this report to a successful completion. Without his support and timely guidance the completion of our project and its report would be far-fetched dream. We are grateful to Dr. R. P. Rajoria (Campus Director) and Dr. Om Prakash Sharma (Principal, PCE), for their learned guidance and moral support which we have received from him while working on this project. We are also thankful to all the faculty members of college who have contributed in some manner directly or indirectly in our endeavor to make our project a success. We feel indebted to express our heartiest thanks to Mr. Amit Prajapati (HOD, ECE Dept.), Mr. Manish Singhal and Mr. Sandeep Gupta (Project-Coordinators) for their constant support and encouragement from the native idea of project to the great completion. We would like to express our deep sense of gratitude to our colleagues for supporting us in our project. Their contribution cannot be expressed in words.

Vivek Kr Jha (EC/10/1101)

Mohit Vaidya (EC/10/1132)

Ravi Kant Chotia (EC/10/1143)

Shubham Kumawat (EC/10/50)

Harshita Singh Rathore (EC/10/1154) (Final Year, ECE)

iii

ABSTRACT

This project is about designing a PC-based monitoring parking system that can be applied to parking lots such as at shopping complexes, offices and buildings. The main focus on this project is the development of front panel using the LabVIEW software by National Instrument. Conventional car park system does not have display panel to show the vacancies of parking lot. Thus, 1 of the main objectives in this project is to develop front panels for owner. This will not only ease the users but also bring benefits to the owner as information of the parking lots can be retrieved from this system. The information includes total vehicles in and the basic details of the customer. In addition, the project is also being upgraded by using lots of sensors allowing the vehical to get parked itself. On the other hand, the system is also user friendly. Besides that, this project will create virtual sensor operation system by developing LabVIEW front panel of car park operation data. The system will convert the output from sensor to the programmable language to the PC-based display panel by using the DAQ which acts as interface between hardware and software. In this project, the front panel is successfully developed and explained by designing a physical model of parking lot. This LABVIEW based monitoring system can be applied in various industrial applications such as building security system and factory automation.

iv

TABLE OF CONTENTS
Certificate Acknowledgement Abstract Table of Contents Table Index Figure Index ii iii iv v viii ix

Chapter 1 Introduction
1.1 Introduction Automated Car Parking System 1.2 Description of Project 1.3 History 1.4 Block Diagram 1.5 Snapshot 1.6 Feasibility 1.6.1 Practical Feasibility 1.6.2 Economical Feasibility 1.7 Applications

1-5
1 1 2 3 4 4 4 4 5

Chapter 2 Transmitter And Receiver Unit


2.1 Introduction 2.2 Types of RF Modules 2.2.1 Transmitter module 2.2.2 Receiver module 2.3 RF Signal Modulation 2.4 Main factors affecting RF module performance

6-9
6 6 7 7 7 8

2.5 Pin Diagram 2.6 Pin Description

9 9

Chapter 3 Circuit Description


3.1 Circuitry 3.2 Microcontroller 3.2.1 Criteria for Selecting a Microcontroller in Embedded System 3.2.2 Microcontroller 8051 Architecture 3.2.3 128 Byte RAM for Data Storage 3.2.4 4KB ROM 3.2.5 Timers and Counters 3.2.6 Input Output Ports 3.2.7 Oscillator 3.2.8 Pin Description of 8051 Microcontroller 3.3 IC L293D 3.3.1 Working Concept 3.3.2 Working of L293D 3.3.3 L293D Logic Table 3.3.4 Voltage Specification 3.4 IC LM358 3.5 IC 7805 3.6 DC Motor 3.6.1 Construction of DC Motor 3.6.2 Operating Principle of DC Motor 3.7 IR(Infrared) Sensors 3.7.1 Types of Infra-Red Sensors 3.7.2 Working Principle 3.7.3 Applications 3.8 ULN 2003 3.8.1 Internal Description of ULN 2003

11-30
11 12 12 13 13 14 15 16 16 17 18 19 20 20 21 22 24 25 27 27 28 29 29 29 30 31

vi

3.8.2 Absolute Maximum Ratings 3.9 Stepper Motor 3.9.1 Stepping Modes of Stepper Motor 3.9.2 Stepper Motor Advantages and Disadvantages 3.9.3 Open Loop Operation 3.9.4 Stepper Motor Types

32 33 34 36 37 37

Chapter 4 Software Description


4.1 LabVIEW 4.1.1 Introduction 4.1.2 Graphical Programming 4.1.3 Benefits of Using LabVIEW 4.2 Keil Vision 4.2.1 Introduction 4.2.2 Software Development Tools 4.2.3 RTOS and Middleware Components 4.2.4 Hardware Debug Adapters 4.3 Flash Magic

40-45
40 40 40 43 44 44 44 45 45 45

Chapter 5 Future Scope and Conclusion


5.1 Conclusion 5.2 Future Scope

46-47
46 46

REFERENCES APPENDICES Appendix I Microcontroller coding in Bascom at transmitter unit Appendix II Database coding in LabVIEW Cost of the Project

48

49 51 53

vii

TABLE INDEX

Table No.
2.1 2.2 3.1 3.2 3.3 3.4

Particulars Pin Description of RF Transmitter Pin Description of RF Receiver Absolute Maximum Ratings Specifications of IC 7805 ULN Ratings ULN Ports

Page No.
9 10 21 25 32 33

viii

FIGURE INDEX

Figure No. 1.1 1.2 1.3 1.4 2.1 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12

Particulars Proposed Model of Garage Vehicle Block Diagram Garage Block Diagram LabVIEW Window Pin Diagram of RF Module Circuit of LMV Architecture of Microcontroller 8051 Addressing of RAM Addressing of ROM Timer Registers Pin Diagram of 8051 Circuit Diagram of L293D Pin Diagram of L293D LM358 IC LM358 Pin Diagram IC 7805 DC Motor

Page No. 2 3 3 4 9 11 13 14 15 15 17 19 20 22 23 25 27

ix

3.13 3.14 3.15 3.16 3.17 3.18 3.19 3.20 3.21 3.22 3.23 3.24 4.1 4.2 4.3

Flemings Left Hand Rule IR Sensors ULN 2003 Pin Connection of ULN 2003 Schematic for each driver ULN 2003 Internal Stepper Motor Stepper Motor Excitation sequences for different drive modes Unipolar and Bipolar wound stepper motors Cross-section of a variable reluctance (VR) motor Principle of a PM or tin-can stepper motor Cross-section of a hybrid stepper motor Graphical Programming in LabVIEW Connector Panel Front Panel

27 28 30 31 31 32 33 34 35 37 38 39 41 42 42

CHAPTER 1 INTRODUCTION
1.1 Introduction Automated Car Parking System
The project portrays the idea of automated parking system. Generally, the movement of the car is controlled manually. Automatizing here refers to controlling the movements of the car through the sensor inputs using a microcontroller. The design is based on the principle of line follower along with obstacle avoidance. Sensors and the programmed microcontroller simulates the eye and brain of a human respectively. In this system, the car is parked and retrieved without human intervention.

1.2 Description of Project


i. A database system keeps monitoring the availability of slots and further allows the car at entry accordingly. ii. If any slot is empty the gate at parking opens as soon as the details of the user are entered in the software. iii. At the entry of the parking lot, the driver switches over the control to automatic mode (if a slot is available) which is battery driven at constant speed. iv. As most of the LMVs are of similar width, the slots will be of equal dimensions. Since the principle of line following is used, the black line marks the path in which car has to move and park by itself. v. The car is provided with three IR sensors at the front bottom and two at the rear bottom for line following purpose. The inputs from the IR sensors monitor the car movements. vi. Two IR proximity sensors at the front and rear serve the purpose of obstacle avoidance and ensures safe movement. vii. Proximity sensors are also provided at the two sides to identify an empty slot. Once an empty slot is found, the car parks itself. viii. When the driver wishes to retrieve his car, he sends the RF signal from his remote which is received by the transceiver in the car. The car then moves towards the exit.

Proposed Model

CONTROL AND MONITORING USING LABVIEW

Fig 1.1 Proposed Model of Garage

1.3 History
i. The earliest use of an APS was in Paris, France in 1905. The APS consisted of a groundbreaking multi-story concrete structure with an internal elevator to transport cars to upper levels where attendants parked the cars.

ii.

In the 1920s, forerunners of automated parking systems appeared in U.S. cities like Los Angeles, Chicago, New York and Cincinnati. Some of these multi-storey structures are still standing, and have been adapted for new uses. A system that is now found all over Japan the Ferris-wheel, was created by the Westinghouse Corporation in 1923.

iii.

iv.

The Nash Motor Company created the first glass enclosed version of this system for the Chicago Century of Progress Exhibition in 1933, and it was the precursor to a more recent version, the Smart Car Towers in Europe.

1.4 Block Diagram

RF TRANSMITTER (For user)

Fig 1.2 Vehicle Block Diagram

LABVIEW MONITORING OF GARAGE AND CONTROL OF BARRIER

GARAGE WITH SLOTS FOR VEHICLE PARKING

Fig 1.3 Garage Block Diagram

1.5 Snapshot

Fig 1.4 LabVIEW Window

1.6 Feasibility
1.6.1 Practical Feasibility
i. ii. iii. LabVIEW based, so database system keep monitoring the entire process. Serves as a simple real time system and an effective solution to the problem. Movement and obstacle avoidance is done with the help of commonly used IR sensors and proximity sensors.

1.6.2 Economical Feasibility


i. As compared to other automated parking system it is very cheap as technologies such as elevators and 3D movement of parking base are costlier then simple embedded and LabVIEW approach. ii. The initial cost of the software is high but can be easily recovered once the project gets started.

iii.

Simply constructed parking lot is used which is far more cheaper then the other Hi-Tech parking areas.

iv.

The total cost of the project will around Rs. 2000.

1.7 Applications
i. ii. iii. iv. Solves the problem of parking in shopping complex, public place or apartments. It can be used in automobile servicing centers. It can also be used in automobile manufacturing industry. The parked cars and their contents are more secure since there is no public access to parked cars. v. vi. Minor parking lot damages such as scrapes and dents are eliminated. Driving around in search of a parking space is eliminated, thereby reducing time and fuel consumption.

CHAPTER 2 TRANSMITTER AND RECEIVER UNIT


2.1 Introduction
An RF module (radio frequency module) is a (usually) small electronic circuit used to transmit and/or receive radio signals on one of a number of carrier frequencies. RF modules are widely used in electronic design owing to the difficulty of designing radio circuitry. Good electronic radio design is notoriously complex because of the sensitivity of radio circuits and the accuracy of components and layouts required to achieve operation on a specific frequency. Design engineers will design a circuit for an application which requires radio communication and then "drop in" a radio module rather than attempt a discrete design, saving time and money on development. RF modules are most often used in medium and low volume products for consumer applications such as garage door openers, wireless alarm systems, industrial remote controls, smart sensor applications, and wireless home automation systems. They are sometimes used to replace older infra red communication designs as they have the advantage of not requiring lineof-sight operation. Several carrier frequencies are commonly used in commercially-available RF modules, including 433.92 MHz, 315 MHz, 868 MHz and 915 MHz. These frequencies are used because of national and international regulations governing the used of radio for communication.

2.2 Types of RF Modules


The term RF module can be applied to many different types, shapes and sizes of small electronic sub assembly circuit board. It can also be applied to modules across a huge variation of functionality and capability. Most standard, well known types are covered here: 1. Transmitter module 2. Receiver module 3. Transceiver module

2.2.1 Transmitter Module


An RF transmitter module is a small PCB sub-assembly capable of transmitting a radio wave and modulating that wave to carry data. Transmitter modules are usually implemented alongside a micro controller which will provide data to the module which can be transmitted. It is also a part of transreceiver. Intelligent Transmitter Module An intelligent transmitter module is the same as a transmitter module, but it is often made with an on-board micro controller to handle radio data packetisation negating the need for an external micro controller to convert data or Manchester encode it. This type of module is usually used for designs requiring a quick route to market or if the designer has little experience designing with radio.

2.2.2 Receiver Module


There are two types of RF receiver modules: superheterodyne receivers and super-regenerative receivers. Super-regenerative modules are usually low cost and low power designs using a series of amplifiers to extract modulated data from a carrier wave. Super-regenerative modules are generally imprecise as their frequency of operation varies considerably with temperature and power supply voltage. Superheterodyne receivers have a performance advantage over superregenerative; they offer increased accuracy and stability over a large voltage and temperature range. This stability comes from a fixed crystal design which in turn leads to a comparatively more expensive product.

2.3 RF Signal Modulation


There are three types of signal modulation methods commonly used in RF transmitter and receiver modules:

ASK FSK OOK

2.4 Main factors affecting RF module performance


As with any other radio-frequency device, the performance of an RF module will depend on a number of factors. For example, by increasing the transmitter power, a larger communication distance will be achieved. However, this will also result in a higher electrical power drain on the transmitter device, which will cause shorter operating life for battery powered devices. Also, using a higher transmit power will make the system more prone to interference with other RF devices, and may in fact possibly cause the device to become illegal depending on the jurisdiction. Correspondingly, increasing the receiver sensitivity will also increase the effective communication range, but will also potentially cause malfunction due to interference with other RF devices. The performance of the overall system may be improved by using matched antennas at each end of the communication link, such as those described earlier. Finally, the labeled remote distance of any particular system is normally measured in an open-air line of sight configuration without any interference, but often there will be obstacles such as walls, floors,iron construction to absorb the radio wave signals, so the effective operational distance will in most practical instances be less than specified. The RF module, as the name suggests, operates at Radio Frequency. The corresponding frequency range varies between 30 kHz & 300 GHz. In this RF system, the digital data is represented as variations in the amplitude of carrier wave. This kind of modulation is known as Amplitude Shift Keying (ASK). Transmission through RF is better than IR (infrared) because of many reasons. Firstly, signals through RF can travel through larger distances making it suitable for long range applications. Also, while IR mostly operates in line-of-sight mode, RF signals can travel even when there is an obstruction between transmitter & receiver. Next, RF transmission is more strong and reliable than IR transmission. RF communication uses a specific frequency unlike IR signals which are affected by other IR emitting sources. This RF module comprises of an RF Transmitter and an RF Receiver. The transmitter/receiver (Tx/Rx) pair operates at a frequency of 434 MHz. An RF transmitter
8

receives serial data and transmits it wirelessly through RF through its antenna connected at pin4. The transmission occurs at the rate of 1Kbps - 10Kbps.The transmitted data is received by an RF receiver operating at the same frequency as that of the transmitter. The RF module is often used alongwith a pair of encoder/decoder. The encoder is used for encoding parallel data for transmission feed while reception is decoded by a decoder. HT12E-HT12D, HT640-HT648, etc. are some commonly used encoder/decoder pair ICs.

2.5 Pin Diagram

Fig 2.1 Pin Diagram of RF Module

2.6 Pin Description


RF Transmitter Pin No 1 2 3 4 Function Ground (0V) Serial data input pin Supply voltage; 5V Antenna output pin Name Ground Data Vcc ANT

Table 2.1 Pin Description of RF Transmitter


9

RF Receiver Pin No 1 2 3 4 5 6 7 8 Function Ground (0V) Serial data output pin Linear output pin; not connected Supply voltage; 5V Supply voltage; 5V Ground (0V) Ground (0V) Antenna input pin Table 2.2 Pin Description of RF Receiver Name Ground Data NC Vcc Vcc Ground Ground ANT

10

CHAPTER 3 CIRCUIT DESCRIPTION


3.1 Circuitry
There are two circuits used in the project apart from the transmitter and receiver unit. i. ii. Motor vehicle circuit IR sensor circuit

The basic components used in these circuits are: i. ii. iii. iv. v. vi. Microcontroller IC L293D IC LM358 IC 7805 DC Motor IR(Infrared) Sensors (with comparator)

Fig 3.1 Circuit of LMV


11

3.2 Microcontroller
The microcontroller incorporates all the features that are found in microprocessor. The microcontroller has built in ROM, RAM, Input Output ports, Serial Port, timers, interrupts and clock circuit. A microcontroller is an entire computer manufactured on a single chip. Microcontrollers are usually dedicated devices embedded within an application. For example, microcontrollers are used as engine controllers in automobiles and as exposure and focus controllers in cameras. In order to serve these applications, they have a high concentration of on-chip facilities such as serial ports, parallel input output ports, timers, counters, interrupt control, analog-to-digital converters, random access memory, read only memory, etc. The I/O, memory, and on-chip peripherals of a microcontroller are selected depending on the specifics of the target application. Since microcontrollers are powerful digital processors, the degree of control and programmability they provide significantly enhances the effectiveness of the application. The 8051 is the first microcontroller of the MCS-51 family introduced by Intel Corporation at the end of the 1970s. The 8051 family with its many enhanced members enjoys the largest market share, estimated to be about 40%, among the various microcontroller architectures. The microcontroller has on chip peripheral devices. Microcontroller (MC) may be called computer on chip since it has basic features of microprocessor with internal ROM, RAM, Parallel and serial ports within single chip. Or we can say microprocessor with memory and ports is called as microcontroller. This is widely used in washing machines, VCD player, microwave oven, and robotics or in industries Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC. 8 bit microcontroller, means it can read, write and process 8 bit data. Ex. 8051 microcontroller. Basically 8 bit specifies the size of data bus. 8 bit microcontroller means 8 bit data can travel on the data bus or we can read, write process 8 bit data.

3.2.1 Criteria for Selecting a Microcontroller in Embedded System


Criteria for selection of microcontroller in any embedded system is as following: i. ii. iii. Power consumption Amount of RAM and ROM on chip No. of I/O pins and timers on chip
12

iv. v.

Cost Availability of software development tools such as compiler, assembler and debugger.

3.2.2 Microcontroller 8051 Architecture


It is an 8-bit microcontroller, means MC 8051 can Read, Write and Process 8 bit data. This is mostly used microcontroller in the robotics, home appliances like mp3 player, washing machines, electronic iron and industries. Mostly used blocks in the architecture of 8051 are as follows:

Fig 3.2 Architecture of Microcontroller 8051

3.2.3 128 Byte RAM for Data Storage


MC 8051 has 128 byte Random Access memory for data storage. Random access memory is non-volatile memory. During execution for storing the data the RAM is used. RAM consists of the register banks, stack for temporary data storage. It also consists of some special function register (SFR) which are used for some specific purpose like timer, input output ports etc.

13

Normally microcontroller has 256 byte RAM in which 128 byte is used for user space which is normally Register banks and stack. But other 128 byte RAM which consists of SFRs. Now what is the meaning of 128 byte RAM? We know that 128 byte = 2^7 byte

Fig 3.3 Addressing of RAM Since 27 bytes so last 7 bits can be changed so total locations are from 00H to 7F H. This procedure of calculating the memory address is called as memory mapping. We can save data on memory locations from 00H to 7FH. Means total 128 byte space from 00H to 7FH is provided for data storage.

3.2.4 4KB ROM


i. In 8051, 4KB read only memory (ROM) is available for program storage. This is used for permanent data storage. ii. Or the data which is not changed during the processing like the program or algorithm for specific applications. iii. This is volatile memory; the data saved in this memory does not disappear after power failure. iv. We can interface up to 64KB ROM memory externally if the application is large. These sizes are specified different by their companies. v. Address Range of PC: Address range of PC means program counter (which points the next instruction to be executing) can be moved between these locations or we can save the program from this location to this location. vi. The address range can be calculated in the same way just like the RAM which is discussed in previous section. vii. 4KB = 2^2 * 2^10 B (since 1KB = 210 B) = 212 Byte

14

Fig 3.4 Addressing of ROM viii. Address range of PC is 0000H to 0FFFH means total 4KB locations are available from 0000H to 0FFFH. At which we can save the program.

3.2.5 Timers and Counters


Timer means which can give the delay of particular time between some events. For example on or off the lights after every 2 sec. This delay can be provided through some assembly program but in microcontroller two hardware pins are available for delay generation. These hardware pins can be also used for counting some external events. How much times a number is repeated in the given table is calculated by the counter. i. In MC8051, two timer pins are available T0 and T1, by these timers we can give the delay of particular time if we use these in timer mode. ii. iii. iv. We can count external pulses at these pins if we use these pins in counter mode. 16 bits timers are available. Means we can generate delay between 0000H to FFFFH. Two special function registers are available.

Fig 3.5 Timer Registers v. If we want to load T0 with 16 bit data then we can load separate lower 8 bit in TL0 and higher 8 bit in TH0.

15

vi.

In the same way for T1, TMOD, TCON registers are used for controlling timer operation.

3.2.6 Input Output Ports


i. ii. There are four input output ports available P0, P1, P2, P3. Each port is 8 bit wide and has special function register P0, P1, P2, P3 which are bit addressable means each bit can be set or reset by the Bit instructions (SETB for high, CLR for low) independently. iii. iv. The data at any port which is transmitting or receiving is in these registers. The port 0 can perform dual works. It is also used as Lower order address bus (A0 to A7) multiplexed with 8 bit data bus P0.0 to P0.7 is AD0 to AD7 respectively the address bus and data bus is demultiplex by the ALE signal and latch which is further discussed in details. v. vi. Port 2 can be used as I/O port as well as higher order address bus A8 to A15. Port 3 also have dual functions it can be worked as I/O as well as each pin of P3 has specific function. P3.0 RXD Serial I / P for Asynchronous communication Serial O / P for synchronous communication. P3.1 TXD Serial data transmit. P3.2 INT0 External Interrupt 0. P3.3 INT1 External Interrupt 1. P3.4 T0 Clock input for counter 0. P3.5 T1 Clock input for counter 1. P3.6 WR Signal for writing to external memory. P3.7 RD Signal for reading from external memory. When external memory is interfaced with 8051 then P0 and P2 cant be worked as I/O port they works as address bus and data bus, otherwise they can be accessed as I/O ports.

3.2.7 Oscillator

16

i.

It is used for providing the clock to MC8051 which decides the speed or baud rate of MC.

ii.

We use crystal which frequency vary from 4MHz to 30 MHz, normally we use 11.0592 MHz frequency.

3.2.8 Pin Description of 8051 Microcontroller

Fig 3.6 Pin Diagram of 8051 Description of each pin is discussed here: VCC 5V supply
17

VSS GND XTAL2/XTALI Oscillator input Port 0 32 to 39 AD0/AD7 and P0.0 to P0.7 Port 1 1 to 8 P1.0 to P1.7 Port 2 21 to 28 P2.0 to P2.7 and A 8 to A15 Port 3 10 to 17 P3.0 to P3.7 P 3.0 RXD Serial data input SBUF P 3.1 TXD Serial data output SBUF P 3.2 INT0 External interrupt 0 TCON 0.1 P 3.3 INT1 External interrupt 1 TCON 0.3 P 3.4 T0 External timer 0 input TMOD P 3.5 T1 External timer 1 input TMOD P 3.6 WR External memory write cycle Active LOW P 3.7 RD External memory read cycle Active LOW RST For Restarting 8051 ALE Address latch enable 1 Address on AD 0 to AD 7 0 Data on AD 0 to AD 7 PSEN Program store enable

3.3 IC L293D
The Device is a monolithic integrated high volt- age, high current four channel driver designed to accept standard DTL or TTL logic levels and drive inductive loads (such as relays solenoides, DC and stepping motors) and switching power tran- sistors. To simplify use as two bridges each pair of chan- nels is equipped with an enable input. A separate supply input is

18

provided for the logic, allowing op- eration at a lower voltage and internal clamp di- odes are included. This device is suitable for use in switching appli- cations at frequencies up to 5 kHz. The L293D is assembled in a 16 lead plastic packaage which has 4 center pins connected to- gether and used for heatsinking The L293DD is assembled in a 20 lead surface mount which has 8 center pins connected to- gether and used for heatsinking. L293D is a typical Motor driver or Motor Driver IC which allows DC motor to drive on either direction. L293D is a 16-pin IC which can control a set of two DC motors simultaneously in any direction. It means that you can control two DC motor with a single L293D IC. Dual H-bridge Motor Driver integrated circuit (IC). The l293d can drive small and quiet big as well, check the Voltage Specification at the end of this page for more info. It can be found in any electronic shop very easily and it costs around 70 Rupees (INR) or around 1 $ Dollar (approx Cost) or even less. You can find the necessary pin diagram, working, a circuit diagram, Logic description and Project as you read through.

3.3.1 Concept
It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to be flown in either direction. As you know voltage need to change its direction for being able to rotate the motor in clockwise or anticlockwise direction, Hence, H-bridge IC are ideal for driving a DC motor.

19

Fig 3.7 Circuit Diagram of L293D In a single l293d chip there two h-Bridge circuit inside the IC which can rotate two dc motor independently. Due its size it is very much used in robotic application for controlling DC motors. Given below is the pin diagram of a L293D motor controller. There are two Enable pins on l293d. Pin 1 and pin 9, for being able to drive the motor, the pin 1 and 9 need to be high. For driving the motor with left H-bridge you need to enable pin 1 to high. And for right H-Bridge you need to make the pin 9 to high. If anyone of the either pin1 or pin9 goes low then the motor in the corresponding section will suspend working. Its like a switch.

20

Fig 3.8 Pin Diagram of L293D

3.3.2 Working of L293D


The t 4 input pins for this l293d, pin 2,7 on the left and pin 15 ,10 on the right as shown on the pin diagram. Left input pins will regulate the rotation of motor connected across left side and right input for motor on the right hand side. The motors are rotated on the basis of the inputs provided across the input pins as LOGIC 0 or LOGIC 1. In simple you need to provide Logic 0 or 1 across the input pins for rotating the motor.

3.3.3 L293D Logic Table


Lets consider a Motor connected on left side output pins (pin 3,6). For rotating the motor in clockwise direction the input pins has to be provided with Logic 1 and Logic 0. Pin 2 = Logic 1 and Pin 7 = Logic 0 | Clockwise Direction Pin 2 = Logic 0 and Pin 7 = Logic 1 | Anticlockwise Direction Pin 2 = Logic 0 and Pin 7 = Logic 0 | Idle [No rotation] [Hi-Impedance state] Pin 2 = Logic 1 and Pin 7 = Logic 1 | Idle [No rotation] In a very similar way the motor can also operated across input pin 15,10 for motor on the right hand side.

3.3.4 Voltage Specification


VCC is the voltage that it needs for its own internal operation 5v; L293D will not use this voltage for driving the motor. For driving the motors it has a separate provision to provide motor supply VSS (V supply). L293d will use this to drive the motor. It means if you want to operate a motor at 9V then you need to provide a Supply of 9V across VSS Motor supply. The maximum voltage for VSS motor supply is 36V. It can supply a max current of 600mA per channel.Since it can drive motors Up to 36v hence you can drive pretty big motors with this l293d. VCC pin 16 is the voltage for its own internal Operation. The maximum voltage ranges from 5v and upto 36v.

21

Symbol VS VSS Vi Ven Io Ptot Tstg, Tj Supply Voltage

Parameter

Value 36 36 7 7 1.2 4 40 to 150

Unit V V V V A W C

Logic Supply Voltage Input Voltage Enable Voltage Peak Output Current (100 s non repetitive) Total Power Dissipation at Tpins = 90 C Storage and Junction Temperature Table 3.1 Absolute Maximum Ratings

3.4 IC LM358
It is a Single Supply Dual Operational Amplifier. Utilizing the circuit designs perfected for Quad Operational Amplifiers, these dual operational amplifiers feature low power drain, a common mode input voltage range extending to ground/VEE, andsingle supply or split supply operation. The LM358 series is equivalent to onehalf of an LM324. These amplifiers have several distinct advantages over standard operational amplifier types in single supply applications. They can operate at supply voltages as low as 3.0 V or as high as 32 V, with quiescent currents about onefifth of those associated with the MC1741 (on a per amplifier basis). The common mode input range includes the negative supply, thereby eliminating the necessity for external biasing components in many applications. The output voltage range also includes the negative power supply voltage.

22

Fig 3.9 LM358 IC The LM358 series is made using two internally compensated, twostage operational amplifiers. The first stage of each consists of differential input devices Q20 and Q18 with input buffer transistors Q21 and Q17 and the differential to single ended converter Q3 and Q4. The first stage performs not only the first stage gain function but also performs the level shifting and transconductance reduction functions. By reducing the transconductance, a smaller compensation capacitor (only 5.0 pF) can be employed, thus saving chip area. The transconductance reduction is accomplished by splitting the collectors of Q20 and Q18. Features: i. ii. iii. iv. v. vi. vii. Short Circuit Protected Outputs True Differential Input Stage Single Supply Operation: 3.0 V to 32 V Low Input Bias Currents Internally Compensated Common Mode Range Extends to Negative Supply Single and Split Supply Operation

23

Fig 3.10 LM358 Pin Diagram Another feature of this input stage is that the input common mode range can include the negative supply or ground, in single supply operation, without saturating either the input devices or the differential to singleended converter. The second stage consists of a standard current source load amplifier stage. Each amplifier is biased from an internalvoltage regulator which has a low temperature coefficient thus giving each amplifier good temperature characteristics as well as excellent power supply rejection. The LM158 series consists of two independent, high gain, internally frequency compensated operational amplifiers which were designed specifically to operate from a single power supply over a wide range of voltages. Operation from split power supplies is also possible and the low power supply current drain is independent of the magnitude of the power supply voltage. Application areas include transducer amplifiers, dc gain blocks and all the conventional op amp circuits which now can be more easily implemented in single power supply systems. For example, the LM158 series can be directly operated off of the standard +5V power supply voltage which is used in digital systems and will easily provide the required interface electronics without requiring the additional 15V power supplies. The LM358 and LM2904 are available in a chip sized pack- age (8-Bump micro SMD) using Nationals micro SMD pack- age technology.

3.5 IC-7805
Voltage regulator IC's are the ICs that are used to regulate voltage. IC 7805 is a 5V Voltage Regulator that restricts the voltage output to 5V and draws 5V regulated power supply. It comes with provision to add heatsink. 7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear voltage regulator ICs. The voltage source in a circuit may have fluctuations and would not give the fixed voltage output. The voltage regulator IC maintains the output voltage at a constant value. The xx in 78xx indicates the fixed output voltage it is designed to provide. 7805 provides +5V regulated power supply. Capacitors of suitable values can be connected at input and output pins depending upon the respective voltage levels.
24

The maximum value for input to the voltage regulator is 35V. It can provide a constant steady voltage flow of 5V for higher voltage input till the threshold limit of 35V. If the voltage is near to 7.5V then it does not produce any heat and hence no need for heatsink. If the voltage input is more, then excess electricity is liberated as heat from 7805. It regulates a steady output of 5V if the input voltage is in rage of 7.2V to 35V. Hence to avoid power loss try to maintain the input to 7.2V. In some circuitry voltage fluctuation is fatal (for e.g. Microcontroller), for such situation to ensure constant voltage IC 7805 Voltage Regulator is used. IC 7805 is a series of 78XX voltage regulators. Its a standard, from the name the last two digits 05 denotes the amount of voltage that it regulates. Hence a 7805 would regulate 5v and 7806 would regulate 6V and so on. The schematic given below shows how to use a 7805 IC, there are 3 pins in IC 7805, pin 1 takes the input voltage and pin 3 produces the output voltage. The GND of both input and out are given to pin 2.

Pin No 1 2 3

Fig 3.11 IC 7805 Function

Name

Input voltage (5V-18V) Ground (0V) Regulated output; 5V (4.8V-5.2V) Fig 3.2 Specifications of IC 7805

Input Ground Output

3.6 DC Motor
A DC motor relies on the fact that like magnet poles repel and unlike magnetic poles attract each other. A coil of wire with a current running through it generates a electromagnetic field
25

aligned with the center of the coil. By switching the current on or off in a coil its magnet field can be switched on or off or by switching the direction of the current in the coil the direction of the generated magnetic field can be switched 180. A simple DC motor typically has a stationary set of magnets in the stator and an armature with a series of two or more windings of wire wrapped in insulated stack slots around iron pole pieces (called stack teeth) with the ends of the wires terminating on a commutator. The armature includes the mounting bearings that keep it in the center of the motor and the power shaft of the motor and the commutator connections. The winding in the armature continues to loop all the way around the armature and uses either single or parallel conductors (wires), and can circle several times around the stack teeth. The total amount of current sent to the coil, the coil's size and what it's wrapped around dictate the strength of the electromagnetic field created. The sequence of turning a particular coil on or off dictates what direction the effective electromagnetic fields are pointed. By turning on and off coils in sequence a rotating magnetic field can be created. These rotating magnetic fields interact with the magnetic fields of the magnets (permanent or electromagnets) in the stationary part of the motor (stator) to create a force on the armature which causes it to rotate. In some DC motor designs the stator fields use electromagnets to create their magnetic fields which allow greater control over the motor. At high power levels, DC motors are almost always cooled using forced air. The commutator allows each armature coil to be activated in turn. The current in the coil is typically supplied via two brushes that make moving contact with the commutator. Now, some brushless DC motors have electronics that switch the DC current to each coil on and off and have no brushes to wear out or create sparks. Different number of stator and armature fields as well as how they are connected provide different inherent speed/torque regulation characteristics. The speed of a DC motor can be controlled by changing the voltage applied to the armature. The introduction of variable resistance in the armature circuit or field circuit allowed speed control. Modern DC motors are

26

often controlled by power electronics systems which adjust the voltage by "chopping" the DC current into on and off cycles which have an effective lower voltage. Since the series-wound DC motor develops its highest torque at low speed, it is often used in traction applications such as electric locomotives, and trams. The DC motor was the mainstay of electric traction drives on both electric and diesel-electric locomotives, streetcars/trams and diesel electric drilling rigs for many years. The introduction of DC motors and an electrical grid system to run machinery starting in the 1870s started a new second Industrial Revolution. DC motors can operate directly from rechargeable batteries, providing the motive power for the first electric vehicles and today's hybrid cars and electric cars as well as driving a host of cordless tools. Today DC motors are still found in applications as small as toys and disk drives, or in large sizes to operate steel rolling mills and paper machines. If external power is applied to a DC motor it acts as a DC generator, a dynamo. This feature is used to slow down and recharge batteries on hybrid car and electric cars or to return electricity back to the electric grid used on a street car or electric powered train line when they slow down. This process is called regenerative braking on hybrid and electric cars. In diesel electric locomotives they also use their DC motors as generators to slow down but dissipate the energy in resistor stacks. Newer designs are adding large battery packs to recapture some of this energy.

3.6.1 Construction of DC Motor


The very basic construction of a dc motor contains a current carrying armature which is connected to the supply end through commutator segments and brushes and placed within the north south poles of a permanent or an electro-magnet as shown in the diagram below.

27

Fig 3.12 DC Motor

3.6.2 Operating Principle of DC Motor


Now to go into the details of the operating principle of DC motor its important that we have a clear understanding of Flemings left hand rule to determine the direction of force acting on the armature conductors of dc motor.

Fig 3.13 Flemings Left Hand Rule Flemings left hand rule says that if we extend the index finger, middle finger and thumb of our left hand in such a way that the electric current carrying conductor is placed in a magnetic field (represented by the index finger) is perpendicular to the direction of current (represented by the middle finger), then the conductor experiences a force in the direction
28

(represented by the thumb) mutually perpendicular to both the direction of field and the current in the conductor.

3.7 IR (Infrared) Sensors


An infrared sensor is an electronic instrument that is used to sense certain characteristics of its surroundings by either emitting and/or detecting infrared radiation. It is also capable of measuring heat of an object and detecting motion. Infrared waves are not visible to the human eye. In the electromagnetic spectrum, infrared radiation is the region having wavelengths longer than visible light wavelengths, but shorter than microwaves. The infrared region is approximately demarcated from 0.75 to 1000m. The wavelength region from 0.75 to 3m is termed as near infrared, the region from 3 to 6m is termed mid-infrared, and the region higher than 6m is termed as far infrared. Infrared technology is found in many of our everyday products. For example, TV has an IR detector for interpreting the signal from the remote control. Key benefits of infrared sensors include low power requirements, simple circuitry, and their portable feature.

Fig 3.14 IR Sensors

3.7.1 Types of Infra-Red Sensors


Infra-red sensors are broadly classified into two types:
29

i.

Thermal infrared sensors These use infrared energy as heat. Their photo sensitivity is independent of wavelength. Thermal detectors do not require cooling; however, they have slow response times and low detection capability.

ii.

Quantum infrared sensors These provide higher detection performance and faster response speed. Their photo sensitivity is dependent on wavelength. Quantum detectors have to be cooled so as to obtain accurate measurements. The only exception is for detectors that are used in the near infrared region.

3.7.2 Working Principle


A typical system for detecting infrared radiation using infrared sensors includes the infrared source such as blackbody radiators, tungsten lamps, and silicon carbide. In case of active IR sensors, the sources are infrared lasers and LEDs of specific IR wavelengths. Next is the transmission medium used for infrared transmission, which includes vacuum, the atmosphere, and optical fibers. Thirdly, optical components such as optical lenses made from quartz, CaF2, Ge and Si, polyethylene Fresnel lenses, and Al or Au mirrors, are used to converge or focus infrared radiation. Likewise, to limit spectral response, band-pass filters are ideal. Finally, the infrared detector completes the system for detecting infrared radiation. The output from the detector is usually very small, and hence pre-amplifiers coupled with circuitry are added to further process the received signals.

3.7.3 Applications
The following are the key application areas of infrared sensors:
i. ii. iii. iv. v. vi.

Tracking and art history Climatology, meteorology, and astronomy Thermography, communications, and alcohol testing Heating, hyperspectral imaging, and night vision Biological systems, photobiomodulation, and plant health Gas detectors/gas leak detection

30

vii. viii. ix. x.

Water and steel analysis, flame detection Anesthesiology testing and spectroscopy Petroleum exploration and underground solution Rail safety.

3.8 ULN 2003


The ULN2003 is a monolithic high voltage and high current Darlington transistor arrays. It consists of seven NPN darlington pairs that features high-voltage outputs with commoncathode clamp diode for switching inductive loads. The collector-current rating of a single darlington pair is 500mA. The darlington pairs may be parrlleled for higher current capability. Applications include relay drivers,hammer drivers, lampdrivers,display drivers(LED gas discharge),line drivers, and logic buffers. The ULN2003 has a 2.7kW series base resistor for each darlington pair for operation directly with TTL or 5V CMOS devices.

Fig 3.15 ULN 2003 These versatile devices are useful for driving a wide range of loads including solenoids, relays DC motors, LED displays filament lamps, thermal print heads and high power buffers. The ULN2001A/2002A/2003A and 2004A are supplied in 16 pin plastic DIP packages with a copper lead frame to reduce thermal resistance. They are available also in small outline package (SO-16) as ULN2001D/2002D/2003D/2004D.

31

Fig 3.16 Pin Connection of ULN 2003

3.8.1 Internal Description of ULN 2003


ULN2003 belongs to the family of ULN200X series of ICs. Different versions of this family interface to different logic families. ULN2003 is for 5V TTL, CMOS logic devices. These ICs are used when driving a wide range of loads and are used as relay drivers, display drivers, line drivers etc. ULN2003 is also commonly used while driving Stepper Motors. Refer Stepper Motor interfacing using ULN2003.

32

Fig 3.17 Schematic for each driver Each channel or darlington pair in ULN2003 is rated at 500mA and can withstand peak current of 600mA. The inputs and outputs are provided opposite to each other in the pin layout. Each driver also contains a suppression diode to dissipate voltage spikes while driving inductive loads. The schematic for each driver is given below:

Fig 3.18 ULN 2003 Internal

3.8.2 Absolute Maximum Ratings

33

Table 3.3 ULN Ratings

Table 3.4 ULN Ports

3.9 Stepper Motor


A stepper motor (or step motor) is a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor's position can then be commanded to move and hold at one of these steps without any feedback sensor (an open-loop controller), as long as the motor is carefully sized to the application.

34

Fig 3.19 Stepper Motor A stepper motor is an electromechanical device which converts electrical pulses into discrete mechanical movements. The shaft or spindle of a stepper motor rotates in discrete step increments when electrical command pulses are applied to it in the proper sequence. The motors rotation has several direct relationships to these applied input pulses. The sequence of the applied pulses is directly related to the direction of motor shafts rotation. The speed of the motor shafts rotation is directly related to the frequency of the input pulses and the length of rotation is directly related to the number of input pulses applied.

3.9.1 Stepping Modes of Stepper Motor


The following are the most common drive modes. i. ii. iii. iv. Wave Drive (1 phase on) Full Step Drive (2 phases on) Half Step Drive (1 & 2 phases on) Microstepping (Continuously varying motor currents)

The excitation sequences for the above drive modes are summarized in table given below.

Fig 3.20 Stepper Motor Excitation sequences for different drive modes

i.

Wave Drive (1 phase on)


In this drive method only a single phase is activated at a time. It has the same number of steps as the full step drive, but the motor will have significantly less than rated torque. It is

35

rarely used.The stator is energized according to the sequence A B

and the

rotor steps from position 8 2 4 6. For unipolar and bipolar wound motors with the same winding parameters this excitation mode would result in the same mechanical position. The disadvantage of this drive mode is that in the unipolar wound motor you are only using 25% and in the bipolar motor only 50% of the total motor winding at any given time. This means that you are not getting the maximum torque output from the motor.

Fig 3.21 Unipolar and Bipolar wound stepper motors

ii.

Full Step Drive (2 phases on)


This is the usual method for full step driving the motor. Two phases are always on. The motor will have full rated torque. In Full Step Drive you are energizing two phases at any given time. The stator is energized according to the sequence AB B and the rotor steps from position 1 3 5 7. Full step mode results in the same angular movement as 1 phase on drive but the mechanical position is offset by one half of a full step. The torque output of the unipolar wound motor is lower than the bipolar motor (for motors with the same winding parameters) since the unipolar motor uses only 50% of the available winding while the bipolar motor uses the entire winding.

iii.

Half Step Drive (1 & 2 phases on)

36

Half Step Drive combines both wave and full step (1&2 phases on) drive modes. Every second step only one phase is energized and during the other steps one phase on each stator. The stator is energized according to the sequence AB B B

A and the rotor steps from position 1 2 3 4 5 6

7 8. This results in angular movements that are half of those in 1- or 2-phases-on drive modes. Half stepping can reduce a phenomena referred to as resonance which can be experienced in 1- or 2- phases-on drive modes.

iv.

Microstepping (Continuously varying motor currents)


What is commonly referred to as microstepping is often "sine cosine microstepping" in which the winding current approximates a sinusoidal AC waveform. Sine cosine microstepping is the most common form, but other waveforms can be used [2]. Regardless of the waveform used, as the microsteps become smaller, motor operation becomes more smooth, thereby greatly reducing resonance in any parts the motor may be connected to, as well as the motor itself. Resolution will be limited by the mechanical stiction, backlash, and other sources of error between the motor and the end device. Gear reducers may be used to increase resolution of positioning.Step size repeatability is an important step motor feature and a fundamental reason for their use in positioning.

3.9.2 Stepper Motor Advantages and Disadvantages


Advantages
i. ii. iii. The rotation angle of the motor is proportional to the input pulse. The motor has full torque at standstill (if the windings are energized). Precise positioning and repeatability of movement since good stepper motors have an accuracy of 3 5% of a step and this error is non cumulative from one step to the next. iv. v. Excellent response to starting/ stopping/reversing. Very reliable since there are no contact brushes in the motor. Therefore the life of the motor is simply dependant on the life of the bearing. vi. The motors response to digital input pulses provides open-loop control, making the motor simpler and less costly to control.

37

vii.

It is possible to achieve very low speed synchronous rotation with a load that is directly coupled to the shaft.

viii.

A wide range of rotational speeds can be realized as the speed is proportional to the frequency of the input pulses.

Disadvantages
1. Resonances can occur if not properly controlled. 2. Not easy to operate at extremely high speeds.

3.9.3 Open Loop Operation


One of the most significant advantages of a stepper motor is its ability to be accurately controlled in an open loop system. Open loop control means no feedback information about position is needed. This type of control eliminates the need for expensive sensing and feedback devices such as optical encoders. Your position is known simply by keeping track of the input step pulses.

3.9.4 Stepper Motor Types


There are three basic stepper motor types. i. ii. iii. Variable-reluctance Permanent-magnet Hybrid

i.

Variable-reluctance (VR)
This type of stepper motor has been around for a long time. It is probably the easiest to understand from a structural point of view. Figure 1 shows a cross section of a typical V.R. stepper motor. This type of motor consists of a soft iron multi-toothed rotor and a wound stator. When the stator windings are energized with DC current the poles become magnetized. Rotation occurs when the rotor teeth are attracted to the energized stator poles.

38

Fig 3.22 Cross-section of a variable reluctance (VR) motor

ii.

Permanent Magnet (PM)


Often referred to as a tin can or canstock motor the permanent magnet step motor is a low cost and low resolution type motor with typical step angles of 7.5 to 15. (48 24 steps/revolution) PM motors as the name implies have permanent magnets added to the motor structure. The rotor no longer has teeth as with the VR motor. Instead the rotor is magnetized with alternating north and south poles situated in a straight line parallel to the rotor shaft. These magnetized rotor poles provide an increased magnetic flux intensity and because of this the PM motor exhibits improved torque characteristics when compared with the VR type.

Fig 3.23 Principle of a PM or tin-can stepper motor

39

iii.

Hybrid (HB) The hybrid stepper motor is more expensive than the PM stepper motor but provides better performance with respect to step resolution, torque and speed. Typical step angles for the HB stepper motor range from 3.6 to 0.9 (100 400 steps per revolution). The hybrid stepper motor combines the best features of both the PM and VR type stepper motors. The rotor is multi-toothed like the VR motor and contains an axially magnetized concentric magnet around its shaft. The teeth on the rotor provide an even better path which helps guide the magnetic flux to preferred locations in the air gap. This further increases the detent, holding and dynamic torque characteristics of the motor when compared with both the VR and PM types.

Fig 3.24 Cross-section of a hybrid stepper motor

40

CHAPTER 4 SOFTWARE DESCRIPTION


We have used three softwares in our project: 1. LabVIEW For database management 2. Keil Vision 3 For microcontroller programming 3. Flash Magic For burning the program

4.1 LabVIEW
4.1.1 Introduction
LabVIEW (short for Laboratory Virtual Instrument Engineering Workbench) is a systemdesign platform and development environment for a visual programming

language from National Instruments. The programming language used in LabVIEW, also referred to as G, is a dataflow programming language. Execution is determined by the structure of a graphical block diagram (the LabVIEW-source code) on which the programmer connects different function-nodes by drawing wires. These wires propagate variables and any node can execute as soon as all its input data become available. Since this might be the case for multiple nodes simultaneously, G is inherently capable of parallel execution. Multi-processing and multi-threading hardware is

41

automatically exploited by the built-in scheduler, which multiplexes multiple OS threads over the nodes ready for execution.

4.1.2 Graphical Programming


LabVIEW ties the creation of user interfaces (called front panels) into the development cycle. LabVIEW programs/subroutines are called virtual instruments (VIs). Each VI has three components: a block diagram, a front panel and a connector panel. The last is used to represent the VI in the block diagrams of other, calling VIs. The front panel is built using controls and indicators. Controls are inputs they allow a user to supply information to the VI. Indicators are outputs they indicate, or display, the results based on the inputs given to the VI. The back panel, which is a block diagram, contains the graphical source code. All of the objects placed on the front panel will appear on the back panel as terminals. The back panel also contains structures and functions which perform operations on controls and supply data to indicators. The structures and functions are found on the Functions palette and can be placed on the back panel. Collectively controls, indicators, structures and functions will be referred to as nodes. Nodes are connected to one another using wires e.g. two controls and an indicator can be wired to the addition function so that the indicator displays the sum of the two controls. Thus a virtual instrument can either be run as a program, with the front panel serving as a user interface, or, when dropped as a node onto the block diagram, the front panel defines the inputs and outputs for the given node through the connector panel. This implies each VI can be easily tested before being embedded as a subroutine into a larger program.

42

Fig 4.1 Graphical Programming in LabVIEW

Fig 4.2 Connector Panel

43

Fig 4.3 Front Panel

4.1.3 Benefits of Using LabVIEW


i. Interfacing A key of LabVIEW over other development environments is the extensive support for accessing instrumentation hardware. Drivers and abstraction layers for many different types of instruments and buses are included or are available for inclusion. These present themselves as graphical nodes. The abstraction layers offer standard software interfaces to communicate with hardware devices. The provided driver interfaces save program development time. ii. Code Compilation In terms of performance, LabVIEW includes a compiler that produces native code for the CPU platform. The graphical code is translated into executable machine code by interpreting the syntax and by compilation. The LabVIEW syntax is strictly enforced during the editing process and compiled into the executable machine code when requested to run or upon saving. In the latter case, the executable and the source code are merged into a single file. The executable runs with the help of the LabVIEW run-time engine,

44

which contains some precompiled code to perform common tasks that are defined by the G language. iii. Large Libraries Many libraries with a large number of functions for data acquisition, signal generation, mathematics, statistics, signal conditioning, analysis, etc., along with numerous graphical interface elements are provided in several LabVIEW package options. The number of advanced mathematic blocks for functions such as integration, filters, and other specialized capabilities usually associated with data capture from hardware sensors is immense. iv. Parallel Programming LabVIEW is an inherently concurrent language, so it is very easy to program multiple tasks that are performed in parallel by means of multithreading. This is, for instance, easily done by drawing two or more parallel while loops. This is a great benefit for test system automation, where it is common practice to run processes like test sequencing, data recording, and hardware interfacing in parallel. v. User Community There is a low-cost LabVIEW Student Edition aimed at educational institutions for learning purposes. There is also an active community of LabVIEW users who communicate through several e-mail groups and Internet forums.

4.2 Keil Vision


4.2.1 Introduction
The Keil Development Tools are designed for the professional software developer, however programmers of all levels can use them to get the most out of the embedded microcontroller architectures that are supported. Tools developed by Keil endorse the most popular microcontrollers and are distributed in several packages and configurations, dependent on the architecture. i. MDK-ARM: Microcontroller Development Kit, for several ARM7, ARM9, and CortexMx based devices
45

ii. iii. iv.

PK166: Keil Professional Developers Kit, for C166, XE166, and XC2000 devices DK251: Keil 251 Development Tools, for 251 devices PK51: Keil 8051 Development Tools, for Classic & Extended 8051 devices. In addition to the software packages, Keil offers a variety of evaluation boards, USB-JTAG

adapters, emulators, and third-party tools, which completes the range of products. The following illustrations show the generic component blocks of Vision in conjunction with tools provided by Keil, or tools from other vendors, and the way the components relate.

4.2.2 Software Development Tools


Like all software based on Keils Vision IDE, the toolsets provide a powerful, easy to use and easy to learn environment for developing embedded applications. They include the components you need to create, debug, and assemble your C/C++ source files, and incorporate simulation for microcontrollers and related peripherals. The RTX RTOS Kernel helps you to implement complex and time-critical software.

4.2.3 RTOS and Middleware Components


These components are designed to solve communication and real-time challenges of embedded systems. While it is possible to implement embedded applications without using a real-time kernel, a proven kernel saves time and shortens the development cycle. This component also includes the source code files for the operating system.

4.2.4 Hardware Debug Adapters


The Vision Debugger fully supports several emulators provided by Keil, and other vendors. The Keil ULINK USB-JTAG family of adapters connect the USB port of a PC to the target hardware. They enable you to download, test, and debug your embedded application on real hardware.

4.3 Flash Magic


Flash Magic is used to download the program in your microcontroller, provided it is In System Programmable. P89V51RD2 supports the ISP feature.

46

There are four steps to burn the program on microcontroller Step 1: Communications i. ii. iii. iv. Device: Select your target device. Com port: Select the COM port you are using to connect to your computer Baud rate: Select 9600 as baud rate Interface: Choose the ISP option

Step 2: Erase You can choose to erase your device if required. It is not mandatory but it is advisable. If you do not erase your flash, your code will overwrite the previous code. Step 3: Hex File Browse your computer and select the Hex file stired in your project folder Step 4: Options Here you can choose the options required by you. If you program the clock bit, the speed of execution will double. However, after doing this it can be reprogrammed only through parallel programmer.

CHAPTER - 5 CONCLUSIONS & FUTURE SCOPE


5.1 Conclusion
Parking of cars in a parking area is becoming a difficult task as the number of cars increases while the number of parking spaces is finite. People spend a certain amount of time looking for parking space and thus traffic slows down and cause congestion. The information of available parking spaces is not readily available to the people looking for parking spaces. Hence this project fulfills the need of automated parking system as the movement of the vehicle is controlled through the sensor inputs using a microcontroller and the vehicle is parked and retrieved without human intervention. Also as compared to other automated parking system it is very cheap as technologies such as elevators and 3D movement of parking base are costlier then simple embedded and LabVIEW approach.
47

5.2 Future Scope


1. Generation of the invoice for the customer and change in the bill value with time With the development of this the customer will have to pay for a fixed amount of time slot which is the minimum cost to use the garage and if the customer exceeds the maximum limit then the bill will be automatically updated according to the increased time. 2. Monitoring of the garage system In this system there will be a sensor placed at every slot in the garage which will be connected to control room, hence the information of slot availability will be displayed through labview. 3. Enhancement of the vehicle and making it more feasible practically Enhancement in the technique of automatic parking used in the vehicle, such as using GPS rather than using simple path tracing technique. 4. Automatic updating of database when the customer leaves the garage The information related to the amount of time and the number of time the customer used the garage will be updated when the customer leaves the garage.

48

REFERENCES
[1] Automated Car Parking System, Niyantra 2013,

http://www.decibel.ni.com/automated_car_parking_system [2] PC Based Automated System using LabVIEW, Components, http://www.alldatasheet.com Microcontroller 8051, http://www.wikipedia.org/microcontroller_8051

http://www.buet.ac/icece/pub2002/paper_100 [3] [4]

49

APPENDICES
Appendix I Microcontroller coding in Bascom at transmitter unit
$crystal = 11059200 $baud = 9600 Config Lcd = 16 * 2 Config Lcdpin = Pin , Db4 = P3.4 , Db5 = P3.5 , Db6 = P3.6 , Db7 = P3.7 , E = P3.3 , Rs = P3.2 If P1.2 = 1 And P1.3 = 1 Then Do If P1.0 = 1 And P1.1 = 1 Then P2 = &B00001010 End If If P1.0 = 0 And P1.1 = 1 Then P2 = &B00001000
50

End If If P1.0 = 1 And P1.1 = 0 Then P2 = &B00000010 End If If P1.0 = 0 And P1.1 = 0 Then P2 = &B00001111 End If End If If P1.2 = 0 And P1.3 = 1 Then P2 = &B00000001 Do If P1.4 = 1 And P1.5 = 1 Then P2 = &B00000101 End If If P1.4 = 0 And P1.5 = 1 Then P2 = &B00000100 End If If P1.4 = 1 And P1.5 = 0 Then P2 = &B00000001 End If If P1.4 = 0 And P1.5 = 0 Then P2 = &B00001111 End If End If

51

Appendix II Database coding in LabVIEW

52

53

54

Cost Of the Project


i. ii. iii. iv. v. Microcontroller IR(Infrared) Sensors (With Comparator) RF(Radio Frequency) Tranceivers Dc Motor Other Electronic Components (Pcb Board, Resistors, Capacitors, Motor Driving Ic, Vehicle Body, Garage Model) vi. Stationery & Reports Rs. 1000/Rs. 50/Rs. 500/Rs. 500/Rs. 800/Rs. 150/-

Total Cost

Rs. 3000/-

55

You might also like