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







A developing country like India because of its financial growth, we find that each and every middle class family can afford to buy a car. Naturally vehicles are increasing day by day and because of poor planning we dont find sufficient space for parking. Finding parking place in huge shopping malls, multiplexes, etc in major cities is the biggest problem. These days almost all the big cities are crowded with huge number of vehicles, there by a solution must be emerged to park multiple vehicles in less space. To avoid this problem we have designed a parking system, which occupies very less place. In this regard this proto type module is designed to park three cars in one car space. Under ground parking method is implemented here such that vacant slots are displayed through an LCD that is interfaced with the micro controller. The moving mechanism is constructed as multi storied compartments and is driven through a DC motor. Rack and pinion method coupled with sliding channel is used to drive the mechanism smoothly. With the help of control keys, required compartment can be brought into the convenience for the comfort of the user. The module is divided into two compartments and each compartment is employed with IR sensors, so that presence of the vehicle inside the compartment can be detected and it can be displayed. Before parking the car, the owner of the car should give the password of his own in the form of three digits Code and the same password is given by him when he vacating the parking lot. The display system is designed with LCD and displays either Full or Empty. The two compartments are the ground level (0), (-1) and (-2) levels.

Depending on the control keys the controller moves this module to that particular level that will be recognized using the magnetic switches.

The growth of automobile population is an important issue in many urban cities around the world. It creates not only a horde of problems such as indoor air quality and noise pollution, but also affected the demand of parking spaces as in any city, land is scarce and expensive resource that has to be utilized to its fullest value. Therefore, underground (basement) car park has become a solution in order to optimize the usage of the land. Varieties of parking spaces are designed such as multi-storey, surface (ground level) and above ground (elevated and usually multi-storey complex). Underground car parks are expected to be much more constructed in future. This is due to the current scenario of the developed cities where they prefer to build the main building spaces rather than erecting an elevated multi-storey car park complex on the land provided which this is believes will affect the aesthetic value as well as the environment of the whole development. An underground car park is defined as under a street or an open space and it is a basement to a building which includes any floors constructed under ground level We are building roads to drive our vehicles like car or bike on it, but we do not have the enough space to park them. So metros are facing parking problems and peoples have park their vehicles anyplace. Delhi and other metros like Mumbai, Kolkata, Hyderabad, Bangalore and Ahmedabad has millions of cars and two-wheelers on its road, but not enough parking spaces.

The required parking space has, on an average in the crowded market of metros in India, outstripped by 45%. It is not just a problem for a single city in India; all major cities in India facing the space crunch. Parking space is fast becoming a major dilemma in other gigantic cities in India, which includes Kolkata, Bangalore, Hyderabad, Ahmedabad, Pune, and other urban and semi urban cities. Underground parking systems are the solutions for the same issue. Delhi seems to have realized it. Municipal Corporation of Delhi have identified some areas for automatic parking systems and started getting tendering activities. Traditionally garages and underground parking has been the only parking available for indoors. For smaller buildings extensions such as garages are built to the side of the building to offer both parking space and protection to the cars themselves while larger buildings such as condominiums and other types of highrise buildings utilize the underground space for similar indoor parking effect. Occasionally there are outdoor parking that are designed the same as the underground parking lots but they are more rare and serve virtually the same purpose as the underground parking. Unfortunately indoor parking spaces are not very efficient since they can always be used for something else. Even when it comes to underground parking having extra levels underground for numerous purpose (additional shops, recreation area for condominiums, etc.) seems better than using them as just parking spaces. Nevertheless, parking spaces are indeed necessities everywhere so it is something that people eventually learn to accept. While it is impossible to simply get rid of parking itself it is more than possible to maximize the potential of the indoor parking spaces. A park lift system allows you to do just that and even more. By having a park lift system installed in an indoor parking space one can easily double the capacity of a parking lot. This

means that a parking lot with 2 floors can be modified so that 1 floor can be utilized as something other than a parking space while the other floor takes on the capacity of both floors. Rising land prices and rising car ownership are leading to an acute shortage of parking spaces. One solution is to build car parks below ground. Choosing to build car parks underground brings a number of benefits.

Frees up valuable land for other uses Ugly car parks do not spoil historical landscapes Can allow one to build close to existing facilities Underground car-parks range from a single space below a house to large

municipal car-parks. However, like all underground structures, they need to be protected from water-ingress. Car-park management systems operate by monitoring the availability of carparking spaces and making that information available to customers and facility administrators. Customers use it for guiding them in their choice of parking space. This Car Parking System enables the parking of vehicles, floor after floor and thus reducing the space used. Here any number of cars can be parked according to the requirement. These makes the systems modernized and even a space-saving one. This idea is developed using 89C51 Microcontroller. Display is provided at the ground floor which is basically a counter that displays whether the floors are fully filled with the cars or is it having place in a particular floor or not. There is facility of lift to carry the car to up and down. Movement of Lift is controlled by DC motor. The mechanical transmission section driven through DC motor is having reduction gear mechanism internally. This motor is driven through H Bridge IC & it is interfaced with the microcontroller as output device.

In this project, we show the basic underground car parking system with two floors. Also, in this project, we will show two floors with one set of IR sensors on each floor. The IR sensor is design to detect the car at the car park and sent the data to the microcontroller. The lift carries the car to each floor. Magnetic field sensors also used in this project, Magnetic field sensor will be attached with microcontroller as brain of this system. With the help of these sensors, the lift stops automatically. When we press a concerned floor switch, the lift automatically starts and immediately senses the space in the parking station. If the space is available, the lift will start or stop on particular floor, which is displayed in the LCD. If no space is available, the lift stops and displays the message no space. If all the spaces are vacant, the lift will park the vehicle on priority basis. All the flow of the system will be completely control by microcontroller. An excellent programming is needed to be programmed into microcontroller in order to identify and monitor the car parking space before someone is given to enter the car park. A model of parking system will be build integrated with microcontroller and Magnetic Field Sensor. A brief Introduction to 89C51 Microcontroller: When we have to learn about a new computer we have to familiarize about the machine capability we are using .and we can do it by studying the internal hardware design (devices architecture), and also to know about the size, number and the size of the registers The hardware is driven by a set of program instructions, or software. One familiar with hardware and software, the user can then apply the microcontroller to the problems easily. In this project we are making use of microcontroller. 89C51 chip; this IC is having 40 pins. The main control circuit accommodated along with the mechanism is designed with

The ATMEL AT89C51 is a low power, higher performance CMOS 8-bit microcomputer with 4K bytes of flash programmable and erasable read only memory (PEROM). Its high-density non-volatile memory compatible with standard MCS-51 instruction set makes it a powerful controller that provides highly flexible and cost effective solution to control applications. This controller works according to the program written in it. The program is written in such a way, so that the Microcontroller can read and it can store the information received from the PC key board. The 89C51 is an 8- bit controller widely used for control systems. This microcontroller is the integration of a microprocessor having 4kb memory, 32 I/O lines, timers, ROM, etc. on a single chip. As this chip is having four ports, lot of electronic hard ware can be interfaced with this single chip. Its high-density nonvolatile memory compatible with standard MCS-51 instruction set makes it a powerful controller that provides highly flexible and cost effective solution to control applications.

Micro-controllers are "Embedded" inside some other device so that they can control the features or actions of the product. Another name for a micro-controller is "embedded controller". Micro-controllers are dedicated to one task and run one specific program. The program is stored in ROM (read-only memory) and generally does not change. Micro-controllers are often low-power devices. The detailed description of these controllers is provided in 5TH chapter.



Underground parking systems are the most modern parking systems of the world. The parking facility can be developed underground as well as overhead also and one of the several global solutions to car parking solutions in urban centers. Unmanned underground or over-ground car parking solutions, particularly for crowded cities. The over all project work consists of several electronic components such as magnetic field sensors, a microcontroller, DC motor and IR sensors. Nowadays, there are so many sensors in the market. From the report of sensor market 2008, there are about ten most popular sensors developed today. The sensors are Temperature sensors, Pressure sensors, Flow sensors, and Fire detectors sensors. Magnetic field sensors will use in this project the magnetic field sensor is choose because this sensor has more reliability and can be apply at many fields. Even this sensor is still new, it become more popular form a day to another because of it application. For the example, it can be applied at Automatic Door/gate opening, Railroad Crossing Control (for trains), Parking Meters, Drive through retail (Banking, Fast-Food, etc.) and so on. The whole process starts with Infrared sensors and these sensors will be attached with microcontroller as brain of this system. The sensor is designed to

detect the car at the car park and sent the data to the microcontroller. All the flow of the system will be completely control by 89C51 microcontroller. An excellent programming is needed to be programmed into microcontroller in order to identify and monitor the car parking space before someone is given to enter the car park. The following is the individual block description of the block diagram.

In this project work two similar blocks are designed with IR sensors, for detecting the presence of vehicle in the compartment. With this sensing block, the microcontroller can identify weather that particular compartment is vacant or full and according to that, the controller displays the information. The outputs of two sensing blocks are fed to microcontroller, and these blocks generate high / low signals according to the occupancy / non-occupancy of the vehicles, and these signals are very essential for the microcontroller.

The main block in the Block diagram is vehicle (car) Sensing circuit Designed with IR Sensors. The car sensing block is designed with LM567 IC, this is a tone decoder IC, and also it generates tone frequency. For identifying the car in a particular floor, two sets of sensors are used with two different 567 ICs are used. These two sets of sensors are arranged inside the each floor. Each sensing block is designed with two IR LEDs namely IR signal transmitting LED and IR signal detector. The IR signal detector is nothing but a photo diode; hence it is called as optical sensor. Both the devices are arranged side by side with in halfinch distance. The tone generator part of the IC is configured as Astable mode of operation, which produces a perfect square wave of 10 KHz approximately and it is amplified using a transistor. The amplified signal is radiated through the transmitting IR LED. The signal delivered by the IR LED transmits in a line like LASER beam, whenever this signal is interrupted by an object, the radiating signal will be spread in the air because of the object, this signal is tracked by the IR

signal detector/photo diode. On receipt of optical signal, the tone decoder part of the IC detects the signal through the optical sensor and generates a high signal for the microcontroller. Like wise the controller is getting signals from the two sensing blocks, according to the received information from the sensors, the controller controls the motor. On receipt of this signal, the controller displays Full in display. The main aim is detect the vehicle with out any physical contact, and therefore it can be called as an infrared proximity detection system. Here high efficiency IRLED is driven by PNP Transistor SK100/BC 557 with a modulating frequency of about 10 KHz. The Frequency is decided by the RT and CT connected at Pin No 5 and 6 of the Tone Decoder IC. This frequency is available from Pin 5 of LM 567 IC (versatile PLL tone decoder IC). The 470 ohms variable resistor connected in series with the IR LED limits the IR-LED current. With the help of this variable resistor, the current passing through the IR LED can be controlled, there by range is also can be adjusted. The output of the sensing circuit is inverted using a switching transistor, i.e., whenever the signal is interrupted by sensing the presence of an object which is at very near to the reference point, the final output of the inverter will become high automatically and this high signal can be fed to the controller. The detailed description will be provided in the next chapter.

Magnetic Sensors
In this project, we use a magnetic switch (reed switch) as a sensor. Reed switch is a special magnetic proximity sensor. When this reed sensor is activated by an external magnetic field, the reed sensor is activated automatically. In the reed sensor, there are two wires inside the glass casing. When an external magnetic field affects the sensor, these plates join together and become short automatically. We use this sensor in our project to sense the concerned floor and

of the lift on floor. When the lift moves, it searches the reed sensor for stoppage. We paste one magnet with the lift and when the lift move up-wards or down-wards, then magnet searches the sensor. As the sensor is sensed by the magnet, the lift stops there automatically.

So whenever we want to stop the lift, we search the magnetic sensor. When any car is parked on the desired position, the sensor activates and provides a signal to the controller. The controller checks the change of voltage on this pin and saves this data for auto sensing logic. When sensor is active, the port pin becomes more negative and this change of voltage from high to low is our required signal.


In this project, we use the 89C51 controller to interface all the inputs and outputs, in the input device; we use 2 sets of sensors. We use LCD display and one DC motor to move lift up-ward and down ward. The brain inside the controller is to control all these input and output and perform perfectly. 8051 is basically an INTEL IC but now in these days it is available with many companies. We use ATMEL 89C51 series with advance feature than 8051. ATMEL 89C51 is a 40 pin controller with 128 bytes of ram and 4K bytes of ROM inside. Pin No.40 of the controller is connected to the positive 5 volt power supply. We provide a 5 volt regulated power supply on this pin. Pin no.9 is the reset pin and this pin is connected to a capacitor and resistor network to provide an auto-reset option, when controlled is wake-up. Pin no. 20 is connected to the ground pin, pin 18 and 19 are connected to the external crystal to provide a constant oscillation to the circuit. Two capacitors are grounded from the crystal pins to provide stabilization. All the read sensors are connected to port1.

The microcontroller unit used in this project work is to monitor the presence of the vehicle in the compartments and display the information according to the occupancy of the vehicles in the compartments. The controller output is used to control the DC motor through the H-bridge IC. Micro-controller unit is constructed with ATMEL 89C51 Micro-controller chip. The ATMEL AT89C51 is a low power, higher performance CMOS 8-bit microcomputer with 4K bytes of flash programmable and erasable read only memory (EEPROM). Its high-density non-volatile memory compatible with standard MCS-51 instruction set makes it a powerful controller that provides highly flexible and cost effective solution to control applications. Micro-controller works according to the program written in it. The program is written in such a way, so that the output from the sensing blocks will be converted into its equivalent digital information, and according to the instructions sent through the manual keys, the controller drives the DC motor Micro-controllers are "embedded" inside some other device so that they can control the features or actions of the product. Another name for a micro-controller, therefore, is "embedded controller". Micro-controllers are dedicated to one task and run one specific program. The program is stored in ROM (read-only memory) and generally does not change. Micro-controllers are often low-power devices. A battery-operated Microcontroller might consume 50 milli watts. A micro-controller has a dedicated input device and often (but not always) has a small LED or LCD display for output. A micro-controller also takes input from the device it is controlling and controls the device by sending signals to different components in the device The motor driving circuit is designed with L293D chip; this is popularly known as H bridge device generally used to drive the low power DC motors.To

drive the motor independently in both directions, drive sequence is programmed depending up on the information gathered from the sensors. To drive the motor independently in both directions, four drive sequences are essential; this is achieved through H Bridge. The H bridge package is interfaced with microcontroller. The name "H-Bridge" is derived from the actual shape of the switching circuit which controls the motion of the motor. It is also known as "Full Bridge". Basically there are four switching elements named as "High side left", "High side right", "Low side right", "Low side left". When these switches are turned on in pairs motor changes its direction accordingly. Like, if we switch on High side left and Low side right then motor rotate in forward direction, as current flows from Power supply through the motor coil goes to ground via switch low side right. Similarly, when we switch on low side left and high side right, the current flows in opposite direction and motor rotates in backward direction. This is the basic working of H-Bridge. Depending up on the signals provided by the sensors, microcontroller activates the DC motor through H Bridge. The current flowing through each driver circuit is restricted to 600 ma & it can with stand up to a peak current of 1.2amps.This chip is having two drive circuits internally; therefore it can drive DC motor simultaneously. Since the device can accept TTL logics, it can be interfaced with controller directly. This device is built in with four channel drivers, motor can be rotated in both directions. The enable pins & channel inputs are controlled by the microcontroller. The DC motor used to drive the lift mechanism will not consume more then 150 milliamps at full load, there by heat sink is not required. If any higher rating motor is used, heat sink is essential for long run & this heat sink must be coupled to the center 4 pins of the chip.


The data received through 2 sets of infrared sensors, the controller displays weather the floor is filled with the car or is it having place in a particular floor through LCD display, which is interfaced with microcontroller. A display is provided at the ground floor. When any compartment is empty, then that particular compartment display shows FULL, similarly if it is vacant then it shows AVILABLE. The LCD panel used in this circuit is interfaced with micro-controller through its output port. This is a 16 character x 2Line LCD module, depending up on the availability of LCD panel 3 lines or 4 lines panels also can be used for the purpose, so that more information can be displayed simultaneously. These panels are capable of display numbers, characters, and graphics. The display contains two internal byte-wide registers, one for commands (RS=0) and the second for characters to be displayed (RS=1), it also contains a user. Programmed RAM area (the character RAM), that can be programmed to generate any desired character can be formed using a dot matrix. To distinguish between these two data areas, the hex command byte 80 will be used to signify that the display RAM address 00h is chosen. The LCD circuit is constructed with 89C51 microcontroller. The LCD contains 16 pins of which 8 are data pins and 3 are control pins. The LCD is interfaced to the Microcontroller using one of its ports. The microcontroller used in this project work is having 32 I/O lines and 10 I/O lines are interfaced with LCD panel, D0 D7 of LCD panel are called as 8 bit data pins and this panel acquires the information from microcontroller through this data pins. Detailed description about LCD interfacing is provided in this chapter. With the help of a read key, connected at the input side of the controller, channel can be selected to read that particular channel data. Failure information or

interruption information of all the channels is also displayed through the same LCD. The following figure shows how the display unit is interfaced to the Microcontroller.

Interfacing the display unit to the microcontroller As seen from the above figure, Pins from 7 to 14 are data pins used for the selection of a particular character and pins 4 to 6 are Control signal pins used for performing Register bank selection, Read / Write and Enable pins respectively. By adjusting the voltage at pin number 3 we can change the contrast of the display. To display a particular character its associated logic sequence has to be placed on the data pins and write signal (Pin-6) has to be enabled. Microcontroller takes care of all these things based on the program loaded into it. All that we need to do is to depress the desired keys during the text message preparation. The display section is same at the transmitting end as well as at the receiving end. In the receiving

end, Microcontroller places the logic sequence on the data pins based on the information obtained from the decoder output.

The detailed circuit description of the project work Underground Car parking System is explained along with circuit diagram. For better understanding total circuit diagram is divided into various sections and each section circuit description with its circuit diagram is provided in this chapter. The details are as follows.


This section is designed for detecting the presence of a car, which is inside the compartment. It is basically an infrared proximity detection system. Here high efficiency IR-LED is driven by PNP Transistor SK100 with a modulating frequency of about 10KHz. This frequency is available from Pin 5 of LM 567 IC (versatile PLL tone decoder IC). The 47 resistor connected in series with the IR LED limits the IR-LED current. The basic function of the detector circuit is by radiating energy into space through IR LED and detecting the transmitted IR signal. The two optical sensors i.e., transmitting IR LED as well as receiving IR LED are kept parallel to each other inside the compartment. The IR signal delivered through the transmitting LED, transmits in a line like laser beam. Whenever any vehicle entered in to the compartment for parking purpose, the beam is interrupted; thereby the receiver output becomes high automatically. The high output produced at Pin No.8 of

LM567 IC, is fed to microcontroller. Whenever the controller receives a high signal from the compartment, the microcontroller drives the corresponding display through the driving transistor, and the display shows FULL, means that particular compartment is full. Two similar circuits are designed for the two different compartments. The following is the diagram of sensing circuit.

In the above circuit diagram, an led indicator is provided at the final output stage, which glows bright when ever the beam is interrupted. FUNCTION OF LM 567 TONE DECODER CHIP The LM567 IC is a general-purpose tone decoder designed to provide a saturated transistor switch to ground when an input signal is present within the pass band. The circuit consists of two-phase detectors i.e., Q and I detector that are driven by a voltage-controlled oscillator, which determines the center frequency of the decoder. External components are used to independently set center frequency, bandwidth and output delay.

As the IC is configured with a VCO internally, it will be generating the frequency depending on the R and C values that are connected to the 5 and 6 pins of the 567-tone decoder IC. 5th pin is called as the timing resistor (RT) and 6th pin is called as the timing capacitor (CT). As the frequency is inversely proportional to R and C values, by defining the RC network at the IC; the VCO (Voltage Controlled Oscillator) along with the Q-phase detector will be generating a particular frequency which will be coming out from the 5th pin of the tone decoder IC. The Iphase detector is used to decode or compare the received frequency with the generated frequency. The frequency generated by the tone decoder IC can be calculated using the formula: F = [1 / (2 R C)] Looking at the pin configuration in the circuit diagram of the 567-tone decoder, 3rd pin of the IC is connected to the IR receiver (detector) and 5th pin to the IR transmitter by using a transistor. The PNP transistor SK 100 is used to drive the high efficiency IR transmitting LED with the modulating frequency generated by the IC. In simple words it can be explained like, as the signal (frequency) generated by the IC will not be having great strength, the transistor is used for amplifying the signal and the amplified signal is fed to IR transmitting LED and in order to limit the current a 470 ohms resistor is connected. The IR is having the characteristics of a laser i.e., it almost travels in a straight line with minimum expansion and like laser light it is also a monochromatic light. Another important feature of IR is that while the transmission is being done the IR transmitter and the IR receiver (detector) both should be in line of sight. The IR receiver is connected to the 3rd pin, which is the input pin of the IC. As the IR signal is transmitted into the free space and the IR receiver detects the

signal. In the free space as lot of noise signals are present, the IR signal will be received with some noise signals. So in order to eliminate the noise signals a capacitor is connected in between the IR receiver and the 3rd pin of the 567-tone decoder IC. And thus the IR received signal is fed to the IC, which will compare the received frequency signal with that of the generated frequency. The I-phase detector does this comparison and the output will be enabled when both the frequencies matches i.e., transmitted frequency is equal to the received frequency. And if the frequencies do not match the output will not be enabled. When both the transmitted and the received frequencies are matched, the Iphase detector enables the output pin of the 567-tone decoder i.e., the 8th pin. So when the output is enabled the output from the IC is a logic low signal. And if the frequencies do not match, the output will not be enabled and the 8th pin will logic high signal. This is due to the fact that at the 8th pin internally a transistor is present whose emitter is grounded and the collector pin the output 8th pin. And if the circuit of the 567-tone decoder is observed, we can see the supply i.e., Vcc is connected to the output pin of the IC through a resistor. When the frequencies match, the output will be enabled by which the transistor will be conducting (ON) and the Vcc supply will grounded through the transistor internally in the IC 567 Tone decoder itself. So a logic low signal will be received. And the same way if frequencies do not match output will not enabled by which the transistor will not be conducting (OFF) and the supply will be coming from the output pin, which is the logic high signal. When the IR sensors are connected facing each other, every time the output of the tone decoder IC will be a logic low signal until no obstacle comes in between the IR transmitter and the IR receiver. Unless any obstacle is present the transmitted frequency will be continuously received by the receiver and frequency will be matched with that of the generated ones and the output will be enabled. So

a logic low will be the output. And if obstacle comes in between the sensors the IR receiver will not receive the signal and the tone decoder IC checks the received frequency. As there is no received frequency the output will not be enabled, thus a logic high signal is received. If the sensors are placed side by side, the IR transmitter will be transmitting the IR signal continuously and the receiver will receive the reflected signal when there is any obstacle. So until there is no obstacle, the receiver will not receive the IR signal, so the frequencies do not match and the output will not be enabled. So the output of the 567-tone decoder will be a logic high signal. If obstacle comes in front of the sensors, the IR signal will be reflected back which will be observed by the IR receiver and feeds the signal to the tone decoder, which checks the frequency with the generated ones and as both of them match the output will be enabled by which the internal will be in ON state and the supply will be grounded internally in the IC. So a logic low signal will be received from the output of the 567-tone decoder IC. And to indicate whether the output of the sensing circuit is a logic low signal or a logic high signal, a LED is connected at the output pin of the 567-tone decoder IC. If the output is high LED will be in ON state and LED will be in OFF state if the output is low.

Magnetic sensors or Reed Switches:

The reed switch is an electrical switch operated by an applied magnetic field. The basic reed switch consists of two identical flattened ferromagnetic reeds, sealed in a dry inert-gas atmosphere within a glass capsule, thereby protecting the contact from contamination. The reeds are sealed in the capsule in such a way that their ends overlap and are separated by a small air gap.

The contacts may be normally open, closing when a magnetic field is present, or normally closed and opening when a magnetic field is applied. A magnetic field from an electromagnet or a permanent magnet will cause the contacts to pull together, thus completing an electrical circuit. The stiffness of the reeds causes them to separate, and open the circuit, when the magnetic field ceases. Good electrical contact assured by plating a thin layer of precious metal over the flat contact portions of the reeds.

A reed sensor is a device built using a reed switch with additional functionality like ability to withstand higher shock, easier mounting, additional intelligent circuitry, etc. In production, a metal reed is inserted in each end of a glass tube and the end of the tube heated so that is seals around a shank portion on the reed. Infrared-absorbing glass is used, so an infrared heat source can concentrate the heat in the small sealing zone of the glass tube. The thermal coefficient of

expansion of the glass material and metal parts must be similar to prevent breaking the glass-to-metal seal. The glass used must have a high electrical resistance and must not contain volatile components such as lead oxide and fluorides. The leads of the switch must be handled carefully to prevent breaking the glass envelope.

How does a reed switch work?

When a magnetic force is generated parallel to the reed switch, the reeds become flux carriers in the magnetic circuit. The overlapping ends of the reeds become opposite magnetic poles, which attract each other. If the magnetic force between the poles is strong enough to overcome the restoring force of the reeds, the reeds will be drawn together. One important quality of the switch is its sensitivity, the amount of magnetic energy necessary to actuate it. Sensitivity is measured in units of Ampere-turns, corresponding to the current in a coil multiplied by the number of turns. Typical pull-in sensitivities for commercial devices are in the 10 to 60 AT range.

Reed switches are widely used for electrical circuit control, particularly in the communications field. Reed switches are commonly used in mechanical system as proximity switches as well as in door and window sensors in burglar alarm system and tamper proofing methods. These were formerly used in the keyboards for computer terminals, where each key has a magnet and a reed switch actuated by depressing the key. Speed sensors on bicycles use a reed switch to detect when the magnet on the wheel passes the sensor.

1. 2. They are hermetically sealed in glass environment. Free from contamination, and are safe to use in harsh industrial and

explosive environments.
3.Reed switches are immune to electrostatic discharge (ESD) and do not require

any external ESD protection circuits. The isolation resistance between the contacts is an high as 1015 ohms, and contact resistance is as low as 50 milliohms. 4. 5. They can directly switch loads as low as a few microwatts without the help When the reed switches are combined with magnets and coils, they can be of external amplification circuits to as high as 120W. used to form many different types of relays. Two reed switches are used in this project to different levels of the each floor. When the floating magnet comes in contact with any of the reed switches, magnetic field will be generated and the reeds are drawn together and thus the reed switch is triggered and this change is applied to the microcontroller for further processing.

In this project Atmel 89c51 Micro controller Integrated Chip plays the main role. The program for this project is embedded in this Micro controller Integrated Chip and interfaced to all the peripherals. The timer program is inside the Micro controller IC to maintain all the functions as per the scheduled time. The Liquid crystal Display (LCD) is interfaced to Atmel 89c51 Micro controller to display the availability of car parking spaces, DC motor is used to move lift upward and downward.

Today in the field of microcontrollers had their beginnings in the development of technology of integrated circuits. This development has made it possible to store hundreds of thousands of transistors into one chip. That was a prerequisite for production of microprocessors, and the first computers were made by adding external peripherals such as memory, input-output lines, timers and other. Further increasing of the volume of the package resulted in creation of integrated circuits. These integrated circuits contained both processor and peripherals. That is how the first chip containing a microcomputer, or what would later be known as a microcontroller came about.

Memory unit
Memory is part of the microcontroller whose function is to store data. The easiest way to explain it is to describe it as one big closet with lots of drawers. If we suppose that we marked the drawers in such a way that they can not be confused, any of their contents will then be easily accessible. It is enough to know the designation of the drawer and so its contents will be known to us for sure. Memory components are exactly like that. For a certain input we get the contents of a certain addressed memory location and thats all. Two new concepts are brought to us: addressing and memory location. Memory consists of all memory locations, and addressing is nothing but selecting one of them. This means that we need to select the desired memory location on one hand, and on the other hand we need to wait for the contents of that location. Besides reading from a memory location, memory must also provide for writing onto it. This is done by supplying an additional line called control line. We will designate this line as R/W (read/write). Control line is used in the following way: if r/w=1, reading is done, and if opposite is true then writing is done on the memory location. Memory is the first element, and we need a few operation of our microcontroller.

Central Processing Unit

Let add 3 more memory locations to a specific block that will have a built in capability to multiply, divide, subtract, and move its contents from one memory location onto another. The part we just added in is called central processing unit (CPU). Its memory locations are called registers.

Registers are therefore memory locations whose role is to help with performing various mathematical operations or any other operations with data wherever data can be found. Look at the current situation. We have two independent entities (memory and CPU) which are interconnected, and thus any exchange of data is hindered, as well as its functionality. If, for example, we wish to add the contents of two memory locations and return the result again back to memory, we would need a connection between memory and CPU. Simply stated, we must have some way through data goes from one block to another.

That way is called bus. Physically, it represents a group of 8, 16, or more wires. There are two types of buses: address and data bus. The first one consists of as many lines as the amount of memory we wish to address, and the other one is as wide as data, in our case 8 bits or the connection line. First one serves to transmit address from CPU memory, and the second to connect all blocks inside the microcontroller.

Input - output unit

Those locations weve just added are called ports. There are several types of ports: input, output or bi-directional ports. When working with ports, first of

all it is necessary to choose which port we need to work with, and then to send data to, or take it from the port. When working with it the port acts like a memory location. Something is

simply being written into or read from it, and it could be noticed on the pins of the micro-controller. The following is the Circuit diagram of Micro-controller

DC Motor
DC motors are widely used, inexpensive, small and poweful for their size. They are most easy to control. One DC motor requires only two singals for its operation. They are non-polarized, means you can reverse the voltage without any damage to motor. DC motors have +ve and ve leads. Connecting them to a DC voltage source moves motor in one direction (clockwise) and by reversing the polarity, the DC motor will move in opposite direction (counter clockwise). The maximum speed of DC motor is specified in rpm (rotation per minute). It has two rpms: no load and loaded. The rpm is reduces when moving a load or decreases when load increases. Other specifications of DC motors are voltage and current ratings. Below table shows the specifications of the motor used in the project.

Operating Voltage Operating Current Speed

12V DC 150MAmp s 30 RPM

DC Motor Specifications

Speed of the motor can be changed by changing the applied voltage across motor. DC motors dont have enough torque to drive the mechanism directly by connecting mechanism with it. The motor driving circuit is designed

with L293D chip; this is popularly known as H bridge device generally used to drive the low power DC motors.To drive these two motors independently in both directions, drive sequence is programmed depending up on the information gathered from the sensors.

H-Bridge (General description)

H-Bridge is an electronic circuit which enables a voltage to be applied on either side of the load and the H-bridge DC motors allow the car to run backwards or forwards. H-Bridge is a configuration of 4 switches, which switch in a specific manner to control the direction of the current through the motor. Below figure shows simplified H-bridge as switches. The states of these four switches can be changed in order to change the voltage across the motor, of the current flow and the rotation of motor.

Basic Structure of an H-Bridge

In above figure, all switches are open and the motor terminals are disconnected from the circuit. This state allows the motor to spin freely. If we open switches S1 & S4 and close S2 & S3 as in first part of below figure there will be current flow across the circuit and motor will run. But if S1, S4 are close and S2, S3 are open, the voltage across the motor will switch around and that will cause the motor to rotate in the opposite direction. Below table summarizes the basic operation of the H-bridge depending upon the voltage applied across the switches.

S1 1 0 0 0 1

S2 0 1 0 1 0

S3 0 1 0 0 1

S4 1 0 0 1 0

Result Motor moves right Motor moves left Motor free runs Motor brakes Motor brakes

H-Bridge Operation Summary

Two Basic States of an H-Bridge

To control the speed and direction of the DC motor from the microcontroller, this simple H-bridge will be of no use. H-bridge which makes use of transistors works best for robotics projects. These transistors work as switch and they can control the current flow in the motor easily. Below figure shows transistor as a switch.

Transistors as a Switch

The difference between the mechanical switch and the transistor switch is that mechanical switch can be turned on or off mechanically but a transistors switch can be turned on or off by applying small current at the base. For an NPN transistor, when a small current of 20mA is applied to the base of the transistor, current will flow from collector to emitter. In case of, for PNP transistor, the current will flow from emitter to collector. For transistor to work as switch, the applied voltage at base needs to be higher than collector voltage for NPN transistor and lower than collector voltage for PNP transistor. In this project, the dual H-bridge motor driver IC used is L293D. The L293D is a monolithic integrated, high voltage, high current, 4-channel driver. The L293D supports two DC motors. Pin 8 is voltage for the motors and pin 16 is the +5 voltage for the chip. So with one IC we can interface two DC motors which can be controlled in both clockwise and counter clockwise direction and if you have motor with fix direction of motion then we can make use of all the four I/Os to connect up to four DC motors. First motor is connected between pin 3 and 6. The motor is turned on by sending a high signal to both the enable (pin 1) pin and one of the two direction pins, i.e. pin 2 or pin 7. To stop motor, the enable pin is high and both pin 2 and pin 7 are low. L293D has output current of 600mA and peak output current of 1.2A per channel. Moreover for protection of circuit from back EMF output diodes are included within the IC. The output supply (VCC2) has a wide range from 4.5V to 36V, which had made L293D a best choice for DC motor driver.

DC Motor Control with H-Bridge

The same goes for the other side of the chip. When using two motors, the best practice is to connect pins 2 and 15 togather and pin 7 and 10. above figure shows the control of the DC motors with L293D and microcontroller signal.

L293D H Bridge (Motor Driver)

Motor drivers are the simplest modules that provide power amplification for low-level control singals like PWM and direction supplied by the user.


The required DC levels are derived from the mains supply for this purpose a step-down transformer of 12V-0-12V center tapped secondary transformer is used. The current rating of the transformer is 2amps at secondary. The secondary is rectified and filtered to generate 12V smooth DC which is unregulated voltage and which is required to drive the alarm. With the help of a positive voltage regulator, constant voltage source of +5V is derived, for this purpose 7805 which is a 3Pin Voltage regulator IC is used so that, though the mains supply varies from 170V to 250V, the output of the regulator remains constant. The following is the circuit diagram of power supply.



This chapter explains about how to interface the LCD to Microcontroller, before interfacing we have to study the operation modes of LCDs and how to program using assembly language and C. In recent years the LCD panels became very popular because of their widespread use in various electronic systems like instruments to read the parameter values, digital communications for sending or receiving the text information, data acquisition systems, etc. These display units dominating seven segment displays by providing more features to the user. The LCD system can display numbers, characters, and graphics, where as seven segments LEDs displays only numbers, there fore most of the engineers prefers LCDs. The data fed to the LCD remains as it is and the same will be displayed until it gets an erase signal from the controller. The data can be stored and it can be refreshed for the next task.

The instruction command codes from microcontroller can be sent to the LCD to clear the display, depending up on the command the cursor can be brought to home position or blink the cursor. The LCD is having two important resistors internally, command resistor and data register; RS pin is used to select either command register or data register. If RS = 0, the instruction command code register is selected and allowing the user to send a command to clear the display. If RS = 1 the data register is selected, there by the user is allowed to send data that is to be displayed on LCD screen. By making RS pin to zero, we can also check the busy flag bit to see if the LCD is ready to receive information. As already mentioned that D0 D7 of LCD pins are 8 bit data pins and the busy flag is D7, it can be read when R/W (Read or Write) pin is

high (R/W = 0) and RS = 0, as follows; if R/W = 1, R/S = 1. When D7 pin is high, the LCD is busy taking care of internal operations and will not accept any new information. When D7 = 0, the LCD is ready to receive new information. It is recommended to check the busy flag before writing any data to the LCD. The following is the table shows the list of instruction command codes.

Code Command to LCD Instruction 1 2 4 6 5 7 8 A C E F 10 14 18 IC 80 CO 38 Clear display screen Return home Decrement cursor (shift cursor to left) Increment cursor (shift cursor to right) Shift display right Shift display left Display off, cursor off Display off, cursor on Display on, cursor off Display on, cursor blinking Display on, cursor blinking Shift cursor position to left Shift cursor position to right Shift the entire display to the left Shift the entire display to the right Force cursor to beginning of first line Force cursor to beginning of second line 2 Lines and 5x7 Matrix

To send any commands from instruction command code table to the LCD, make RS pin to zero. For data, feed high signal to RS pin, then send a high to low pulse to the E pin to enable the internal latch of the LCD. For

this, the suitable program is to be prepared for LCD connections. Another suitable program is to be prepared for sending code to the LCD with checking busy flag. Depending up on the program the busy flag can be D7 of the command resistor, to read command register R/W pin must be high and RS pin must be low, and a low to high pulse for the enable pin will provide the command register. After reading the command register, if bit D7 (busy flag) is high, the LCD is busy and no information (either command or data) should be issued to it. During D7 is zero; at that time we can send data or commands to the LCD. In this method time delays are not required in the program, because we are checking the busy flag before issuing commands to the LCD. Enable line must be negative-edge triggered for the write and it should be positive-edge triggered for the read.


Intel Corporation introduces 89c51; it is an 8-bit microcontroller. This microcontroller has 128 bytes of RAM, 4K of on-chip ROM, two timers, one serial port, and four ports of 8-bits each all on a single chip. 89c51 is basically Flash ROM version of 8051 families. 89c51 is basically a 40 pin Dual-in-

package. Block diagram of 89c51 is as shown in chapter-10, i.e., hardware details. The main features of 89c51 Hardware can be labeled as below:


It has 8-bit CPU with registers A (the accumulator) and B.

2. Sixteen-bit program counter (PC) and data pointer (DPTR). 3. Eight-bit program status word (PSW). 4. Eight-bit stack pointer (SP). 5. Internal ROM of 0 to 4K. 6. Internal RAM of 128 bytes. 7. 32 I/0 pins arranged as four 8-bit ports: P0-P3 8. Two 16-bit Timer/Counters: T0 and T1 9. Full duplex serial data receiver/transmitter: SBUF 10. Control registers: TCON, TMOD, SCON, PCON, IP, and IE. 11. Two external and three internal interrupt sources. 12. Oscillator and Clock circuits.

Pin descriptions:

1. VSS (pin-20) Ground= 0 V reference

2. VCC (pin-40) This is the power supply voltage for normal, idle and power-down modes. 3. P.0-P0.7 (pin-39 to pin 32 i.e., port 0)

Port 0 is an open-drain, bi-directional I/O port. Pins of Port 0 on which there is a high logic will float and can be used as a high impedance inputs. Port 0 is also the multiplexed low-order address and data bus during accesses to external program and data memory; in this application it uses strong internal pull-ups for emitting 1s.

4. P1.0 P1.7 (Pin-1 to Pin 8 i.e., Port 1) Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. Port 1 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 1 pins that are externally pulled low will source current because of the internal pull-ups.

5. P2.0 P2.7 (Pin-21 to Pin 28 i.e., Port 2) Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. Port 2 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 2 pins that are externally being pulled low will source current because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 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 (MOV @ Ri), port 2 emits the contents of the P2 special function register.

6. P3.0 P3.7 (Pin-10 to Pin 17 i.e., Port ) Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. Port 3 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 3 pins that are externally being pulled low will source current because of the pull-ups. Port 3 also serves the special features of the 89C51, as listed below: RxD (P3.0): Serial input port. TxD (P3.1): Serial output port. INT0 (P3.2): External interrupt. INT1 (P3.3): External interrupt. T0 (P3.4): Timer 0 external input. T1 (P3.5): Timer 1 external input. WR (P3.6): External data memory write strobe. RD (P3.7): External data memory read strobe.

7. RESET (Pin-9) A high on this pin for two machine cycles while the oscillator is running, resets the device. An internal diffused resistor to VSS permits a power-on reset using only an external capacitor to VCC.

8. ALE (Pin-30)

Output pulse for latching the low byte of the address during an Access to external memory. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency, and can be used for external timing or clocking. Note that one ALE pulse is skipped during each access to external data memory. Setting SFR auxiliary,0 can disable ALE. With this bit set, ALE will be active only during a MOVX instruction.

9. PSEN (Pin-29) The read strobe to external program memory. When executing code from the external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. PSEN is not activated during fetches from internal program memory.

10. EA/VPP (Pin-31) EA must be externally held low to enable the device to fetch code from external program memory locations 0000H to the maximum internal memory boundary. If EA is held high, the device executes from internal program memory unless the program counter contains an address greater than 0FFFH for 4 k devices, 1FFFH for 8 k devices, 3FFFH for 16 k devices, and 7FFFH for 32 k devices. The value on the EA pin is latched when RST is released and any

subsequent changes have no effect. This pin also receives the 5V/12V programming supply voltage (VPP) during FLASH programming.

11. XTAL1 and XTAL2 (Pin-18 and Pin-19) Crystal1: Input to the inverting oscillator amplifier and input to the internal clock generator circuits. Chapter2: Output from the inverting oscillator amplifier


XTAL1 and XTAL2 are the input and output, respectively, of an Inverting amplifier. The pins can be configured for use a an On-chip oscillator. To drive the device from an external clock source, XTAL1 should be driven while XTAL2 is left unconnected. There are no requirements on the duty cycle of the external clock signal, because the input to the internal clock circuitry is through a divideby-two flip-flop. However, minimum and maximum high and low times specified in the data sheet must be observed.


A reset is accomplished by holding the RST pin high for at least two machine cycles (24 oscillator periods), while the oscillator is running.To insure a

good power-on reset, the RST pin must be high long enough to allow the oscillator time to start up (normally a few milliseconds) plus two machine cycles. At power-on, the voltage on VCC and RST must come up at the same time for a proper start-up. Ports 1, 2, and 3 will asynchronously be driven to their reset condition when a voltage above VIH1 (min.) is applied to RST. The value on the EA pin is latched when RST is deasserted and has no further effect.


The A (Accumulator) is the versatile of the two CPU registers and is used for many operations, including addition, subtraction, division, integer multiplication and Boolean bit manipulations. The A register is also used for data transfers between the 8051 and any external memory.

B Register: The B register is used during multiply and divide operations. For other instructions it can be treated as another scratch pad register.

Program Status Word The PSW register contains program status information as detailed in Table below: The PSW consists of math flags, user program flag F0, and the register bank

select bits that identify which of the four general register banks is currently in use by the program.

Stack Pointer

The Stack Pointer register is 8 bits wide. It is incremented before data is stored during PUSH and CALL executions. While the stack may reside anywhere in on-chip RAM, the Stack Pointer is initialized to 07H after a reset. This causes the stack to begin at locations 08H.

Data Pointer

The Data Pointer (DPTR) consists of a high byte (DPH) and a low byte (DPL). Its intended function is to hold a 16-bit address. It may be manipulated as a 16-bit register or as two independent 8-bit registers.

Serial Data Buffer

The Serial Buffer is actually two separate registers, a transmit buffer and a receive buffer. When data is moved to SBUF, it goes to the transmit buffer and is held for serial transmission. (Moving a byte to SBUF is what initiates the transmission.) When data is moved from SBUF, it comes from the receive buffer.

Timer Registers

Register pairs (TH0, TL0), and (TH1, TL1) are the 16-bit Counting registers for Timer/Counters 0 and 1, respectively. Control Register

Special Function Registers IP, IE, TMOD, TCON, SCON, and PCON contain control and status bits for the interrupt system, the Timer/Counters, and the serial port. They are described in later sections.

Timers And Counters

Timer 0 and Timer 1 The Timer or Counter function is selected by control bits C/T in the Special Function Register TMOD. These two Timer/Counters have four operating modes, which are selected by bit-pairs (M1, M0). In TMOD. Modes 0, 1, and 2 are the same for both Timers/Counters. Mode 3 is different. The four operating modes are described in the following text:

Mode 0:

Timer, which is an 8-bit Counter with a divide-by-32 pre scalar. The Mode

0 operation as it applies to Timer 1. In this mode, the Timer register is configured as a 13-bit register. As the count rolls over from all 1s to all 0s, it sets the Timer interrupt flag TF1. The counted input is enabled to the Timer when TR1 = 1 and either GATE = 0 or INT1 = 1. (Setting GATE = 1 allows the Timer to be controlled by Putting either Timer into Mode 0 makes it look like an 8048 external input INT1, to facilitate pulse width measurements). TR1 is a control bit in the Special Function Register TCON (Figure 3). GATE is in TMOD.

The 13-bit register consists of all 8 bits of TH1 and the lower 5 bits of TL1. The upper 3 bits of TL1 are indeterminate and should be ignored. Setting the run flag (TR1) does not clear the registers. Mode 0 operation is the same for the Timer 0 as for Timer 1. Substitute TR0, TF0, and INT0 for the corresponding Timer 1 signals in Figure 2. There are two different GATE bits, one for Timer 1 (TMOD.7) and one for Timer 0 (TMOD.3). Mode 1: Mode 1 is the same as Mode 0, except that the Timer register is being run with all 16 bits.

Mode 2:

Mode 2 configures the Timer register as an 8-bit Counter (TL1) with automatic reload, as shown in Figure 4. Overflow from TL1 not only sets TF1, but also reloads TL1 with the contents of TH1, which is preset by software. The

reload leaves TH1 unchanged. Timer/Counter 0.

Mode 2 operations are the same for

Mode 3: Timer 1 in Mode 3 simply holds its count. The effect is the same as setting TR1 = 0. Timer 0 in Mode 3 establishes TL0 and TH0 as two separate counters. The logic for Mode 3 on Timer 0 is shown in Figure 5. TL0 uses the Timer 0 control bits: C/T, GATE, TR0, and TF0, as well as the INT0 pin. TH0 is locked into a timer function (counting machine cycles) and takes over the use of TR1 and TF1 from Timer 1. Thus, TH0 now controls the Timer 1 interrupt. Mode 3 is provided for applications requiring an extra 8-bit timer on the counter. With Timer 0 in Mode 3, an 80C51 can look like it has three Timer/Counters. When Timer 0 is in Mode 3, Timer 1 can be turned on and off by switching it out of and into its own Mode 3, or can still be used by the serial port as a baud rate generator, or in fact, in any application not requiring an interrupt.

TCON and TMOD are the two registers used for setting the above modes. The format of these registers is as shown in figure: TMOD is dedicated solely to the timers and can be considered to be two duplicate 4-bit registers, each of which controls the action of one of the timers. TCON has control bits and flags for the timers in the upper nibble, and control bits and flags for the external interrupts in the lower nibble.

2.4 Criteria for choosing 89c51Microcontroller

1. The first and foremost criterion in choosing a microcontroller is that it must meet the task at hand efficiently and cost effectively. In our project we have chosen an 8-bit microcontroller, which can handle the computing needs of the task most effectively. 2. 3. The highest speed this microcontroller can support is 12MHZ To fulfill our requirements in terms of space, assembling, we have

chosen the 40-pin DIP. 4. To support the memory requirement we have chosen it as it includes 4K ROM and 128byte RAM. 5. As there are 32 I/O pins and 2 timers, it supports our input-output requirement greatly. 6. We have used the battery power product like an RTC the power consumption is critical for it. 7. In choosing this controller we have considered the availability of an assembler, debugger, simulator etc. 8. The ready availability in needed quantities both now and in the future. Currently, of the leading 8-bit microcontrollers, the 8051 family has the largest number of diversified suppliers.


A reed switch consists of a sealed glass tube containing a pair of ferrous metal contacts. When a magnetic field comes close to the reed switch, the two contacts come together enabling a current to pass through the switch. Most commonly reed switches are used in burglar alarm systems in which they act as window and door sensors.

Reed switches have many uses in renewable energy generation, particularly with DIY wind turbines. For example a reed switch within a simple electric circuit can be used to count revolutions of the wind turbine for analysis purposes (tachometer). Find out more about reed switch wind turbine RPM meters using a calculator or pedometer here. The reed switch is an electrical switch operated by an applied magnetic field. It was invented at Bell Telephone Laboratories in 1936 by W. B. Ellwood. It consists of a pair of contacts on ferrous metal reeds in a hermetically sealed glass envelope. The contacts may be normally open, closing when a magnetic field is present, or normally closed and opening when a magnetic field is applied. The switch may be actuated by a coil, making a reed relay,[1] or by bringing a magnet near to the switch. Once the magnet is pulled away from the switch, the reed switch will go back to its original position.

An example of a reed switch's application is to detect the opening of a door, when used as a proximity switch for a burglar alarm.

The reed switch contains a pair (or more) of magnetizable, flexible, metal reeds whose end portions are separated by a small gap when the switch is open. The reeds are hermetically sealed in opposite ends of a tubular glass envelope.

Reed switch diagrams from Ellwood's patent, U.S. Patent 2,264,746, Electromagnetic switch A magnetic field (from an electromagnet or a permanent magnet) will cause the reeds to come together, thus completing an electrical circuit. The stiffness of the reeds causes them to separate, and open the circuit, when the

magnetic field ceases. Another configuration contains a non-ferrous normallyclosed contact that opens when the ferrous normally-open contact closes. Good electrical contact is assured by plating a thin layer of non-ferrous precious metal over the flat contact portions of the reeds; low-resistivity silver is more suitable than corrosion-resistant gold in the sealed envelope. There are also versions of reed switches with mercury "wetted" contacts. Such switches must be mounted in a particular orientation otherwise drops of mercury may bridge the contacts even when not activated. Since the contacts of the reed switch are sealed away from the atmosphere, they are protected against atmospheric corrosion. The hermetic sealing of a reed switch make them suitable for use in explosive atmospheres where tiny sparks from conventional switches would constitute a hazard. One important quality of the switch is its sensitivity, the amount of magnetic field necessary to actuate it. Sensitivity is measured in units of Ampereturns, corresponding to the current in a coil multiplied by the number of turns. Typical pull-in sensitivities for commercial devices are in the 10 to 60 AT range. The lower the AT, the more sensitive the reed switch. Also, smaller reed switches, which have smaller parts, are more sensitive to magnetic fields, so the smaller the reed switch's glass envelope is, the more sensitive it is. In production, a metal reed is inserted in each end of a glass tube and the end of the tube heated so that it seals around a shank portion on the reed. Infrared-absorbing glass is used, so an infrared heat source can concentrate the heat in the small sealing zone of the glass tube. The thermal coefficient of expansion of the glass material and metal parts must be similar to prevent breaking the glass-to-metal seal. The glass used must have a high electrical resistance and must not contain volatile components such as lead oxide and

fluorides. The leads of the switch must be handled carefully to prevent breaking the glass envelope.

Reed relays
One or more reed switches inside a coil is a reed relay. Reed relays are used when operating currents are relatively low, and offer high operating speed, good performance with very small currents which are not reliably switched by conventional contacts, high reliability and long life. Millions of reed relays were used in mid-20th Century telephone exchanges. In particular they were used for switching in the British TXE family of telephone exchanges. The inert atmosphere around the reed contacts ensures that oxidation will not affect the contact resistance. Mercury-wetted reed relays are sometimes used, especially in highspeed counting circuits. Reliability is compromised by contacts sticking closed either from residual magnetism or welding.

Magnetic sensors
In addition to their use in reed relays, reed switches are widely used for electrical circuit control, particularly in the communications field. Reed switches actuated by magnets are commonly used in mechanical systems as proximity sensors. Examples are door and window sensors in burglar alarm systems and tamper proofing methods (however they can be disabled by a strong, external magnetic field). Reed switches are used in modern laptops to put the laptop on sleep/hibernation mode when the lid is closed. Speed sensors on bicycle wheels and car gears use a reed switch to actuate briefly each time a magnet on the wheel passes the sensor. Reed switches were formerly used in the keyboards for computer terminals, where each key had a magnet and a reed switch actuated by depressing the key; cheaper switches are now used. Electric and electronic pedal keyboards used by pipe organ and Hammond organ players

often use reed switches, where the glass enclosure of the contacts protects them from dirt, dust, and other particles. Further reading Reed switches are very similar to relays, except a permanent magnet is used instead of a wire coil. When the magnet is far away the switch is open, but when the magnet is brought near the switch is closed as shown in See Reed Switch. These are very inexpensive an can be purchased for a few dollars. They are commonly used for safety screens and doors because they are harder to trick than other sensors.


The Reed Switch was first invented by Bell Labs in the late 1930s. However, it was not until the 1940s when it began to find application widely as a sensor and a Reed Relay. Here it was used in an assortment of stepping/switching applications, early electronic equipment and test equipment. In the late 1940s Western Electric began using Reed Relays in their central office telephone switching stations, where they are still used in some areas today. The Reed Switch greatly contributed to the development of telecommunications technology.

Over the years several manufacturers have come and gone, some staying longer than they should have, tainting the marketplace with poor quality, and poor reliability. However, most of the manufacturers of Reed Switches today produce very high quality and very reliable switches. This has given rise to unprecedented growth. Today Reed Switch technology is used in all market segments including: test and measurement equipment, medical electronics, Telecom, automotive, security, appliances, general purpose, etc. Its growth rate is stronger than ever, where the world output cannot stay abreast with demand. As a technology, the Reed Switch is unique. Being hermetically sealed, it can exist or be used in almost any environment. Very simple in its structure, it crosses many technologies in its manufacture. Critical to its quality and reliability is its glass to metal hermetic seal, where the glass and metal used must have exact linear thermal coefficients of expansion. Otherwise, cracking and poor seals will result. Whether sputtered or plated, the process of applying the contact material, usually Rhodium or Ruthenium, must be carried out precisely in ultra clean environments similar to semiconductor technology. Like semiconductors, any foreign particles present in the manufacture will give rise to losses, quality and reliability problems.

Over the years, the Reed Switch has shrunk in size from approximately 50 mm (2 inches) to 6 mm (0.24 inches). These smaller sizes have opened up many more applications particularly in RF and fast time domain requirements. Reed Switch Features: 1. Ability to switch up to 10,000 Volts 2. Ability to switch currents up to 5 Amps

3. Ability to switch or carry as low as 10 nanoVolts without signal loss 4. Ability to switch or carry as low as 1 femptoAmp without signal loss 5. Ability to switch or carry up to 7 GigaHertz with minimal signal loss 6. Isolation across the contacts up to 1015 W 7. Contact resistance (on resistance) typical 50 milliOhms (mW) 8. In its off state it requires no power or circuitry 9. Ability to offer a latching feature 10.Operate time in the 100 ms to 300 ms range 11. 12. Ability to operate over extreme temperature ranges from oC to 200 oC Ability to operate in all types of environments including air, water, vacuum,

oil, fuels, and dust laden atmospheres 13.Ability to withstand shocks up to 200 Gs 14.Ability to withstand vibration environments of 50 Hz to 2000 Hz at up to 30 Gs 15.Long life. With no wearing parts, load switching under 5 Volts at 10 mA, will operate well into the billions of operations



The applications and advantages of infrared sensors are plenty; mostly these devices are utilized for various types of security systems by implementing

proximity detection theme. Other important applications are for counting objects, or counting revolutions of a rotating object. In any concept, the proximity detection package contains two devices, namely infrared light emitting diode (IR LED) and infrared light/signal detector (IR sensor). The IR LED is always ON, meaning that this device is constantly emitting light and the sensor is detecting this light. The sensors can be interfaced with trigger circuit to generate logic high/low pulses depending up on the interruptions created by any object. This design of the circuit is suitable many applications. However this design is more power consuming and is not optimized for high ranges, in this design, range can be from 1 to 10 cm, depending on the ambient light conditions.

The following are the few applications: Proximity sensor:

Generally proximity sensors are used for counting the objects or for counting the revolutions of a low speed running motor. These sensor packages are readily available in the market; each package contains IR LED and IR sensor. Different sensors are available to suit the requirement, the main criteria is range, as the range increases power consumption of the device also increases. Battery operated sensors range is very less, often less then 10 centi-meters. This type of sensors can be used for constructing the digital tacho meters. This sensor can be used for most indoor applications where no important ambient light is present. For simplicity, this sensor doesn't provide ambient light immunity. However, this sensor can be used to measure the speed of object moving at a very high speed, like in industry or in tachometers. In such applications, ambient light ignoring sensor, which rely on sending 40 KHz pulsed signals cannot be used because there are time gaps between the pulses where the sensor is 'blind'.

Object detection using IR light:

The solution proposed doesn't contain any special components, like photodiodes, phototransistors, or IR receiver ICs, only a couple if IR leds, an Op amp, a transistor and a couple of resistors. In need, as the title says, a standard IR led is used for the purpose of detection. Due to that fact, the circuit is extremely simple, and any novice electronics hobbyist can easily understand and build it. To prove the concept practically, as shown in the figure, we required 2 simple IR LEDs, and they must be arranged side by side to pick-up the reflected IR light. For detecting the reflected IR light, a very simple technique is used by using another IR-LED, to detect the IR light that was emitted from another led of the same type. This is an electrical property of Light Emitting Diodes (LEDs), which is the fact that a led produces a voltage difference across its leads when it is subjected to light. As per the following figure, the infrared signal delivered from one LED hits the object and it is reflected, another infrared LED detects the reflected signal. The signal strength depends up on the current that is passing through the infrared LED; signal strength can be defined as radiating power, which is measured in mill watts. The range is depends up on the signal strength.

The infrared signal detector circuit is designed with Op-Amp (operational Amplifier), which can detect very small voltage changes also accurately. Two different designs are proposed, each one of them is more suitable for different applications. The main difference between the 2 designs is the way infra-red (IR) light is sent on the object. The receiver part of the circuit is exactly the same in both designs. Both the circuits sender and receiver can be constructed on the same board. In other concept, the receiver can be kept parallel to the transmitter. The IR leds encapsulated to protect them from ambient light, this kind of encapsulation was totally sufficient to overcome all noise due to ambient light for indoor applications.

Wheel Encoder:
The wheel encoder can be used many applications, it can be used as

revolutions counter, running speed can be displayed, and distance traveled also can be displayed. To achieve this, the wheel must be arranged with block and white stripes. This is a simple wheel encoder based on the idea that white stripes will reflect IR light, while black ones will absorb it, this will result in a series of electrical pulses as the wheel is rotating, providing the micro controller with precious information that can be used to calculate displacement, velocity or even acceleration. It is now clear that this kind of sensor has to be Always ON, to detect every single white stripe passing in front of it, to achieve accurate results.

Contact-Less tachometer:
This is a tachometer that counts the revolutions per minute of a rotating object, given that the object has a reflective stripe glued on it that will pass in front of the IR sensor for each and every revolution, giving a pulse per revolution. Again a micro controller will have to be used to 'understand' the data provided by

the sensor and display it. Many commercial contact-less tachometers are designed with infrared sensors because of their cost effective ness.

Contact less obstacle detection:

In this design, which is oriented to obstacle detection in robots, our primary target is to reach high ranges, from 25 to 35 cm, depending on ambient light conditions. Increasing the current flowing in the led extends the range of the sensor. This is a delicate task, as we need to send pulses of IR instead of constant IR emission. The duty cycle of the pulses turning the LED ON and OFF have to be calculated with precision, so that the average current flowing into the LED never exceeds the LED's maximum DC current (or 10mA as a standard safe value).

Basics of IR transmitter
Infra red transmitter emits IR rays in planar wave front manner. Even though infrared rays spread in all directions, it propagates along straight line in forward direction. IR rays have the characteristics of producing secondary wavelets when it collides with any obstacles in its path. This property of IR is discussed here.

When IR rays gets emitted from LED, it moves in the direction it is angled. When any obstacle interferes in the path, the IR rays get cut and it produces secondary wavelets which propagates mostly in return direction or in a direction opposite to that of the primary waves, which produces the net result like reflection of IR rays.

Basics of IR receiver:
Infrared photo receiver is a two terminal PN junction device, which operates in a reverse bias. It has a small transparent window, which allows light to strike the PN junction. A photodiode is a type of photo detector capable of converting light into either current or voltage, depending upon the mode of operation. Most photodiodes will look similar to a light emitting diode. They will have two leads, or wires, coming from the bottom. The shorter end of the two is the cathode, while the longer end is the anode. A photodiode consists of PN junction or PIN structure. When a photon of sufficient energy strikes the diode, it excites an electron thereby creating a mobile electron and a positively charged electron hole. If the absorption occurs in the junction's depletion region, or one diffusion length away from it, these carriers are swept from the junction by the built-in field of the depletion region. Thus holes move toward the anode, and electrons toward the cathode, and a photocurrent is produced.

Use of Infrared Detectors Basics

IR emitter and IR phototransistor An infrared emitter is an LED made from gallium arsenide, which emits near-infrared energy at about 880nm. The infrared phototransistor acts as a transistor with the base voltage determined by the amount of light hitting the transistor. Hence it acts as a variable current source. Greater amount of IR light cause greater current to flow through the collector-emitter leads. As shown in the diagram below, the phototransistor is wired in a similar configuration to the voltage divider. The variable current traveling through the resistor causes a voltage drop in the pullup resistor. This voltage is measured as the output of the device

IR reflectance sensors contain a matched infrared transmitter and infrared receiver pair. These devices work by measuring the amount of light that is reflected into the receiver. Because the receiver also responds to ambient light, the device works best when well shielded from ambient light, and when the distance between the sensor and the reflective surface is small (less than 5mm). IR reflectance sensors are often used to detect white and black surfaces. White surfaces generally reflect well, while black surfaces reflect poorly. One of such applications is the line follower of a robot.

Schematic Diagram for a Single Pair of Infrared Transmitter and Receiver

Description of operation of a typical circuit

If the emitter and detector (phototransistor) are not blocked, then the output on pin 2 of the 74LS14 will be high (apx. 5 Volts). When they are blocked, then the output will be low (apx. 0 Volts). The 74LS14 is a Schmitt triggered hex inverter.

Remote control application

A remote control is an electronic device used for the remote operation of a machine. The term remote control can be also referred to as "remote" or "controller" when abbreviated. It is known by many other names as well, such as clicker. Commonly, remote controls are Consumer IR devices used to issue commands from a distance to televisions or other consumer electronics such as stereo systems and DVD players. Remote controls for these devices are usually small wireless handheld objects with an array of buttons for adjusting various settings such as television channel, track number, and volume. In fact, for the majority of modern devices with this kind of control, the remote contains all the function controls while the controlled device itself only has a handful of essential primary controls. Most of these remotes communicate to their

respective devices via infrared (IR) signals and a few via radio signals. They are usually powered by small AAA or AA size batteries. Infrared Radiation Infrared radiation is electromagnetic radiation whose wavelength is longer than that of visible light, but shorter than that of terahertz radiation and microwaves. The name means "below red" (from the Latin infra, "below"), red being the color of visible light with the longest wavelength. Infrared radiation has wavelengths between about 750 nm and 1 mm, spanning three orders of magnitude. Humans at normal body temperature can radiate at a wavelength of 10 micrometers. Infrared imaging is used extensively for both military and civilian purposes. Military applications include target acquisition, surveillance, night vision, and homing and tracking. Non-military uses include thermal efficiency analysis, remote temperature sensing, short-ranged wireless communication, spectroscopy, and weather forecasting. Infrared astronomy uses sensor-equipped telescopes to penetrate dusty regions of space, such as molecular clouds; detect cool objects such as planets, and to view highly redshifted objects from the early days of the universe. At the atomic level, infrared energy elicits vibration modes in a molecule through a change in the dipole moment, making it a useful frequency range for study of these energy states. Infrared spectroscopy examines absorption and transmission of photons in the infrared energy range, based on their frequency and intensity. Objects generally emit infrared radiation across a spectrum of wavelengths, but only a specific region of the spectrum is of interest because sensors are usually designed only to collect radiation within a specific bandwidth. As a result, the infrared band is often subdivided into smaller sections. The boundary between visible and infrared light is not precisely defined. The human eye is markedly less sensitive to light above 700 nm wavelength, so shorter frequencies make insignificant contributions to scenes illuminated by

common light sources. But particularly intense light (e.g., from lasers, or from bright daylight with the visible light removed by colored gels) can be detected up to approximately 780 nm, and will be perceived as red light. The onset of infrared is defined (according to different standards) at various values typically between 700 to 800 nm. Infrared radiation is popularly known as "heat" or sometimes "heat radiation", since many people attribute all radiant heating to infrared light and/or to all infrared radiation to being a result of heating. This is a widespread misconception, since light and electromagnetic waves of any frequency will heat surfaces that absorb them. Infrared light from the Sun only accounts for 49% of the heating of the Earth, with the rest being caused by visible light that is absorbed then re-radiated at longer wavelengths. Visible light or ultravioletemitting lasers can char paper and incandescently hot objects emit visible radiation. It is true that objects at room temperature will emit radiation mostly concentrated in the 8 to 12 micrometer band, but this is not distinct from the emission of visible light by incandescent objects and ultraviolet by even hotter objects.

Whenever a robotics hobbyist talk about making a robot, the first thing comes to his mind is making the robot move on the ground. And there are always two options in front of the designer whether to use a DC motor or a stepper motor. When it comes to speed, weight, size, and cost... DC motors are always preferred over stepper motors. There are many things, which we can do with DC motor when interfaced with a micro controller. For example we can control the speed of motor, we can control the direction of rotation, we can also do encoding of the rotation made by DC motor i.e. keeping track of how many turns are made by the motors etc. So we can see DC motors are better then stepper motors. In this part of tutorial we will learn to interface a DC motor with a micro controller. Usually H-bridge is preferred way of interfacing a DC motor. These days many IC manufacturers have H-bridge motor drivers available in the market like L293D is most used H-Bridge driver IC. H-bridge can also be made with the help of transistors and MOSFETS etc. rather of being cheap, they only increase the size of the design board, which is some times not required so using a small 16 pin IC is preferred for this purpose. L293D is having two H Bridges inside, so that we can drive two DC motors simultaneously. Before discussing about this device, first we must learn basic theory of H Bridges. The following is the description.

Basic Theory

Let's start with the name, H-bridge. Sometimes called a "full bridge" the H-bridge is so named because it has four switching elements at the "corners" of the H and the motor forms the cross bar. The basic bridge is shown in the figure above. The key fact to note is that there are, in theory, four switching elements within the bridge. These four elements are often called, high side left, high side right, low side right, and low side left (when traversing in clockwise order). The switches are turned on in pairs, either high left and lower right, or lower left and high right, but never both switches on the same "side" of the bridge. If both switches on one side of a bridge are turned on it creates a short circuit between the battery plus and battery minus terminals. If the bridge is sufficiently powerful it will absorb that load and your batteries will simply drain quickly. Usually however the switches in question melt. To power the motor, turn on two switches that are diagonally opposed. The current flows and the motor begin to turn in a "positive" direction. Switch off

these two switches and switch on other two switches diagonally in other direction then the motor starts rotating in opposite direction. Actually it is quite simple, the tricky part comes in when we decide what to use for switches. Anything that can carry a current will work, from four SPST switches, one DPDT switch, relays, transistors, to enhancement mode power MOSFETS. One more topic in the basic theory section is quadrants. If each switch can be controlled independently then we can do some interesting things with the bridge, some folks call such a bridge a "four quadrant device" (4QD). If we built it out of a single DPDT relay, we can really only control forward or reverse. We can build a small truth table that tells us for each of the switch's states, what the bridge will do. As each switch has one of two states, and there are four switches, there are 16 possible states. However, since any state that turns both switches on one side on is "bad", there are in fact only four useful states (the four quadrants) where the transistors are turned on.

High Side Left High Side Right Low Side Left Low Side Right Quadrant Description On Off On Off Off On On Off Off On Off On On Off Off On Forward Running Backward Running Braking Braking

In the above table the last two rows describes condition about short circuit the motor that causes the motors generator effect to work against it. The turning motor generates a voltage, which tries to force the motor to turn the opposite direction. This causes the motor to rapidly stop spinning and is called "braking" on a lot of H-bridge designs. Of course there is also the state where

all the transistors are turned off. In this case the motor coasts freely if it was spinning and does nothing if it was doing nothing. 1. Using Relays:

A simple implementation of a H Bridge using four SPST relays is shown. Terminal A is High Side Left, Terminal B is High Side Right, Terminal C is Low Side Left and Terminal D is Low Side Right. The logic followed is according to the table above. Warning: Never turn on A and C or B and D at the same time. This will lead to a short circuit of the battery and will lead to failure of the relays due to the large current.


Using Transistors: We can better control our motor by using transistors or Field Effect

Transistors (FETs). Most of what we have discussed about the relays H-Bridge

is true of these circuits. See the diagram showing how they are connected. We should add diodes across the transistors to catch the back voltage that is generated by the motor's coil when the power is switched on and off. This fly back voltage can be many times higher than the supply voltage. Don't turn on A and C or B and D at the same time.

Transistors, being a semiconductor device, will have some resistance, which causes them to get hot when conducting much current. This is called not being able to sink or source very much power, i.e.: Not able to provide much current from ground or from plus voltage. MOSFETs are much more efficient, they can provide much more current and not get as hot. They usually have the fly back diodes built in so we don't need the diodes anymore. This helps guard against fly back voltage frying our ICs. To use MOSFETs in an H-Bridge, we need P-Channel MOSFETs on top because they can "source" power and N-Channel MOSFETs on the bottom because they can "sink" power. It is important that the four quadrants of the HBridge circuits be turned on and off properly. When there is a path between the positive and groundside of the H-Bridge, other than through the motor, a condition exists called "shoot through". This is basically a direct short of the

power supply and can cause semiconductors to become ballistic, in circuits with large currents flowing. There are H-bridge chips available that are much easier, and safer, to use than designing our own H-Bridge circuit.

L293D Dual H-Bridge Motor Driver

L293D is a dual H-Bridge motor driver, so with one IC we can interface two DC motors, which can be controlled in both clockwise and counter clockwise directions. Since the device is having four half H Bridges, there by if required four motors can be driven through this single device, moreover the task is to run all four motors in one direction only. L293D has output current of 600mA and peak output current of 1.2A per channel. Moreover for protection of circuit from back EMF output diodes are included within the IC. The output supply (VCC2) has a wide range from 4.5V to 36V, which has made L293D a best choice for DC motor driver. In this IC there are two different power supplies (Vcc1 and Vcc2). Vcc1 is for logic input circuit while Vcc2 is supply for the output circuit. This means that we should apply about 5V to Vcc1 and whatever voltage required by the motor (up to 36V max for this IC) to Vcc2. Each Half H-Bridge has an individual Ground. So we must ground the terminal corresponding to the Half H-Bridge, depending up on the circuit design, if required all four terminals of bridges can be connected to the ground. Each Half H-Bridge has an Input (A) and output (Y). Also there are enable pins to turn on the Half H-Bridges. Once a Half H-bridge is enabled, then the truth table is as follows: INPUT A OUTPUT Y



So we just give a High level when we want to turn the Half H-Bridge on and Low level when we want to turn it off. When the Half H-Bridge is on, the voltage at the output is equal to Vcc2. If we want to make a Full H-Bridge, we must connect the motor (or the load) between the outputs of two Half H-Bridges and the inputs will be the two inputs of the Half H-Bridges. Suppose we have connected Half H-Bridges 1 and 2 to form a Full HBridge. Now the truth table is as follows: INPUT INPUT OUTPUT OUTPUT 1A L L H H 2A L H L H 1Y L L H H 2Y L H L H


Braking (both terminals of motor are Gnd) Forward Running Backward Running Braking (both terminals of motor at Vcc2)


Permanent magnet DC motor responds to both voltage and current. The steady state voltage across a motor determines the motors running speed, and the current through its armature windings determines the torque. Apply a voltage and the motor will start running in one direction; reverse the polarity and the direction will be reversed. If you apply a load to the motor shaft, it will draw more current, if the power supply does not able to provide enough current, the voltage will drop and the speed of the motor will be reduced. However, if the power supply can maintain voltage while supplying the current, the motor will run at the same speed. In general, you can control the speed by applying the appropriate voltage, while torque is controlled by current. In most cases, DC motors are powered up by using fixed DC power supply, therefore; it is more efficient to use a chopping circuit.

Consider what happens when a voltage applied to a motors windings is rapidly turned ON and OFF in such a way that the frequency of the pulses produced remains constant, but the width of the ON pulse is varied. This is known as Pulse Width Modulation (PWM). Current only flows through the motor during the ON portion of the PWM waveform. If the frequency of the PWM input is high enough, the mechanical inertia of the motor cannot react to the ripple wave; instead, the motor behaves as if the current were the DC average of the ripple wave. Therefore, by changing the width of pulse, we can control the motor speed.

At the most basic level, electric motors exist to convert electrical energy into mechanical energy. This is done by way of two interacting magnetic fields -one stationary, and another attached to a part that can move. A number of types of electric motors exist, but most BEAM bots use DC motors in some form or another. DC motors have the potential for very high torque capabilities (although this is generally a function of the physical size of the motor), are easy to miniaturize, and can be "throttled" via adjusting their supply voltage. DC motors are also not only the simplest, but the oldest electric motors.

The basic principles of electromagnetic induction were discovered in the early 1800's by Oersted, Gauss, and Faraday. By 1820, Hans Christian Oersted and Andre Marie Ampere had discovered that an electric current produces a magnetic field. The next 15 years saw a flurry of cross-Atlantic experimentation and innovation, leading finally to a simple DC rotary motor. A number of men were involved in the work, so proper credit for the first DC motor is really a function of just how broadly you choose to define the word "motor

Principles of operation

In any electric motor, operation is based on simple electromagnetism. A current-carrying conductor generates a magnetic field; when this is then placed in an external magnetic field, it will experience a force proportional to the current in the conductor, and to the strength of the external magnetic field. As you are well aware of from playing with magnets as a kid, opposite (North and South) polarities attract, while like polarities (North and North, South and South) repel. The internal configuration of a DC motor is designed to harness the magnetic interaction

between a current-carrying conductor and an external magnetic field to generate rotational motion.

Let's start by looking at a simple 2-pole DC electric motor (here dark black represents a magnet or winding with a "North" polarization, while light colour represents a magnet or winding with a "South" polarization).

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field magnets, and brushes. In most common DC motors, the external magnetic field is produced by high-strength permanent magnets. The stator is the stationary part of the motor -- this includes the motor casing, as well

as two or more permanent magnet pole pieces. The rotor (together with the axle and attached commutator) rotates with respect to the stator. The rotor consists of windings (generally on a core), the windings being electrically connected to the commutator. The above diagram shows a common motor layout -- with the rotor inside the stator (field) magnets.

The geometry of the brushes, commutator contacts, and rotor windings are such that when power is applied, the polarities of the energized winding and the stator magnet(s) are misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the next winding. Given our example two-pole motor, the rotation reverses the direction of current through the rotor winding, leading to a "flip" of the rotor's magnetic field, driving it to continue rotating.

In real life, though, DC motors will always have more than two poles (three is a very common number). In particular, this avoids "dead spots" in the commutator. You can imagine how with our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole motor, there is a moment where the commutator shorts out the power supply (i.e., both brushes touch both commutator contacts simultaneously). This would be bad for the power supply, waste energy, and damage motor components as well. Yet another disadvantage of such a simple motor is that it would exhibit a high amount of torque "ripple" (the amount of torque it could produce is cyclic with the position of the rotor).


The Electronic Hardware like ICs and other important Electrical components like magnetic sensors, IR sensors & DC motor used in this project work are procured from the Hyderabad Electronics Market. Required PCB (printed circuit board) is designed and fabricated at Kushaiguda industrial estate, this estate is very familiar for fabricating the PCB. The data sheets of ICs are gathered from websites. The following are the important components details, and their data sheets are provided in this chapter.

1 89C51 ATMEL Microcontroller 2 LM 567 Tone Decoder cum Generator 3 L293D Quadruple Half-H Drivers 3 Voltage Regulator 4 BC547 NPN Transistor

Conclusions And References
Motorists expend substantial amount of time to find parking spaces for their vehicles in huge lots of busy cities. Manual operation of ticket dispensing in the parking lots consumes few moments. The approach of the problem employing Systems Engineering Process techniques reduces development risk and cost by thorough preparation, planning and execution. All the phases are incorporated with the systems design practice to explore all the best possibilities to get right direction in building the complete parking information system. Providing the parking space availability information to the motorists through the parking information systems saves significant wait time. Even pollution, congestion, and energy are indirectly spared. Thus, upgrading the existing system with these information systems or building the new one would not only help the drivers to save parking search time but also generates more revenue to the parking lot owners, who could receive more customers in the result of their advanced parking facilities.

9.1 Recommendations and Implications: These type of parking information system can be easily integrated with other parking information system in the city and the motorists can be directed to go the nearest free parking lot if the lot he/she entering is full. Motorists can be given the free parking spaces availability details while he/she is on the road using Variable Message Signs (VMS) with

the help of Intelligent Transportation System (ITS), so that they could choose the parking lot on their convenience. These systems can be implemented by any kind of parking lot operators and easily transferable.

(1) Mechatronics Electronic Control Systems in Mechanical and electrical Engineering By: W. Bolton (2) Electronic Circuit guide book Sensors By JOSEPH J.CARR (3) The 8051 Micro-controller Architecture, programming & Applications By: Kenneth J. Ayala (4) Practical transistor circuit design and analysis By: GERALD E. WILLIAMS (5) Robotic Engineering An Integrated Approach By: Richard D. Klafter, Thomas A. Chmiclewski, Michael Negin (6) Programming and Customizing the 8051 Micro-controller By: Myke Predko (7) The concepts and Features of Micro-controllers - By: Raj Kamal (8) Digital Electronics. (9). Electronics for you (11). Elector India (10). Practical Electronics By JOSEPH J.CARR Monthly Magazine