This project simulates an automated conveyor belt control system for a small-scale production line. The core challenge and primary objective of this project was to build the entire system using strict bare-metal C programming on an ATmega328P microcontroller.
As part of our Microprocessor & Microcontroller System Final Project, the use of standard Arduino functions (such as digitalWrite(), analogRead(), delay()) and external libraries (like LiquidCrystal.h) was strictly prohibited. Every hardware interaction—from driving the LCD to reading analog sensors and triggering interrupts—is handled entirely through direct register manipulation.
The system relies on a DC motor to drive the conveyor and two Infrared (IR) obstacle sensors placed at the entry and exit points.
- Initial State: The motor is stopped, and the product counters are at zero. Upon booting, the LCD displays a splash screen showing "Project Uas" and our group name, "Kelompok 2 IVA".
- Product Entry (Auto-Start): When a product enters the conveyor, the first IR sensor detects it. This triggers an external interrupt that immediately starts the DC motor and increments the "In" counter.
- Speed Control: While the conveyor is running, an operator can adjust the speed using a potentiometer. The microcontroller reads this analog value and converts it into a Pulse Width Modulation (PWM) signal to smoothly control the motor's speed.
- Product Exit (Auto-Stop): When the product reaches the end of the line, the second IR sensor detects it. This triggers another interrupt that halts the motor instantly and increments the "Out" counter.
- Real-Time Monitoring: A 16x2 LCD continuously displays the live conveyor speed (in percentage 0-100%), the motor status (RUN/STOP), and the total number of products that have entered and left.


















_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)
Comments