How to Make an Arduino Controlled Coffee Roaster

In this tutorial we will be building a low budget, computer controlled coffee roaster using a Popcorn Popper, an Arduino, and the Artisan RoasterScope software. The github repo for this project is here. Follow along, and you’ll be enjoying delicious, freshly roasted coffee in no time!


This setup is designed to be extremely low budget. The parts you will need are:

  • MAX6675 Thermocouple with Breakout: $3.96 CAD on AliExpress. The Arduino uses this to read the temperature during roasting. Coffee roasting temperatures are around 180°C — 240°C so make sure your thermocouple is rated high enough to handle this.
  • Solid State Relay: I used a 40A SSR for controlling the heating element. 40A is probably overkill, but you probably shouldn’t use one less than 25A depending on the wattage of your popcorn popper.
  • MOSFET Transistor: The Arduino digital pins didn’t have enough power to control the relay, so I used a mosfet transistor between the digital pin and relay. This might not be an issue depending on your relay though.
  • Tape, Wires, Breadboard, Solder, etc..
  • And most importantly: Green Coffee Beans! I’ve been using beans from a local coffee roaster, but if you want to buy some online you can check out Sweet Maria’s


First, follow the instructions here to separate the main heating element of your popper from the rest of the popper’s circuitry. Now, you can plug the thermocouple breakout directly into the Arduino’s pins 2->6. Using the breadboard wire up a circuit so that the digital pin 9 controls the MOSFET which controls the circuit going through the control line on the SSR. Then connect the other end of the SSR to the heating element circuit as shown below:

Arduino Setup

To setup the Arduino, simply upload the sketch using the Arduino IDE. You will need to add the MAX6675 library and this ModbusRTU library. You can install both of these using the Arduino Library Manager.


Modbus is a serial communication protocol used in lots of industrial equipment, including many industrial coffee roasters. This project uses Modbus so that the Arduino can easily interface with Artisan RoasterScope software as well as any commercial coffee roasting software that supports the Modbus protocol.

Artisan Config

To configure Artisan RoasterScope, first set up the device under Config->Device:

PID Control

“A proportional–integral–derivative controller (PID controller) is a control loop feedback mechanism (controller) commonly used in industrial control systems. A PID controller continuously calculates an error value e(t) as the difference between a desired setpoint and a measured process variable and applies a correction based on proportional, integral, and derivative terms (sometimes denoted P, I, and D respectively) which give their name to the controller type.” — Wikipedia

Loading a Roasting Profile

To load a background roast, go to Roast->Background and click the load button:


If you live in a cold climate, such as Canada (where I’m from) it will be difficult for the roaster to reach high enough temperatures outside. A tip I learned here is to place the roaster in a box, so that the hot air being dispelled from the roaster is fed back into the air intake. This will help improve your roasts during winter.


Software Developer with Experience Making Mobile and Web Apps, Building Robots, and Applying Machine Learning

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store