← Back to overview

📖 Cocktail machine – manual

Operation, setup and maintenance of the cocktail machine.

Contents:
1. Initial commissioning 2. The interface 3. Setup 4. Creating drinks 5. Dispensing a drink 6. Wi-Fi & standalone 7. Tablet kiosk 8. Safety & emergency stop 9. Hardware / pins 10. FAQ

1. Initial commissioning

Flashing the firmware requires Rust with the ESP toolchain (espup install) as well as espflash and ldproxy. Then:

  1. Enter the Wi-Fi details: copy the template .cargo/config.toml.example to .cargo/config.toml and fill in WIFI_SSID / WIFI_PASS there.
  2. In the project folder, run cargo run --release – this compiles, flashes via USB and opens the serial monitor.
  3. The IP address appears in the monitor. The interface can be reached at http://cockimate/ or at this IP.
The ESP32 only transmits on 2.4 GHz Wi-Fi. Pure 5 GHz networks do not work. If no connection to the router is established, the machine automatically opens its own Wi-Fi network “Cockimate” (see section 6).

2. The interface

By default – the way a guest sees it – the screen shows only the drink selection, plus the connection and machine status at the top, a discreet cog ⚙️, a homing symbol 🏠 and the emergency stop (NOT-AUS).

The admin menu is deliberately hidden. Tapping the cog ⚙️ and entering the password (default 1234) reveals the four tabs Getränke, Einrichtung, Manuell and Skripte (drinks, setup, manual, scripts). The cog then turns into a lock 🔒, which locks the menu again.

The password is set in src/servo-control-migrated.html (constant SETUP_PASSWORD). It is an operating lock so that guests do not change any settings – not real access protection.

3. Setup

In the Einrichtung (setup) tab, the machine is taught once. Everything is stored on the ESP32.

  1. Homing: “🏠 X referenzieren” / “🏠 Z referenzieren” (home X / home Z) – both axes move to their limit switch (zero point).
  2. Teaching the slots: Use the jog panel (±10/±100/±1000) to move the carriage under slot 1 and press “📍 X übernehmen” (apply X). Repeat for all 6 slots. For each slot, the type Mechanismus or Pumpe (mechanism or pump) is selected. For a pump, there is also a Z position: the height to which Z moves before pumping.
  3. Z release height: Raise Z far enough for the mechanism to trigger reliably, and apply it. This height applies to all mechanism slots.
  4. Dispensing position: By default, every drink ends with a homing run (the zero point is the pick-up position). Optionally, teach a separate dispensing position.
  5. Times & dosing: Set the hold time, pause and return stroke between portions, as well as the pump run time per portion.
  6. At the very bottom, press “Einstellungen speichern” (save settings).
One portion (one “stroke”) corresponds to approx. 20 ml. Measure it on your own machine and set “ms pro Portion” (ms per portion) accordingly for pump slots.

4. Creating drinks

Under Einrichtung → Getränke verwalten (setup → manage drinks): “➕ Neues Getränk anlegen” (create new drink), choose a name and icon, then put together the recipe as a “Slot × Portionen” list (slot × portions). “✔ Getränk übernehmen” (apply drink), and finally “Getränkeliste speichern” (save drink list).

A freshly flashed machine already contains a few drinks with “Beispiel:” (example) in their name – only as suggestions. They can be edited or deleted.

5. Dispensing a drink

In the Getränke (drinks) tab, tap a tile and briefly confirm the recipe – done. A banner shows the progress; “Fertig! 🥂” (done) means: take the glass.

Homing from the main screen: If the machine needs to be homed, a gold bar “Referenzfahrt nötig – hier tippen” (homing required – tap here) appears at the top and the 🏠 symbol pulses. One tap moves Z clear first, then X – a guest may trigger this too, without a password.

6. Wi-Fi & standalone

Router mode (default): The machine joins the existing Wi-Fi network (credentials in .cargo/config.toml).

Standalone mode: No router needed – the machine sets up its own Wi-Fi network “Cockimate” (password cocktail123). Switch over under Einrichtung → Netzwerk (setup → network) → “Speichern & neu starten” (save & restart). Then connect to the “Cockimate” Wi-Fi network and open http://192.168.71.1/ in a browser.

Android often reports “no internet” for standalone Wi-Fi networks. Confirm “keep connection” once, and the device stays connected.

7. Tablet kiosk

For a permanently installed panel, an inexpensive Android tablet with a kiosk browser app (e.g. “Fully Kiosk Browser”) is a good choice: enter the machine address as the start page, activate full screen and “keep screen on”. Guest mode (hidden menu) ensures that guests can only choose drinks and use the emergency stop.

8. Safety & emergency stop

The big red NOT-AUS (emergency stop) button can always be reached (also via the keyboard: ESC). It immediately stops both motors and the pump and discards all pending commands. To continue afterwards, press “Fortsetzen” (resume; Manuell tab) and home the machine again.

Important: A software emergency stop is no substitute for a real hardware emergency stop that physically disconnects the motor supply. If people can reach moving parts, a real emergency stop button in the power supply line is strongly recommended. Operation at your own risk.

Further protective functions: software end positions, speed limits, homing abort if the limit switch is not reached, debounced limit switch, limited queues.

9. Hardware / pins

AxisFunctionGPIO
XStep / Dir / Enable / limit switch32 / 33 / 14 / 21
ZStep / Dir / Enable / limit switch25 / 26 / 27 / 22
–Pump relay (HIGH = on)19

The pins are defined in src/main.rs (section “HARDWARE-SETUP”), the travel ranges and limits in src/config.rs. If an axis moves the wrong way, edit src/config.rs and invert the constant X_DIR_INVERTED or Z_DIR_INVERTED accordingly.

10. FAQ

The machine does not show up on the Wi-Fi network.

Check the SSID/password in .cargo/config.toml (2.4 GHz!). The IP is shown in the serial monitor. If necessary, connect to the “Cockimate” Wi-Fi network.

A drink does not start (“Slot X nicht eingelernt” – slot X not taught).

Open Einrichtung, teach the missing position or Z height and save.

The pump does not run.

Is the slot set to “Pumpe”? Is the relay on GPIO 19? Is “ms pro Portion” set to a sensible value?

Positions are wrong after switching on.

The ESP32 forgets the current axis position when switched off (the taught slots remain stored). Dispensing homes the machine automatically beforehand; manually, a homing run always helps.