Sei sulla pagina 1di 21

ABSTRACT

Infrared interruption counter is a reliable circuit that takes over the task of counting number of interruptions very accurately. When somebody enters into the room, then the Counter is Incremented by one. The total number of Persons inside the Room is displayed on the seven segment displays. The microcontroller does the above jo. It receives the signals from the sensors, and this signals operated under the control of software which is stored in ROM. All the above systems are controlled by the Microcontroller.

1. INTRODUCTION

The task of counting has always been a tedious one. Whether it is counting number of goods in a logistics supply, luggage at an airport or the number of people attending a particular event. Before the advent of the electronic age this task was done by humans manually. This resulted in lots of errors. With the advancement of technology, this task has been taken over by computers. Our project Bi-directional automatic counter is the basic version of the counter used at smart airports and logistics industries. In this device an infrared sensor is used to check the number of interruptions. As soon as the infrared system senses an obstruction, it is read by the microcontroller. The program burned on the microcontroller counts the total number of interruptions and thus total count is displayed on the seven segment display.

2|Page

2. COMPONENTS DESCRIPTION
2.1 IC AT89C51

FIG. 2.1 Pin diagram of IC AT89C2051

Description:
AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. AT89C51 has 4KB of Flash programmable and erasable read only memory (PEROM) and 128 bytes of RAM. It can be erased and program to a maximum of 1000 times.

In 40 pin AT89C51, there are four ports designated as P1, P2, P3 and P0. All these ports are 8-bit bi-directional ports, i.e., they can be used as both input and output ports. Except P0 which needs external pull-ups, rest of the ports have internal pull-ups. When 1s are written to these port pins, they are pulled high by the internal pull-ups and can be used as inputs. These ports are also bit addressable and so their bits can also be accessed individually.

Port P0 and P2 are also used to provide low byte and high byte addresses, respectively, when connected to an external memory. Port 3 has multiplexed pins for special functions like serial communication, hardware interrupts, timer inputs and read/write operation from external memory. AT89C51 has an inbuilt UART for serial communication. It can be programmed to

3|Page

operate at different baud rates. Including two timer & hardware interrupts, it has a total of six interrupts.

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

4|Page

2.2

Transistor BC547B

FIG. 2.2 Transistor BC547b

DESCRIPTION
BC547 is an NPN bi-polar junction transistor. A transistor, stands for transfer of resistance, is commonly used to amplify current. A small current at its base controls a larger current at collector & emitter terminals.

BC547 is mainly used for amplification and switching purposes. It has a maximum current gain of 800. Its equivalent transistors are BC548 and BC549.

The transistor terminals require a fixed DC voltage to operate in the desired region of its characteristic curves. This is known as the biasing. For amplification applications, the transistor is biased such that it is partly on for all input conditions. The input signal at base is amplified and taken at the emitter. BC547 is used in common emitter configuration for 5|Page

amplifiers. The voltage divider is the commonly used biasing mode. For switching applications, transistor is biased so that it remains fully on if there is a signal at its base. In the absence of base signal, it gets completely off.

6|Page

2.3

IC LM358

FIG. 2.3 PIN DIAGRAM OF IC LM358

DESCRIPTION
The LM358 consists of two independent, high gain,internally frequency compensated operational amplifiers which were designed specifically to operate from a singlepower supply over a wide range of voltages. Operation from split power supplies is also possible and the low power supply current drain is independent of the magnitude of the power supply voltage. Application areas include transducer amplifiers, dc gain blocks and all the conventional op amp circuits which now can be more easily implemented in single power supply systems. For example, the LM358 can be directly operated off of the standard +5V power supply voltage which is used in digital systems and will easily provide the required interface electronics without requiring the additional 15V power supplies.

7|Page

2.4 CRYSTAL Oscillator 12Mhz

FIG . 2.4.-CRYSTAL

A crystal oscillator is an electronic oscillator 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 (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits designed around them became known as "crystal oscillators." Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of megahertz. More than two billion (2109) crystals are manufactured annually. Most are small devices for consumer devices such as wristwatches, clocks, radios, computers, and cellphones. Quartz crystals are also found inside test and measurement equipment, such as counters, signal generators, and oscilloscopes.

8|Page

2.5 Seven Segment Display

Fig 2.5 A seven segment display is the most basic electronic display device that can display digits from 0-9. They find wide application in devices that display numeric information like digital clocks, radio, microwave ovens, electronic meters etc. The most common configuration has an array of eight LEDs arranged in a special pattern to display these digits. They are laid out as a squared-off figure 8. Every LED is assigned a name from 'a' to 'h' and is identified by its name. Seven LEDs 'a' to 'g' are used to display the numerals while eighth LED 'h' is used to display the dot/decimal.

A seven segment is generally available in ten pin package. While eight pins correspond to the eight LEDs, the remaining two pins (at middle) are common and internally shorted. These segments come in two configurations, namely, Common cathode (CC) and Common anode (CA). In CC configuration, the negative terminals of all LEDs are connected to the common pins. The common is connected to ground 9|Page

and a particular LED glows when its corresponding pin is given high. In CA arrangement, the common pin is given a high logic and the LED pins are given low to display a number.

10 | P a g e

3. CIRCUIT DIAGRAM & EXPLANATION

FIG. 3.1 CIRCUIT DIAGRAM OF DIGITAL CODE LOCK

11 | P a g e

In this circuit, two infrared (IR) sensor modules are used each for up and down counting, respectively. Whenever an interruption is observed by the first IR sensor, it increments the counter value. Similarly, when the second sensor detects an obstacle, the count is decremented. The count value is calculated depending upon the sensors input and is displayed on a set of four seven segment displays by using the concept of multiplexing (for concept of multiplexing refer seven segment multiplexing). The data pins of each 7-segment display are connected to port P2 of the microcontroller AT89C51. The first four pins of port P1 (P1^0P1^3) are connected to control pins to enable a particular 7-segment. P1^5 & P1^6 are configured as input pins at which the sensors are connected. The sensor inputs are defined as up and down selector modes for the counter in the code. Each time the first sensor is blocked, it gives a high signal at P1^5 and the count value gets incremented. The value gets decremented when P1^6, connected to second sensor, gives high input. At each step, the value of the counter is sent to be displayed on the segments.

12 | P a g e

4. SOFTWARE USED

4.1 DIPTRACE
DipTrace is a complete PCB Design system. It includes four programs: 1. PCB Layout - PCB design with easy to use manual routing tools and autorouter. 2. Schematic - creates schematic and exports netlist to PCB. 3. ComEdit - pattern editor. 4. SchemEdit - component editor. Draw parts and attach patterns to them. DipTrace provides the following features: Easy to learn user interface - To design a schematic, simply select and place components onto your document and connect them together using the wire and bus tools. Multisheet design is supported. Then select the menu option 'Switch to Board' to convert the schematic to PCB. Layout can be updated from Schematic in a few clicks at anytime. When you create or edit design objects they are highlighted to improve your work. Step-by-step tutorial available from web-site guides you through the design process and allows to get started with ease. Easy to use manual and powerful automatic routing DipTrace PCB software includes 2 automatic routers which is able to route complex multi-layer boards as well as simple singlelayer layouts. Intelligent manual routing tools allow you to create and edit traces by 90, 45 degree or without any limitations. Through, blind or buried vias can be used in automatic and manual routing. Unlimited board size is supported. Shape-based copper pour - powerful copper pour system can help to reduce your manufacturing costs by minimizing the amount of etching solution required. To use it, all you have to do is insert a copper area on your board in the PCB Layout program and any pad or trace inside the selected area will be automatically surrounded with a gap of the desired size. Using copper pour you can also create planes and connect them to pads and vias (different thermal types are supported).

13 | P a g e

5. CIRCUIT DIAGRAM IN DIPTRACE &TRACK


Layer 1:

Solder Side View Of Layer 1:

14 | P a g e

Layer 2:

Solder Side View Of Layer 1:

15 | P a g e

6. PRINTED CIRCUIT BOARD


P.C.B. Construction
A Printed Circuit Board (P.C.B.) can be defined as an insulating base material to which is permanently attached a flat metallic network of conducting paths whose dimension depends upon the current that can be handled by them. The P.C.B. may be either single sided or double sided. The P.C.B. used for this project is single sided one.

Board Design:
PCB designing is the most important and requires great care during work. In this case great care must be taken while tracing the circuit or layout on the board. Because once PCB is designed, it is virtually impossible to alter it. While designing a circuit, designer should take care to avoid crossing of conducting paths (tracks) as possible. Crossovers are unavoidable then only of the jumper can be used. A circuit board carrying copper on both sides can also help to solve this problem when circuit is complicated.

P.C.B. Making: Planning the circuit:


Though this is not particularly difficult, there are several important factors that need not be taken into account. If the finished device is to work properly we must consider gain factor and ensure that the input and output parts are sufficiently well isolated to avoid the possibility. We must also ensure that conductors and components carrying high frequency current are well separated from these parts of the circuits. We are also to make sure that all components need to return to earth are properly connected and that possibility of common impedance arising in earth returned. Circuit is totally eliminated by making all earth as substantial as possible consistent with nature of design. Other factors that have to successfully studied include availability of adequate return points on board and its mounting from accessibility of switch connections made for mechanical fixing ventilation effect of vibration. 16 | P a g e

Cleaning the board:


The copper side of the board must be thoroughly cleaned before Circuit plan is transferred to it. This is very important because even slightest trace of graze (from figure of instance) will impure the etching process and when the circuit plan has been neatly transferred to copper in this manner the board is held under, running tap and the allowed to dry before resist is applied.

Transforming the plan:


Now, once cleaning is done plan has to transfer on copper surface of PCB material.A convenient way to do this is simply put a carbon paper between a copper surface of the board and working plan and carefully trace the lines of original plan with a ball pen.

Resist:
Resist is nothing more than a substrate that is unaffected by presence etching chemicals. It is usually colored so that, it can be easily seen the copper surface. When plan is clearly worked on clean copper the a that are to be left in fact as the copper conductors must be covered when resists the leaguer type of paints possess good resist properties but disadvantages of relatively long time taken for drying. It is essential to resist through hardening before etching is started. Nail polished are better as they quickly and are less difficult to remove. To overcome this drying effect and to achieve the sharp edges of the trace on PCB. Now a days etching taps along with IC pads are commonly used. To this, chances of short circulating due to paints are completely the avoid etching tapes and pads are available in different sizes.

Correcting errors:

17 | P a g e

When a result has been thoroughly hardened any errors that have been made can usually be corrected by gently scratching away with knife. To ensure clear out lines round edges of copper conductors on board the resist must be applied with steady band.

Etching:
Next comes etching of unwanted copper and whether a small single is all that is required as quantity of board to be produce certain precautions must be taken before operation is commenced the most used etch ant I ferric chloride and to this is added small quantity of HCL to accelerate. But it is not as critical as lab construction is concerned. Mixing 10 grams of ferric chloride and 25 grams of HCL with 15 grams of water can produce a good etchant.

Finishing off:
When all unwanted copper is dissolved from areas between conductors, board should be taken from an etchant and washed in water. The resist must be removed using proper solvent. After this the copper surface must be polished with any kind of cleaner. It should be seen that there is no slight incomplete etching between the conducting paths of the PCB. The PCBs are coated coating material for protection in lab coating material itself is a soldier. This process is called Tinning. This process of coating involves tracks with solder. Advantage of tinning the effect of environment of conductors, then PCB is drilled i.e. holes for filling and mounting the components on PCB are drilled with suitable drill bit.

Assembling of PCB:
After the holes are drilled, the components have to be assembled On PCB before assembling the components it is necessary to clean soldering iron in order to get easy and accurate soldering. Removing impurity particles that are gathered on iron bit due to repetitive use cleans soldering iron.

18 | P a g e

7. DISCUSSION
7.1 Application
Can be used for the counting tHe number of people present at a time inside a room Can be used to count the number of objects that have been delivered through a conveyer belt

7.2 Advantages
Very simple to use. Once programmed no human intervention required

7.3 Disadvantages
External power supply is required, thus if the power is lost the counter will stop working.

19 | P a g e

8. CONCLUSION
We have immense pleasure that we have completed our group project on AUTOMATIC BI-DIRECTIONAL VISITOR COUNTER successfully.

Basic working and theory of different ICs and other components were studied and various software to implement the project where also studied. Project is also focused to detect whether its a valid user or not.

The project has been through learning exercise.

It also taught us the importance of the teamwork and thus developing the management skills. It was a great experience in enhancing our knowledge in this field of studies.

20 | P a g e

9. REFERENCE
1. www.engineersgarage.com

21 | P a g e