Project · Arduino Nano

The Aperol machine

Three pumps, a potentiometer, two push buttons and a 16×2 display: choose the strength, choose the glass size, press Start. The machine pours sparkling wine, Aperol and water one after another in the right ratio – with calibration, a rinse programme and a lucky wheel for those who cannot decide.

Operation – here in the browser

The replica calculates with the same recipes, glass sizes and pump times as the real firmware. Only time runs faster, so there is no waiting.

Aperol machine v1 · Arduino Nano ready
1 · Sparkling
–
–
2 · Aperol
–
–
3 · Water
–
–
Mix 3/6 · 2/6 · 1/6
Total volume 200 ml
Pouring time – s
Drinks poured 0
Order: sparkling wine → Aperol → water, never at the same time. After each pump, a 1.2 s drip pause.

The five strength levels

The mixing ratio is set in sixths in the source code (RECIPE[5][3]). Level 3 is the default – level 5 gets a skull on the display.

LevelSparklingAperol WaterCharacter

Build

Arduino Nano, an I2C display, three pumps via N-channel MOSFETs.

PinFunction
A0Potentiometer – wiper, ends to 5 V and GND
A4 / A5LCD 16×2 with I2C backpack (PCF8574), SDA/SCL
D2“Next/Menu” button to GND, internal pull-up
D3“Start” button to GND, internal pull-up
D9MOSFET gate – pump Water
D10MOSFET gate – pump Sparkling
D11MOSFET gate – pump Aperol
D5Piezo buzzer (optional; without it everything keeps running silently)
Do not cut corners on the pumps.

Each pump needs a flyback diode (e.g. 1N4007) connected antiparallel – otherwise the inductive spike at switch-off destroys the MOSFET. In addition, a gate series resistor of about 220 Ω and a pull-down of around 10 kΩ from gate to GND, so that the pumps reliably stay off during boot.

What the menu can do

Holding the Next button for 3 seconds opens the main menu.

01

Party round

Choose 1–9 glasses on the potentiometer, and the machine pours them one after another. In between, change the glass and press Start. A fanfare at the end.

02

Cleaning

For each pump in turn: swap the bottle for a cleaning bottle, press Start, rinse for 10 seconds. A long press on Next cancels.

03

Manual

Run a single pump by hand – for priming the hoses. The pump runs as long as Start is held.

04

Calibration

The pump runs for exactly 10 s into a measuring jug; set the measured amount on the potentiometer and save. It is stored in the EEPROM and survives power cuts.

05

Statistics

Drink counter from the EEPROM. Holding Start for 3 s resets it.

06

Screensaver

After 60 s of inactivity, a glass bounces across the display. Any button or the potentiometer wakes the machine – without triggering anything.

Two things that took some work

Dosing

Why calibration is necessary

The amount is controlled via the pump time : run time = desired millilitres ÷ flow rate. The preset is 250 ml per 10 s – which is practically never right, because hose length, height and viscosity all play a part. So all three pumps go through the calibration menu once, and then the amounts are right.

Hardware limit

No reverse running with one MOSFET

A single N-channel MOSFET only switches on and off – the polarity at the pump stays the same and cannot be reversed with it. Real suck-back would need an H-bridge per pump (DRV8871 or L298N). As a substitute, the firmware inserts a 1.2 s drip pause after each pumping cycle before the next ingredient follows.

Build your own

The package contains the commented Arduino sketch, the complete instructions with wiring and a quick guide as a PDF. The “LiquidCrystal I2C” library by Frank de Brabander is required.

Request the source code

Download on request – a short registration, and I unlock it.

Contact

Questions about how it is built, the decisions behind it, or how it might carry over to another case.

Arithmetic check Arithmetic task, shown as an image

No Google captcha, no cookies, nothing passed to third parties. Prefer e-mail? info@timobritz.de.