Simple Product Sorting System With Raspberry Pi and Arduino

Introduction: Simple Product Sorting System With Raspberry Pi and Arduino

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

Step 1: 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)

Step 2: Part1-Product Storage and Consuming Arm Brief Description

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...

Step 3: Part2-Conveyor Belts and It's Attached Actuators and Sensors

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...

Step 4: Control Center and Monitor

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...

Step 5: That's All ! Hope You Like This Project !

Please let me know if you need more information.

Be the First to Share

    Recommendations

    • DIY Summer Camp Contest

      DIY Summer Camp Contest
    • Maps Challenge

      Maps Challenge
    • Fandom Contest

      Fandom Contest

    8 Comments

    0
    xXperia12
    xXperia12

    Question 4 months ago on Step 5

    How to run server in raspberry pi

    0
    SumitD13
    SumitD13

    7 months ago

    please upload a detail video on making this project from scratch

    0
    ankit.prajapati26
    ankit.prajapati26

    Question 8 months ago

    Can you please upload the circuit diagram?

    0
    huzer2096
    huzer2096

    8 months ago

    Can you please share the circuit diagram?
    Awesome project!!!

    0
    Beckum
    Beckum

    1 year ago on Step 5

    please include circuit diagram. can you please tell me how to remove arm code. thanks

    0
    am.projects.forfun
    am.projects.forfun

    Reply 1 year ago

    Hi Beckum, to remove arm code, you just don't use the esp8266 code, regarding circuit diagram I would make and upload soon ...

    0
    seamster
    seamster

    1 year ago

    Impressive work! : )