Arduino Nano with IR Sensor & OLED Display | KitKraft Object Counter Project
In this project, we’re going to build a simple yet effective object counter using an Arduino Nano, an IR sensor, and an OLED display. This project can be used in various practical applications, from counting items on a conveyor belt to tracking people entering a room. With easy-to-source components, it’s perfect for beginners looking to explore the world of microcontrollers and sensors.
Components Needed:
- Arduino Nano: This microcontroller serves as the central unit to process data from the IR sensor and display the count on the OLED.
- IR Sensor Module: Detects objects passing in front of it using infrared light.
- 0.96-inch OLED Display: Used to show the object count in real-time.
- Breadboard and Jumper Wires: For connecting the components.
- USB Cable: To upload code and power the Arduino Nano.
How It Works:
The IR sensor emits infrared light, and when an object passes in front of it, the light reflects back, signaling the sensor that an object has been detected. The Arduino Nano processes this signal and increments the count. The current count is then displayed on the OLED screen for easy monitoring.
This setup is ideal for environments where you need an automated counting system, such as:
- Inventory management
- Crowd control systems
- Production lines
Applications:
- Automatic Door Monitoring: Keep track of the number of people entering or exiting a building.
- Production Line Counter: Use the object counter to monitor items on a conveyor belt in industrial settings.
- Event or Exhibition Visitor Counter: Set this up at the entrance to count visitors automatically.
Project Steps:
-
Set Up the Hardware: Connect the IR sensor to the Arduino Nano. The VCC pin connects to the 5V pin on the Nano, GND to GND, and the OUT pin connects to a digital input pin (e.g., D2). Similarly, connect the OLED display using the I2C interface.
-
Upload the Code: Once you’ve set up the hardware, upload the code to the Arduino Nano. The code will handle detecting when an object passes the IR sensor and updating the count on the OLED display.
-
Test the System: Place objects in front of the IR sensor and watch the counter increase. The OLED display will update in real-time, showing the current count.
Enhancements:
- Buzzer or LED Alert: You can add a buzzer or LED that goes off every time an object is counted, providing an additional layer of feedback.
- Wireless Monitoring: For advanced users, integrate wireless modules like the ESP8266 to monitor the object count remotely.
- Data Logging: Store the count in a microSD card for future analysis or integrate it with a database via IoT platforms.
Conclusion:
This project is an excellent introduction to working with IR sensors and OLED displays using an Arduino Nano. Whether you’re a beginner or an experienced hobbyist, this object counter offers a great way to explore practical applications of electronics. You can easily expand the project by adding more features or integrating it into larger systems, making it a versatile tool in various scenarios.
Watch the Project in Action: Watch on YouTube Shorts
For Code & Schematics: Click Here