Sunday 4 March 2012

People Counting Machine with GSM

The main objective of this project is to design a system which counts the number of people present inside a premises with the count being sent automatically as an SMS upon dialing the phone number.


It consists of 3 modules

1. Infrared Transmitter and Receiver
There are two of them say IR1 and IR2. Breaking the beam of IR1 first and then IR2 will increment the count by 1 where as breaking the beam IR2 and then IR1 will decrement the count. The output of IR1 and IR2 are connected to microntroller interrupts INT0 and INT1 respectively. Complete design of IR Tx and Rx can be found here : Infrared Beam break Detector


2. Microncontroller with LCD
The microcontroller used here is 89c51. INT0 and INT1 of the micronctroller is connected to output of IR1 and IR2 respectively. It is connected to a GSM module via a serial port. And the microncontroller is also connected to a LCD which displays the total count at any given point of time. The microntroller increments or decrements the count based on weather INT0 interrupt occurs first and then INT1 or vice versa and continuously displays on the LCD. Micronctroller will also receive a serial interrupt when there is an incoming call in whch time it will read the phone number, disconnect and send the total count as a SMS

3. GSM Module
The microcontroller sends AT commands to GSM module to read the phone number, disconnect and send an SMS to the calling number. Below are the AT commands used.

1. Disconnect a call
ATH  and Enter

2. Read the phone number of an incoming call
  • Set the below AT command only once
  • AT+CLIP=1 and Enter
  • When there is a incoming call, the data from GSM will be similar to below for default settings
    • RING
      +CLIP: "+919449XXXXXX",145,"","",0
      RING
      +CLIP........
    • Read the phone number above into an array and send the SMS
    3. Send an SMS

    AT+CMGF=1 and Enter
    AT+CMGS="+919449XXXXXX" and Enter
    "Hello World" and CTRL+Z

    During programming CTRL+Z requires to be sent as 0x1A Ascii character while the escape character for Enter is '\r'. For better understanding on sending a SMS and C code, refer to Sending SMS using AT commands


    4 comments:

    1. This is such a great source you are offering. I appreciate seeing web pages that recognize the value of offering a primary source totally free. I really beloved looking at your content. Thanks!ip video surveillance

      ReplyDelete
    2. This is a nice concept of integrating GSM and People Counting System in making the count to reach the huge distances. Appreciate the project work! Delopt

      ReplyDelete
    3. Dear admin..

      Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.

      Flexible Shaft grinder

      ReplyDelete
    4. Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon. Best Money Counting Machine

      ReplyDelete