Java Script: Coding the Perfect Cup of Joe
Why spend your time making coffee when a robot can make the perfect cup of pour-over for you every time?
There’s no question about it: people love their coffee. Many are content to get their brew from a cheap drip coffee maker, but not everyone is so easily satisfied. For the true aficionado, a standard pot of "brown water" simply won't cut it. These enthusiasts delve into the nuances of grind size, water temperature, and pressure, often filling their counters with equipment such as espresso machines, burr grinders, and precision scales.
YouTuber zeroshot loves a good cup of coffee, but doesn't want to do all the work of preparing it. So, rather than settling for subpar java, he decided to build a robot to do all the hard work for him. zeroshot has a taste for coffee made using the pour-over technique, so the robot was designed to replicate it.
zeroshot began by hammering out the mechanical design. After initially considering a rotating platform, he quickly recognized the potential for liquid sloshing and opted for a more stable two-axis cantilever system. Constructed from lightweight aluminum extrusion, the robot's X-axis employs a belt-driven sliding block, keeping the motor's weight close to the base for optimal stability. The Y-axis, utilizing a belt and pinion, allows the arm to precisely position itself over the coffee cup. For control, an Arduino board was chosen, tasked with executing Cartesian interpolated motion to ensure every diagonal movement was nice and smooth.
Next, zeroshot turned his attention to the grinding process. A stepper motor was introduced to automate the manual grinder, but there was a problem: the motor lacked the necessary torque. The solution was the addition of a gearbox, dramatically increasing the torque. While this makes the robotic grinding slower than manual work, it gets the job done.
With those mechanical issues worked out, it was time to deal with water delivery and temperature control. A servo motor with a horn was positioned to physically press the boil button on the electric kettle. For transferring the boiling water, a peristaltic pump was selected, utilizing food-safe PVC tubing. This type of pump is ideal because it moves liquid by compressing the tube with rollers, meaning the pump mechanism never actually touches the water, preventing contamination.
The human touch of the pour-over technique — the deliberate, spiraling pour — was replicated through software. Using sinusoidal equations, zeroshot generated circular motion, and by gradually decreasing the radius of these circles during the pour, the robot perfectly traced a spiral path over the coffee grounds.
Initial tests, however, weren't without their issues. The water hose had a mind of its own and needed a 3D-printed guide to keep it in line. The grinder's clearance also needed adjustment, necessitating a 10mm spacer to prevent it from interfering with the filter. Finally, precise calibration of the hose's center position was required.
After these adjustments, the robot flawlessly brewed a cup of pour-over coffee in approximately five minutes. Fortunately, all of this work paid off: zeroshot said that the coffee tasted exactly as if he had made it himself.