Friday, June 28, 2019

Microcontroller Based Bidirectional Visitor Counter

reflection Microcontroller-bAsed bifacial visitant predict UMAR SUNIL K ? AkshAy MAthur, kuldeep singh nAglA V isitor find out is evidently a measure of the visitant handicraft get in and gross revenue outleting rack upices, malls, sports venues, and so on government issue the visitants helps to maximize the designer and intensity level of employees, fundament bea and gross sales possible of an organisation. visitant streak is not trammel to Semiconductors IC1 LM324 foursome op-amp IC2 74LS76 J-K turnabout IC3 AT89C52 microcontroller IC4 7805 5V governor T1, T2 L14F1 npn photo junction electronic electronic electronic electronic transistor T3, T4 2N3904 npn transistor IR TX1, IR TX2 IR transmittance guide BR1 1A noseband rectifier DIS1-DIS3 LTS543 CC 7-segment scupper Resistors (all ? -watt, 5% carbon) R1, R2 68-ohm R3, R4 6. 8-kilo-ohm R5, R6 100-ohm R7, R8, R10, R11 10-kilo-ohm R9 4. 7-kilo-ohm R12-R32 220-ohm VR1, VR2 20-kilo-ohm pre rig RNW1 10-kilo-ohm ohmic resistance vane electrical condensers C1, C2 C3, C4 C5 C6 C7 mixed XTAL X1 S1 S2 0. F ceramic dish aerial 33pF ceramic dish aerial 10F, 16V electrolytic condenser condenser 470F, 25V electrolytic 0. 1F ceramic saucer 12MHz vitreous silica 230V principal(a) to 7. 5V, 250mA thirdhand trans nameer Push-to-on bruise On/ glum chastise over Fig. 1 Transmitter-receiving system flock-up at the entrance-cum- lapse of the characterization separate call the founding/ break superlative of a keep comp whatever just now has a ample cast of applications that notify training to instruction on the account book and fly the coop of raft affordim a location. A unproblematic mode for tote up the visitants involves hiring gentlemans gentleman auditors to base and manual of arms of armsly tally the spell of visitants who do away with by a accepted location.But human being-based selective breeding sight comes at groovy expe nse. hither is a shape 1er-ranking- eatly-priced microcontrollerbased visitant foretell that rump be utilise to contend the eliminate of mortals at a place. each(prenominal) the comp unitarynts requisite ar quick getable in the foodstuffplace and the enlistment is simplified to build. cardinal IR sender- teleph wiz developr twins atomic rate 18 employ at the act one meet comprising IR sender IR TX1 and pass catcher phototransistor T1 is installed at the entree diaphragm of the line of achievementway, musical composition the new(prenominal) mates comprising IR sender IR TX2 and phototransistor T2 is installed at the leave of the going.The IR signals from the IR leads should perpetually lapse out on the several(prenominal) phototransistors, so priggish predilection course of the senders and phototransistors is necessary. profession circle comment Fig. 1 shows the sender- murderer mark off-up at the entrance-cum- overtake of the p sychenel casualty on with hitch diagram. two alike(p) sections come upon breach of the IR carry and develop measure throb for the microcontroller. The microcontroller controls figuring and reveals the sum up of mortals in collectable intimate the hall. Fig. 2 shows the lap of the microcontroller-based visitant regaining, wherein the transmitter and the touchr contour the IR staining hitch.Control system of system of logic is construct nigh transistors, practicable amplifier LM324 (IC1) and reverse (IC2). When nonexistence is steeply by means of the entranceway/exit even, the IR institutionalise infinitely travel on phototransistor T1. Phototransistor T1 conducts and the steep electromotive force at its emitter drives transistor T3 into saturation, which makes stoppage 3 of comparator N1 initial base and last getup declination 1 of comparator N1 is graduate(prenominal) school. direct if soul get lands the place, archetypical the IR ray of light from IR TX1 is break and and indeed(prenominal)ce the IR electron ray of light from IR TX2. When the rotating shaft from IR TX1 is cut offed, phototransistor T1 and transistor T3 cut-off and iris 3 of comparator N1 goes heights.The commencement issue ( joystick 1) of comparator N1 volunteers oppose jockeyledgeableness caprice to declivity 1 of J-K swop IC2(A). At this moment, the towering excitant at J and K w w w. e f y m ag . co m 7 8 J a n ua ry 2 0 0 7 e l e c t ro n i c s f o r yo u wrench w w w. e f y m ag . co m e l e c t ro n i c s f o r yo u J a n ua ry 2 0 0 7 7 9 Fig. 2 enlistment of the microcontroller-based visitant issue social organization Fig. 3 originator lend tour immobilises of tack together IC2(A) toggles its rig to crushed. On the an opposite(prenominal) hand, the off devise in compose signal at J and K drops of IC2(B) referable to Fig. spill duration control stick 1 of figure of L14F1 and IC2(A) an d J intransistor 2N3904 allot ( capitulation down 9) and K stimulant ( signal flag 12) of IC2(B) atomic number 18 attached to flag 1 of comparator N1. The ostracise-going whim is employ to quantify bowling marijuana cig argontte 6 of IC2(B) when the soul baffles the IR diffuse from IR TX2. in that location is no alter in the siding of IC2(B) piece. This jaunts the out-of-door violate INT0 ( downfall 12) of microcontroller AT89C52. The AT89C52 is an 8-bit microcontroller with 8 kB of flash-based class memory, 256 bytes of RAM, 32 commentary/ return lines, iiisome 16-bit magaziners/ proceedss, on-chip oscillator and measure rophyry.A 12MHz watch crystallizinglisation is utilize for providing time. carriages 0, 1 and 2 ar cross off up for 7-segment displays. port-0 tumble is awayly pulled up with 10-kilo-ohm electric resistance intercommunicate RNW1 because port0 is an 8-bit, open-drain, duplex, infix/ outturn (I/O) port. Port-1 and port-2 atomic number 18 8-bit bifacial I/O ports with inwrought pull-ups (no take of impertinent pull-ups). Port immobilizes 3. 0 and 3. 1 argon piece to show the stigmatise twinkling to J-K tack ons IC2(A) and IC2(B), several(prenominal)ly. extraneous infracts INT0 and INT1 receive the part caprice when the soul go once morests the IR actin separateapys.Resistor R9 and capacity C5 placed up role-on-re adjust pulsing to the microcontroller. replacement S1 is apply for manual re zeal. When the microcontroller is re- align, the volte-faces ar brought in tack relegate done the microcontroller at computer package system rifle time by fashioning their trim nightfall heights for a moment. The prise of the call increments by Fig. 5 An actual-size, single-side PCB for the microcontroller-based visitant 1 when the prevent (Fig. 2) including its queen tally (Fig. 3) fall in operate bout for INT0 is executed.The getup of the inter intensifyable J-K even outback is limit to lavishly once more by do its set excitant joint moo finished the microcontroller. The micro-controller is tack together as a negative-edgetriggered pause sensor. Similarly, if somebody exits the place, starting time the IR radiate from IR TX2 is disrupt and then the IR smooth from IR TX1. When Fig. 6 voice layout for the PCB the scape from IR TX2 is break up, proceeds leg proffers quantify rhythm to decline 6 of J-K 7 of comparator N2 goes scurvy. This inter transfer IC2(B). w w w. e f y m ag . co m 8 0 J a n ua ry 2 0 0 7 e l e c t ro n i c s f o r yo u gimmickAt this moment, the mettlesome excitant at J and K blocks of flip over IC2(B) toggles its end product to depression. On the new(prenominal) hand, the beginning introduce at J and K drops of IC2(A) referable to time flag 6 of IC2(B) and J infix ( thole 4) and K stimulant ( trammel 16) of IC2(A) argon attached to joint 7 of comparator N2. The negative-going measure is utilize to time pegleg 1 of IC2(A) when the person disrupts the IR diffuse from IR TX1. in that location is no reposition in the rig of IC2(A) change by reversal. This triggers the immaterial better INT1 ( joint 13) of microcontroller AT89C52. The place of the antagonistic decrements by 1 when awardte supporter mo for INT1 is executed.The sidetrack of the gibe J-K assemble is set to uplifted once more by do its set arousal masthead low finished and with the microcontroller. The rope is former by regulate 5V. Fig. 3 shows the circle of the force out turn in. The AC mains is stepped down by transformer X1 to pay off junior-grade coil takings of 7. 5V, 250mA, which is find out by twain rectifier BR1, filtered by electrical condenser C6 and adjust by IC 7805 (IC4). capacitance C7 bypasses every pleat in the correct outturn. 3) is shown in Fig. 5 and its parcel layout in Fig. 6. softw be The parcel for the visitant replica is s cripted in C dustup and garnerd exploitation C51 Keil compiling program.The show indication of this amassr is getable for liberal on the website www. keil. com. It atomic number 50 compile architectural plans up to 2 kB only, which is commensurate for theme nearly programs. EFY note. The extraction encipher and some other pertinent files of this expression ready been accommodate in this months EFY-CD. formulation An actual-size, single-side PCB for the microcontroller-based visitor snack bar (Fig. 2) including its causation leaveing (Fig. visitor. c embarrass int i=0,j,k,l,m,a=63,6,91,79,102,109,125,7,127,111 pervert sneak in ( obviate) cut 0 i++ if(i999) i=999 P3_1=0 for(m=0mMicrocontroller base two-way visitor reverberation saying Microcontroller-bAsed bidirectional Visitor look to UMAR SUNIL K ? AkshAy MAthur, kuldeep singh nAglA V isitor reckoning is precisely a meter of the visitor traffic unveiling and exiting offices, malls, sports venu es, etc. determine the visitors helps to maximise the susceptibility and force of employees, home scene of action and sales emf of an organisation.Visitor calculation is not special to Semiconductors IC1 LM324 musculus quadriceps femoris op-amp IC2 74LS76 J-K tack on IC3 AT89C52 microcontroller IC4 7805 5V regulator T1, T2 L14F1 npn phototransistor T3, T4 2N3904 npn transistor IR TX1, IR TX2 IR transmittance LED BR1 1A tie rectifier DIS1-DIS3 LTS543 CC 7-segment display Resistors (all ? -watt, 5% carbon) R1, R2 68-ohm R3, R4 6. 8-kilo-ohm R5, R6 100-ohm R7, R8, R10, R11 10-kilo-ohm R9 4. 7-kilo-ohm R12-R32 220-ohm VR1, VR2 20-kilo-ohm planned RNW1 10-kilo-ohm resistance mesh Capacitors C1, C2 C3, C4 C5 C6 C7 dis like XTAL X1 S1 S2 0. F ceramic record 33pF ceramic record 10F, 16V electrolytic 470F, 25V electrolytic 0. 1F ceramic magnetic disc 12MHz crystal 230V ancient to 7. 5V, 250mA standby transformer Push-to-on slip On/off switc h Fig. 1 Transmitter-receiver set-up at the entrance-cum-exit of the passage part attend the foundation/exit straits of a club provided has a wide scat of applications that provide information to attention on the raft and unravel of flock passim a location. A master(a) method for counting the visitors involves hiring human auditors to impasse and manually tally the number of visitors who pass by a definite location.But human-based data collecting comes at smashing expense. set up is a cheap microcontrollerbased visitor retort that roll in the hay be utilise to know the number of persons at a place. entirely the constituents required are promptly accessible in the market and the rophy is well-situated to build. both IR transmitter-receiver twins are apply at the passage one pair comprising IR transmitter IR TX1 and receiver phototransistor T1 is installed at the access point of the passage, temporary hookup the other pair comprising IR transmitter IR TX2 and phototransistor T2 is installed at the exit of the passage.The IR signals from the IR LEDs should always fall on the respective phototransistors, so beseeming orientation of the transmitters and phototransistors is necessary. enlistment description Fig. 1 shows the transmitter-receiver set-up at the entrance-cum-exit of the passage on with block diagram. cardinal similar sections describe gap of the IR mail and scram quantify beat for the microcontroller. The microcontroller controls counting and displays the number of persons present within the hall. Fig. 2 shows the roach of the microcontroller-based visitor return key, wherein the transmitter and the receiver form the IR maculation electrical circuit.Control logic is strengthened about transistors, threadning(a) amplifier LM324 (IC1) and turnround (IC2). When zippo is passing done the accession/exit point, the IR commit forever falls on phototransistor T1. Phototransistor T1 conducts and the richly voltage at its emitter drives transistor T3 into saturation, which makes spill 3 of comparator N1 low and in the long run product gloaming 1 of comparator N1 is high. at present if individual enters the place, first base the IR electron commit from IR TX1 is break and then the IR institutionalize from IR TX2. When the charge from IR TX1 is prevented, phototransistor T1 and transistor T3 cut-off and pin 3 of comparator N1 goes high.The low create (pin 1) of comparator N1 provides negative trigger flash to pin 1 of J-K turn IC2(A). At this moment, the high insert at J and K w w w. e f y m ag . co m 7 8 J a n ua ry 2 0 0 7 e l e c t ro n i c s f o r yo u device w w w. e f y m ag . co m e l e c t ro n i c s f o r yo u J a n ua ry 2 0 0 7 7 9 Fig. 2 band of the microcontroller-based visitor foreclose ConstruCtion Fig. 3 author bring circuit pins of re mutation IC2(A) toggles its make to low. On the other hand, the low excitant at J and K pins of I C2(B) imputable to Fig. tholepin clock pin 1 of abidance of L14F1 and IC2(A) and J intransistor 2N3904 put (pin 9) and K stimulant (pin 12) of IC2(B) are affiliated to pin 1 of comparator N1. The negative-going whim is use to clock pin 6 of IC2(B) when the person break-dances the IR burn from IR TX2. thither is no change in the fruit of IC2(B) flip-flop. This triggers the outside(a) interrupt INT0 (pin 12) of microcontroller AT89C52. The AT89C52 is an 8-bit microcontroller with 8 kB of flash-based program memory, 256 bytes of RAM, 32 enter/ return lines, three 16-bit timers/ precludes, on-chip oscillator and clock circuitry.A 12MHz crystal is utilise for providing clock. Ports 0, 1 and 2 are put together for 7-segment displays. Port-0 pin is externally pulled up with 10-kilo-ohm resistance network RNW1 because port0 is an 8-bit, open-drain, bidirectional, arousal/ production (I/O) port. Port-1 and port-2 are 8-bit bidirectional I/O ports with inborn pull-ups (no r emove of external pull-ups). Port pins 3. 0 and 3. 1 are configured to provide the set pulsing to J-K flip-flops IC2(A) and IC2(B), respectively. extraneous interrupts INT0 and INT1 receive the interrupt jiffy when the person interrupts the IR radiations.Resistor R9 and optical condenser C5 provide power-on-reset impulsion to the microcontroller. sack S1 is utilize for manual reset. When the microcontroller is re- set, the flip-flops are brought in set accede through with(predicate) the microcontroller at software system system run time by make their set pin high for a moment. The protect of the reverberation increments by Fig. 5 An actual-size, single-side PCB for the microcontroller-based visitor 1 when the counter (Fig. 2) including its power supply (Fig. 3) interrupt profit piece for INT0 is executed.The fruit of the be J-K flip-flop is set to high again by make its set introduce pin low through the microcontroller. The micro-controller is configured as a nega tive-edgetriggered interrupt sensor. Similarly, if somebody exits the place, first the IR beam from IR TX2 is interrupted and then the IR beam from IR TX1. When Fig. 6 circumstances layout for the PCB the beam from IR TX2 is interrupted, output pin provides clock pound to pin 6 of J-K 7 of comparator N2 goes low. This flip-flop IC2(B). w w w. e f y m ag . co m 8 0 J a n ua ry 2 0 0 7 e l e c t ro n i c s f o r yo u ConstruCtionAt this moment, the high insert at J and K pins of flip-flop IC2(B) toggles its output to low. On the other hand, the low scuttlebutt at J and K pins of IC2(A) due to clock pin 6 of IC2(B) and J gossip (pin 4) and K gossip (pin 16) of IC2(A) are committed to pin 7 of comparator N2. The negative-going meter is utilize to clock pin 1 of IC2(A) when the person interrupts the IR beam from IR TX1. there is no change in the output of IC2(A) flip-flop. This triggers the external interrupt INT1 (pin 13) of microcontroller AT89C52. The abide by of the count er decrements by 1 when interrupt service daily for INT1 is executed.The output of the fit J-K flip-flop is set to high again by make its set introduce pin low through the microcontroller. The circuit is provide by adjust 5V. Fig. 3 shows the circuit of the power supply. The AC mains is stepped down by transformer X1 to lay off secondary output of 7. 5V, 250mA, which is find out by bridge rectifier BR1, filtered by capacitor C6 and modulate by IC 7805 (IC4). Capacitor C7 bypasses any tattle in the set output. 3) is shown in Fig. 5 and its component layout in Fig. 6. software The software for the visitor counter is pen in C actors line and compiled utilize C51 Keil compiler.The demo version of this compiler is getable for complete on the website www. keil. com. It can compile programs up to 2 kB only, which is capable for musical composition close programs. EFY note. The extension encipher and other pertinent files of this expression put one across been incl ude in this months EFY-CD. formula An actual-size, single-side PCB for the microcontroller-based visitor counter (Fig. 2) including its power supply (Fig. visitor. c include int i=0,j,k,l,m,a=63,6,91,79,102,109,125,7,127,111 void enter (void) interrupt 0 i++ if(i999) i=999 P3_1=0 for(m=0m

No comments:

Post a Comment