The problem
An IR object counter for conveyor lines is an Arduino-based counting rig that counts every item passing a fixed point on a moving belt and shows the running total on a bright 4-digit 7-segment display. A reflective infrared sensor mounted beside the belt watches for each passing carton or bottle; every time the beam is interrupted, the controller registers one count, increments the total, and refreshes the display, so an operator can read the batch total at a glance without stopping the line or keeping a manual tally. A preset batch size, a reset push-button, and a buzzer alert complete the working loop: when the count reaches the preset, the buzzer sounds and the belt can be stopped for packing or changeover. The rig is built around an Arduino Uno, a reflective IR sensor module, a 4-digit 7-segment display driven by a TM1637 driver, and a small DC-motor conveyor model.
The DC gear motor drives the belt carrying cartons past the sensor gate.
How it works
A carton or bottle riding the belt enters the sensor gate, where the reflective IR module's emitted beam bounces off the item's surface and back into the receiver, flipping the module's digital output. The Arduino watches that output for a falling edge, waits out a short debounce window to reject flicker, and only then increments its counter by one, so each item is counted exactly once no matter how long it blocks the beam. The updated total is written to the 4-digit 7-segment display through the TM1637 driver, which multiplexes the digits fast enough that all four appear lit at once. Meanwhile the firmware compares the total against the preset batch size on every count, and the moment the two match it drives the buzzer, signalling the operator to stop the belt and clear the batch. Pressing the reset button zeroes the counter and silences the buzzer, and the cycle starts again with the next batch.
- The DC gear motor drives the belt, carrying cartons and bottles steadily past the sensor gate mounted beside the belt.
- Each item reflects the IR module's beam back into its receiver, flipping the module's digital output from HIGH to LOW.
- The Arduino detects the falling edge on its digital input pin and starts a short debounce window to reject flicker from vibration or rough surfaces.
- Once the signal is confirmed stable, the firmware increments the counter by exactly one and writes the new total to the 4-digit 7-segment display.
- The firmware compares the total against the preset batch size after every count, without pausing the belt or the display refresh.
- When the total reaches the preset, the buzzer sounds and stays on until the operator acknowledges the batch.
- The operator stops the belt, clears the finished batch, and presses the reset button to zero the counter for the next batch.
Builder note from the build: mount the IR module at a slight angle, roughly 10 to 15 degrees off perpendicular to the belt, and shield it with a short cardboard hood so overhead tube lights do not swamp the receiver. Calibrate the onboard potentiometer using the darkest sample item in the batch, not the lightest, because a threshold tuned on a bright carton is the one that misses dark bottles later.
Tech stack:
- Arduino Uno (ATmega328P)
- Arduino IDE · C/C++ firmware
- Reflective IR sensor module
- 4-digit 7-segment display · TM1637 driver
- DC gear motor · L298N motor driver
- Breadboard · jumper wiring
- 12 V DC adapter · 5 V regulation
Comparison with alternatives
| Approach | How counting happens | Operator effort | Cost scale | Best for |
|---|---|---|---|---|
| IR object counter (this build) | Sensor edge triggers one count per item automatically | Low, watch the display only | Low | Packaging-line and lab demos with steady item flow |
| Manual tally | A person counts items by hand or with a clicker | High, tiring and error-prone | Very low | Very small batches counted occasionally |
| Camera-based counting | A camera and software detect and count items in video | Low after setup | High | Lines that also need inspection or sorting |
| Mechanical tally counter | A lever or wheel advances a mechanical counter per item | Medium, needs physical contact | Low | Slow lines with uniform, sturdy items |
| Parameter | Value |
|---|---|
| Controller | Arduino Uno, ATmega328P (datasheet) |
| Sensor type | Reflective IR module, digital output (datasheet) |
| Sensing range | Approximately 2 cm to 30 cm, adjustable (datasheet) |
| Display | 4 digits (design specification), red 7-segment, TM1637 driver |
| Count capacity | 0 to 9999 counts (design specification) |
| Belt speed | Approximately 10 cm/s to 30 cm/s (design target) |
| Belt length | Approximately 60 cm (prototype dimension) |
| Item gap needed | At least approximately 2 cm between items (design target) |
| Supply | 12 V DC adapter, regulated to 5 V |
| Preset batch | Configurable, up to 9999 counts (design specification) |
| Debounce window | Approximately 50 ms (design target) |
| Buzzer | 5 V active buzzer (datasheet) |
Project features
The IR object counter for conveyor lines combines four capabilities that matter most on a packing line: edge-triggered counting that registers each item exactly once, a large 4-digit 7-segment display readable from across a lab bench, a preset batch size that sounds a buzzer the moment a batch is complete, and a one-touch reset that clears the total for the next batch. Around that core, the sensing range is adjustable with the module's onboard potentiometer, the belt speed is set with a simple motor control, and the design leaves room for a second direction-sensing sensor or data logging later. Every capability below is labelled honestly: what is implemented now, what is configurable, what is an optional extra, and what belongs to future scope. The display driver, motor control, and sensor tuning are all documented so the build can be explained part by part in a viva.
- [Edge-triggered IR counting] Implemented. The firmware counts only on the falling edge of the sensor signal, so one passing carton produces exactly one count even if the sensor stays blocked for a while. A short debounce window filters out flicker from vibration or uneven carton surfaces.
- [4-digit 7-segment display] Implemented. The running total is shown on a bright red 4-digit display driven by a TM1637 driver, readable from several metres away in normal lab lighting, with leading zeros shown so the count always reads as a fixed-width number.
- [Batch preset with buzzer alert] Implemented. A preset batch size is set in the firmware, and when the count reaches it, a buzzer sounds so the operator knows the batch is complete without watching the display continuously.
- [One-touch reset] Implemented. A push-button on the rig clears the count to zero instantly, so the next batch can start without re-uploading code or power-cycling the board.
- [Adjustable sensing range] Configurable. The IR module's onboard potentiometer sets the detection distance, so the same rig can be tuned for small bottles close to the sensor or larger cartons further away.
- [Belt-speed control] Configurable. The DC gear motor speed is set through the motor driver, letting the demo run slowly for explanation or faster to show continuous counting.
- [Second sensor for direction sensing] Optional customization. A second IR sensor can be added on request so the rig can tell whether an item moved forward or backward along the belt.
- [Count logging to a computer] Future scope. Serial logging of each count with a timestamp is not part of the base build; it can be developed later as an extension.
What is included
- Working conveyor rig with belt, rollers, DC gear motor and sensor gate
- Arduino Uno with the counting firmware uploaded and documented
- 4-digit 7-segment display unit with TM1637 driver, reset button and buzzer
- Circuit and wiring documentation with pin connections
- Component list with module names and ratings
- Setup and calibration instructions, including the sensor-alignment note
- Project abstract PDF and demonstration guidance
Limitations & prerequisites
- Reflective IR sensing works over approximately 2 cm to 30 cm only; items outside that band are not detected reliably.
- Very dark, matte, or transparent surfaces reflect less IR light, so the sensor may need re-tuning or a lighter target patch for such items.
- Items need a gap of at least approximately 2 cm between them; items touching each other can be read as a single item.
- Strong direct sunlight or nearby IR sources can interfere with the receiver, so the rig is meant for indoor lab use.
- The counter counts items; it does not identify what an item is, read labels, or sort by size or type.
- The belt and frame are a lab prototype rated for light items up to approximately 500 g each (design target); they are not a substitute for an industrial conveyor.
- The display shows the running total only; batch history is not stored when power is removed.
Frequently Asked Questions
Is this project suitable for a final-year project?
Yes, it suits Electrical, Electronics and Instrumentation final-year students because it combines sensor interfacing, embedded firmware, display driving, and a small mechanical conveyor build in one demonstrable system. The counting logic, debounce handling, and calibration process give plenty of material for a report and a viva discussion, and the working demo makes the concept easy to present to examiners.
Which controller and sensor are used?
The build uses an Arduino Uno based on the ATmega328P microcontroller, paired with a reflective IR sensor module that outputs a digital HIGH/LOW signal when an object reflects its beam. The Uno is chosen because its digital inputs, timers, and large community examples make the edge-detection and debounce logic straightforward to explain and modify.
How does the counter avoid counting one item twice?
The firmware counts only on the falling edge of the sensor signal and then applies a debounce window of approximately 50 ms, so a single passing item produces exactly one increment. Even if the beam flickers while a rough carton surface passes, the debounce logic treats the whole passage as one event rather than several.
Can the batch size be changed?
Yes, the preset batch size is a single value in the firmware that can be changed before uploading, and it can be made adjustable with buttons or a potentiometer as an optional customization. When the count reaches the preset, the buzzer sounds until the operator resets the counter for the next batch.
What happens when the preset count is reached?
The buzzer sounds continuously to signal that the batch is complete, while the display keeps showing the final total so the operator can record it. The belt is stopped manually, the finished batch is cleared, and pressing the reset button zeroes the counter and silences the buzzer for the next batch.
Does the counter need internet or a computer to run?
No, the counter runs entirely standalone on the Arduino once powered, with no internet, computer, or phone connection required for counting or display. A computer is only needed once, to upload the firmware, and the optional serial logging extension is the only feature that would use one afterwards.
Components & software requirements
- Arduino Uno (ATmega328P)
- Arduino IDE · C/C++ firmware
- Reflective IR sensor module
- 4-digit 7-segment display · TM1637 driver
- DC gear motor · L298N motor driver
- Breadboard · jumper wiring
- 12 V DC adapter · 5 V regulation
Comparison with alternatives
| Approach | How counting happens | Operator effort | Cost scale | Best for |
|---|---|---|---|---|
| IR object counter (this build) | Sensor edge triggers one count per item automatically | Low, watch the display only | Low | Packaging-line and lab demos with steady item flow |
| Manual tally | A person counts items by hand or with a clicker | High, tiring and error-prone | Very low | Very small batches counted occasionally |
| Camera-based counting | A camera and software detect and count items in video | Low after setup | High | Lines that also need inspection or sorting |
| Mechanical tally counter | A lever or wheel advances a mechanical counter per item | Medium, needs physical contact | Low | Slow lines with uniform, sturdy items |
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.