Project · ESP32 & Rust

Cocktail machine

I built this cocktail machine myself. It is controlled by an ESP32, a small microcontroller with Wi-Fi, and I wrote its firmware in Rust. You operate it in the browser: the machine serves its own control page, so no app is needed.

How the machine works

A carriage moves the glass under one of six bottle positions, called slots. There, one stroke releases a portion; a slot can also be a pump instead. The ESP32 serves the control page itself: you connect your phone or tablet to the Wi-Fi, open the machine's address and tap the drink you want.

There is also an Android app written in Kotlin that finds the machine on the Wi-Fi by itself.

Drink selection in the cocktail machine’s web interface

Try the machine

The simulator replicates the real controller. Choose a drink and watch the carriage move to the slots.

ESP32 · Cocktail machine ready
X axis0 mm
Z axisup
Slot-
in glass0 ml
Ready. The machine is homed.
Same travel and sequence as the real machine, only faster.

What the machine can do

Operation in the browser

Large tiles for each drink are easy to tap, even on a permanently mounted tablet.

Teach-in by click

You move to each position by hand and save it with one click.

Recipes & pump

A recipe sets how many portions come from which slot. A slot can also be a pump.

Safety

An emergency stop, software end stops and speed limits restrict every movement.

With or without a router

The machine runs on your home Wi-Fi or opens a network of its own.

Guest mode

Guests only see the drinks and the emergency stop. Settings need a password.

What the controls look like

Setup view

In the protected area, slots, heights, speeds and dosing times are taught and drinks are created.

Everything stays stored on the ESP32 even after a power cut. Every device on the Wi-Fi sees the same.

The interface also fits a phone. The emergency stop and homing (the run to the zero point) are always available, even without a password.

A few example drinks are ready to start with.

Mobile view

Building your own

To build one, you need an ESP32, two axes with stepper motors and limit switches, and the Rust toolchain for the ESP32. After that, it takes three steps:

  • Enter your Wi-Fi credentials.
  • Build the firmware and flash it: cargo run --release
  • In your browser, open http://cockimate/.
You will find the complete guide in the manual and in DOKUMENTATION.md. How the program is structured is explained on the page Development & structure.

Contact

Write to me if you have questions about how the machine is built, would like to know why I solved something a certain way, or want to adapt it for your own purpose.

Arithmetic check Arithmetic task, shown as an image

Your details are processed in order to answer your enquiry. More in the privacy policy.

No Google captcha, no cookies, no disclosure to third parties. Alternatively by e-mail to info@timobritz.de.