Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Bidirect visitor counter


Published on

description of hardware and software

Published in: Engineering

Bidirect visitor counter

  2. 2. OBJECTIVE The objective of this project is to design an Energy Saving Visitor Counter by using the microcontroller 68hc11/8051 and to integrate hardware and software in order to simulate the circuit in such a way that when somebody enters into the room then the counter is incremented by one and the light in the room will be switched ON and when any one leaves the room then the counter is decremented by one. The light will be only switched OFF until all the persons in the room go out. The total number of persons inside the room may also be displayed on the seven segment displays/LEDs
  4. 4. BLOCK DIAGRAM DESCRIPTION MICROCONTROLLER(AT89C51) A microcontroller is device, which contains all the device necessary to form working system, in a single chip. Therefore, inside the microcontroller we find a central processing unit (CPU), program memory, data memory, I/O ports, serial communication interface. IR Transmitter: We have implemented the Person counter module using 2 transmitters and 2 receivers. We have used Infra-Red transmitters. Reason behind choosing IR LED is, infrared beams are not visible to human eyes and they are not easily triggered by other sources in the environment. Transmitters used are IR LEDs. IR Receiver: We have used IR sensor as an Infrared receiver. It is an active low device, which means it gives low output when it receives the Infrared rays. So when the IR rays are interrupted by any person then microcontroller will receive a high pulse from the IR receiver.
  5. 5.  LED (light emitting diode) Light emitting diodes are diodes (electronic components that let electricity pass in only one direction) that emit visible light when electricity is applied, much like a light bulb. When many LEDs are side-by-side, they can create pictures, such as the scrolling red LED signs found everywhere  The seven segment Display An LED or Light Emitting Diode, is a solid state optical PN-junction diode which emits light energy in the form of “photons” when it is forward biased by a voltage allowing current to flow across its junction, and in Electronics we call this process electroluminescence. The actual colour of the visible light emitted by an LED, ranging from blue to red to orange, is decided by the spectral wavelength of the emitted light which itself is dependent upon the mixture of the various impurities added to the semiconductor materials used to produce it.  Power cell A nine-volt battery, sometimes referred to by its original designation as a PP3 battery is used here, the battery has both the positive and negative terminals on one end. The negative terminal is fashioned into a snap fitting which mechanically and electrically connects to a mating terminal on the power connector. The power connector has a similar snap fitting on its positive terminal which mates to the battery. This makes battery polarization obvious since mechanical connection is only possible in one configuration. The clips on the 9-volt battery can be used to connect several 9-volt batteries in series
  6. 6. CODE  #include<reg51.h>  sbit led1=P1^2;  sbit sw1=P1^0;  sbit sw2=P1^1;  sfr seg=0xA0;  int a[10]={0xbf,0x86,0xdb,0xcf,0xe6,0xed, 0xfd,0x87,0xff,0xef};  void delay(unsigned int t)  {  int i,j;  for(i=0;i<t;i++)  for(j=0;j<1000;j++);  }  void main()  {  int c=0;  seg=a[0];  while(1)  {  if(sw1==0)  {  while(sw2==1);  if(sw2==0)  {  c++;  seg=a[c];  delay(40);  }  }  else if(sw2==0)  {  while(sw1==1);  if(sw1==0)  {  c--;  seg=a[c];  delay(40);  }  }  else if(c>=1&&c<2)  {  led1=0;  }  else if(c==0)  {  led1=1;  }  }  }
  7. 7. CIRCUIT DIAGRAM In this bidirectional circuit two infrared (IR) sensor components are used for up and down counting, respectively. Whenever an interruption is observed by the IR sensor then the IR sensor increment the value of counter and whenever the second sensor detects any obstacle, the counter is decremented. The number of interruption count depend upon the sensor’s input and displayed on a set of 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 seven pin of P2 are connected to control pins of to enable a particular seven segment. The IR sensor input is defined as up and down selector mode for the counter in the code. Every time the first sensor is blocked, the first sensor gives a high voltage signals and the count the value gets incremented. The value of second sensor gets decremented when connected to second a sensor, gives high input. At every setup, the value of the counter is sent and displayed it on the Sensor, gives high input. At every setup, the value of the counter is sent and displayed it on the seven segments Figure number – (2) circuit diagram CIRCUIT DIAGRAM DESCRIPTION
  8. 8. HARDWARE AND SOFTWARE PLATFORM  Hardware platform The microcontroller is backbone of this project. The microcontroller get connected by all the components which allow it to operate standalone, and it has been designed in particular for monitoring and control tasks. In consequence, in addition to the processor it includes memory, various interface controllers, one or more timers, an interrupt controller, and last but definitely not least general purpose I/O pins which allow it to directly interface to its environment. Microcontrollers also include bit operations which allow you to change one bit within a byte without touching the other bits. This is a microcontroller which can process both digital and analog signals. A major application area for microcontrollers are embedded systems in the bidirectional visitor counter. In embedded systems, the control unit is integrated into the system.
  9. 9.  Software platform Proteus software Proteus is a best simulation software for various designs with microcontroller. It is mainly popular because of availability of almost all microcontrollers in it. So it is a handy tool to test programs and embedded designs for electronics hobbyist. You can simulate your programming of microcontroller in Proteus Simulation Software. After simulating your circuit in Proteus Software you can directly make PCB design with it so it could be an all in one package for students and hobbyists. So I think now you have a little bit idea about what is proteus software. Keil software Keil compiler is a software used where the machine language code is written and compiled. After compilation, the machine source code is converted in hex code which his to be dumped into microcontroller for the processing. Keil compiler also support c language code
  10. 10. RESULTS INCREMENT Figure number – (3) figure of increment DECREMENT Figure number – (4) figure of decrement DEBUG Figure number – (5) figure of debug in keil
  11. 11. CONCLUSION AND FUTURE SCOPE CONCLUSION Finally, I have done my assignment bidirectional energy saving visitor counter and learnt many things from this project. This gives lots of knowledge of software as hardware. Name of software used in this project i.e proteus and keil and now able to handle proteus and keil software. I got information about pin configuration of microcontroller 8051, crystal oscillator, seven segment, IR sensor and many more FUTURE SCOPE  In bidirectional visitor counter the voice alarm may be added to indelicate room is full and person can’t enter in the room.