Introduction & Contribution
At Phoenix Industries, we manufacture ASTRA Cups and other food-grade items. During the manufacturing process, several errors occur due to the injection molding machine's in-label system error. These errors result in incorrect labeling of items, and some cups may contain unnecessary materials. To automatically remove defective cups and pack only those that pass the quality test, we have developed an AI-based packing machine that detects and removes defective items along the production line. My contribution to this project includes designing and implementing the electronic control system and developing the firmware for the microcontroller .
Clear core motion controller and Its IO expansion board
As the main brain of the machine, I have utilized the ClearCore motion controller and its I/O expansion board to expand the current I/O ports. Firmware development for the controller was done using C++, and their motion controller library was used to control the motors precisely. The ClearCore inbuilt motion controlling library uses its timers to control the motors, which frees the CPU by generating step signals. This allows us to use the CPU cycle without much consideration of step and direction signal generation.
The ClearCore motion controller has only one core, so I wrote my firmware to avoid blocking the main thread. This is crucial because we have also implemented an HMI (Human-Machine Interface) for this machine
HMI Design and Communication
To implement a well-responsive modern HMI for the machine, we utilized the LattePanda single-board Windows computer. The main reason for selecting this single-board Windows computer is that it allows the HIKBOT camera software to run on the machine itself, enabling parameter modifications without requiring any other computer. Because our main controller is Windows-based, I developed a Windows-based HMI using the Unity game engine, which uses the .NET framework. It is uncommon to use Unity for HMI software development, but I have experience in creating games with the Unity engine, and it is very easy to add high-quality HMI features with Unity. This is one of the reasons I chose Unity.
Communication between the HMI software and the ClearCore motion controller is done using Ethernet. Ethernet is one of the fastest ways to communicate with the ClearCore motion controller and is easy to implement. Because this system communicates a large amount of data through the HMI software, it is mandatory to use a high-speed communication method between the two.
Another major advantage of using Ethernet is that all HIKBOT cameras also communicate with the software via Ethernet. I was able to use a network switch to connect all Ethernet clients to the software and use them simultaneously.
This HMI design allows the operator to control every aspect of the machine and provides all the statistics of the current production.
Electrical Wiring Design and Layout
Working Video