Introduction: Warehouse Management Robot

Welcome

This is a comprehensive instructables on our Warehouse Management Robot Project, we will be explaining about the neccesary components and what goes into our robot in order to make it functional. We will also demonstrate briefly on the function of this robot

Our Group

  • 2501986832 - Arkannabil Pratama
  • 2501974782 - Jonathan Suhalim
  • 2502002500 - Javier Nugraha Saonard


Supplies

  • Esp32 DevKitC 32U + Antenna
  • L298N Motor Driver 2x
  • Servo Motor MG996r 360 degrees
  • MT3608 Step Up Voltage Converter
  • 18650 Battery 3.7V 6x
  • 18650 Battery holder for 3 Batteries with included switch 2x
  • DC Gearbox motor 4x
  • Omni Wheel 4x (In this scenario, we're using mechanum
  • Jumper wires
  • PVC Pipe 1 1/2 inch 80cm
  • Two sturdy light board made from plastic/PLA filament/wood 24cm x 24cm x 1.5cm
  • 10uf capacitor
  • L7805 5v Regulator

Step 1: Brief Explanation and Goals

Warehouse Management Robot is a robot that could help a warehouse manager organize a warehouse by sorting items and deliver into their correct sortings.

We have found that in a warehouse environment, sorting items into their correct storage is time consuming and would need extra manpower in order to sort them into the correct container. This robot will ease the sorting process and help it be more efficient.

In our design, we are hoping to achieve:

  • A Robot that could deliver items from departure point to their respective containers
  • A Robot that could be easily controlled and user friendly
  • A Robot that would help warehouse managers on sorting items

Step 2: Methodology

We are using the ESP32U micro-controller as our main controller, this controller is connected using the antenna to our mobile application for controlling the robot. The pins of the micro-controller will be connected to the servo and motor driver. We're using flutter for the mobile application.

We're using the ESP32U specifically since it has the ability to have an external antenna, this allows more signal coverage than what you might see if you use the integrated antenna in the ESP32D. The low power usage of the overall ESP32 also contributes to the efficiency of the system and since the L298N Motor Driver could provide power up to a certain amount, the micro controller is perfect for the type of situation.

L298N Motor Driver by itself is a main component for this robot, since this component would control the motors as well providing power to the whole system. This motor driver has a function of providing a power source from the 5V Output.

We're using a L7805 regulator for the servo to stabilize the voltage with the added capacitor. Though it's not needed when using ESP32 since the input 5V can trigger the regulator that is inside the ESP32.

The MT368 Step Up Voltage Converter is used to increase the voltage running, since ESP32 and the Servo have a minimum voltage limit

We're using an Omni Wheel, specifically the Mechanum to make it viable for the warehouse environment.

The servo we're using is able to turn 360 degrees since we need it to spin.

Step 3: Flow Chart

The flow chart is representing the robots action, if a task is done, you can still repeat it until completion

Step 4: Circuit Diagram

This is the overview of our circuit for this robot

The ESP32U will be acting as a main hub for the connection of all the components, it will be connected with the L298N motor driver, servo and power.

Here are the pins that is connected to the micro controller:

L298N Motor Driver 1:

  • ENA > GPIO12
  • IN1 > GPIO14
  • IN2 > GPIO27
  • IN3 > GPIO26
  • IN4 > GPIO33
  • ENB > GPIO32
  • OUT1+ > Motor 1+
  • OUT1- > Motor 1-
  • OUT2+ > Motor 2+
  • OUT2- > Motor 2-
  • 12V > Battery 1+
  • GND > Battery 1-

L298N Motor Driver 2:

  • ENA > GPIO5
  • IN1 > GPIO17
  • IN2 > GPIO16
  • IN3 > GPIO4
  • IN4 > GPIO0
  • ENB > GPIO2
  • OUT1+ > Motor 3+
  • OUT1- > Motor 3-
  • OUT2+ > Motor 4+
  • OUT2- > Motor 4-
  • 12V > Battery 2+
  • GND > Battery 2-

Servo MG996r:

  • PWM > GPIO13
  • VCC > OUT (L7805)
  • GND > GND (L7805)

MT3608 Step Up Voltage Converter (connected with L298N Motor Driver 1):

  • VIN+ > 5V (L298N Motor Driver)
  • VIN- > GND (L298N Motor Driver)
  • VOUT+ > 5V (ESP32)
  • VOUT- > GND (ESP32)

MT3608 Step Up Voltage Converter (connected with L298N Motor Driver 2):

  • VIN+ > 5V (L298N Motor Driver)
  • VIN- > GND (L298N Motor Driver)
  • VOUT+ > IN (L7805)
  • VOUT- > GND (L7805)


Step 5: PCB Design

This is our PCB for this robot, there will be a dedicated wire for the battery and motor output.

Specifications:

  • Length = 135mm
  • Wide = 70mm
  • Area = 9450mm
  • Copper routing lane size (PWM, ENA, ENB, IN1..) = 1mm
  • Copper routing lane size (Power Providing Lane (such as VOUT+ > 5V)) = 1.5mm
  • Single layer

Step 6: 3D Design

This is one of our early 3D Design Prototype.

The design is made to be efficient and simple

Note: We then use the 2 wheels facing each other, since we adapt to using mechanum wheel

Step 7: Code

4 functions (BLYNK_WRITE(V1), BLYNK_WRITE(V2), BLYNK_WRITE(V3), BLYNK_WRITE(V4)) are defined to handle Blynk application commands to move the robot forward, backward, left, and right.

Another function (BLYNK_WRITE(V5)) is defined to control the servo motor. The servo rotates 90 degrees each time the corresponding button in the Blynk application is pressed.

There is also a function (BLYNK_WRITE(V0)) to turn on/off the internal LED based on button presses in the Blynk application to test whether it is communicating with Blynk.

Attachments

Step 8: Application QR Code Scanner With Firebase

Following are the code results from the flutter application

In the Flutter application results section there are 4 categories, namely:

  1. Add Product
  2. Products
  3. QR Codes
  4. Catalog

For how the application works in flutter code:

1. First of all, click the "Add Product" section

2. Second, in the "Add Product" section there are 3 categories, namely Product Code, Product Name and Quantity, for example:

  • Product Code: 2502002500
  • Product Name: Warehouse Management Robot
  • Quantity: 12

After that, click the "Add Product" section where the data will go to Firebase to the Firestore Database section whose purpose is to require cloud-based data storage.

3. Third, you can look in the "Firestore Database" and in the "Product" section, after that you can edit the data via Firebase then the data in the application will change accordingly.

4. After that, we will view and enter the data into the "QR Code Generator" website to print the results of the data we entered and the resulting QR Code will be entered into the Python file, as in the next step.

In the QR Code and Catalog section

QR Code: In that section where we scan the QR Code directly and the data will go to the Firestore Database and the results in Product

Catalog: In this catalog section, there is a pdf where we save the results of the data we have created.


Website QR Code Generator: https://www.the-qrcode-generator.com/

Link GitHub - QR Code Scanner Using Flutter: https://github.com/JNSaonard/qr_code_scanner_flutter

Step 9: QR Code Detection Using Python

The code we created is a Python program which uses OpenCV which is useful for detecting and reading QR codes from videos taken by a webcam Logitech. The following is an explanation of each part of the code:

The library that we use in this code is:

  • import cv2: Is an OpenCV library for image and video processing.
  • import numpy as np: This is a library for numeric operations
  • import time: This is a library for measuring time.
  • import math: This is a mathematics library.

Webcam Initialization:

  • cv2.VideoCapture(1): Opens the camera with index 1 (usually an external webcam).
  • cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920): Set video frame width to 1920 pixels.
  • cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080): Set video frame height to 1080 pixels.

QR Code Detector Initialization:

cv2.QRCodeDetector() = Create a QR code detector object.

Check Webcam Availability:

if not cap.isOpened():

  raise IOError("Cannot open webcam") = Checks whether the webcam can be opened. Otherwise, the program will give an error message.

Video Processing Loop:

while cap.isOpened():

  ret, frame = cap.read()

  ```

- Reading frames from video.

Detect and Decode QR Code:

value, points, qrcode = detector.detectAndDecode(frame) = Uses a QR code detector to detect and decode QR codes on frames.

QR Code Detected Process:

if value != "" = Process if QR code is detected.

Calculation and Display of Additional Information:

Calculation and display of information such as distance, time and FPS.

Show Frame with Additional Information:

cv2.imshow('img', frame): = Displays frames with additional information.

Releasing Resources and Closing the Window:

cap.release()

cv2.destroyAllWindows()

Releases webcam resources and closes all OpenCV windows.


Link GitHub - QR Code Detection Using Python: https://github.com/JNSaonard/ProjectQR

Step 10: Video Demo QR Code With Flutter & Python

This is the video result of QR Code Scanner (Flutter) and QR Code Detection (Python): https://youtu.be/D-As5fGXMko

Step 11: Video

This is the video for the overall project. Includes the demonstration of our test build.

Step 12: Conclusion

In Conclusion, We have made a Warehouse Management Robot using a ESP32U as our micro controller. Though in our journey in the project, we do have some notable insights.

  • We have discovered the motors we bought is unable to handle the weight of our robot, to solve this in the future, we can use a lighter material (Plastic or filament for example) or use a more powerful motor
  • There were some problems in the software that thankfully was fixed later, one of which is because of the webcam we're using for object detection
  • The frame could use a bit more work especially in the test build.

Step 13: References