Software & Algorithm

User Interface:

For a successful product, it is crucial to have an intuitive user interface. Our solution is a grid with the name of the spices above drop-down options. The drop-down options are in increments of 5mL. Additionally, the bottom row includes several preset recipes. After selection, the user would hit submit for the dispenser to start.

GUI of Spice Dispenser
chevron-rightGUI Codehashtag

Data Transmission:

In order for a streamlined experience, it would be crucial to require the wireless transmission of the GUI selections to the dispenser. This would be accomplished by the user sending the data to the ESP32 through Bluetooth. Afterward, the ESP32 would send the G-Code commands through serial to the Arduino UNO.

chevron-rightData Transmission Codehashtag

Gantry Actuation:

We have two basic types of movements to consider for the gantry: Traversing and Dispensing

chevron-rightTraversing Methodshashtag

The gantry system is controlled via G-Code and only moves via X and Y coordinates

To traverse through relevant points in the X-Direction:

To traverse through relevant points in the Y-Direction:

In order to go to specified region numbers for the algorithm we utilize the methods we previously wrote:

To enter or exit the space where we can actuate the dispenser:

chevron-rightDispensing Methodshashtag

In order to actuate the dispenser, we call the basic traversing methods.

To dispense, I created a method that would handle the basic movements involved in dispensing to avoid rewriting the same lines:

To complete the dispense, we need to have a method to handle going to the starting point of the dispense, dispensing either one or multiple dispensers. Furthermore, we need to keep track of how much has been dispensed:

Dispensing Optimization:

Before we make our first move, we need to determine the best way to dispense the selected spices. In order to minimize moves, we look to the regions that have the potential to dispense multiple at once. Furthermore, we compare regions that overlap to see which direction is fastest.

chevron-rightRegion Pairs Codehashtag

Now to do the optimization, I wrote a method that would handle the decision-making and utilize all the methods that were written beforehand.

chevron-rightOptimization Codehashtag

Last updated