Professional Documents
Culture Documents
T,FZR
Description in detail:
It mainly consist of following blocks 1. Transmitter: We are going to implement the Person counter module using a 2 transmitters and 2 receivers. We are going to use Infra-Red transmitters because infrared beams are not visible to human eyes. Transmitter used are IR LEDs 2. Receiver: We are going to use a Infrared receiver. It is a active low device which means it gives low output when it receives the Infrared rays. 3. Microcontroller: This is the CPU (central processing unit) of our project. We are going to use a microcontroller of 8051 family. The various functions of microcontroller are like I. Reading the digital input from two infrared receivers and calculate the number of persons from them. II. Sending this data to LCD so that the person operating this project should read the number of persons inside the room. III. Sensing the password using keypad and to check whether it is a correct password or a wrong password and rotate the stepper motor if the password entered is a correct password. IV. Sending the data to the computer using serial port. This data consist of number of persons inside the room and the status of entered password (Correct/wrong) . 4. LCD: We are going to use 16x2 alphanumeric Liquid Crystal Display (LCD) which
means it can display alphabets along with numbers on 2 lines each containing 16 characters.
Future Development:
1. We can send this data to a remote location using mobile or internet 2. We can implement other related modules like fire sensor, wind sensor. 3. We can add the module of voice alarm system to indicate that the room is full and persons cant enter inside.
8051 Family
ii.
8031 This microcontroller has all the features of 8051 except for it to be ROM-less. An
external ROM that can be as large as 64 K bytes should be programmed and added to this chip for execution. The disadvantage of adding external ROM is that 2 ports (out of the 4 ports) are used. Hence, only 2 ports are left for I/O operations which can also be added externally if required for execution. Comparison of 8051 family members: Features 8051
8052
8031
128 4K 2 1 32 6
256 8K 3 1 32 8
128 0K 2 1 32 6
8051 microcontrollers use two different kinds of memory such as UV- EPROM, Flash and NVRAM. Hence 8051 will not be seen in the part number even though it is the most popular member of the 8051 family.
i.
8751 This microcontroller is the UV-EPROM version of 8051. This chip has only 4K
bytes of UV-EPROM. It is required to have access to the PROM burner and the UV-EPROM eraser to erase the contents inside the chip before it is programmed again. The disadvantage of using this memory is the waiting time of around 20 minutes to erase the contents in order to program it again. Due to this limitation, manufacturers fabricated flash and NV-RAM versions of 8051. AT89C51 from Atmel Corporation Atmel fabricated the flash ROM version of 8051
ii.
which is popularly known as AT89C51 (C in the part number indicates CMOS). The flash memory can erase the contents within seconds which is best for fast growth. Therefore, 8751 is replaced by AT89C51 to eradicate the waiting time required to erase the contents and hence expedite the development time. To build up a microcontroller based system using AT89C51, it is essential to have ROM burner that supports flash memory. Note that in Flash memory, entire contents must be erased to program it again. The contents are erased by the ROM burner. Atmel is working on a newer version of AT89C51 that can be programmed using the serial COM port of IBM PC in order to get rid of the ROM burner.
RAM
I/O pins
Timer
Interrupt
Vcc
Packaging
4K 8K 1K 2K 4K 8K
32 32 15 32 32 32
2 3 1 3 2 3
6 8 3 8 6 8
5V 5V 3V 3V 3V 3V
40 40 20 20 40 40 Top
Features of 8051
The main features of 8051 microcontroller are:
i. ii. iii. iv. v. vi.
RAM 128 Bytes (Data memory) ROM 4Kbytes (ROM signify the on chip program space) Serial Port Using UART makes it simpler to interface for serial communication. Two 16 bit Timer/ Counter Input/output Pins 4 Ports of 8 bits each on a single chip. 6 Interrupt Sources 8 bit ALU (Arithmetic Logic Unit) Harvard Memory Architecture It has 16 bit Address bus (each of RAM and ROM) and 8 8051 can execute 1 million one-cycle instructions per second with a clock frequency of
vii. viii.
12MHz. This microcontroller is also called as System on a chip because it has all the features on a single chip. The Block Diagram of 8051 Microcontroller is as shown in Figure 1.1
Memory Architecture
The 4 discrete types of memory in 8051 are:
i.
Internal RAM This memory is located from address 0 to 0xff. The memory locations
from 0x00 to 0x7F are accessed directly. The bytes from 0x20 to 0x2F are bit-addressable. Loading R0 and R1 the memory location from 0x80 to 0xFF can easily accessed.
ii
0xFF of the memory location. The same instructions used for lower half of Internal RAM can be used to access SFRs. The SFRs are bit addressable too. iii. Program Memory This is read only memory which is located at address 0. With the help of 16 bit Special Function Register DPTR, this memory can also save the tables of constants. iv. External Data Memory Located at address 0. The Instruction MOVX (Move External) should be used to access the external data memory.
LCD WITH 8051:LCD used here has HD44780u dot matrix lcd controller.LCD module have 8-bit data interface and control pins.One can send data as 8-bit or in pair of two 4-bit nibbles.To display any
character on LCD micro controller has to send its ASCII value to the data bus of LCD.For e.g. to display 'AB' microcontroller has to send two hex bytes 41h and 42h respectively.LCD display used here is having 16x2 size. It means 2 lines each with 16 character.
This project is a simple DC regulated power supply that has a variable DC voltage range from 5V to 15V. It can supply current up to a 400mA to power the various circuits for your electronic projects. The voltage output is varied by using the potentiometer VR1. In this circuit, the input line power supply is designed for 240VAC. If 110VAC input is used, change the ratings of the varistor to 150VAC and the transformer ratio to 110V/12V. Fuse F1 is used as a protection in case there is any short circuit in the circuit. Varistor V1 is connected in parallel to the input of the line voltage to clamp the surge voltage from the line to a reasonable level that helps to protect the transformer and other circuitry. Once the voltage level surge to a high level beyond the ability of the varistor to absorb it, fuse F1 or varistor V1 or both will burn. If this circuit failed after a period of operation, check that the fuse and the varistor are still in good condition or else replace them. Diodes D1, D2, D3 and D4 are used to rectify the 12VAC voltage to DC voltage. Electrolytic capacitor E1 is used as a smoothing capacitor to reduce the ripple of the DC voltage. The DC voltage is fed into the input of 7805 regulator where the output DC voltage is obtained. Changing the value of VR1 will change the output of the DC voltage. Capacitor C1 is used to filter out high frequency component from the power supply.
The high level programming languages such as BASIC, Pascal, Forth, C, C++, and Java are available to code the program for 8051. These high level languages make use of a Compiler to translate into machine code. For example, when a program is written in C, the program needs to be translated into machine language using C compiler. Usually, Assembly and C language is widely used for 8051 programs as compared to the other high level languages. The 8051 provides a total of four ports for I/O operations. 8051 has 40 pins, of which 32 pins are set aside for the four ports. PO, P1, P2, and P3 each have 8 pins and can be used for either input or output. The remaining pins are designated as Vrt, GND, XTAL1, XTAL2, RST, EA, ALE/PROG and PSEN. 8051 allows you to manipulate one or all of the bits of a port, thus providing programmers with a unique and powerful feature. 8051 provides the programmer with the ability to read, write and modify each port to customize applications as much as possible
Oscillator Circuit:-
The 8051 uses the crystal for precisely that: to synchronize its operation. Effectively, the 8051 operates using what are called "machine cycles." A single machine cycle is the minimum amount of time in which a single 8051 instruction can be executed. although many instructions take multiple cycles. 8051 has an on-chip oscillator. It needs an external crystal thats decides the operating frequency of the 8051. This can be achieved in two ways,, The crystal is connected to pins 18 and 19 with stabilizing capacitors. 12 MHz (11.059MHz) crystal is often used and the capacitance ranges from 20pF to 40pF. The oscillator can also be a TTL clock source connected with a NOT gate as shown
Reset Circuit
RESET is an When RESET is goes back to The 8051 is the RST high machine cycles it low. Power-On - Initially capacitor makes RST High - When capacitor charges fully it blocks DC. Manual reset -closing the switch momentarily will make RST High. active High input set to High, 8051 the power on state. reset by holding for at least two and then returning
Reset charging of
After a reset, the program counter is loaded with 0000H but the content of on-chip RAM is not affected.
Register IP IEv All timer registers SCON SBUF PCON (HMOS) PCON (CMOS)v
MOC7811
Introduction Position Encoder sensors are used to find position of the wheel. It consists of IR LED and Photodiode mounted facing each other enclosed in plastic body. When light emited by the
IR LED is blocked because of alternating slots of the encoder disc logic level of the photo diode changes. This change in the logic level can be sensed by the microcontroller or by discrete hardware. This sensor is used to give position feedback to the robot. Specifications
Size: Refer to the image below Mounting hole diameter: 3mm Mounting hole spacing: 19mm Slot width: 3mm Slot depth: 7mm
Applications
DC motor position / velocity control Position and velocity servomechanisms Factory automation robots Numerically controlled machinery Computer printers and plotters
Dimensions
PROGRAMME FOR PERSON COUNTER:#include<reg51.h> sbit ir=p3^2; sbit ir2=p3^3; sfr data=oxa0; sbit rs=p0^0; sbit rw=p0^1; sbit en=p0^2; sbit buzz=p0^3; void delay(int time); void lcddata(unsigned char value); void lcdcmd (unsigned char value); unsigned char ender[]= 000 000000 ; void main() { unsigned int i,j,k,o,a,b,c,l,m,n; lcdcmd (0x38); lcdcmd (ox0c); lcdcmd (ox01); lcdcmd (ox06); lcdcmd (ox80); lcddata(e); lcddata(n); lcddata(t); lcddata(e); lcddata(r); lcdcmd (0x86); lcddata(e); lcddata(x); lcddata(i); lcddata(t); lcdcmd(ox8c); lcddata(r); lcddata(m); lcddata(n); lcddata(g); lcdcmd(oxc0);
for(o=0;0<15;o++) { lcddata(enter[0]); delay(10); } while(1); {ir=1; if(ir==0) {lcdcmd(oxc0); i++; if(i==10) { i=0;j++; } if(j==10) { j=0;k++; } if(k==10) {i=0;j=0;k=0;} lcddata(ox30+k); lcddata(ox30+j); lcddata(ox30+i); lcdcmd(oxcc); l++; if(l==10) { l=0;m++;} if(m==10) { m=0;n++; } if(n==10){ l=0;m=0;n=0;} lcddata(ox30+n); lcddata(ox30+m); lcddata(ox30+l); delay(50);} if(ir2==0) { lcdcmd(oxc6); a++; if(a==10) {
a=0;b++;} if(b==10) {b=0;c++;} if(c==10) {a=0;b=0;c=0;} lcddata(ox30+c); lcddata(ox30+b); lcddata(ox30+a); l--; if(l==0-1) { l=9;m--; } if(m==0-1) { m=9;n--;
}if(n==0-1) {n=0;m=0;l=0; } lcdcmd(oxcc); lcddata(ox30+n); lcddata(ox30+m); lcddata(ox30+l); delay(50); }}} void delay(int time) { int i,j; for(i=0;i<=time;i++) { for(j=0;j<=1275;j++) } void lcdcmd(unsigned char value) {ldata=value;
rs=0; rw=0; en=1; delay(10); en=0; }void lcddata(unsined char value) { ldata=value; rs=1; rw=0; en=1; delay(10); en=0; }
1. This pesson counter display ENTER EXIT RMNG on LCD display 2.two mocs 7811 are one for enter and another for exit
4.To make a particular card (like ATM card) sensitive person counter ,we have to use any other sensor instead of MOC7811. 5. For safety, public locations are often rated to hold a certain number of people. Accurate people counting is used to ensure that the building is below the safe level of occupancy. Although, no people counting system is 100% accurate and therefore must not be entirely relied upon for the purposes of health & safety, an electronic people counting system offers a relatively accurate means of managing capacity 6.Many non-profit organizations use visitor counts as evidence when making applications for finance. In cases where tickets are not sold, such as in museums and libraries, counting is either automated, or staff keep a log of how many clients use different services 7.People Counting technology can also be used for queue management and customer tracking.
8 information about the number of people in highly crowded areas, mving through doors or along corridors not only provides important information for security purposes, but also for marketing intelligence.
CHAPTER 5 CONCLUSIONS AND FUTURE SCOPE 1. A people counter is a device used to measure the number and direction of people
traversing a certain passage or entrance per unit time. The resolution of the measurement is entirely dependent on the sophistication of the technology employed. The device is often used at the entrance of a building so that the total number of visitors can be
recorded. Many different technologies are used in people counter devices, such as infrared beams, computer vision, thermal imaging and pressure-sensitive mats.
2.
There are various reasons for counting people. In retail stores, counting is done as a form of intelligence-gathering. The use of people counting systems in the retail environment is necessary to calculate the conversion rate, i.e., the percentage of a store's visitors that makes purchases. This is the key performance indicator of a store's performance and is superior to traditional methods, which only take into account sales data. Together, traffic counts and conversion rates how a store arrived at sales, e.g., if year-over-year sales are down, did fewer people visit the store, or did fewer people buy? Accurate visitor counting is also useful in the process of optimizing staff shifts; Staff requirements are often directly related to density of visitor traffic and services such as cleaning and maintenance are typically done when traffic is at its lowest. More advanced People Counting technology can also be used for queue management and customer tracking. Although traffic counting is widely accepted as essential for retailers, it is estimated that less than 25% of major retailers track traffic in their stores.[citation needed] Shopping mall marketing professionals rely on visitor statistics to measure their marketing. Often, shopping mall owners measure marketing effectiveness with sales, and the also use visitor statistics to scientifically measure marketing effectiveness. Marketing metrics such as CPM (Cost Per Thousand) and SSF (Shoppers per Square Foot) are performance indicators that shopping mall owners monitor to determine rent according to the total number of visitors to the mall or according to the number of visitors to each individual store in the mall.
FUTURE SCOPE
3. Modern people counting systems use many different technologies, each with its own
advantages and disadvantages.
A hand-held tally-counter, sometimes called a clicker-counter, would be used; one press per person. To reset the counter, one would have to turn a knob, resetting most counters' display to "0000".
Inexpensive Simple to fit Disadvantages: Most basic beam sensors are limited to non-directional counts Can't discern people walking side-by-side Cannot count high volume, uninterrupted traffic High potential to become blocked by people standing in an entrance or by merchandise or displays Infra-red beam counters may be negatively affected when subject to direct sunlight
developed that can compensate for this behavior and excellent counting accuracy can today be obtained for both outdoor and indoor counting using computer vision.[citation needed] Advantages:
High accuracy, in correct conditions sometimes over 98%[citation needed] Directional information Flexible in customization Highly scalable when embedded in IP cameras Integration with other systems
Disadvantages:
Higher cost than beam systems May require repeat visits for calibration Lower lifetime and higher power consumption than thermal systems Many systems require PCs are not fully embedded Less simple implementation than beam systems Accuracy can be affected by differing light levels
REFERENCES:-
1.People counter _wikipedia the free encyclopedia. 2.The 8051 microcontroller and embedded systems.(Muhammad ali mazidi)