Simple Product Sorting System With Raspberry Pi and Arduino

by am.projects.forfun in Circuits > Arduino

14754 Views, 28 Favorites, 0 Comments

Simple Product Sorting System With Raspberry Pi and Arduino

Product Sorting System with Tensorflow Lite, Raspberry Pi and Arduino Demo

I am a FAN of engineering, I love programming and making electronic related projects in my free time, in this project I would share with you a Simple Product Sorting System I have done recently.

For making this system, please prepare the components as following:

1. Raspberry Pi 3 + Camera v2.1 + power supply

2. Arduino Uno + Motor shield + power supply (I use batter for this one)

3. NodeMCU ESP8266 + Motor shield + power supply (I use batter for this one)

4. DC Motor x 1

5. RC Servo 9g x 2

6. RC Servo MG90S x 2

7. IR sensor x 3

8. LEDs for lighting part

9. Ball Transfer Unit Bearing x 1

10. Cardboard, Ice cream sticks, Straws

11. Conveyor Belt

12. A tablet or a smart phone

System Parts and Components

This system basically include 3 parts.

1. Product storage and consuming arm. (I use boxes with label as products)

2. Conveyor Belts and it's attached actuators and sensors.

3. Control center and monitor. (Raspberry Pi + Camera as control center and Tablet as monitor)

Part1-Product Storage and Consuming Arm Brief Description

09.jpg
08.jpg
07.jpg
06.jpg
05.jpg
04.jpg
03.jpg
02.jpg
01.jpg
00.jpg
10.jpg
11.jpg
12.jpg

The consuming arm receives the control signal from controller (Raspberry Pi 3) to do the sequence: Hand up 90 degree => Arm rotates 90 degree => Hand down back to 0 degree => IR sensor detected box => Fingers close to take the box => Arm rotates back to 0 degree => Fingers open and drop the box.

For details, please take the code in:

https://github.com/ANM-P4F/ProductSortingSystem/tr...

Part2-Conveyor Belts and It's Attached Actuators and Sensors

00.png
01.jpg
02.jpg
03.jpg
04.jpg
05.jpg
06.jpg
07.jpg
08.jpg
09.jpg
10.jpg

The core of this part is an Arduino Uno. It receive "start/stop" signal from Raspberry Pi via serial connection to run/stop the conveyor bell. The first IR sensor along the conveyor bell connect to Arduino Uno via DIO, when it detects the box, the Arduino Uno stops the conveyor bell and send a signal to Raspberry Pi via serial connection to do the image classification.

After the classification has been done, the raspberry pi send back the signal to Arduino to continue running the bell.

The second IR sensor also connect to Arduino via DIO, when it detects the box, the Arduino controls the servo motor to do the sorting.

For detail, please see the source code in the following link:

https://github.com/ANM-P4F/ProductSortingSystem/tr...

Control Center and Monitor

05.jpg
00.jpg
01.jpg
02.jpg
03.jpg
04.jpg

A Raspberry Pi with a connected camera is the control center.

A tablet or a smart phone can be used as monitor panel.

The Raspberry Pi receives user's control command to start/stop the system via the HTTP request which can be done in a web browser in the tablet or smartphone.

After receiving the control command, the Raspberry Pi request the arm and conveyor bell parts to run.

The Raspberry Pi communicates with Arduino Uno (conveyor bell part) via serial and NodeMCU ESP8266 (consuming part) via UDP. The Raspberry Pi is a streaming server, it streams the camera images to the web browser. It also runs a vgg16 classification network on tensorflow lite to classify the boxes to get the type of logo (batman, superman and ours). The classification network is only run when the Raspberry Pi receive the command from Arduino Uno (when the box is detected by the first IR sensor).

Regarding the label of the box, in this project I used 3 classes of logo.

If you need to train your own classes, please use this source:

https://github.com/ANM-P4F/Classification-Keras

For details, please see the code in the following link:

https://github.com/ANM-P4F/ProductSortingSystem/tr...

That's All ! Hope You Like This Project !

Please let me know if you need more information.