The LEGO Color Sorting Machine with PC-HMI is an advanced automation project we built as part of our final semester in the Automation and Robotics Technology program. This intelligent machine can automatically detect the color of LEGO bricks and sort them based on what the user chooses through the HMI. It clearly shows how mechanical parts, electrical systems, and software programming can all work together in one smart, efficient, and practical automated system designed for real-world use.
The main controller of this machine is the Siemens S7-1200 PLC (Programmable Logic Controller). It controls the timing, sequence, and operation of all parts. The Arduino is used to detect the color of each LEGO brick. A Human-Machine Interface (HMI) running on a computer is used to control and monitor the system. The PLC and HMI are connected using an Ethernet cable so they can share data in real time.
When you turn on the machine, the first thing you see on the HMI is the Main Screen. It shows the project title and the names of all group members. There are buttons at the bottom that let users go to other pages like Operator, Production, Maintenance, and Error & Fault. At the top of every screen is the System Status bar, which shows live updates and warnings. Clicking this bar brings you to the Error & Fault screen.
The Operator Screen lets users start or stop the machine and choose which color should be the “Good Part.” The system then considers any other color as a “Bad Part.” It shows the cycle time (how long it takes to sort each piece), tells you if the current part is Good or Bad, and keeps a live LEGO counter.
The Production and Maintenance Screens are for administrators only. You need a username and password to open them. The Production Screen shows running time, idle time, and other stats. You can also reset timers and counters here. The Maintenance Screen lets you control motors and valves manually, but only when the machine is off. It also shows which devices are active or inactive using color indicators (green or grey).
The Error & Fault Screen lists any problems in the system. It helps the user quickly find and fix issues, like if a LEGO gets stuck or doesn’t reach the sensor on time.
The machine includes a 3D-printed gravity feeder that holds up to six LEGO bricks. A pneumatic cylinder pushes each piece onto the conveyor. The conveyor has guides to keep the blocks in place and align before color detection. The Arduino checks the color, and based on the result, the PLC activates another cylinder to either send it to the Good Part chute or let it continue to the end of the conveyor.
In short, our LEGO Color Sorting Machine is a great example of how automation can solve real problems. It also shows our team’s dedication, creativity, hard work, knowledge, and ability to design and build a fully functional, reliable system from start to finish.
Powered by Acadiate
© 2011-2026, Acadiate Inc. or its affiliates · Privacy