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

CONTENTS

CHAPTTER
1. 2. 3. 4.
5.

TITLED
Introduction Project Description Circuit Diagram Component List Circuit Description Component Description Microcontroller Program PCB Construction Data Sheets Bibliography

6. 7. 8. 9. 10.

Chapter-one Introduction

INTRODUCTION

As we all know that day by demand of electricity is going to be increased because of growing population, urbanization and industrialization. Increasing global warming is also one reason behind growing demand of electricity. So its become necessity to save and consume electricity strictly as per need. Side by side we should also try to find out some non conventional sources of energy like sun. Often we see that street lights are unnecessary on even when vehicles or pedestrians are on road or not. unnecessary wasted. Our project is one step in this regard. In this project we have tried to Show a technique to use electricity as per need. The reason behind doing this project is that so many times and so many places we see that electricity is unnecessary wasted even when there is no need for it. So a huge amount of electricity is

PROJECT DESCRIPTION

This is a microcontroller based project in which we have used 89c51 microcontroller. We use two infra red sensors to check the movement of vehicle. When first infra red sensor is on then lights are on and when second sensor is interrupt then lights are off.

BLOCK DIAGRAM

SMART HIGHWAY LIGHT SYSTEM

CIRCUIT DESCRIPTION In this project we use 89CC51 controller, family member of the 8051 family. Supply voltage of the microcontroller is 5 volt dc. For this purpose we convert the battery voltage into 5 volt dc with the help of the 5 volt regulator circuit. For this purpose we use ic 7805 regulator to regulate the high voltage into 5 volt dc. One capacitor is ground from the regulator for filtration. Capacitor reduces the noise. Output of the regulator is connected to the pin no 40 of the controller directly. One crystal is connected to the pin no 18 and 19 of the controller to provide an oscillation signal. For this purpose we use 12 Mhz crystal. Two capacitors are grounded from the crystal to reduce the noise. In this project we use two logics. One is light sensitive logic and second is road sensor logic. When sensor is in dark then all the lights are on and when sensor is in light then all the lights are off. This is done by the light sensor (LDR). LDR is a light dependent resistor, when light fall on the ldr then ldr offers a low resistance and when ldr is in dark then ldr offers a high resistance. Here in this project we use the ldr with

npn transistor circuit. Emitter of the npn transistor is connected to the ground and collector is connected to the pin no 3 of the controller.

When ldr is in light then there is low positive on the base of the npn transistor and collector is become more negative. When LDR is in dark then there is no base voltage and hence collector becomes more positive. Microcontroller sense this change of voltage and switch on the output led whish is connected to the port 0. Output leds are connected with the port 0 through the resistance in series, here in this we use 6 l.e.d. Common point of the l.e.d is connected with the positive line. Out of 6 only three l.e.ds are on. Our second part of this project is infra red sensor. In this logic when any car cross the first IR sensor then all the led are on and if the traffic continuous then led are on if the no car on the road then again three led are on and three are off. For this purpose we use two IR sensor circuit with this project. Here in this project we use infra red sensor and one photodiode circuit. when light fall on the photo sensor then resistance of photo sensor become low and hence negative voltage is applied to the controller, when any car cross

the photodiode and then photo diode resistance become high and hence signal is change on the pin no 2 of the controller. As the controller sense this change of signal on pin then all the light are on.

COMPONENTS LIST
1. 89S51 MICROCONTROLLER 2. PHOTODIODE( 2)5MM INFRA RED LED (2) 5MM 3. 7805 REGULATOR ( 5 VOLT) 4. CRYSTAL ( 12 MHZ) CONNECTED TO PIN NO 18 AND 19 5. 27 PF ( 2_) GROUNDED FROM CRYSTAL 6. RESISTANCE: 10K OHM (3) 470 OHM(2) 270 OHM (6) 1 K OHM (1) 7. LDR FOR AUTOMATIC STREET LIGHT 8. NPN BC 548 FOR LDR SWITCHING 9. GENERAL PURPOSE PCB 10. 12 VOLT DYANMO

11. 6 VOLT CHARGEBALE BATTERY 13. CHANGOVER SWITCH 14. L.E.D ( 6 ) FOR STREET LI

CIRCUIT DIAGRAM

COMPONENT DESCRIPTION MICROCONTROLLER AT89C51


Architecture of 8051 family:-

The figure 1 above shows the basic architecture of 8051 family of microcontroller.

Features Compatible with MCS-51 Products 4K Bytes of In-System Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles Fully Static Operation: 0 Hz to 24 MHz Three-Level Program Memory Lock 128 x 8-Bit Internal RAM 32 Programmable I/O Lines Two 16-Bit Timer/Counters Six Interrupt Sources Programmable Serial Channel Low Power Idle and Power Down Modes Description The AT89C51 is a low-power, high-performance CMOS 8-bit

microcomputer with 4K bytes of Flash Programmable and Erasable Read Only Memory (PEROM). The device is manufactured using Atmels high density nonvolatile memory technology and is compatible with the industry standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. The AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O

lines, two 16-bit timer/counters, five vector two-level interrupt architecture, a full duplex serial port, and on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset. Pin Description VCC Supply voltage. GND Ground. Port 0 Port 0 is an 8-bit open drain bi-directional I/O port. As an output port each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pull-ups are required during program verification.

Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and verification. Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data 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 uses 8-bit addresses (MOVX @ RI); Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs.

As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89C51 as listed below: Port 3 also receives some control signals for Flash programming and verification. RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN Program Store Enable is the read strobe to external program memory. Port Pin Alternate Functions P3.0 RXD (serial input port)

P3.1 TXD (serial output port) P3.2 INT0 (external interrupt 0) P3.3 INT1 (external interrupt 1) P3.4 T0 (timer 0 external input) P3.5 T1 (timer 1 external input) P3.6 WR (external data memory write strobe) P3.7 RD (external data memory read strobe) When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12volt VPP. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier.

Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.

DYNAMO

A dynamo, originally another name for an electrical generator now means a generator that produces direct current with the use of a commutator. Dynamos were the first electrical generators capable of delivering power for industry, and the foundation upon which many other later electric-power conversion devices were based, including the electric motor, the alternatingcurrent alternator, and the rotary converter. They are rarely used for power generation now because of the dominance of alternating current, the disadvantages of the commutator, and the ease of converting alternating to direct current using solid state methods. The word still has some regional usage as a replacement for the word generator. A small electrical generator built into the hub of a bicycle wheel to power lights is called a hub dynamo, although these are invariably AC devices. Photodiode A photodiode is a type of photo detector capable of converting light into either current or voltage, depending upon the mode of operation. Photodiodes are similar to regular semiconductor diode diodes except that they may be either exposed (to detect vacuum UV or X-rays) or packaged with a window or optical fiber connection to allow light to reach the sensitive part of the device. Many diodes designed for use specifically as a photodiode will also use a PIN junction rather than the typical pn junction. Principle of operation A photodiode is a 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. Photovoltaic mode When used in zero bias or photovoltaic mode, the flow of photocurrent out of the device is restricted and a voltage builds up. The diode becomes forward biased and "dark current" begins to flow across the junction in the direction opposite to the photocurrent. This mode is responsible for the photovoltaic effect, which is the basis for solar cellsin fact, a solar cell is just a large area photodiode. Photoconductive mode In this mode the diode is often reverse biased, dramatically reducing the response time at the expense of increased noise. This increases the width of the depletion layer, which decreases the junction's capacitance resulting in faster response times. The reverse bias induces only a small amount of current (known as saturation or back current) along its direction while the photocurrent remains virtually the same. The photocurrent is linearly proportional to the illuminance. Although this mode is faster, the photoconductive mode tends to exhibit more electronic noise.[citation needed] The leakage current of a good PIN diode is so low (< 1nA) that the JohnsonNyquist noise of the load resistance in a typical circuit often dominates.

LDR LDRs or Light Dependent Resistors are very useful especially in light/dark sensor circuits. Normally the resistance of an LDR is very high, sometimes as high as 1000 000 ohms, but when they are illuminated with light resistance drops dramatically. When the light level is low the resistance of the LDR is high. This prevents current from flowing to the base of the transistors. Consequently the LED does not light. However, when light shines onto the LDR its resistance falls and current flows into the base of the first transistor and then the second transistor. The LED lights. The preset resistor can be turned up or down to increase or decrease resistance, in this way it can make the circuit more or less sensitive.

P.C.B CONSTRUCTION
Layout of desired circuit diagram and preparation is first and most important operation in any printed circuit board manufacturing process. First of all layout of component side is to be made in accordance with available components dimensions. The following points are to be observed while forming the layout of P.C.B: 1. 2. Between two components, sufficient space should be maintained. High wattage/max, dissipated components should be mounted at a sufficient capacitors. 3. The most important point is that the components layout is making proper compromisation with copper side circuit layout. Printed circuit board (P.C.Bs) is used to avoid most or all the disadvantages of conventional breadboard. These also avoid the use to thin wired for connecting (the components they are small in size and efficient in performance) the two most popular boards are widely used for generalpurpose application where the cost is to be low and the layout is simple. 1. PREPARING CIRCUIT LAYOUT: First of all the actual size circuit layout is to be drawn on the copper side of the copper clad board. Then enamel paint is applied on the tracks of connection with the help of a sharp brush. We have to apply the paints distance from semiconductors and electrolytic

surrounding the point at which the connections are to be made. It avoids the disconnection between the leg of the component and circuit track. After completion of painting work, it is allowed to dry. 2. DRILLING: After completion of painting work, holes of 1/32 inch (1mm) diameter are drilled at desired points where we have to fix the components. 3. ETCHING: The removal of excess of copper on the plate apart from the printed circuit is known as etching. For this process the copper clad board with printed circuit is placed in the solutions of FeCl3 (Ferric Chloride) with 3-4 drop of HCl in it and is kept so far about 2 hrs. and is taken out when all the excess copper is removed from the P.C.B. after away from dry acidic profile which may cause poor performance of the circuit. After the P.C.B has been thoroughly washed paint is removed by soft piece of cloth dipped in thinner or turpentine. The P.C.B is checked as per the layout. Now the P.C.B is ready for use. SOLDERING: Soldering is the process of joining two metallic conductors, the joint where the two metal conductors are to be joined or fused is heated with a device called soldering iron and then as alloy of tin and lead called solder is applied which melts and covers the joint. The solder cools and solidifies quickly to ensure a good and durable connection between the joined metals covering the joint with solder also prevents oxidation.

HOW TO SOLDER: A good soldering practice is very important for assembling for any electronic circuit. A poorly soldered joint or connections in electronic circuit is the cause of most services problem. Given below are some importation steps to be followed in good and correct soldering practice.

1. Use of correct type of soldering iron and solder. Avoid the use of excessive flux. 2. Keep the soldering iron hot during the working period and let it reset on its stand when not in use. 3. All components leads and wires should be thoroughly cleaned to remove dust and rust before soldering. 4. Enough heat is applied to the joint so that the solder metal flows freely overt the join. 5. Over heating of components in P.C.B is avoided. Overheating may result in damage of components or P.C.Bs 6. Too much solder is not used to avoid short circuits between conduction paths on a P.C.B.

DATA SHEET

89C51 7805

BIBLIOGRAPHY
Multiman Halkias - Integrated Electronics Modem Electric Instrumentation, Auther Albert D. Cooper, PHI.

S. C. See, (PHI), Digital Circuits and Logic Design. The 8051 microcontroller, by Mazidi Microcontroller by Aylar

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