Introduction: Superstock (Stock Controlled by Barcode Scanner)
In this guide I'll be telling you how to build Superstock, my school project for 1MCT at Howest. The concept is making a user friendly database that you can access through a website to keep count of what you have in stock (in my case clothing for my clothing brand).
Raspberry Pi 3 model B
DS18B20 waterproof temperature sensor
DHT11 temperature and humidity sensor
USB LASER Barcode Scanner
circuit board (for pricing and more info, see BOM_bill_of_materials-Ian-Remy.xlsx)
Step 1: Building the Circuit
Power off your Pi before connecting the components. You can find all connections on the fritzing schema and some examples in the pictures above, everything should be pretty self explanatory. You can just plug the barcode scanner in the raspberry pi for it to work.
Step 2: Getting the Files
The files for this project can be found in this Github repository:
The backend is a Python/Flask program that communicates with our hardware and serves the information from it to the frontend, which is a webinterface. You might have to change some things around for it to properly work, like the mysql user or ip-adresses the programs run on.
Step 3: Database
You can put the database (dump file in Github repository under the folder Database-export) on the Pi via MySQL Workbench by doing a data import. The file in the repository is a dump of the database that holds the whole database in 1 file. Otherwise you might run into some problems because the Pi uses MariaDB instead of MySQL. You might also have to create a new user or change these credentials in the code. You can see the ERD in the picture above.
Step 4: Soldering
In the pictures above you can see all t he connections you have to make, i used a few different boards to make everything a bit smaller. I also used a 20 pin socket to connect the GPIO extension board so the housing would be plug and play. All the rest is just soldering of the different components on the boards.
Step 5: Housing
For the housing i used a plastic project box and cut holes in it with a dremel multi tool to put the socket, GPIO extension board and sensors through as you can see in the pictures above and made sure everything was in a goof place so it would be easy to open and close.