Intro: PhantomX Pincher Robot - Apple Sorter
Safety requirements for food are growing. Both consumers and the authorities are increasingly demanding that the food we eat should be of high quality and with high security. Should problems occur during the production of food, the source of error must quickly be found and corrected. Food quality can be divided into objective and subjective quality. Objective food quality deals with characteristics that can be measured and documented while subjective food quality is the perception of the food by the consumers.
Product-oriented properties that can be measured and documented through self-control can, for example, be the color, texture and nutritional content of the food. Self-control, hygiene and risk assessment are all essential elements that are statutory for all companies that produce food.
A self-inspection program must ensure that the food produced by the company meets the requirements of the legislation. This project will investigate the possibility of creating a self-control program of corporate food.
How to develop a self-control program to ensure that apples the consumers buy at the store have the correct color, when they are leaving the manufacturer?
Step 1: Project Setup
For obvious reasons this project will only act as an mock-up of a real case scenario of a self-control program. The program is setup such that only red apples will go through the quality control. Bad apples, defined by colors other than red, will be sorted into a different pile.
The robot will pick up the apples and hold them in front of a camera, then the program will detect the color and sort them accordingly. Because of the lack of available apples, the program will be simulated with colored wooden blocks.
Step 2: Hardware and Material
The hardware and material used in this project are as follows:
PhantomX Pincher Robot Arm Kit Mark ll
5 x AX-12A servo motors
ArbotiX-M Robot Controller
2 x buttons
Blocks in different colors
Step 3: Software
The software used for this project was found on the following sites:
The required software to complete this project are as follows:
1. PhantomX Pincher Robot Arm Kit Mark ll (for the actuator/robotic arm)
2. Arbotix-M Robot Controller (for the Arbotix-M controller)
3. AX-12A (software for the servomotors)
4. Arduino (for the programming)
5. CMUcam5 Pixy (for the camera)
6. PixyMon (Shows what the pixy camera sees)
Step 4: Arbotix-M and Pixy Camera Setup
Connections for the Arbotix-M board and the camera can be seen in the pictures above. The connections are described below.
For Arbotix-M Board:
1. Digital Pin 0: PushButton Stop
2. Digital Pin 1: PushButton Start
3. Digital Pin 7: LedPin Green light
4. ISP PIN: Pixy camera connection
5. BLK: Connetion from the board to the PC
6. 3x 3-Pin DYNAMIXEL Ports (TTL): Control to the servos
7. Power supply for the Pixy Camera
For the Pixy camera:
8. Camera lens
9. RGB- LED light (Showing the color the camera detects)
10. USB-connection from the board to the PC
11. Button for registration of the color in front of the camera
12. ISP PIN: for connection to the Arbotix-M board
Step 5: The Program
The entire code for the color sorting program is included in this step, please feel free to copy.
The actions of the robot are explained hereafter:
The robotic arm will start in its start position (pointing straight upwards). Then it will lean over backwards till the pincher is in position around the block already placed and then squeeze together. The arm will then rise and move up over itself till the pincher is in front of the platform. Then it will hold the block still in front of the camera, till the color of the block has been detected. If the block is to be sorted as red, the arm will move to the right, lower itself so the block is on the table, and then release the block. If the block is not red the arm will move to the left instead and do the same thing. After this the robotic arm will rise a bit, move up over itself again and down till it is above the next block that is to be sorted, and then repeat the program.
A video of the working robot is to be seen in the next step.
Note that this robotic arm is placed on a platform with small leveling screws. If you need it to work at a different height, move the arm manually and note the positions of each end position, then change the servo positions in the code.
Step 6: Conclusion
A program has been made for quality control of apples, specifically a color sorting process between good red apples and bad apples in any other color. The robotic arm will sort the good apples in a pile to the right and the bad apples in a pile to the left. The process of sorting food with the help of a robot is highly beneficial in the food industry because of the increasing demands for quality, and to keep the costs of wages down and efficiency up.
The instructable goes through the themes of the motivation for choosing this specific project, the project setup, the hardware and software used, the setup and wiring of the Arbotix-M and the PixyCam board and the full program of the sorting system in code. To conclude on the project, the color sorting process was success which can be seen in the video below.
This intructable was made as an assignment by automation engineering students at University College Nordjylland in Denmark: Rolf Kjærsgaard Jakobsen, Martin Nørgaard and Nanna Vestergaard Klemmensen.