Show HN: A Digital Twin of my coffee roaster that runs in the browser

autoroaster.com

149 points by jvkoch 6 days ago


I built this website to host a data-driven model of my coffee sample roaster.

I realized after 20 or so batches on the machine that while the controls are intuitive (heat, fan, and drum speeds), the physics can be unintuitive. I wanted to use my historical roast data to create and tune a model that I could use to do roast planning, control, and to help me build my own intuition for roasting. This website lets you interact with my roaster in a virtual, risk-free setting!

The models are custom Machine Learning modules that honor roaster physics and bean physics (this is not GPT/transformer-based). Buncha math.

The models are trained on about a dozen real roasts. The default bean model is an Ethiopian Guji bean.

My next steps are to add other roasters and the ability to practice control/reference tracking.

hulk-konen - 2 days ago

This takes me back.

I used to run a coffee roastery and roasted several thousand batches. This is pretty much how it works. I spent hours of trying to match those curves to the target profile.

Back in the day we had software called Artisan and a few probes inside the machine. It would have benefited of from having much more data being recorded.

For example: environment humidity, the number of the batch (machine itself heats, so batch 1 of the day is very different than batch 11), bean temp and moisture before going in, actions the roaster takes etc.

It seems like I have forgotten some nuances.

madamelic - 2 days ago

I overclocked the roaster and now the kitchen is gone: https://i.imgur.com/qRcGm64.png

(Nice work! This is really nifty. I wish I knew more about coffee so I could better understand the dynamics of the controls and how to achieve a perfect roast.)

nxobject - 2 days ago

This is extremely fun to play with – congrats!

If you ever did a writeup on how your ML modelling worked and what real-life data you needed, I'd learn so much point of view of someone who's applied a little bit of control theory to robotics and aquarium controllers, but with traditional models. (Hell, I'd even pay $CUP_OF_COFFEE_PRICE for it, since I'd get that much learning time out of it.)

Also: you advertise custom models for roasters. But can you make a digital twin of my toaster?

simlevesque - 2 days ago

I'd like to see you tackle the problem of figuring the opposite, let the user draw the curves and generate the inputs. Then I could replay with Artisan.

Cool website !

sambo546 - 2 days ago

If I understand this correctly, calling it a "digital model" would be more appropriate. Digital twins require sensor input from a real system as well as the ability to alter the real system, not just prediction.

dluan - 2 days ago

I thought the whole point of roast curves is that the beans are the exogenous variable, even the same beans at different times of the day. And that those changes influence the outcomes (bean temp) even if it's nearly imperceptible.

I've never paid attention to the minute differences, but if you're the kind of roaster who believes in the art of it versus the science, I think it'd be cool to try to map this model to certain outcomes - eg more or less fruity, chocolate, etc. Or actually throw in stuff like humidity, bean age, time of day, etc.

I've done a few hundred roasts, but by hand cranking a flour sifter over a heat gun. My model inputs are noise, smell, appearance. I've never been interested in pursuing a roast curve or profile, because I'm a barbarian.

lukeinator42 - 2 days ago

very cool. If you're looking for machines to add, it would be awesome to model a cheap roaster based on a popcorn popper since it is probably less reliable than commercial sample roasters (and might benefit from less trial-and-error). During my undergrad I made an arduino-controlled popcorn popper that connected to the open source artisan software: https://github.com/lukeinator42/coffee-roaster.

jl6 - 2 days ago

Not trying to knock your project, which is executed very nicely, but it does make me wonder where the boundary of human-ability quality discernment lies, beyond which is audiophile territory. Is “bean physics” the event horizon? Can you really tell the difference in a double blind test? If so, that’s amazing!

haritha-j - 2 days ago

As someone doing PhD in digital twins, I’m obliged to point out that this is a simulation, not a digital twin, as there is no two way data interchange between the models. Having said that, this is extremely cool and I love it.

horacemorace - a day ago

You could interface with an Artisan LCD maybe? I’ve got my 1 lb drum roaster hooked up to that and watch the degrees-per-minute display to estimate the roast curve.

cjonas - 2 days ago

Super interesting. I had plans to do something similar with my roaster but life got in the way as always. What are you roasting on? We just purchased a venta18 and my goal this fall is to get it hooked up with PID. Something like this could be very useful for tuning

westurner - 2 days ago

Coffee grounds are compostable. Re: collectd-python-plugins, LoRA, MontyHome BLE + a Pi: https://news.ycombinator.com/item?id=42200099#42201207

A Tuboencabulating Roaster

LTL_FTC - 2 days ago

Gotta admit, when I read "digital twin" I though it was the kind that Nvidia likes to show off. Would be really awesome future work if you were able to pull that off. I mean, this already super cool! but you know, gaussian splatting...

neuroelectron - a day ago

Does it run on Java?

captainregex - 2 days ago

this is nuts! beans? whatever, it’s super cool!

lawlessone - 2 days ago

Did i win?

>Drum 745°C

jablongo - 2 days ago

I'm curious -- did you make the interface with Claude? I have a hunch you did, can you confirm/deny?

26thCreator - a day ago

This is one of the nice thing i saw today!

rshanreddy - 2 days ago

super cool

73189822 - 2 days ago

cool!

terran9 - 2 days ago

cool

Bflixto - 2 days ago

[dead]

Bflixto - 2 days ago

[dead]

fnord77 - 2 days ago

There is a perfectly good word for this. Simulation.

Can we stop using the expression "Digital Twin" ?