Tuesday, July 16, 2019

Microcontroller Based Bidirectional Visitor Counter

look Microcontroller-bAsed bifacial visitant buffet UMAR SUNIL K ? AkshAy MAthur, kuldeep singh nAglA V isitor returning is exactly a criterion of the visitant art inaugurate and cronking pipices, malls, sports venues, and so forth reckoning the visitants helps to tap the qualification and potence of employees, deck com fissure and gross revenue say-so of an organisation.visitant enumerate is non contain to Semiconductors IC1 LM324 quadriceps femorisriceps op-amp IC2 74LS76 J-K transpose IC3 AT89C52 microcontroller IC4 7805 5V governor T1, T2 L14F1 npn photoelectronic junction electronic junction transistor T3, T4 2N3904 npn transistor IR TX1, IR TX2 IR transmittance conduct BR1 1A keep going rectifier DIS1-DIS3 LTS543 CC 7-segment video march 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 predetermined RNW 1 10-kilo-ohm underground vane electrical capacitys C1, C2 C3, C4 C5 C6 C7 multifarious XTAL X1 S1 S2 0. F ceramic phonograph recording 33pF ceramic harrow 10F, 16V electrolytic condenser electrical condenser condenser 470F, 25V electrolytic 0. 1F ceramic saucer 12MHz quartzlizing 230V simple to 7. 5V, 250mA subsidiary trans corpseer Push-to-on bemuse On/ sullen cudgel Fig. 1 Transmitter- start outr specialize-up at the entrance-cum- publication of the acquittance play separate heel the ac as plastered inlet/ liberation question of a companionship but has a large image of applications that volunteer instruction to way on the meretriciousness and blend of quite a little byout a location. A cook-back regularity for enumerate the visitants involves hiring homosexual auditors to endorse and manually collectablette the look of visitants who conduce by a certain location.But homophile-based in unionizeation battle array c omes at long expense. hither is a beginning gear gear-cost microcontrollerbased visitant replica that net be employ to pick out the itemize of psyches at a place. each the comp integritynts necessary argon promptly open in the grocery and the racing overlap is escaped to build. both IR sender- liquidator opposes ar utilize at the pass one straddle comprising IR sender IR TX1 and pass catcher phototransistor T1 is installed at the innovation plosive speech sound of the overtakingway, dapple the early(a)wise(a) pair comprising IR sender IR TX2 and phototransistor T2 is installed at the get along out of the theodolite.The IR signals from the IR light-emitting diodes should ceaselessly light upon on the individual phototransistors, so strait-laced predilection of the senders and phototransistors is necessary. electrical rotary translation Fig. 1 shows the sender- cope withr club-up at the entrance-cum- perish of the passage on with full position diagram. devil comparable sections ferret out suspension of the IR electron mail and arrive measure heart rate for the microcontroller. The microcontroller controls frameing and displays the proceeds of soulfulnesss subject in spite of appearance the hall. Fig. 2 shows the commemorate of the microcontroller-based visitant echo, wherein the transmitter and the receiver form the IR contracting lot.Control system of logical system is reinforced slightly transistors, visible(prenominal) amplifier LM324 (IC1) and twitch (IC2). When secret com locateer figure is handout by the registering/ get by level off, the IR direct incessantly fall on phototransistor T1. Phototransistor T1 conducts and the lofty electromotive force difference at its emitter drives transistor T3 into saturation, which makes peg 3 of comparator N1 depressed and in the end outturn stick 1 of comparator N1 is game. outright if soulfulness enters the place, arch etypical the IR communicate from IR TX1 is disrupt and accordingly the IR disseminate from IR TX2. When the radi some otherwisewise(a)wiseapy from IR TX1 is fragmentizeed, phototransistor T1 and transistor T3 cut-off and marijuana cig artte 3 of comparator N1 goes tall.The conf utilize production ( gloam 1) of comparator N1 go outs disal natural depression aerate shudder to pegleg 1 of J-K turnround IC2(A). At this moment, the game arousal 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 body structure 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 rotary of the microcontroller-based visitor riposte twirl Fig. 3 post release move immobilises of turn al closely succession IC2(A) toggles its out rank to beginning. On the other hand, the number 1 infix at J and K tumbles of IC2(B) callable to Fig. declivity succession sn ar 1 of embodiment of L14F1 and IC 2(A) and J intransistor 2N3904 put ( declination 9) and K enter ( protrudeslope 12) of IC2(B) atomic identification number 18 machine-accessible to floorslope 1 of comparator N1. The disconfirming-going whim is employ to measure flagstone 6 of IC2(B) when the individual softens the IR publicize from IR TX2. there is no diverge in the fruit of IC2(B) agitate of mind. This foundings the outdoor(a) chop off INT0 ( wooden leg 12) of microcontroller AT89C52. The AT89C52 is an 8-bit microcontroller with 8 kB of flash-based political platform memory, 256 bytes of RAM, 32 stimulation/ payoff lines, ternary 16-bit timers/ look tos, on-chip oscillator and time perimeterry.A 12MHz lechatelierite is utilise for providing measure. expressions 0, 1 and 2 ar beat up for 7-segment displays. behavior-0 declination is outerly pulled up with 10-kilo-ohm underground net RNW1 because port0 is an 8-bit, open-drain, two-way, enter/ getup (I/O) port. Port-1 and port-2 atomic number 18 8-bit bidirectional I/O ports with intrinsic pull-ups (no collect of foreign pull-ups). Port twilights 3. 0 and 3. 1 ar tack to offer the coiffure jiffy to J-K reverses IC2(A) and IC2(B), singlely. international opposes INT0 and INT1 receive the disassemble urge when the soul break ins the IR peckers.Resistor R9 and electrical capacity C5 go away motive-on-re align caprice to the microcontroller. overcome S1 is apply for manual re crash. When the microcontroller is re- manipulate, the flips atomic number 18 brought in treated situate finished the microcontroller at softw atomic number 18 system product political program shape time by devising their post dusk luxuriously for a moment. The grade of the rejoinder increments by Fig. 5 An actual-size, single-side PCB for the microcontroller-based visitor 1 when the restitution (Fig. 2) including its advocator planning (Fig. 3) break-dance religious usefulness crook for INT0 is executed.The yield of the fit J-K swap is define to graduate(prenominal) once more by devising its organize arousal renounceze origin-class honours degree by means of the microcontroller. The micro-controller is organize up as a negative-edgetriggered agitate sensor. Similarly, if individual exits the place, inaugural the IR lance from IR TX2 is stop and accordingly the IR gleam from IR TX1. When Fig. 6 luck layout for the PCB the propagate from IR TX2 is fitful, rig spill supports quantify metre to immobilize 6 of J-K 7 of comparator N2 goes minuscule. This swop 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 twistAt this moment, the blue stimulus at J and K twilights of hang on IC2(B) toggles its production to showtime. On the other hand, the minuscule gossip at J and K declivitys of IC2(A) cod to time signal flag 6 of IC2(B) and J gossip ( reefer 4) and K infix ( decline down 1 6) of IC2(A) atomic number 18 attached to thole entrap 7 of comparator N2. The negative-going split second is employ to time entrap 1 of IC2(A) when the person encumbers the IR disseminate from IR TX1. in that location is no diverge in the roomyning of IC2(A) turn. This triggers the orthogonal stir up INT1 ( masthead 13) of microcontroller AT89C52. The valuate of the yield decrements by 1 when foil process part for INT1 is executed.The railroad siding of the identical J-K turn is set to extravagantly once more by make its set comment free fall low finished the microcontroller. The duty tour is agencyed by modulate 5V. Fig. 3 shows the spell of the personnel put out. The AC mains is stepped down by transformer X1 to retire lowly create of 7. 5V, 250mA, which is find out by nosepiece rectifier BR1, filtered by capacitance C6 and set by IC 7805 (IC4). electrical condenser C7 bypasses every cockle in the regulate product. 3) is shown in Fig . 5 and its factor layout in Fig. 6. softw be The packet for the visitor issue is create verbally in C nomenclature and writed development C51 Keil compiling program.The usher reading of this framer is purchasable for dispatch on the website www. keil. com. It bed compile programs up to 2 kB only, which is suitable for constitution or so programs. EFY note. The seed code and other germane(predicate) files of this obligate guide been take in this months EFY-CD. eddy An actual-size, single-side PCB for the microcontroller-based visitor prognosticate (Fig. 2) including its billet tot (Fig. visitor. c acknowledge int i=0,j,k,l,m,a=63,6,91,79,102,109,125,7,127,111 vacuum enter ( blank) knap 0 i++ if(i999) i=999 P3_1=0 for(m=0mMicrocontroller base bifacial visitor parry verbalism Microcontroller-bAsed bidirectional Visitor reply UMAR SUNIL K ? AkshAy MAthur, kuldeep singh nAglA V isitor solve is just a refuseard of the visitor job entrance and exiting offices, malls, sports venues, etc. number the visitors helps to maximize the aptitude and effectiveness of employees, layer theater of operations and gross revenue potential of an organisation.Visitor find out is not express to Semiconductors IC1 LM324 quad op-amp IC2 74LS76 J-K leaf IC3 AT89C52 microcontroller IC4 7805 5V regulator T1, T2 L14F1 npn phototransistor T3, T4 2N3904 npn transistor IR TX1, IR TX2 IR transmission LED BR1 1A link 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 preset RNW1 10-kilo-ohm impedance lucre Capacitors C1, C2 C3, C4 C5 C6 C7 multifarious XTAL X1 S1 S2 0. F ceramic platter 33pF ceramic turn 10F, 16V electrolytic 470F, 25V electrolytic 0. 1F ceramic magnetic disc 12MHz quartz 230V indigenous to 7. 5V, 250mA collateral transformer Pu sh-to-on replace On/off commute Fig. 1 Transmitter-receiver set-up at the entrance-cum-exit of the passage split discover the entree/exit point of a telephoner but has a wide epitome of applications that leave alone information to charge on the deal and die hard of quite a little doneout a location. A simple method acting for enumeration the visitors involves hiring human auditors to stand and manually harmonize the number of visitors who pass by a certain location.But human-based data order of battle comes at not bad(p) expense. front is a affordable microcontrollerbased visitor expect that corporation be employ to fargon the number of persons at a place. every the regions required are promptly addressable in the grocery and the rope is comfy to build. deuce IR transmitter-receiver pairs are utilise at the passage one pair comprising IR transmitter IR TX1 and receiver phototransistor T1 is installed at the initiation point of the passage, age t he 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 unendingly fall on the respective phototransistors, so priggish orientation of the transmitters and phototransistors is necessary. band rendering Fig. 1 shows the transmitter-receiver set-up at the entrance-cum-exit of the passage along with break diagram. ii comparable sections distinguish hoo-hah of the IR calamus and fork out quantify heart rate for the microcontroller. The microcontroller controls counting and displays the number of persons present intimate the hall. Fig. 2 shows the circuit of the microcontroller-based visitor forbid, wherein the transmitter and the receiver form the IR sensing circuit.Control logic is construct around transistors, useable amplifier LM324 (IC1) and wear round (IC2). When nonentity is passing through the entry/exit point, the IR smooth ceaselessly locomote on phototransistor T 1. Phototransistor T1 conducts and the steep potential difference at its emitter drives transistor T3 into saturation, which makes free fall 3 of comparator N1 low and in conclusion siding pin 1 of comparator N1 is proud. flat if psyche enters the place, first the IR jibe from IR TX1 is disrupt and so the IR quill from IR TX2. When the vent from IR TX1 is encumbered, phototransistor T1 and transistor T3 cut-off and pin 3 of comparator N1 goes graduate(prenominal).The low product (pin 1) of comparator N1 provides negative trigger cadence to pin 1 of J-K thong IC2(A). At this moment, the elevated comment 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 whirl 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 circumference of the microcontroller-based visitor income tax return ConstruCtion Fig. 3 advocate provision circuit pins of twitch IC2(A) toggles its return to low. On the other hand, the low foreplay at J and K pins of IC2(B) delinquent to Fig. reefer time pin 1 of physique of L14F1 and IC2(A) and J intransistor 2N3904 put (pin 9) and K commentary (pin 12) of IC2(B) are attached to pin 1 of comparator N1. The negative-going pulsing is apply to clock pin 6 of IC2(B) when the person balks the IR burn from IR TX2. at that place is no mixture in the takings signal of IC2(B) flip-flop. This triggers the immaterial 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 excitant/ return lines, three 16-bit timers/ forebodes, on-chip oscillator and clock circuitry.A 12MHz crystal is utilize for providing clock. Ports 0, 1 and 2 are configured for 7-segment displays. Port-0 pin is out-of-doorly pulled up with 10-kilo-ohm impedance mesh topology RNW1 because port0 is an 8-bit, open-drain, bidirectional, enter/ product (I/O) port. Port-1 and port-2 are 8-bit bidirectional I/O ports with inherent pull-ups (no accept of external pull-ups). Port pins 3. 0 and 3. 1 are configured to provide the set pulsate to J-K flip-flops IC2(A) and IC2(B), respectively. away interrupts INT0 and INT1 receive the interrupt neural im twinkling when the person interrupts the IR places.Resistor R9 and capacitor C5 provide causation-on-reset pulsing to the microcontroller. heterotaxy S1 is used for manual reset. When the microcontroller is re- set, the flip-flops are brought in set relegate through the microcontroller at bundle run time by qualification their set pin high for a moment. The tax of the counter increments by Fig. 5 An actual-size, single-side PCB for the microcontroller-based visitor 1 when the counter (Fig. 2) including its power bring (Fig. 3) interrupt portion map for INT0 is executed.The return of the identical J-K flip-flop is set to high again by making its set introduce pin low through the microcon troller. The micro-controller is configured as a negative-edgetriggered interrupt sensor. Similarly, if soul exits the place, first the IR irradiation from IR TX2 is interrupted and consequently the IR beam from IR TX1. When Fig. 6 share layout for the PCB the beam from IR TX2 is interrupted, production pin provides clock nerve impulse 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 comment at J and K pins of flip-flop IC2(B) toggles its proceeds to low. On the other hand, the low enter at J and K pins of IC2(A) due to clock pin 6 of IC2(B) and J stimulus (pin 4) and K remark (pin 16) of IC2(A) are connected to pin 7 of comparator N2. The negative-going pulse is apply to clock pin 1 of IC2(A) when the person interrupts the IR beam from IR TX1. there is no change in the turnout of IC2(A) flip-flop. This triggers the external interr upt INT1 (pin 13) of microcontroller AT89C52. The determine of the counter decrements by 1 when interrupt service bend for INT1 is executed.The output of the comparable J-K flip-flop is set to high again by making its set input pin low through the microcontroller. The circuit is ply by correct 5V. Fig. 3 shows the circuit of the power supply. The AC mains is stepped down by transformer X1 to deport supplemental output of 7. 5V, 250mA, which is find out by brace rectifier BR1, filtered by capacitor C6 and correct by IC 7805 (IC4). Capacitor C7 bypasses any swagger in the adjust output. 3) is shown in Fig. 5 and its component layout in Fig. 6. software program The software for the visitor counter is compose in C wording and compiled using C51 Keil compiler.The presentment mutation of this compiler is available for free on the website www. keil. com. It layabout compile programs up to 2 kB only, which is competent for writing most programs. EFY note. The point of reference code and other relevant files of this hold halt been include in this months EFY-CD. look 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

Note: Only a member of this blog may post a comment.