Wednesday, 7 November 2012

BIDIRECTIONAL VISITOR COUNTER USING MICROCONTROLLER AT89C2051


Visitor counting is simply a measurement of the visitor traffic entering and exiting offices, malls, sports venues, etc. Counting the visitors helps to maximize the efficiency and effectiveness of employees, floor area and sales potential of an organization .Visitor counting is not limited to the entry/exit point of a company but has a wide range of applications that provide information to management on the volume and flow of people throughout a location. A primary method for counting the visitors involves hiring human auditors to stand and manually tally the number of visitors who pass by a certain location. But human-based data collection comes at great expense.

 Here is a low-cost microcontroller based visitor counter that can be used to know the number of persons at a place. All the components required are readily available in the market and the circuit is easy to build .Two IR transmitter-receiver pairs are used at the passage: one pair comprising IR transmitter IR TX1 and receiver phototransistor T1 is installed at the entry point of the passage, while the other pair comprising IR transmitter IR TX2 and phototransistor(TSOP sensor) T2 is installed at the exit of the passage. The IR signals from the IR LEDs should continuously fall on the respective phototransistors, so proper orientation of the transmitters and phototransistors is necessary.

Two similar sections detect interruption of the IR beam and generate clock pulse for the microcontroller. The microcontroller controls counting and displays the number of persons present inside the hall is also displayed on the seven segment displays. It receives the signals from the sensors, and this signal is operated under the control of software which is stored in ROM. Microcontroller AT89S52 continuously monitor the Infrared Receivers, When any object pass through the IR Receiver's then the IR Rays falling on the receiver are obstructed , this obstruction is sensed by the Microcontroller.

Block Diagram

The basic block diagram of the bidirectional visitor counter with automatic light controller is shown in the above figure. Mainly this Block diagram consist of the following essential blocks.
              
  1.Power Supply
  2.Entry and Exit sensor circuit
  3.AT 89c2052 micro-controller
             
1.Power Supply:-
                                  Here we used +12V and +5V dc power supply. The main function of this block is to provide the required amount of voltage to essential circuits. +12 voltage is given. +12V is given to relay driver. To get the +5V dc power supply we have used here IC 7805, which provides the +5V dc regulated power supply.

2.Enter and Exit Circuits:-
                                              This is one of the main part of our project. The main intention of this block is to sense the person. For sensing the person and light we are using the light dependent register (LDR). By using this sensor and its related circuit diagram we can count the persons.

3.AT89C2051
                               Microcontroller IC AT89C205(IC2) is at the heart of the circuit. It is a 20-pin, 8-bit microcontroller with 2 kb of Flash programmable and erasable read-only memory (PEROM), 128 bytes of RAM, 15 input/output (I/O) lines, two 16-bit timer/counters, a five-vector two-level interrupt architecture, a full duplex serial port, a precision analogue comparator, on-chip oscillator and clock circuitry.

CIRCUIT DESCRIPTION:
                 There are two main parts of the circuits.

                       1.Transmission Circuits (Infrared LEDs)
                       2.Receiver Circuit (Sensors)

1. Transmission circuit
                                     In this circuit, a negative pulse applied at pin 2 triggers an internal flip-flop that turns off pin 7's discharge transistor, allowing C1 to charge up through R1. At the same time, the flip-flop brings the output (pin 3) level to 'high'.  When capacitor C1 as charged up to about 2/3 Vcc, the flip-flop is triggered once again, this time making the pin 3 output 'low' and turning on pin 7's discharge transistor, which discharges C1 to ground. This circuit, in effect, produces a pulse at pin 3 whose width t is just the product of R1 and C1, i.e., t=R1C1.

IR transmission circuit is used to generate the modulated 36 kHz IR signal. The IC555 in the transmitter side is to generate 36 kHz square  wave. Adjust the preset in the transmitter to get a 38 kHz signal at the o/p. around 1.4K we get a 38 kHz signal. Then you point it over the sensor and its o/p will go low when it senses the IR signal of 38 kHz. This circuit diagram shows how a 555 timer IC is configured to function as a basic monostable multivibrator . A monostable multivibrator is a timing circuit that changes state once triggered, but returns to its original state after a certain time delay.  It got its name from the fact that only one of its output states is stable.  It is also known as a 'one-shot'.

2.Receiver circuit

                           The IR transmitter will emit modulated 38 kHz IR signal and at the receiver we use TSOP1738 (Infrared Sensor). The output goes high when the there is an interruption and it return back to low after the time period determined by the capacitor and resistor in the circuit. I.e. around 1 second. CL100 is to trigger the IC555 which is configured as monostable multivibrator. So when anybody crosses the transmitter receive pair the output from TSOP sensor will high and microcontroller will know that the interruption and decide whether increment the count decrement from the loaded program.

After receiving signal from sensor microcontroller will define whether it was enter or exit by using following algorithm..
            1 .If the sensor 1 is interrupted first then the microcontroller will look for the sensor 2.And if it is interrupted then the microcontroller will increment the count .

           2.If the sensor 2 is interrupted first then the microcontroller will look for the sensor 1. And if it is interrupted then the microcontroller will decrement the count.

Advantage
o    Low cost
o   Easy to use
o   Implement in single door
Disadvantage

            It is used only when one single person cuts the rays of the sensor hence it cannot be used when two person cross simultaneously………………………………….  

CODE :
             If you need the code of  this project  please join this site as member .After joining  as member   post your  request in  comments .. Don't write your mail id . Remember the coding of this project will be strictly given to the members of this site only.....................

21 comments:

  1. hello sir !i like your complete work.can u give me the code of this project.i want to use it for my project purpose.

    ReplyDelete
  2. hello sir! i like your work .can u give me the code for this project .i want to use it in my project work.thank you!

    ReplyDelete
  3. please send the code for this project sir,...

    ReplyDelete
  4. hai sir i need this code for my project please give me this code , Thank you.

    ReplyDelete
  5. hai sir please give me this code for my project.

    ReplyDelete
  6. hello sir please i need this code for my project purpose sir please send that in my mailid iprakashece@gmail.com sir if that code is in c language is too beautiful sir.thank you.

    ReplyDelete
  7. very nice project
    I really need of this code kindly send me
    Thank u

    ReplyDelete
  8. hai rashid
    the program was send to you.keep visit us

    ReplyDelete
  9. Sir plz kindly send me this code
    I need this code. Very attractive project.
    Thank you

    ReplyDelete
  10. hai Shivangi pal
    you have to join in our site as member to receive the program or write your mail id

    ReplyDelete
  11. hi sir,i need source code i embedded c plz help me ,my mail id gokulraj738@gmail.com

    ReplyDelete
  12. hi sir,please send me code for this project in embedded c and asm

    ReplyDelete
  13. sir i need this code urgently....please send it to my email id(singhsourabh9@gmail.com)

    ReplyDelete
  14. sir please send me this code......i need this urgently

    ReplyDelete
    Replies
    1. hai sourabh
      check your mail.the program was sent to you

      Delete
  15. hai sourabh
    check your mail.the program was sent to you

    ReplyDelete
  16. hi sir. please send me this code? because i need it for my studies.. as soon as possible..
    thanks sir.

    ReplyDelete
  17. Hi sir. can you please send me the code? i need that code. i likes your code and its suitable for my studies. hope you could help me sir. thank you

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...