Sie sind auf Seite 1von 67

PROJECT ON STREET LIGHT CONTROL SYSTEM: BSc III YEAR

19

TH

(AFFILIATED TO BANGALORE UNIVERSITY) MAIN, 17th B CROSS, Sector-IV, HSR layout, Bangalore560102 DEPARTMENT OF COMPUTER SCIENCE PROJECT REPORT ON STREETLIGHT CONTROL SYSTEM Submitted in Practical Fulfillment of the Requirements for

the degree Of BACHELOR OF COMPUTER SCIENCE Submitted by Maheshraj (10RNS75060) UNDER THE GUIDANCE OF Mrs.Gayathri Sudheer (Associate Professor)

THE OXFORD COLLEGE OF SCIENCE BENGALURU

(AFFILIATED TO BANGALORE UNIVERSITY) 19TH MAIN, 17TH B CROSS, Sector-IV, HSR layout, Bangalore560102 CERTIFICATE This is to certify that the project work entitled STREETLIGHT CONTROL SYSTEM has been successfully carried out by Maheshraj (10RNS75060) student of 6th semester B.Sc, submitted in the partial fulfillment of requirements prescribed by the Bangalore University for BACHELOR OF COMPUTER SCIENCE course during the year 2012-2013 Under The Guidance Of Department Mrs.Gayathri Mrs.Gayathri Sudheer (Associate Professor) Electronics) the Examiner Date: 1) . Head of the

Sudheer (Department of Signature of

2) .

ABSTRACT
This project aims at designing and executing the advanced development in embedded systems for energy saving of street lights with 8051 Microcontroller, light depending resistor and IR sensor. Now a days, human has become too busy and he is unable to find time even to switch OFF the lights wherever not necessary. This can be seen more effectively in the case of street lights. The present system of the project is like,only 50% of the street lights will be switched ON alternatively in the evening during sun sets using LDR.There will be an alternate light system, whenever the vehicle passes on the road it will be detected by IR sensor and 50% of alternate switched off lights will be switched ON, and the same lights will be switched OFF alternatively after the vehicles passes away. On the next day morning after there is sufficient sun light on the roads the 50% lights which are switched ON will be switched OFF automatically using LDR. With this, the power

will be saved up to some extent. This project gives the best solution for saving 10% to90% of electricity.

CONTENTS
1.INTRODUCTION
Aim Objectives Motivations Overview

2.THEORITICAL BACKGROUND 3.PROJECT DESRCIPTION


Block Diagram Circuit Diagram Flowchart Components

4.DESIGN PROCEDURE 5.FABRICATION 6.TESTING AND EVALUATION 7.CONCLUSION AND SCOPE OF FUTURE WORK 8.REFRENCES

CHAPTER-1
4

Introduction
1.1 AIM: The main aim of Automation of street light control system is: To result in economy of operation. Elimination of human error. We know that the demand of electricity is very high than demand in our country so, Automatic street light monitoring and control is to save electricity. To save electricity which is very important for human life.

1.2 LEARNING OBJECTIVES:

Development

on

MIC-89C51:

This

contains

an

automatic movement that can save human errors.


5

Implementation of important subjects of engineering studies such as Embedded Systems, Control Systems, and Machines etc. to the fullest. 1.3 MOTIVATION: The main consideration in the present field technologies are Automation, Power consumption and cost effectiveness. Automation is intended to reduce man power with the help of intelligent systems. Power saving is the main consideration forever as the source of the power(Thermal, Hydro, Electric etc.,)are getting diminished due to various reasons. The main aim of the project is Automation of street power saving system with LDR & IR sensor, this is to save the power. We want to save power automatically instead of doing manual. So its easy to make cost effectiveness. This saved power can be used in some other cases. So in villages, towns etc we can design intelligent system for the usage of street lights. 1.4 OVERVIEW:

An automatic control system is an arrangement of physical components connected in such a manner so as to direct or regular itself or some another system i.e. some controlled condition forming part of the system is maintained in a prescribed manner. Automatic control system have influenced the current way of life. In recent year automatic control systems have been rapidly increasing importance in all fields of engineering. Its application covers a very wide range from design of precision control devices to design of massive equipments used for manufacture of steel and other industries.

CHAPTER-2
Theoretical background
Why we are choosing a Microcontroller?

As it provides on chip microprocessor, RAM, ROM, Parallel I/O port, Serial I/O port etc. hence its cost is less, size is less, power consumption is less and speed is more. Software upgrade development tools like assembler, C

compilers etc are easily available and are easy to

History of the Microcontroller Introduction


A microcontroller (also MCU or C) is a computer on a chip. It is a type of microprocessor emphasizing high integration, low power consumption, self-sufficiency and cost-effectiveness, in contrast to a general-purpose microprocessor (the kind used in a PC). In addition to the usual arithmetic and logic elements of a general purpose microprocessor, the microcontroller typically integrates additional elements such as read-write memory for data storage, read-only memory, such as flash for code storage, EEPROM for permanent data storage, peripheral devices, and input/output interfaces. At clock speeds of as little as a
8

few MHz or even lower, microcontrollers often operate at very low speed compared to modern day microprocessors, but this is adequate for typical applications. They consume relatively little power (milliwatts), and will generally have the ability to sleep while waiting for an interesting peripheral event such as a button press to wake them up again to do something. Power consumption while sleeping may be just nanowatts, making them ideal for low power and long lasting battery applications. Microcontrollers control are frequently used in automatically machines,

controlled products and devices, such as automobile engine systems, remote controls, office appliances, power tools, and toys. By reducing the size, cost, and power consumption compared to a design using a separate devices, microprocessor, microcontrollers memory, make it and input/output to economical

electronically control many more processes.

Microcontrollers v/s.Microprocessors

MICROPROCESSORS A microprocessor: single-chip contained only CPU bus is available RAM capacity, num of port is selectable RAM is larger than ROM (usually) Microprocessor of I/O devices are in suitable to control designs requiring a minimum

MICROCONTROLLERS A microcontroller single-chip CPU, contained ROM, RAM,

Peripherals, I/O port Communicate by port internal fixed ROM is larger than are in RAM (usually) Microcontrollers information computer systems. suitable to processing hardware is

10

component

Microcontroller for Embedded Systems


In the literature discussing microcontrollers, we often see the term Embedded System. Microcontrollers are widely used in Embedded System products. An Embedded product uses a microcontroller to do one task and one task only. In an Embedded System there is only one application software that is typically burned into ROM and X-86 PC contains or is connected to various Embedded products such as keyboard, printer, modem, disk controller, sound card, CD-ROM driver, mouse and so on. Each one of theses

11

peripherals has a microcontroller inside it that performs only one task. .

Why use 8 bit microcontroller


The following features of 8- bit microcontrollers make it useful to be used for IC testing. Low cost. Low power consumption High speed perform Represent a transition zone between dedicated, highvolume, 4-bit microcontrollers and the high performance 16 bit microcontrollers. Bit addressing used for test pin monitoring or program control flags. 8 bit word size adequate for many computing tasks and control or monitoring applications

12

89c51 4K Bytes of In-System Reprogrammable Flash Memory 128 x 8-bit Internal RAM Two 16-bit Timer/Counters Six Interrupt Sources

Pin Configuration
13

14

PIN DIAGRAM DESCRIPTION

Vcc

Supply Voltage

GND

Ground

Port 0

Port 0 is an 8-bit open drain bidirectional 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 can also be configured to be the multiplexed loworder 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
15

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 pullups. 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. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) Table. Port 1 also receives the low-order address bytes during Flash programming and verification. and the timer/counter 2 trigger input

(P1.1/T2EX), respectively, as shown in the following

16

Table I. Alternate Functions of Port 1

Port 2

Port 2 is an 8-bit bidirectional I/O port with internal pullups. 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

17

(MOVX @ DPTR). In this application, Port 2 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 pullups. 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 receives some control signals for Flash

programming and verification.

18

Port 3 also serves the functions of various special features of the AT89S52, as shown in the following Table.

Table II. Alternate Functions of Port 3

RST (Reset input)

A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives high for 98 oscillator periods after the Watchdog times out. The DISRTO Bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled.

19

ALE/PROG

Address Latch Enable is an 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 (PSEN) is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two
20

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. XTAL 1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit

XTAL 2 Output from the inverting oscillator amplifier.

21

Special Function Register


A map of the on-chip memory area called the Special Function Register (SFR) space is shown in Table I Note that not all of the addresses are occupied, and unoccupied addresses may not be implemented on the chip. Read accesses to these addresses will in general return random data, and write accesses will have an indeterminate effect.

ARCHIECTURE 8951

22

User software should not write 1s to these unlisted locations, since they may be used in future products to
23

invoke new features. In that case, the reset or inactive values of the new bits will always be 0.

Timer 2 Registers: Control and status bits are contained in registers T2CON (shown in Table II) and T2MOD for Timer 2. The register pair (RCAP2H, RCAP2L) is the Capture/Reload registers for Timer 2 in 16-bit capture mode or 16-bit auto-reload mode. Interrupt Registers: The individual interrupt enable bits are in the IE register. Two priorities can be set for each of the six interrupt sources in the IP register.

Dual Data Pointer Registers: To facilitate accessing both internal and external data memory, two banks of 16-bit Data Pointer Registers are provided: DP0 at SFR address locations 82H-83H and DP1 at 84H-85H. Bit DPS = 0 in SFR AUXR1 selects DP0 and DPS
24

= 1 selects DP1. The user should ALWAYS initialize the DPS bit to the appropriate value before accessing the respective Data Pointer Register. Power off Flag: The Power off Flag (POF) is located at bit 4 (PCON.4) in the PCON SFR. POF is set to 1 during power up. It can be set and rest under software control and is not affected by reset.

Memory Organization
MCS-51 devices have a separate address space for Program and Data Memory. Up to 64K bytes each of external Program and Data Memory can be addressed.
Program Memory

If the EA pin is connected to GND, all program fetches are directed to external memory.
25

On the AT89S52, if EA is connected to VCC, program fetches to addresses 0000H through 1FFFH are directed to internal memory and fetches to addresses 2000H through FFFFH are to external memory.
Data Memory

The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a parallel address space to the Special Function Registers. This means that the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space. When an instruction accesses an internal location above address 7FH, the address mode used in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space. Instructions which use direct addressing access the SFR space. For example, the following direct addressing instruction accesses the SFR at location 0A0H (which is P2). MOV 0A0H, #data

26

Instructions that use indirect addressing access the upper 128 bytes of RAM. For example, the following indirect addressing instruction, where R0 contains 0A0H, accesses the data byte at address 0A0H, rather than P2 (whose address is 0A0H).

MOV @R0, #data Note that stack operations are examples of indirect addressing, so the upper 128 bytes of data RAM is available as stack space.

Oscillator Characteristics

XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that can be configured for use as an on-chip oscillator, as shown in Figure. 2.1Either 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.2. There are no requirements on the duty cycle of the external

27

clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low-time specifications must be observed.

Figure 2.1 Oscillator Connections Configuration

Figure 2.2

External Clock

Drive

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

28

special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. Note that when idle mode is terminated by a hardware reset, the device normally resumes program execution from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when idle mode is terminated by a reset, the instruction following the one that invokes idle mode should not write to a port pin or to external memory.

Power-down Mode
In the Power-down mode, the oscillator is stopped, and the instruction that invokes Power-down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the Power-down mode is terminated. Exit from Power-down mode can be initiated

29

either by a hardware reset or by an enabled external interrupt. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.

8051 INSTRUCTIONS
SINGLE BIT INSTRUCTIONS;

30

SETB CLR BIT CPL BIT

BIT

SET THE BIT =1 CLEAR THE BIT =0 COMPLIMENT THE BIT 0 =1, 1=0 JUMP TO TARGET IF BIT =1 JUMP TO TARGET IF BIT =0 JUMP TO TARGET IF BIT =1 & THE

JB BIT, TARGET JNB BIT, TARGET JBC BIT, TARGET

1.1MOV INSTRUCTIONS:- MOV instruction simply copy the data from one location to another location.

1.2MOV D,S ; Copy the data from(S) source to D(destination) MOV R0,A ; Copy contents of A into Register R0 MOV R1,A ; Copy contents of A into register R1 MOV A,R3 ; Copy contents of Register R3 into Accumulator.

31

DIRECT LOADING THROUGH MOV MOV A,#23H ; Direct load the value of 23H in A MOV R0,#12H ; direct load the value of 12H in R0 MOV R5,#0F9H ; Load the F9 value in the Register R5

ADD INSTRUCTIONS ADD instruction adds the source byte to the accumulator (A) and place the result in the Accumulator. ADD A,#42H ; By this instructions we add the value 42H in Accumulator. ADD A,R3 ; By this instructions we move the data from register r3 to accumulator and then add the contents of the register into accumulator . SUBROUTINE CALL FUNCTION
32

1.2.1.1 ACALL, TARGET ADDRESS ; By this instructions we call subroutines with a target address within 2k bytes from the current program counter.

ACALL is a limit for the 2 k byte program counter, but for upto 64k byte we use LCALL instructions. Note that LCALL is a 3 byte instruction. ACALL is a two byte instruction. AJMP stands for absolute jump. It transfers program execution to the target address unconditionally. The target address for this instruction must be within 2k byte of program memory. LJMP is also for absolute jump. It transfers program execution to the target address unconditionally. This is a 3 byte instructions LJMP jump to any address within 64 k byte location.

33

INSTRUCTIONS RELATED TO THE CARRY 1.3 JC TARGET; JUMP TO THE TARGET IF CY FLAG =1 1.4 JNC TARGET; JUMP TO THE TARGET ADDRESS IF CY FLAG IS = 0 2 3 INSTRUCTIONS RELASTED TO JUMP WITH ACCUMULATOR 3.1.1.1.1 JZ TARGET; JUMP TO TARGET IF A = 0

3.1.1.1.1.1.1 JNZ TARGET; JUMP IF ACCUMULATOR IS NOT ZERO. 3.1.1.1.1.1.2 This instruction jumps if register A has a value other than zero

3.1.1.1.2

INSTRUCTIONS RELATED TO THE ROTATE RL A; ROTATE LEFT THE ACCUMULATOR

3.1.1.1.2.1.1.1

By this instruction we rotate the bits of A left. The bits rotated out of A are rotated back into A at the opposite end. 3.1.1.1.3 RR A:- By this instruction we rotate the

contents of the accumulator from right to left from LSB to MSB.

34

3.1.1.1.4

RRC A: - This is same as RR A but difference

is that the bit rotated out of register first enters in to carry and then enter into MSB. 3.1.1.1.5 LSB. 3.1.1.1.6 RET:- This is return from subroutine. This RLC A:- ROTATE A LEFT THROUGH CARRY.

This shifts the data from MSB to carry and carry to

instruction is used to return from a subroutine previously entered by instructions LCALL and ACALL. 3.1.1.1.7 RET1:- This is used at the end of an interrupt

service routine. We use this instruction after interrupt routine.

PUSH:- This copies the indicated byte onto the stack and increments SP. This instruction supports only direct addressing mode. POP; POP FROM STACK. This copies the byte pointed to be SP to the location whose direct address is indicated, and decrements SP by 1. Notice that this instructions supports only direct addressing mode. DPTR INSTRUCTIONS

35

MOV DPTR,#16 BIT VALUE; LOAD DATA POINTER This instructions load the 16 bit DPTR register with a 16 bit immediate value 3.1.1.1.8 INC BYTE:-

This instruction adds 1 to the register or memory location specified by the operand. INC A INC Rn INC DIRECT 3.1.1.1.9 DEC BYTE :-

This instruction subtracts 1 from the byte operand. Note that CY is unchanged. DEC A DEC Rn DEC DIRECT

DESCRIPTION OF PROJECT
BLOCK DIAGRAM

36

Light sensor (LDR)

8 0 5 1

street light LEDs

IR sensor

5V power supply using 7805


Description.
7805 is a 5V fixed three terminal positive voltage regulator IC .The IC has features such as safe operating area protection,thermal shut down, internal current limiting which makes the IC very rugged.Out out currents up to 1A can be drawn from the IC provided that there is a proper heat sink.A 9V transformer steps down the main voltage ,

37

1A bridge rectifies it and capacitor C1 filters it and 7805 regulates it to produce a steady 5V DC .

Circuit diagram.

Power Supplies:
Types of Power Supply

There are many types of power supply. Most are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronics circuits and other devices. A power supply can by broken down into a series of blocks, each of which performs a particular function. For example a 5V regulated supply:

38

Each of the blocks is described in more detail below:

Transformer - steps down high voltage AC mains to low voltage AC. Rectifier - converts AC to DC, but the DC output is varying. Smoothing - smooths the DC from varying greatly to a small ripple. Regulator - eliminates ripple by setting DC output to a fixed voltage.

Circuit Diagram

39

FLOW CHART

Initialize ports

40

Object detected?

NO

YES
Is it night?

NO

Components
Regulator:

Switch on Light For 30 seconds

YES

The regulator (7805) provides circuit designers with an easy way to regulate DC voltages to 5v. Here 78 stands for positive and 05 stands for 5 volts. The 7805 is a positive voltage DC regulator that has only 3 terminals. They are: Input voltage, Ground, Output Voltage.

41

General Features: Output Current up to 1A Short Circuit Protection Thermal Overload Protection

Capacitors:

capacitor

or

condenser

is

passive

electronic

component consisting of a pair of conductors separated by a dielectric. When a voltage potential difference exists between the conductors, an electric field is present in the dielectric. This field stores energy and produces a mechanical force between the plates. In this circuit our capacitor is used to remove ripples. In this we have used both electrolytic and ceramic capacitor of various ratings.

Resistors:

42

A resistor is a two-terminal electronic component that produces a voltage across its terminals that is proportional to the electric current through it in accordance with Ohm's law. Resistors of various ratings are used in this circuit. Resistance is used in front of led to drop the voltage from 5v which is coming from microcontroller to 3v which is required by the led to glow.

Microcontroller:

The 89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 8K bytes of Flash Programmable and Erasable Read Only Memory (PEROM).

43

LEDs:

A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices, and are increasingly used for lighting. In this we are using leds to show the level of water in tank.

Transistors:

In this we have used NPN and PNP transistors. NPN transistor will be used to turn the motor on and PNP to convert negative voltage to positive voltage.

Crystal oscillator:

44

A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time to provide a stable clock signal for digital integrated circuits

Transformer:

45

Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC.

Transformer circuit symbol

Transformer

Step-up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains voltage (230V in UK) to a safer low voltage. The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils, instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core.

46

Transformers waste very little power so the power out is (almost) equal to the power in. Note that as voltage is stepped down current is stepped up.

LDR:

47

Light

Dependent is

Resistor it also called

is as

passive

light

transducer. it intensity.

photo-conductive

cell because its conductivity changes due to change in light

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 a light level of 1000 Lux (bright light) is directed towards it, the resistance is 400r (ohms). When a light level of 10 Lux (very low light level) is directed towards it, the resistance has risen dramatically to 10.43m (10430000 ohms). Basic principle when light falls on it its resistance decreases and when it is dark its resistance is maximum. the change in

48

resistance is directly proportional to intensity of light falling on it. construction it is made up of photo sensitive material like cadmium sulphide (cds), selenium (se), cadmium selenide (cdse) or lead sulphide (pbs). it is deposited on insulating surface like ceramic substrate in the form of zigzag wire as shown in following figure. it is enclosed in round metallic or plastic case and two electrodes are taken out for external connections. the structure is covered with glass sheet to protect it from moisture and dust and allows only light to fall on it.

Constructional diagram of LDR Applications 1. It is used in burglar alarm to give alarming sound when a burglar invades sensitive premises. 2. It is used in street light control to switch on the lights during dusk (evening) and switch off during dawn (morning) automatically. 3. It is used in Lux meter to measure intensity of light in Lux.
49

4. It is used in photo sensitive relay circuit

IR-SENSORS:

Infrared Radiation Infrared radiation exists in the electromagnetic spectrum at a wavelength that is longer than visible light. It cannot be seen but it can be detected. Objects that generate heat also generate infrared radiation and those objects include animals and the human body whose radiation is strongest at a wavelength of 9.4um. Infrared in this range will not pass through many types of material that pass visible light such as ordinary window glass and plastic. However it will pass through, with some attenuation, material that is opaque to visible light such as germanium and silicon. An unprocessed silicon wafer makes a good IR window in a weatherproof enclosure for outdoor use. It also provides additional filtering for light in the visible

50

range. 9.4um infrared will also pass through polyethylene which is usually used to make Fresnel lenses to focus the infarared onto sensor elements. Pyroelectric Sensors The pyroelectric sensor is made of a crystalline material that generates a surface electric charge when exposed to heat in the form of infrared radiation. When the amount of radiation striking the crystal changes, the amount of charge also changes and can then be measured with a sensitive FET device built into the sensor. The sensor elements are sensitive to radiation over a wide range so a filter window is added to the TO5 package to limit detectable radiation to the 8 to 14mm range which is most sensitive to human body radiation. Typically, the FET source terminal pin 2 connects through a pulldown resistor of about 100 K to ground and feeds into a two stage amplifier having signal conditioning circuits. The amplifier is typically bandwidth limited to below 10Hz to reject high frequency noise and is followed by a window comparator that responds to both the positive and negative transitions of the sensor output signal. A well filtered power source of from 3 to 15 volts should be connected to the FET drain terminal pin 1.

51

The PIR325 sensor has two sensing elements connected in a voltage bucking configuration. This arrangement cancels signals caused by vibration, temperature changes and sunlight. A body passing in front of the sensor will activate first one and then the other element whereas other sources will affect both elements simultaneously and be cancelled. The radiation source must pass across the sensor in a horizontal direction when sensor pins 1 and 2 are on a horizontal plane so that the elements are sequentially exposed to the IR source. A focusing device is usually used in front of the sensor

52

The figure below shows the PIR325 electrical specifications and layout in its TO5 package. Note the wide viewing angle without an external lens.

53

54

This is a typical application circuit that drives a relay. R10 and C6 adjust the amount of time that RY1 remains energized after motion is detected.

Fresnel Lens A Fresnel lens (pronounced Frennel) is a Plano Convex lens that has been collapsed on itself to form a flat lens that retains its optical characteristics but is much smaller in thickness and therefore has less absorption losses.

55

Our FL65 Fresnel lens is made of an infrared transmitting material that has an IR transmission range of 8 to 14um which is most sensitive to human body radiation. It is designed to have its grooves facing the IR sensing element so that a smooth surface is presented to the subject side of the lens which is usually the outside of an enclosure that houses the sensor. The lens element is round with a diameter of 1 inch and has a flange that is 1.5 inches square. This flange is used for mounting the lens in a suitable frame or enclosure. Mounting can best and most easily be done with strips of Scotch tape. Silicone rubber can also be used if it overlaps the edges to form a captive mount. The FL65 has a focal length of 0.65 inches from the lens to the sensing element. It has been determined by experiment

56

to have a field of view of approximately 10 degrees when used with a PIR325 Pyroelectric sensor.

This relatively inexpensive and easy to use Pyroelectric Sensor and Fresnel Lens can be used in a variety of science projects, robots and other useful devices.

CHAPTER-4

57

DESIGN PROCEDURE
According to circuit diagram we have collected the components required in our project. Then we assembled those components on the pcb board according to circuit diagram. After the assembling of these components then we soldered those components on the pcb board. We made the hardware connections with the various components. Then we assembled the whole hardware on the plywood.

CHAPTER-5
FABRICATION TECHNIQUES

58

The fabrication techniques used in this project can be broadly classified into: Mechanical poles etc. Fabrication, consisting of

mechanical design i.e. board, street, light

Electrical Fabrication, consisting of electrical design i.e. making PCB, soldering etc.

Mechanical Fabrication

For the basic board we are using plywood cut out accordingly so as to adjust the PCB on the top, the transformer, street, LDR, IR sensor, LED poles.

Electrical Fabrication
1)Soldering

59

How to solder?
Mount components at their appropriate place; bend the leads slightly outwards to prevent them from falling out when the board is turned over for soldering. No cut the leads so that you may solder them easily. Apply a small amount of flux at these components leads with the help of a screwdriver. Now fix the bit or iron with a small amount of solder and flow freely at the point and the P.C.B copper track at the same time. A good solder joint will appear smooth & shiny. If all appear well, you may continue to the next solder connections.

Tips for good soldering


1. Use right type of soldering iron. A small efficient soldering iron (about 10-25 watts with 1/8 or 1/4 inch tip) is ideal for this work. 2. Keep the hot tip of the soldering iron on a piece of metal so that excess heat is dissipated. 3. Make sure that connection to the soldered is clean. Wax frayed insulation and other substances cause

60

poor soldering connection. Clean the leads, wires, tags etc. before soldering. 4. Use just enough solder to cover the lead to be soldered. Excess solder can cause a short circuit. 5. Use sufficient heat. This is the essence of good soldering. Apply enough heat to the component lead. You are not using enough heat, if the solder barely melts and forms a round ball of rough flaky solder. A good solder joint will look smooth, shining and spread type. The difference between good & bad soldering is just a few seconds extra with a hot iron applied firmly.

Precautions

1.

Mount the components at the appropriate places before soldering. Follow the circuit description and components details, leads identification etc. Do not start soldering before making it confirm that all the components are mounted at the right place.

2.

Do not use a spread solder on the board, it may cause short circuit.
61

3. 4.

Do not sit under the fan while soldering. Position the board so that gravity tends to keep the solder where you want it.

5.

Do not over heat the components at the board. Excess heat may damage the components or board.

6.

The board should not vibrate while soldering otherwise you have a dry or a cold joint.

CHAPTER-6

62

TESTING AND EVALUATION

All the components used in constructing the AUTOMATION OF STREET LIGHT CONTROLLER CIRCUIT came pre tested therefore the tests performed were done after the completion of the project. The following tests were performed:

Visual Observation
A visual observation of the AUTOMATION OF STREET LIGHT CONTROL SYSTEM CIRCUIT was conducted to look for any broken connection or any stray wire that can restrict for the ON & OFF function of lights or any other visible fault. No problem was found during this visual evaluation.

Operational Test
The circuit was operated and checked whether it is performing the desired operation. No problem was found during this test.

63

CHAPTER-7
CONCLUSION AND SCOPE OF FUTURE WORK

64

Automatic Street Light Control System is a simple and powerful concept, which uses transistor as a switch to switch ON and OFF the street light automatically. By using this system manual works are removed. It automatically switches ON lights when the sunlight goes below the visible region of our eyes. It automatically switches OFF lights under illumination by sunlight. This is done by a sensor called Light Dependant Resistor (LDR) which senses the light actually like our eyes. By using this system energy consumption is also reduced because now-a-days the manually operated street lights are not switched off properly even the sunlight comes and also not switched on earlier before sunset. In sunny and rainy days, ON time and OFF time differ significantly which is one of the major disadvantage of using timer circuits or manual operation. This project exploits the working of a transistor in saturation region and cut-off region to switch ON and switch OFF the lights at appropriate time with the help of an electromagnetically operated switch. Automatic Streetlight needs no manual operation of switching ON and OFF. The system itself detects whether there is need for light or not. When darkness rises to a certain value then automatically streetlight is switched ON and when there is other source of light, the street light gets
65

OFF. The extent of darkness at which the street light to be switched on can also be tailored using the potentiometer provided in the circuit.

CHAPTER-8
REFERENCES
Following are some internet sites, books, magazines taken as reference for this project

http://www. electronicsforu.com http://www.microcontrollerbooks.com www.8051projects.info/datasheets/BC548.pdf


66

http://www.electronic-circuitsdiagrams.com/alarmsimages/alarmsckt6.shtml www.electronicstutotials.com/oscillators/crysta l- oscillators.htm

Books:

Programming

and

Customizing

8051

Microcontroller by :Myke Predko The 8051/8052 Microcontroller by: Craig

Steiner Embedded Systems by Dr. K.V.K.K Prasad

The

8051

Microcontroller

Architecture

Programming and Applications by: Kenneth J. Ayala, West Publishing Company.

67

Das könnte Ihnen auch gefallen