Show HN: A Digital Twin of my coffee roaster that runs in the browser (autoroaster.com)

157 points by jvkoch ↗ HN
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.

26 comments

[ 3.1 ms ] story [ 41.8 ms ] thread
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?

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 !

this is nuts! beans? whatever, it’s super cool!
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.
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...
I'm curious -- did you make the interface with Claude? I have a hunch you did, can you confirm/deny?
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.
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.)

There is a perfectly good word for this. Simulation.

Can we stop using the expression "Digital Twin" ?

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
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.
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.

Artisan is still very popular and still in use today.
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.

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!
This is one of the nice thing i saw today!
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.