Project idea
Use two spaced IR sensor pairs at a doorway to infer direction, update an up/down counter on an 8051, and drive a relay so loads are on when at least one person is inside and off when the room becomes empty. The live occupancy value is shown on a 7‑segment display, making it ideal for energy‑aware automation in labs, classrooms, and halls.
Project description
An IR transmitter–receiver pair on each side of the door feeds the microcontroller GPIOs, where sequence logic decides whether to increment or decrement the people count for robust bidirectional detection. The 8051 multiplexes the 7‑segment display for clear visibility and energizes a 5 V relay (via driver) to switch a demo lamp, ensuring loads are active only when presence is detected.
Components
8051 Microcontroller
7 Segment Display
Relays
IR Sensors
Crystal Oscillator
Resistors
Capacitors
Transistors
Cables and Connectors
Diodes
PCB and Breadboards
LED
Transformer/Adapter
Push Buttons
Switch
IC Sockets
Software
Keil µVision IDE
Embedded C
Features
Bidirectional counting using two IR sensor pairs with direction logic for accurate people entry and exit tracking on 8051.
Auto load control: relay switches lamp on when count > 0 and turns it off when the last person exits for energy savings.
Real‑time numeric display on multiplexed 7‑segment for clear visibility of current occupancy.
Applications
Automated room lighting in classrooms, labs, libraries, and offices with occupancy‑based control to reduce energy wastage.
Entry/exit counting for halls, events, and access points where tallying and basic utilization analytics are needed.
Project Includes:
Fully assembled and tested circuit
Circuit diagram
Source code
(For DIY KITs - only the components will be provided)
Project Types:
- DIY KIT(Do IT YourSelf KIT) - We are providing only components in this kit for this project
- DIY KIT with Code & Circuit Connections - Along with the components, you will get the Code and the Circuit Connections file to help you build the project easily.
- Readymade Breadboard - We are providing fully assembled, tested and ready-made project using plug-n-play jumper wires and breadboard with all the other components, code & circuit diagram.
- Readymade Soldered - We are providing fully assembled, tested and ready-made project soldered on a PCB with all the other components, code & circuit diagram.
Dimensions (cm)
Approx 10 x 8 x 4 cm when assembled on a 400‑point breadboard/enclosure footprint in the same class as the 8 x 5 x 1 cm board, allowing space for modules and display height.
Shipping dimensions (cm)
Approx 20 x 15 x 10 cm boxed with adapter, padding, and accessories to protect display, relay, and sensors in transit.
Weight
Approx 250 g assembled; reference: breadboard ~40 g plus lightweight semiconductors and modules such as diodes at ~0.35 g each, relay/display/modules, wiring, and lamp demo load.
Estimate project weight
≈ 1kg
Notes: All the products are made by LearnElectronics India and not for re-sale.

