Scanner for Warehouses using Fin/Raspberry Pi

Hello! My name is Kostis and I joined Balena last week as the Warehouse Manager for our office in Athens Greece. As part of my (one-month) labs residency project I’m just reaching out to see whether someone has already done something similar before or has any suggestions/useful information regarding this project. :slight_smile:

*Note that I’m not familiar with coding - creating blocks but if it’s something not that complicated for this project I can use tutorials to do so or use existing code and then push it to the device using CLI.

Basically the idea is to design and create an affordable WMS system for businesses that cannot afford an actual WMS system/ERP system and maybe try it out here in Balena’s warehouse after the project is over or at some point in the future.

Here’s a quick overview of what the devices using blocks will hopefully be able to do:

Using a Raspberry Pi 4 or similar with an external screen and camera to be able to scan barcode/QR codes which then will be sent to an excel file which will recognise and categorise the scans by item and movement (dispatch/receiving). The end goal is to being able to use these barcode/QR codes scanning to generate a stock report (stock balance) and a movement tracker (ledger with all the movements). To achieve that the first step will be installing the hardware parts (camera, touch screen and maybe an external battery) to the raspberry pi/Balena Fin device and then find/create code to push to the device.

Quick summary of the blocks that are needed for the device:

  • The Fin/Pi device accesses the camera and it’s ready to scan barcode/QR codes and extract data as below mentioned.
  • Firstly the user scans from a printed list of barcode/QR codes one of the following 6 functions:
    1)Inbound (receiving items), 2) Outbound (dispatching items) 3) Stock transfer (for assembly line or transfer returned products to stock - 1st function ), 4) Inbound (finished product from assembly line), 5) Return from customer, 6) Disposal
  • Secondly the user scans (from a printed list of barcode/QR codes) the barcode/QR code of the product name.
  • Thirdly the user scans the individual item (EA/Case) barcode/QR code.

After completing the above mentioned scans the data will be imported to an excel file (ideally on the cloud) and then this excel file using code/linked cells with formulas will automatically assign the barcode/QR codes into its categories. For example the first scan will tell the formula that this is either receiving or dispatching, the second scan will tell the formula the specific item that this movement is for and thirdly the scan of the actual item barcode/QR code will add/remove it from the stock. Alternatively, if it’s not that complicated to build the blocks, the device will prompt to the user’s screen a drop down list to select the first two steps (receiving/dispatching and entering the item name/code). By doing so, the user will only need to scan the actual barcode/QR code of the item.

We have the following hardware available here at the office but feel free to recommend other if needed:

  1. Balena Fin/Raspberry Pi 4
  2. 3.5” Touch Screen
  3. Camera module for Fin/Pi 4
  4. 16GB MicroSD memory card

The progress so far:

At first there were lots of issues on how the raspberry pi 4 device operated. There were plenty of Raspberry OS instalments since there were lots of “freezing” and lagging. One thing that definitely improved the device was replacing the SD card with a high speed one (Sandisk MIcroSD Extreme Pro). After replacing the SD card, the difference was noticeable on how fast the update - upgrade commands worked and how fast the code for opening the camera for QR Code scanning operated. Another stumble on this project was how the QR Code scanner behaved. Initially the OpenCV code (which I found on a youtube tutorial) would open the camera and start identifying QR codes and making entries in the databse.csv file. Although, it would not stop scanning QR codes and logging entries and most times, it would scan the same QR code multiple times which resulted duplicate entries in the database. At first, there was a lot of brainstorming ideas on how to stop the code from running indefinitely, some of these ideas were to install a physical button to stop the code from running or place a GUI button to stop the code via pressing it from the touchscreen or make the code understand QR codes that were already scanned and prevent it from re scanning. The solution was much simpler than expected as eventually there was no need for physical buttons, complicated coding or a fancy GUI. The only thing needed was writing “break” just below the code that is responsible for recording the scanned information on the csv file.

The following hardware was used for this project:

Raspberry Pi 4 1GB Ram (running Raspberry OS)
3.5” Touch Screen
Raspberry Pi HQ Camera
Raspeberry Pi Camera Lens
MicroSD Card Extreme Pro
3D Printed Case
3D Pringed Fingerstylus
Device is powered with Raspberry’s Official Charger or any conventional powerbank

Pending tasks: 1) Create - assemble the raspberry pi 3d printed case and finger stylus, 2) Improve the excel data output file, link the csv file with the excel file via cloud (using github), 3) Balenafy!


Good luck on your adventure @kostikar this looks like an amazing project! Looking fwd to test it myself :slight_smile:

1 Like

Awesome start! Looking forward to the updates.

1 Like

Great job!

1 Like