Musclefuel Dispenser

by YoranWandels in Circuits > Raspberry Pi

117 Views, 0 Favorites, 0 Comments

Musclefuel Dispenser

shake_dispenser.png

I'm Yoran Wandels from 1MCT2, and I'm excited to share my latest project with you: an automated dispenser for protein and creatine shakes. This project is designed for athletes and fitness enthusiasts who regularly consume shakes as part of their diet.

So, what does this dispenser do? You can input your preferences via a web app – the type of supplement (protein or creatine), the desired amount, and the amount of water. The dispenser then measures everything accurately and prepares your shake automatically.

Why is this useful? It saves you time and effort. No more messing around with scales and scoops. Plus, the web app keeps track of how much supplement and water is available and provides insights into your consumption history.

In this Instructable, I'll guide you step-by-step through the process of building your own shake dispenser. We'll start with designing the circuit in Fritzing, move on to hardware assembly, and finish by integrating a database to keep track of everything.

Let's get started and build a convenient shake dispenser to make your fitness routine easier!

Good luck!

Supplies

Raspberry Pi 4

Raspberry Pi Power supply USB-C 3A

  • To power the Raspberry Pi
  • Quantity: 1
  • SOS Solutions
  • Unit Cost: $9.95
  • Max Cost: €9.95

Raspberry PI T-cobbler

  • Connection tool for Raspberry Pi
  • Quantity: 1
  • Amazon
  • Unit Cost: $5.99
  • Max Cost: €5.99

Push Button

  • To manually make a shake
  • Quantity: 1
  • AliExpress
  • Unit Cost: $3.13
  • Max Cost: €3.13

Rotary encoder

  • To manually select settings
  • Quantity: 1
  • AliExpress
  • Unit Cost: $1.69
  • Max Cost: €1.69

Water pump

  • For operating the water
  • Quantity: 1
  • AliExpress
  • Unit Cost: $1.59
  • Max Cost: €1.59

Stepper motor

  • To dispense powder into the drink bottle
  • Quantity: 2
  • AliExpress
  • Unit Cost: $4.95
  • Max Cost: €9.90

Load Cell - 5kg

  • To weigh the powder
  • Quantity: 2
  • TinyTronics
  • Unit Cost: $5.00
  • Max Cost: €10.00

Weighing module HX711

  • Converts analog signals to digital signals
  • Quantity: 2
  • Bits and Parts
  • Unit Cost: $1.95
  • Max Cost: €3.90

HC-SR04 Ultrasonic Sensor

  • Distance sensor
  • Quantity: 2
  • Otronic
  • Unit Cost: $1.65
  • Max Cost: €3.30

Water pump hose

  • To connect to the water pump
  • Quantity: 1
  • AliExpress
  • Unit Cost: $1.28
  • Max Cost: €1.28

PCF

Transistor

  • To control the water pump
  • Quantity: 1
  • Otronic
  • Unit Cost: $0.10
  • Max Cost: €0.10

Potentiometer

  • To adjust LCD display backlight
  • Quantity: 1
  • Otronic
  • Unit Cost: $0.90
  • Max Cost: €0.90

LCD display

  • Used to display IP and make a shake
  • Quantity: 1
  • AliExpress
  • Unit Cost: $1.50
  • Max Cost: €1.50

Total Cost: €101,13

Fritzing

musclefuel_dispenser_schematic_bb.jpg
musclefuel_dispenser_schematic_schem.jpg

Ensure that the two stepper motors never operate simultaneously. Make sure the wiring of the water pump is waterproof to prevent any electrical hazards. I use an external power supply of 3.3V and 5V to control the motors. A PCF is used to control the LCD screen. The rest should be clear from the provided photos.

Database

image_2024-06-03_210447911.png

Now that we have a clear understanding of the components needed for our protein shake dispenser, it's crucial to establish a robust database to manage users, devices, and historical data effectively.

Database Schema Overview

I've designed the musclefuel_dispenser database with three main tables:

  1. gebruiker (Users):
  • Stores information about users who will interact with the dispenser.
  • Includes fields like GebruikerID, Gebruikersnaam, Wachtwoord, Email, Voornaam, Achternaam, etc.
  • This table ensures each user has a unique login and profile.
  1. device (Devices):
  • Manages details of various components used in the dispenser.
  • Fields such as DeviceID, Naam, Merk, Beschrijving, Type, AankoopKost, Meeteenheid are recorded.
  • Essential for tracking sensors, actuators, and other hardware.
  1. historiek (History):
  • Logs every action performed by the dispenser.
  • Tracks DeviceID, GebruikerID, Actiedatum, Waarde, and Commentaar.
  • Enables monitoring of all operations, from dispensing protein powder to turning on/off the machine.

Additional Details

  • Users (gebruiker table):
  • Each user has a unique GebruikerID.
  • Rol (Role) defaults to 'user', indicating regular user access.
  • AccountStatus is set to 'actief' upon creation, ensuring active accounts only.
  • Devices (device table):
  • Examples include HC-SR04 sensors for distance measurement and StepperMotor actuators for dispensing ingredients.
  • Each device has specific attributes such as Merk, Beschrijving, and Meeteenheid (measurement unit).
  • History (historiek table):
  • Tracks every interaction via Actiedatum.
  • Waarde captures quantitative data (e.g., amount of powder dispensed).
  • Commentaar provides contextual information about each action.

By structuring our database in this manner, we ensure comprehensive management of user accounts, device inventory, and operational history. In the next step, we'll dive into connecting our physical components to this database for seamless integration and functionality of our protein shake dispenser.

Make the Circuit

20240603_193307.jpg
20240603_193316.jpg
20240603_193339.jpg
20240603_193400.jpg

In this step, we'll focus on assembling the circuit for our protein shake dispenser using two breadboards to accommodate all components. Once the casing is completed, additional wiring will be necessary, especially for the distance sensors, which need to extend to the bottom of the dispenser.

3D Printing

ezgif-7-2e0858674c.jpg
large_display_20-10-05_08-37-59_0419.jpg

In this step, we'll focus on utilizing 3D printing to create essential components for our protein shake dispenser. Specifically, we've printed two mounts for the load cells and two augers to facilitate powder dispensing.

Utilizing 3D Printing

3D printing allows for precise customization of parts that are integral to the functionality and aesthetics of our dispenser. Here’s what we’ve printed:

  1. Load Cell Mounts:
  • These mounts are crucial for securely housing the 5KG load cells, ensuring accurate weight measurement of ingredients.
  • Place the load cells in their designated mounts, ensuring they are securely positioned to handle the weight of the ingredients.
  1. Augers:
  • The augers are designed to dispense protein powder efficiently into the mixing chamber.
  • Print two augers to accommodate the dual ingredient dispensing functionality of the dispenser.

Post-Printing Steps

  1. Assembly:
  • Load Cell Mounts: Attach the printed mounts securely to the structure of the dispenser where the load cells will be positioned.
  • Augers: Install the printed augers in the appropriate compartments or channels where they will dispense the protein powder.
  1. Integration:
  • Ensure that the printed components align correctly with the rest of the dispenser's structure and components (such as sensors and actuators).
  1. Testing:
  • Conduct preliminary tests to verify the functionality and fit of the printed parts.
  • Ensure that the augers dispense powder smoothly and that the load cells accurately measure weight.


Lasercut Design

image_2024-06-16_150418919.png
image_2024-06-16_150435454.png
image_2024-06-16_150453021.png

In this step, we'll focus on the laser cutting process to fabricate crucial components of our protein shake dispenser. Files for laser cutting have been provided, though there's a minor adjustment needed at the top section to ensure proper fit — this oversight won't hinder functionality as the top is designed to be removable.

Constructing the Case

20240614_211852.jpg
20240616_145420.jpg
20240616_145556.jpg

In this step, we'll focus on assembling the case for our protein shake dispenser. Due to minor fitting issues with the wooden pieces, 1x15mm nails were utilized to secure them together.

Installing the Components

20240616_150754.jpg
20240616_150802.jpg
20240616_150817.jpg

In this step, we'll focus on securely installing the components of our protein shake dispenser to ensure functionality and reliability. Here's how I've approached the installation:

Component Installation Details

To effectively integrate all necessary components into the dispenser, I employed several methods to ensure stability and functionality:

  • LCD, Rotary Encoder, and Push Button: Secured these components with duct tape to prevent movement and ensure they remain in place during operation.
  • Augers and Load Cells: Elevated these components with cardboard to ensure they align correctly with the dispenser funnel, facilitating proper ingredient dispensing and weight measurement.
  • Distance Sensors: Extended wires to reach the bottom of the dispenser and the water tank, ensuring they can accurately detect both the presence of a bottle and the water level. Used duct tape to secure the bottom distance sensor for bottle detection.
  • Water Tank: Raised the tank with a cardboard box to address issues with water pumping.

Software Setup

For the software setup of our protein shake dispenser, I've prepared the necessary files and configurations. You can access and download these resources from my GitHub repository:

Software Repository Link

This repository contains the essential scripts and codes required to program the microcontroller and manage the dispenser's operations. Follow the instructions provided in the repository to set up and configure the software environment accordingly.

Completion

shake_dispenser.png

Congratulations! You've successfully completed the construction and setup of your MuscleFuel dispenser. Now, it's time to enjoy the benefits of your hard work and innovation.

Enjoy Your MuscleFuel Dispenser

With all components meticulously assembled and software finely tuned, your MuscleFuel dispenser is ready to simplify and enhance your protein shake preparation process. Whether it's for personal use, sharing with friends, or integrating into a fitness facility, your dispenser stands ready to deliver reliable performance.

What's Next?

  1. Testing and Calibration: Before regular use, conduct thorough testing and calibration to ensure all components function as intended. Verify sensor accuracy, motor responsiveness, and overall system reliability.
  2. User Instructions: If sharing with others, provide clear instructions on how to operate the dispenser safely and effectively. Include guidelines on maintenance and troubleshooting to prolong its lifespan.
  3. Feedback and Iteration: Gather feedback from users to identify areas for improvement. Use this information to iterate on the design or software for future enhancements.

Conclusion

You've embarked on an exciting journey from concept to reality, creating a functional and innovative solution for protein shake dispensing. Now, with your MuscleFuel dispenser ready for action, enjoy the convenience and efficiency it brings to your fitness routine or business operations.

Cheers to your success and happy dispensing!