Smart Beer Inventory and Quality Monitoring System
by Bram Verslype in Circuits > Raspberry Pi
28 Views, 0 Favorites, 0 Comments
Smart Beer Inventory and Quality Monitoring System



Inspired by my own beer, Nois Tripel, the idea emerged for a smart and automated way to manage our beer storage. After countless times of manually counting bottles and doubting the right storage conditions, I knew: there had to be a better way. That’s how BeerGuard was born.
BeerGuard is a DIY prototype that demonstrates how technology can contribute to optimal beer storage. The system continuously monitors key environmental factors such as temperature, humidity, and light intensity. This data is clearly displayed on a responsive web dashboard, giving you constant insight into your beer's storage conditions.
In addition, BeerGuard tracks the inventory in real time using weight sensors. Any changes in stock are immediately visible via the dashboard. Thanks to badge authentication, the system also logs who took how many beers.
BeerGuard watches over your beer and its quality!
Supplies

Microcontroller:
Sensors:
- DHT11 Temperature and Humidity Sensor
- Photoresistor (LDR)
- RC522 RFID Module
- HX711 Load Cell Amplifier
- Reed Switch Module
Actuators:
Components:
- LCD1602 Display
- Resistor Kit
- Jumper Wires
- 2x Breadboard
- 12V DC Power Supply
- MCP3008 Analog-to-Digital Converter
- Potentiometer
- 2N2222 Transistor
- 2x 1N4007 Diode
- TIP120 Transistor
- 2x Door Knob
- Ribbon Cable + T-Piece
Materials:
I’ve included a PDF listing all the materials along with their prices. The total cost of the entire project is +/- €300.
Downloads
Fritzing


Now that we have a clear list of all the components we need, it’s time to start creating our Fritzing diagram. Before we start with the actual circuit, it's important to understand which components are used and how they are connected. By creating this diagram, we get a clear overview of the entire setup, which helps prevent mistakes during the wiring process. I created my diagram using Fritzing.
After making this diagram, you can start connecting and testing all your components. It's recommended to first write and test your code on a breadboard before placing everything into the enclosure, as this makes troubleshooting and adjustments much easier.
Of course, you can also choose to mount everything in the enclosure first and then write your code afterwards, feel free to go with the approach that works best for you.
Database

I used MySQL Workbench to design and manage my database. My database keeps track of product changes by specific users (via RFID), logs sensor readings, and maintains historical data for accurate inventory and usage tracking.
To set up the database yourself, connect to your MySQL server via SSH and create the database structure based on my schema. If you encounter any issues or prefer a ready-made script, you can use my SQL file on my github.
https://github.com/howest-mct/2024-2025-projectone-mct-VerslypeBram/tree/main/data
You can find the file in the link above, under 'data'. It contains the complete schema and all relationships as designed in MySQL Workbench.
Programming the Project
This is where your project really comes to life. In this step, we’ll program both the frontend (what the user sees) and the backend (what happens behind the scenes). You’ll also learn how to connect and control the various sensors and actuators, and how to send and display real-time data through your web interface and database.
Frontend
I started by creating three sketches on paper to visualize how my website would look. Afterwards, we brought these sketches to life by designing them in Figma with colors and details. Once the design was complete, I began coding the frontend using HTML, CSS, and JavaScript. This shapes the look and feel of your web dashboard.
Feel free to create your own website, but if you want to use mine, the file is available in the link below.
https://github.com/howest-mct/2024-2025-projectone-mct-VerslypeBram/tree/main/front
Backend
The backend is built with FastAPI for handling API endpoints and Socket.IO for real-time updates to the frontend. The main logic in BeerGuard.py manages hardware interaction with sensors (temperature, humidity, light intensity, weight...), controls the ventilator, electric lock and LCD, and processes user inputs like RFID scans.
Background threads continuously monitor sensors and update the system, while the DataRepository handles database communication using MySQL. The backend also supports safe shutdown of the Raspberry Pi.
For setting up your database, you have to duplicate the config_example.py file and rename the copy to create your personal configuration file. This is how you do it:
- Replace USER_HERE with your actual database username
- Replace PWD_HERE with your password
- Replace DATABASENAME_HERE with the name of your database
Feel free to create your own backend, but if you want to use mine, the file is available in the link below.
https://github.com/howest-mct/2024-2025-projectone-mct-VerslypeBram/tree/main/backend
Design BeerGuard
.jpg)
.jpg)
Before you start building the enclosure for your project, it’s best to make detailed drawings of your design. This allows you to visualize exactly how your project will look and helps prevent mistakes during assembly. In the photos, you can see both the front view and the top view of the enclosure. This preparation also makes it easier to communicate your ideas with others or to make adjustments before starting construction. Taking the time to plan thoroughly can save you a lot of effort and material later on.
Building BeerGuard


















To begin, I had all the MDF panels cut to the required dimensions (see photos for the exact heights and widths). The next step was assembling the project. Here’s how I proceeded:
- I started by screwing all the outer panels together to form a rectangular frame. This ensures a solid base for the rest of the construction.
- Once the frame was assembled, I attached the hinges, allowing the two doors to open smoothly. Proper alignment of the hinges is crucial for easy access.
- After that, I mounted the LCD display and the RFID reader on the front panel. These components are positioned for easy user interaction and clear visibility.
- Next, I drilled a 38mm hole for the fan, which I installed underneath the roof of the enclosure. This fan helps with ventilation and keeps the beer cool.
- Following this, I fixed the electric lock in place. The lock is integrated with the RFID system for secure access control.
- Then, I installed the weight sensor at the bottom of the enclosure and later mounted the weighing platform on top of it. This setup allows for accurate weight measurements within the project.
- At the end, I drilled a 38mm hole in the back panel. This hole makes it easy to route the power supply cables to my Raspberry Pi and the electric lock.
You can see the results of each step in my photos, which show how I managed to successfully assemble and integrate all the parts.
Ready


This is the end result!
From now on, you keep track of your stock effortlessly and automatically. In addition, you always have a clear overview of the ambient temperatures via the dashboard. Does one of the temperatures go out of its set range? Then you will be notified immediately.
Have fun with BeerGuard, or whatever you want to call your own version! 😄