Sie sind auf Seite 1von 31

instructables

Arduino-controlled DIY Coffee Roaster

by art_tech

In this Instructable we will have a look at modifying a hot-air popcorn machine to turn it into a fully automatic and
temperature-controlled home coffee roaster. Roasting coffee at home is surprisingly simple, and even something
as basic as a frying pan can do the trick with enough patience and practice. In most basic terms, the roasting
process involves heating coffee beans gradually to around or just over 200 degrees Celsius. As they heat up, the
beans undergo various chemical reactions and their colour turns from green through yellow(ish) to brown. The
beans expand, eventually audibly cracking.

The key to getting the taste of the roasted coffee just right (and doing so repeatably) is two-fold. First, we want to
control the temperature during the roast process very precisely, so we can control how much time the beans spend
in different temperature zones. This controls which sorts of chemical reactions happen to what extent, and
ultimately the flavours in the roasted beans. Second, we want to make sure the beans constantly get mixed and
turned, so that the temperature is even throughout.

Hot-air popcorn machines are a perfect solution to issue number two: They blast a batch of popcorn with hot air
from below, hard enough to constantly whirl the popcorn kernels around a small container. Since it just so happens
that coffee beans are about the same size and weight as popcorn kernels, this also works for roasting coffee. Even
an unmodified hot-air popcorn machine can be used to roast coffee reasonably well, but for the perfect roast we
also need to address issue number one - fine-grained temperature control. This is what this Instructable is all
about: We will modify an off-the-shelf popcorn machine so as to add a temperature probe inside the "roast
chamber", gain precise control of the heating element and fan motor, and interface this with a host computer
through and Arduino microcontroller. Once we’re done, we will be able to monitor and control the roast process
through an industry-standard open source software called Artisan.

There are already a number of guides available for this, but I found that these are all very specific to one particular
model of popcorn machine. I therefore had to piece together information from several sources when I first built my
own roaster. So, I wanted to create a guide that I hope can abstract away and work for a wide range of specific
setups. At times this will go into a lot of detail - feel free to skip ahead wherever something does not seem relevant
to you.

The rest of the guide is structured as follows:

In steps 1 and 2, we will take a look at how a popcorn machine works. First we will look at the main mechanical
parts, then we will discuss how fan and heater are connected electrically. We will pay particular attention to the
differences between different models, and what you might encounter in your own machine.

In step 3, we will give a high-level overview of the modifications we will make. Again, we will detail the differences
in what you will have to do for different types of popcorn machines.

Arduino-controlled DIY Coffee Roaster: Page 1


Steps 4-10 will walk you through modifications of the popcorn machine, and then through wiring up the control
electronics. In these, we use a particular popcorn machine model for real-world photographs, but we will still
include a general discussion where applicable.

Steps 11-13 will detail software configuration, and give you pointers for a successful first roast.

Important safety notice:

In this guide we’ll be dealing with mains electricity, and with significant heating power. If you are not sure about
how to follow this guide safely, stop, or ask a qualified electrician for help. Never work on your roaster while it is
plugged in, and never leave it unattended while powered on.

Supplies:
The following is a list of parts I used. You might want to read ahead before ordering, as some depend on your
exact setup.

Hot-air popcorn machine, e.g. Severin PC3751 available on Amazon in Europe. Similar models
available on eBay or Amazon elsewhere.K
TC4+ Arduino shield, available on Tindie https://www.tindie.com/products/artisanaltech/tc4-coffee-ro
aster-shield-tc4-plus/ or website https://coffee.gerstgrasser.net/
Arduino UNO, available on Arduino website, Amazon, eBay.
Optionally IIC LCD display, 20x4, widely available on eBay, Amazon.
Solid State Relay, DC-AC, e.g. Fotek SSR-40DA.
For DC fan: DC PSU matching fan, e.g. 18V LED power supply, or laptop power brick, available on
eBay, Amazon, etc.
For AC fan: AC PWM dimmer module, e.g. https://www.tindie.com/products/bugrovs2012/pwm-ac-li
ght-dimmer-module-50hz-60hz/
K-type flexible tip thermocouple, shielded wire, e.g. https://www.ebay.co.uk/itm/K-Type-Temperatur
e-Sensor-Probe-1-5M-Cable-1-3mm-x-100-300mm-Probe-Thermocouple-/382878838907 but many
others available on eBay or similar.
A second K-type thermocouple, plain tip, e.g. https://www.ebay.co.uk/itm/K-Type-Thermocouple-Pro
be-Sensor-TM-902C-Meter-Temperature-Controller-500-C-UK/292813853636
High-temperature sticky tape, e.g. Kapton tape.
Glass chimney matching diameter of popcorn machine roast chamber, e.g. https://www.ebay.co.uk/i
tm/DUPLEX-Round-Bulge-OIL-LAMP-CHIMNEY-Single-Glass-10-X-2-5-NEW/352484391524
(Make sure diameter fits!)
Aluminium exhaust duct of same diameter
Electronics enclosure
Various electrical wires and cords
Ring and spade connectors
Braided wire sleeve

Tools:

Soldering iron.
Wire cutters and strippers.
Crimp tool for ring/spade connectors.
Drill.
Arduino-controlled DIY Coffee Roaster: Page 2
Arduino-controlled DIY Coffee Roaster: Page 3
Step 1: Anatomy of a Hot-air Popcorn Machine: Mechanical

Before we get going, let's have a look at how a hot-air popcorn machine works internally, and what its main parts
are. The following should essentially be the same on all models of hot-air popcorn machines - I have also added a
few sketches to abstract away from the specifics of any particular model.

Looking at the assembled popcorn machine, we see something that looks a little like a miniature trashcan: A
cylindrical (ish) outer housing with an opening at the top, and a transparent plastic hood. The outer housing is
usually two parts, held together with a handful of screws on the sides and at the bottom of the unit. We will keep
that outer housing, but the plastic hood will be useless for our purposes.

If we take apart the outer housing, we see a big assembly of metal and plastic parts. From the top, this comprises:

A cylindrical, metal roast chamber. This has slits or holes near the bottom, for letting in the hot air
from below.
The roast chamber usually sits half-inside another metal part, the heater housing.
Below this, held together by screws, we have the fan housing. This is often a single assembly
together with the fan motor and possible a circuit board below.

If we take apart heater and fan housing, we get to the interesting part:

Inside we have a heater assembly, comprising heating coils, wires, and a thermostat and thermal
fuse.
Below this, we have a plastic fan, connected to a fan motor.
Below this, depending on the type of fan motor, we might find a PCB containing some electronics.
Note that on my model, the fan, fan housing, fan motor, and PCB, all form one assembly that cannot
be taken apart without breaking it.

When running, the fan sucks in cold air from below, pushes it through the heater assembly heating it up, and then
through the openings in the bottom of the roast chamber, creating a vortex of hot air inside the roast chamber.

Arduino-controlled DIY Coffee Roaster: Page 4


1

1. Roast chamber
2. Heater housing
3. Fan & motor & PCB assembly

3
1

3
4

1. Fan 1. Primary heating coil


2. Housing 2. Thermostat
3. Fan motor 3. Thermal Fuse
4. Fan PCB

Arduino-controlled DIY Coffee Roaster: Page 5


Step 2: Anatomy of a Hot-air Popcorn Machine: Electrical

The electrical makeup of a popcorn machine depends under the fan motor. Instead, both fan motor and
largely on the type of fan used. Two kinds of fans are heater are directly connected to the incoming AC
commonly found in popcorn machines: Mains voltage power wires.
AC fans, and (lower voltage) DC fans. You can tell
which type of fan you likely have by looking at the DC fan with voltage divider and rectifier (Picture 2
wiring inside your popper: If there are two wires going onwards)
into the heater assembly, and no circuit board, you
likely have an AC fan. If there is a circuit board on the
base of the fan motor (or elsewhere) and three wires The DC fan variant is a little more complex, because
going into the heater assembly, you likely have a DC a DC fan needs, well, direct current, and usually a
fan with a voltage divider circuit. lower voltage (18 or 24V) than mains (110 or 230V).
So to power such a fan, popcorn machines first
We will quickly go through both versions. The AC fan create a lower AC voltage, then rectify this lower
version is very simple, so we will discuss it first; but it voltage, making essentially the lower-voltage DC
is also more complicated to control, so if you have the source required.
choice, I would opt for a DC fan machine.
For the first step, creating a lower AC voltage, the
Mains voltage AC fan (Picture 1) popcorn machine uses the heating element as a
voltage divider. A voltage divider essentially uses two
appropriately chosen resistances in series to create a
In the most commmon AC fan variant, both the fan lower voltage at the midpoint. For this reason, DC fan
and heater are mains voltage. They are usually wired popcorn machines often actually have two heating
in parallel, as if they were both just plugged into a coils inside the heater assembly. The primary heating
power outlet each. This might mean live and neutral coil will have the bulk of the mains voltage across it.
wire going to the fan first, and then continuing onto The secondary coil and the DC fan circuit will be
the heater; or they could be branching once they wired parallel with each other, and in series with the
enter the popcorn machine. The live wire might go via primary coil. With the resistances of primary and
a power switch. secondary coils chosen just right, this will leave
exactly the right voltage across the DC fan circuit.
The first attached diagram shows this simple setup:
Fan and heater in parallel connected to live and To convert the AC voltage to DC, usually a full bridge
neutral. rectifier is used. This is essentially four diodes
arranged so that the positive half-sine of the AC
In this setup, you would not typically find a PCB waveform passes through, and the negative half-sine

Arduino-controlled DIY Coffee Roaster: Page 6


is flipped. The result isn't quite the same as a for this. Instead, I measured the resistance of the
constant DC voltage, but close enough. On my motor and both heating coils - this you can do with a
machine, there are also inductors and capacitors multimeter even when the machine is turned off. I got
around the fan motor, which further smooth out the about 42 Ohms for the primary heating coil, and about
rectified AC wave. 3.5 Ohms for the secondary coil and fan motor in
parallel (or about 7 Ohms each), which works out to
The attached diagrams show these steps one by one: 18V across the motor. I could also just about make
First lower the voltage with a voltage divider, then out a marking on the body of the fan motor reading
rectify it, then filter it. "RS-385SA-2065". Searching for this online only
finds a 2065R-variant, but that one is listed as 18V
Physically in this setup, you might find that the nominal, which fits the measurement.
incoming live wire also first goes to the fan PCB. This
is because there is often an AC filtering capacitor AC fan with voltage divider: I have also read a
between AC live and neutral wires. From the PCB, forum post once about a popcorn machine that used
three wires connect to the heater assembly, one for a lower-voltage AC fan, and thus has a voltage
the midpoint between both coils, and one each for the divider but no bridge rectifier. I don't think this variant
other end of each heating coil. Due to the AC filtering is common, however.
capacitor, the neutral wire on my machine is the
middle wire on the PCB, and the mid-point wire on Earth
the corner of the PCB. The final diagram attached
shows this setup. The live wire might go via a power
switch, and if the switch is illuminated, a neutral wire Some machines will also have an earth wire (green
might branch off from the PCB to the switch too. and yellow) connected to all the metal parts (roast
chamber and heater housing, in mine). This is an
On the PCB, you can make out the different parts of important safety feature - make sure you reconnect or
this setup. On my unit, one can see capacitors and leave connected the earth wire when modifying the
inductors placed around the motor for filtering machine.
electrical noise. In the middle of the PCB, four diodes
(black cylindrical components) make up the bridge
rectifier. On the far end of the board, you can see the
wiring: Live on the left side, neutral in the middle, and
the mid-point between the primary and secondary
heating coils on the right. You can also see a
capacitor between AC live and neutral, for additional
filtering of electrical noise. Take a look at the PCB if
your roaster has one, as we will modify it later to
directly connect to the DC motor.

The attached photograph shows the wires on the


PCB in my roaster, and a diagram shows the layout
of the PCB with wires & AC filter capacitor, bridge
rectifier, and DC filter circuit.

Later on, we will want to know the voltage of the DC


fan. There are a couple of ways of figuring this out.
One, you could measure to voltage directly with a
multimeter, when the popcorn machine is turned on.
Personally, I don't like messing with live mains
electricity though when I don't have to, so I did not opt

Arduino-controlled DIY Coffee Roaster: Page 7


1

1. AC fan

Arduino-controlled DIY Coffee Roaster: Page 8


Step 3: Modifying the Popcorn Machine: Overview

Now that we understand how the popcorn machine My popcorn machine has a voltage divider with
works out of the box, let's have a look at the changes primary and secondary heating coils, so I used only
we'll make. For my setup, I have opted to keep the the primary heating coil. This puts the coil at 230V
original housing of the popcorn machine, and add a mains voltage, instead of the roughly 212V it was
separate enclosure for the control electronics. That before. On the bright side, that means slightly higher
means that inside the popcorn machine, I only heating power (ca 1240W) than the original setup (ca
rewired the fan and heater so that they are powered 1100W), on the other hand also a higher risk of
separately and routed those wires outside the overheating. Depending on the specs of each heating
machine. I also added two temperature probes (K- element in your setup and the magnitude of the
type thermocouples), one to measure the temperature resulting increase in peak heating power, you might
of the incoming hot air and one to measure the want to avoid running the heater at 100\% power to
temperature inside the roast chamber. be safe. It is also imperative that the thermal fuse
remain in place.
For the controller, I used an Arduino Uno and a TC4+
shield, which is made specifically for coffee roasting Controlling a DC fan
and has all the necessary electronics. In addition, we
need a solid state relay (SSR) for heater control, and
either a DC power supply for a DC fan, or an AC Controlling a DC fan is also easy, and works in a
PWM dimmer board for an AC fan. Our goal is not similar manner to the heating element: We simply
only to be able to switch heater and fan on and off turn power on and off, except for a motor we need to
independently, but to gain fine-grained control of their do so much more frequently, hundreds or thousands
heater output and fan speed. of times per second for smooth running. This is called
pulse-width modulation, and is luckily something that
In the following, we will go through the modifications microcontrollers excel at. The TC4+ has the
one by one: Heater control, fan control (DC or AC), electronics for this on board, so we only have to
thermocouples. The attached diagrams show the connect the DC fan and the DC power supply to the
wiring for each of these individually, and a complete respective terminals on the TC4+. Internally, the
wiring setup with a DC fan. electronics work much in the same way as before:
The TC4+ has a MOSFET (the DC version of a SSR)
Controlling a heating element in series with the fan motor.

You will have to place a flyback diode across the


For the heating element, this is very easy. Because motor terminals, to protect the DC driver from
the heating coil doesn't change temperature instantly overvoltage generated by the motor when slowing
when switched on or off, we can get away with simply down. This is simply a diode across the motor
switching it on and off relatively slowly, usually once terminals, opposite to the usual direction of current
per second. If we wanted, say, 70% heater output, we flow. You can reuse one of the diodes from the bridge
would switch the heating element on for 0.7 seconds, rectifier for this.
and then switch it off of 0.3 seconds. To do this, we
can use a solid state relay (SSR), which is essentially You will need a DC power supply that matches the
an electronically controlled switch. We simply DC fan's voltage (slightly higher might be fine). The
connect the AC-side of the SSR in series with the rated current of the power supply should exceed the
heating element, on the live side. The DC (control) fan motor current. I would aim for at least twice the
side of the SSR connects to one of the SSR drivers rated power. When a DC motor is turned on, the
(OT1) on the TC4+ shield. current draw (``inrush current'') is momentarily much
higher than the steady state current - bear this in

Arduino-controlled DIY Coffee Roaster: Page 9


mind. If you find that the power supply resets if you without the extra AC PWM dimmer board.
turn the fan on, you can try increasing the fan duty in
several steps to limit the inrush current. Thermocouple temperature probes

If the popcorn machine PCB has inductors and/or


capacitors in series or in parallel with the fan motor, We will add two thermocouple probes to measure the
keep them. They are for filtering out electrical noise temperature of the coffee beans and that of the
generated by the motor brushes. incoming hot air. These will connect directly to the
thermocouple interface on the TC4+ board.
Controlling an AC fan

With an AC fan motor, things are a little more


complex. Due to the way AC works, we cannot simply
switch power on and off hundreds of times per
second. Instead, we need to do what an old-school
dimmer switch does, and turn on power part-way
through each half-sine wave of the AC waveform. The
easiest way to do this is to use an AC PWM dimmer
board, which does all the timing required for this
internally. To the TC4+ and Arduino, this will look the
same as a DC fan, making the software side easy.
There are several such boards available on Tindie, for
instance this model: https://www.tindie.com/products/
bugrovs2012/pwm-ac-light-dimmer-module-50hz-60h
z

If you get a different AC PWM dimmer board, make


sure it is one that only needs a PWM input and does
the timing internally. If the board has a zero-cross
output, it likely requires the Arduino doing the timing,
making things more complex.

A small side note: You might not strictly need fine-


grained fan control. On some setups, it is necessary
to start with a high fan speed and then gradually
lower it toward the end of the roast. This is because
the raw beans are relatively heavy, so stronger
airflow is required to move them; On the other hand,
once the beans get lighter toward the end of the
roast, a lower fan speed allows for a higher peak
temperature. But, this isn't always necessary. On my
roaster, I am able to keep the fan speed constant. So
you could try simply connecting the fan to another
SSR, or even a physical switch, in the first instance,
and see how that goes. For a DC fan, you get fine-
grained control ``for free'' with the TC4+ board, since
this already has a DC PWM driver on board; But with
an AC fan you could try to see if you can get away

Arduino-controlled DIY Coffee Roaster: Page 10


Arduino-controlled DIY Coffee Roaster: Page 11
Arduino-controlled DIY Coffee Roaster: Page 12
Step 4: Modifying the Popcorn Machine: Disassembly and Thermocouples

With all the theory out of the way, let's get down to and less of the air temperature), but still well within
business. We'll start with modifying the internals of the mass of beans. If unsure, measure about 100g of
the popcorn machine, and then we'll go through coffee beans and put them inside the roast chamber.
wiring up the TC4+ and Arduino. Drill the hole a little below the top of the beans.

Disassembly Then, stick about 10mm or so of the thermocouple tip


through the hole. I then fixed the body of the probe to
the outside of the heater housing using high-
First, start by taking apart the outer housing of the temperature sticky tape ("Kapton tape").
popcorn machine. You will likely have to remove a lid
at the bottom of the unit. The outer housing is usually The exact location of the probe is not too important,
two parts held together by several screws. On my as long as it is inside the coffee beans. But, you want
machine, these were at the bottom of the unit, below to fix it in place tightly, so that it always measures the
the ``chin'' at the front of the machine, and one at the exact same spot. This makes measurements
back of the unit. The screw at the back was a security comparable across roasts. If the probe moves even
screw on mine, but easily removed with some needle- slightly, the temperature measurements might
nose pliers. I replace it with a standard M4 bolt on change, and you might have to dial in your roast
reassembly. settings again.

Bean temperature probe Air temperature probe

First, we will place a thermocouple probe inside the Next, we do the same for a thermocouple measuring
roast chamber. This is easiest with a "flexible tip" the temperature of the incoming hot air. This is not
thermocouple probe (widely available on eBay). I strictly required, but useful to have. For this, I used a
used one with 2mm tip diameter K-type thermocouple simple, unshielded, bare K-type thermocouple, like
probe, and I would recommend getting one with a the ones that often come with multimeters. I drilled a
shielded wire. To place the probe, drill a hole with hole into the top of the heater housing, and stuck the
matching diameter into the side of the roast chamber. thermocouple probe about 10mm deep into this,
Place it about 10-15mm above the level where the putting it close to the openings in the bottom of the
heater housing meets the roast chamber: You want roast chamber. I then taped it in place with Kapton
the tip of the probe not too close to the incoming hot tape.
air (so you measure more of the bean temperature

Arduino-controlled DIY Coffee Roaster: Page 13


2 1 1

1. Thermocouple probe entering roast chamber ca 10mm above heater housing. 1. Thermocouple entering roast chamber ca. 10mm above heater
2. Body of probe fixed to outside of roast chamber or heater housing (use housing.
Kapton tape).

1
1

1. Thermocouple probe fixed to heater housing with Kapton tape. 1. Thermocouple probe entering roast chamber ca. 10mm.

1
1
2

1. Air temperature probe entering heater housing from above. 1. Air temperature probe entering heater housing.
2. Thermocouple wire fixed to outside of heater housing.

Arduino-controlled DIY Coffee Roaster: Page 14


1

1. Air temperature probe entering heater housing ca. 10-20mm deep.

Arduino-controlled DIY Coffee Roaster: Page 15


Step 5: Modifying the Popcorn Machine: Heating Element

For the heating element, we want to route the wires fuse in place. I have seen some guides online that
connecting to the (primary) heating coil directly claim they had to bypass the thermal fuse and
outside the popcorn machine. If you have a voltage thermostat, as otherwise the popcorn machine
divider with two heating coils, we first need to find the supposedly did not get hot enough. That is a bad
correct two wires. You can figure this out by looking idea, as the thermal fuse is the number one protection
at the PCB: The main coil is the one connected in against overheating and starting a fire. Furthermore, I
series with everything else, usually with one wire at have not had a problem getting hot enough with my
AC live. The secondary coil is connected in parallel popcorn machine, so at least some models have no
with the bridge rectifier and DC motor. On my PCB, problem getting hot enough at stock. If your machine
the AC live wire is on the left edge of the board, and can't get hot enough, try a different model rather than
the mid-point wire is on the right edge of the board, perform unsafe modifications. You can also try
with the neutral wire in between. This may be reducing fan speed toward the end of the roast to get
different on your PCB, so check that you can see the a little extra temperature inside the roast chamber. It
traces on the board matching the diagram shown in is also quite difficult to modify the heater assembly
Step 2. anyway - for obvious reasons you cannot use solder
here, and I have not found a way to crimp those
If you can't figure it out from the PCB, you could cut eyelet connectors. I have managed to burn out my
all three wires at the PCB, and measure the thermal fuse on my roaster a couple of times in the
resistance between each pair with multimeter. The past, when I accidentally turned on the heater but not
primary heating element will have a relatively large the fan. In those instances, I bought a new popcorn
resistance; the secondary a much smaller; and both machine to replace the entire heater assembly,
together the sum of both. For instance, if you get 42 because I could not figure out how to replace the
Ohm, 7 Ohm and 49 Ohm, then the first pair of wires thermal fuse safely.
is the primary coil, the second the secondary, and the
third both in series. In this case, you want to take the Once you have found the correct two wires, and
two wires with 42 Ohm between them. made sure your setup is safe, you have to connect
them to a new power cord. I crimped tab connectors
If you still cannot figure it out, take apart the heater onto the wires coming from the heating coil, but other
and fan housing, and take out the heater assembly. connectors can work. Screw terminal blocks are less
You should be able to see how each wire is safe, as the wires can slip out more easily. If you
connected to which coil. The larger coil should have two coils, there is now a third wire left dangling
usually be the primary, and might be connected to the free, so make sure you insulate the end. I then used a
wires through the thermal fuse and/or thermostat. The piece of a mains power cord (three wires inside a
secondary coil is of a smaller diameter, and only PVC insulation) to route the AC power outside. Make
easily seen from the side. this about 40-50cm long at least (see below). You
could also use individual wires for this, but with mains
It can't hurt to check out the heater assembly anyway, AC I prefer extra insulation. I crimped matching
to make sure a thermal fuse (and possibly a connectors onto the end of each wire, and connected
thermostat) is connected in series with the primary live and neutral to the heater wires.
heating coil. I strongly advise leaving this thermal

Arduino-controlled DIY Coffee Roaster: Page 16


1

3 4
2

1. Primary heating coil


2. Secondary heating coil (hidden)
3. Neutral wire (connected to secondary coil)
4. Mid-point wire, connected to secondary coil directly, and
to primary coil through thermostat.
5. Live wire, connected to primary coil through thermal
fuse.

Arduino-controlled DIY Coffee Roaster: Page 17


Step 6: Modifying the Popcorn Machine: Fan Motor

DC fan Lastly, we have to put a flyback diode across the


motor. I simply reused one of the diodes from the
For my DC fan motor, I modified the PCB to connect bridge rectifier. I then found two solder pads on the
this to the TC4+. Essentially, you want to remove the PCB that were connected to each terminal of the
wires, AC capacitor, and bridge rectifier from the motor, and the correct distance apart. Then, I
PCB, and connect new wires where the output of the soldered the diode onto the PCB. To do this, I
bridge rectifier was. This way, we keep the inductors pressed one leg of the diode against the solder blob,
and capacitors around the fan motor, which are useful and heated both with a soldering iron. Make sure you
for filtering out noise. If you remove the PCB entirely get the polarity correct: The flyback diode goes
and solder wires directly onto the motor terminals, against the usual flow of current.
you might have problems with electrical noise making
its way down to the TC4+ and messing with your I again only put short pieces of wire here, and then
thermocouple readings (or worse). crimped tab connectors onto them. Then, I used two
longer wires with matching crimp connectors to route
To remove the wires, simply cut them. To remove the these connections outside. This way, I can
rectifier diodes and AC capacitor, heat the solder on disconnect all the power wiring from the popcorn
the bottom of the PCB with a soldering iron, while machine, if I want to work on only a part of the setup.
carefully pulling on the component with tweezers. (Sadly the same is not easily possible with the
Once you have removed them, you can solder new thermocouple wires, as those are special wires. Don't
wires in place of the bridge rectifier. Make sure you try to cut and extend those unless you know what you
identify the correct solder pads. There should be are doing.) Make the longer wires about 40-50cm
traces going from them toward the fan motor (possibly long at least (see below).
with inductors in between). If the wires are too thick to
push through the holes in the PCB, you can either (i) AC fan
carefully cut some of the conductors, if it is stranded
wires, until the remaining ones fit through, or (ii) very For an AC fan, proceed as with the heating element:
carefully widen the holes with a drill, or (iii) solder the Tab connectors on each wire, and a power cord to
wires onto the solder pads rather than through the route outside.
holes.

2 1 2

1. EM filter circuit - keep! 1. New DC wires soldered in place of former rectifier output.
2. Rectifier - remove. 2. New DC wires soldered in place of former rectifier output.

3. AC capacitor and voltage divider wiring - remove.

Arduino-controlled DIY Coffee Roaster: Page 18


2
3 1

1. Rectifier and existing wires removed.


2. New wires soldered onto PCB.
3. New wires soldered onto PCB.

1
2 3

1. Flyback diode
2. Existing solder points
3. Existing solder points
4. Bottom side of PCB

Arduino-controlled DIY Coffee Roaster: Page 19


Step 7: Modifying the Popcorn Machine: Earthing and Reassembly

Earth have several wires and cables coming out of the


popcorn machine: Two AC wires for the heater, two
AC or DC wires for the fan motor, one earth wire, and
Before we finish up, make sure all the metal parts are two thermocouple cables.
still earthed. I again crimped a tab connector on the
original earth wire, and connected this to the earth In my setup, I have the popcorn machine and the box
wire from the AC power cord I used for the heater with the control electronics separate, and connected
power wires. with about 50cm of wiring. This way, I can lift off the
popcorn machine only, which makes it easy to pour
Reassembly out the roasted beans at the end. I have seen others
screw the popcorn machine directly onto their control
enclosure, saving on wiring, but then you'd have to lift
That is all for the popcorn machine! Pull all the wires the whole thing to get your beans out, and you have
through the opening in the bottom outer housing. You to be extra careful to secure all your electronics in
might have to widen the hole that held the original place. If you want to keep the popcorn machine
power cord. Then, put the outer housing back separate from the electronics, use at least about 40-
together. On my machine, it was tricky to align the 50cm of wiring. I used a braided wire sleeve to get all
screw holes in the bottom part with the threads on the the wires together - the resulting "cable" is quite thick,
fan assembly, but with a bit of wiggling everything but keeps everything tidy.
eventually fell in place. Secure everything by putting
all screws back where they were. You should now

1 2 3

1. Thermocouple wires (2x shielded, 1x plain - only one


each usually.)
2. AC power cord
3. DC wires
4. Individual AC and earth wires
5. Braided wire sleeve
6. Heatshrink tube and ziptie to secure end of wire sleeve.

Arduino-controlled DIY Coffee Roaster: Page 20


Step 8: Wiring Up the Control Electronics: Enclosure, Display, Routing Wires

You will want some sort of enclosure for all your remove the tape before it sets.
electronics. I used a plastic box from IKEA that I had
lying around, but there is plenty of enclosures Inside the box, I used a perforated metal plate to
specifically for electronics projects too. Mine is on the secure all components, and to provide earthing. This
small side for everything that goes inside, but fits way, a loose live connector is likely to touch earth
perfectly on my windowsill, which is where I keep the and trigger the RCD. (This obviously only applies if
roaster. You will want to drill one hole for a mains AC you have a RCD / GFCI - check with a local qualified
power cord, and one big hole for the wiring going to electrician if you are unsure about any of this!)
the popcorn machine. Get an AC power cord ready,
and all the wiring coming from the popcorn machine. Get all your components ready: Stack the TC4+ onto
the Arduino, and get your SSR, DC PSU or AC PWM
If you want a display, you can also cut out a space for dimmer module, and plenty of wires and connectors.
this. Tip: Cut out a rough shape, and then mask it. I
used some white silicone bathroom sealant I had The attached pictures show my final enclosure, and
about, but silicone epoxy should work too, for all the control components.
instance. For straight edges, mask the area outside
with tape, then put the sealant or epoxy, and then

3
5 2

1 6
2 8 1
4 7
3

1. Hole for wires toward popcorn machine. 1. Incoming AC power cord.


2. Hole for incoming AC power cord. 2. DC PSU
3. LCD display, secured with silicone inside cutout. 3. TC4 and Arduino.
4. Plastic box / project enclosure. 4. Solid state relay (SSR)
5. AC wires from popcorn machine.
6. DC wires from popcorn machine.
7. Thermocouple wires from popcorn machine.
8. Perforated metal sheet to hold everything in place.

Arduino-controlled DIY Coffee Roaster: Page 21


Step 9: Wiring Up the Control Electronics: Step by Step

When everything is inside my slightly-too-small of the SSR to the TC4+. OT1+ goes to the positive
enclosure, it gets a bit messy, so I wired things up SSR terminal, OT1- to the negative terminal. Again
outside the enclosure for nicer pictures. You might you can use ring connectors on the SSR side of the
want to do this inside your enclosure. If you do it wires. On the TC4+, you can just use bare wires in
outside the enclosure, make sure you already route the screw terminal.
all the incoming wires through the holes you drilled in
the enclosure! Lastly, connect the thermocouples to the TC4+. By
custom, the bean temperature often goes to channel
We will now wire everything up step by step. The 2 on the TC4+ (the leftmost two pins on the 8-pin
attached pictures show each step with annotations, screw terminal), and air temperature to channel 1 (the
and a close-up of all the connections on the fully next two pins). Each thermocouple has two leads,
wired-up TC4+. and it can sometimes be difficult to tell which is
which. If you can't see any markings on the wires,
First, connect earth from the mains power cord to the simply try one way. Then, once you have everything
metal plate, DC PSU, and the earth wire from the up and running, try if everything works as expected.
popcorn machine. For the connection to the metal Turn on the fan and heater and see what the
plate and to the DC PSU I used crimped ring temperature reading does: If it goes up, you got the
connectors, for the one to the popcorn machine again polarity right. If it goes down, you have the two wires
a crimped tab connector. reversed.

Next, connect live and neutral from the AC power. If you have a display, connect this to the TC4+ too. In
Since these need to go to both the DC PSU and the my setup I use a Bluetooth module with the TC4+, if
heater, I made a Y-splitter by crimping to wires onto a you want to use this, follow the instructions on the
tab connector. One set of live and neutral I then TC4+ website. If not, connect a USB cable to the
connected to the DC PSU, again using ring Arduino too.
connectors. The other neutral connector goes straight
to the neutral wire from the popcorn machine. The Then, secure everything inside your enclosure, and
remaing live connector goes to one of the AC close the lid. We're almost done now!
terminals of the solid state relay. The other SSR AC
terminal connects to the live wire from the popcorn If you have an AC fan, skip the DC power step.
machine. Instead, connect the control side of the AC PWM
dimmer board to the IO3 header on the TC4+;
Next up, DC power: Connect V+ and V- on the DC connect an incoming live and neutral wire to the AC
PSU to VIN and GND on the TC4+. For the DC fan, IN terminal of the dimmer board; and connect the AC
connect the positive and negative fan wires coming fan wires to the AC OUT terminal of the dimmer
from the popcorn machien to DC+ and DC- on the board. In this setup, you could power the Arduino
TC4+. (Skip this step and read below if you have an through USB, either connecting it directly to your
AC fan.) computer, or using a USB power supply if you're
using Bluetooth.
Then, the SSR control: Connect the DC (control) side

Arduino-controlled DIY Coffee Roaster: Page 22


Arduino-controlled DIY Coffee Roaster: Page 23
Step 10: Modifying the Popcorn Machine: Chimney

Only one thing is missing now, which is a chimney. several layers of Kapton tape to make the glass
This is to keep the coffee beans inside the roaster, chimney fit the roast chamber snugly, and also to
and to let chaff and smoke go out the window. I found attach the exhaust duct to the top of glass chimney.
a glass chimney on eBay that was meant for old oil When roasting, I put the exhaust duct out my kitchen
lamps, and which had roughly the same outer window, but obviously be considerate of your
diameter as the opening in my popcorn machine. I neighbours with that.
then got a piece of high-temperature aluminium
exhaust duct, again with the same diameter. I used

Arduino-controlled DIY Coffee Roaster: Page 24


2

1. Glass chimney (meant for oil lamp)


2. Aluminium exhaust duct.
3. Kapton tape.
4. Glass chimney fitting roast chamber diameter, pad with Kapton tape if
necessary.

Arduino-controlled DIY Coffee Roaster: Page 25


Step 11: Software: Arduino Sketch

That's it for the hardware. For software, there is tworel="nofollow">https://github.com/greencardigan/TC4-


things left to do, flash the Arduino firmware, and shield/tree/master/applications/Artisan/aArtisan/trunk/
download and configure Artisan. src/aArtisan or https://github.com/greencardigan/TC4-
shield/tree/master/applications/Artisan/aArtisan_PID/t
On the Arduino side, unless you ordered a pre- runk/src/aArtisanQ_PID) and required Arduino
flashed Arduino, you will have to flash a firmware libraries (https://github.com/greencardigan/TC4-shield
onto it. /tree/master/applications/libraries/trunk/libraries).
Copy the libraries to your Arduino library folder
You can use one of two (related) Arduino sketches for (usually Documents/Arduino/libraries), and open the
this: aArtisan or aArtisanQ_PID. The former is aArtisan sketch in the Arduino IDE. Select the user.h
simpler, the latter has a few more features. Which tab on top, and check through the options. If you're
you use is up to you. Download the Arduino IDE ( http using aArtisanQ_PID, you want to select
s://www.arduino.cc/en/Main/Software ) and install it. CONFIG_PWM. Other parameters you might want to
Then, download the aArtisan or aArtisanQ_PID edit are IIC LCD display address, for instance. Most
sketch ( of the other options you canleave them as they are
unless you have a reason to change them. Flash the

Arduino-controlled DIY Coffee Roaster: Page 26


Step 12: Software: Artisan Roaster Scope

On your host computer, download Artisan ( https://artisan-scope.org/ ) and install it. The configuration is the same
as for the TC4 board, and there are already a few very good guides on setting up Artisan to work with this. For
instance, check out this youtube video: https://www.youtube.com/watch?v=0-Co-pXF2NM

The two base things to configure are:

In Config -> Device and Port: Configure the TC4 device, and choose the correct serial port.
In Config -> Events: Configure buttons and sliders to set heater and fan levels. You must configure
serial commands for each of those: OT1 sets heater level, IO3 sets fan speed. For buttons, you can
write "OT1,100" to set the heater level or "IO3,50" to set fan speed. For sliders you can write "IO3,
{}" to control the fan speed, and "OT1,{}" for heater level. See the attached screenshot for a basic
setup.
In Config -> Events: By default Artisan has a device setup that is more geared toward drum roasters
than hot-air fluidbed roasters. You might want to reduce the controllable "event types" to only a
heater and a fan.

The attached screenshots show those configuration options. There are many more features in Artisan, but for the
beginning this basic setup should get you going.

Once you click "On", Artisan will connect to your roaster and display current temperature readings. Click "Start" to
start recording temperature. Use the buttons and sliders to control fan and heater level. Make sure to turn on the
fan before the heater, or you will burn out your heater in seconds!

1 2

1. Select TC4 as device type. 1. Set event types to heater and fan only for a simper UI.
2. Check that ET and BT match your thermocouple channels. ET is
incoming air temperature, BT is bean temperature.

Arduino-controlled DIY Coffee Roaster: Page 27


3 1 2 3
2 1
4 5

1. Set the heater output / fan speed. 1. Enable sliders for fan and heater.
2. Set fan/heater. 2. Again, set action to serial command.
3. Set labels for buttons. 3. Enter serial command for fan speed / heater level. Use "{}" as a
4. Set action to serial command. placeholder for the value.
5. Enter serial command to set heater / fan level.

Step 13: Done! Let's Roast Some Coffee.

That's it! You now have a fully controllable coffee roaster at your disposal. To get started roasting, use about 100g
of green beans (this might vary depending on your exact setup). Start by getting the bean temperature up to about
100C, and then increase from there. You want to hit just over 200C after about 15 minutes, and you want the
temperature increase to slow down over the course of the roast. If you listen closely, you might be able to hear the
beans cracking when you approach 200C. If you want a light roast, you can stop thereabouts, otherwise continue
slightly longer. Once you want to finish the roast, turn off the heater, but keep the fan on full speed, to cool the
beans down. Remove them from the roaster once they're approaching room temperature. The attached screenshot
from Artisan shows how a typical roast might look like, with bean temperature in blue.

For more information on home roasting, check out these websites:

https://forum.homeroasters.org/forum/ - the biggest home roasting forum.


https://www.home-barista.com/home-roasting/ - another good home roasting forum.
https://legacy.sweetmarias.com/library/category/roast/getting-started/ - some good getting started
guides.

If you want to delve deeper into Artisan and automation, have a look at PID control, for instance here:

https://artisan-roasterscope.blogspot.com/2016/11/pid-control.html
https://www.youtube.com/watch?v=ykuUCXhGAC4

Another extra project can be to add Bluetooth connectivity. Follow the guide on the TC4+ website for this:

https://coffee.gerstgrasser.net/assets/TC4plus_Bluetooth_configuration.pdf

And in any case, enjoy your freshly roasted coffee! Thank you for reading my Instructable.

Arduino-controlled DIY Coffee Roaster: Page 28


Thanks for the nice Instructable. I'm interested in doing this to make a fluid bed sample roaster. My
only question/comment is: Isn't it problematic to REALLY measure Bean Temperature in a popper -
because you are in the hot air stream. How much different is the BT from the ET really? Have you
considered measuring the exhaust temps and making profiles from them? Rob Hoos has an
excellent article on this subject that was written for the Ikawa Pro, but the principles apply to most
roasters. In fact, this is what Sonofresco is doing with their thermocouple placement and their ADR
machines. Would be interested in your thoughts on that. THX!
Ah, that's a good point! Indeed, the BT thermocouple doesn't truly measure bean temperature here,
and in other popcorn machine / fluid bed roasters, and that's a general limitation of the working
principle of this type of roaster as you say. In my experiments, BT was different in magnitude from
ET but following a similarly shaped trajectory.

You could indeed measure exhaust temperature instead. The simple reason I chose to put the
thermocouple inside the bean mass here is that that's what most other popcorn machine roasters
do, and I wanted this tutorial to be in line with all the various blog posts and forum threads out
there. But you could easily measure exhaust temperature instead. In fact, I would try measuring
both, and see what is more useful for you. The TC4+ has for thermocouple channels, so you could
even measure incoming air, two different points inside the bean mass, and exhaust air stream.

Ultimately I don't think it matters too much. The goal here isn't necessarily accuracy so much as it
is consistency and repeatability. You want the same temperature curve to produce the same
flavour, basically. But you shouldn't expect to be able to take a temperature curve from a different
roaster and just replay it on yours and get the same result (even with two drum roasters that likely
wouldn't work if the thermocouple placement is even slightly different).

You do raise a good point though, in that the shape of the temperature curve in a popcorn machine
roater might look quite differently than in a drum roaster, for similar results, as the mechanics and
what is actually measure is quite different.
Wow so detailed and clear! Hopefully this will make high-quality home coffee roasting accessible
to more people! Well done! :D Wish this existed years back when I started home roasting—just
buying a board and hooking it onto my popcorn machine—would have made my life so much
easier...
Thank you! :) That's exactly what I'm hoping this does - make decent coffee roasting easy and
accessible. :)
Very cool! My mom has been using an old popcorn popper to roast coffee beans for years.
How much did all of the components cost? Might be more cost effective to just buy a dedicated
coffee roaster haha. Would be nice if you listed the prices of the items.

Arduino-controlled DIY Coffee Roaster: Page 29


Good question! The parts in this guide are about 150 GBP / 180-200 USD. The cheapest
worthwhile off-the-shelf roasters I am aware of start at three times that, like the Gene Cafe. But
those don't give you fully automatic control through Artisan, like this does - and that really is the
main point.
Thanks for that information. Good point. It's definitely a worthwhile and fun project.
How does the control through Artisan compare to something like this?
https://deansbeans.com/our-products/roasters-grinders/freshroast-sr500.html/
What do you mean by "fully automatic control"?
You're welcome - thank you for the enthusiastic feedback! :)

The Freshroast is interesting, as it's a fluid bed roaster, working on the same principle as these hot-
air popcorn machines. Essentially, what it gives you is the same as the stock popcorn machine
plus some basic manual fan and heater controls. It does not give you a temperature reading. But
this is important: Different ambient temperature, different beans, or a number of other parameters,
can mean that the same heater output results in a different temperature. So you would want to
monitor the actual temperature, and adjust your settings based on that. Nor does it give you very
fine-grained control of heater or fan, just three settings for the heater for instance.

Actually, I should have written "electronic control" or "precision


control" or something here, instead of "automatic". Even if you don't
automate the process, having a precise, real-time temperature reading
and fine-grained output control in Artisan makes a huge difference in
what you can achieve.

But you can do automatic control in Artisan, too. For instance, you could have the fan speed
adjusted as the roast progresses. Or, to be truly fully automatic, you can have Artisan and the
TC4+ implement a closed-loop PID controller. With that, you only tell Artisan the temperature to
aim for, or even an entire temperature curve to follow, and it will adjust heater output automatically
based on the thermocouple readings. This is what I do in practice, and it means that once you have
found a roast profile you like, it's essentially one click to recreate it automatically in the future. I
don't go into this in detail in this Instructable, since I wanted to focus more on the hardware for this
one. But check out the links in the last step for more information.
Highly interested making this, wow! I wonder how it is when the outlet is not hosed to go outside,
smell wise inside the kitchen. Perhaps the stove vent can cope to keep the fumes acceptable?
Thanks!

It's hard to say about the smell, I think it's subjective. Personally, I found it bearable, but not great.
There's definitely some cooking that produces a worse smell. Stove extractor fan might help. But
the reason for putting the exhaust out through a window is actually two-fold. Fumes are one
reason, the second, bigger reason is chaff though: It will fly everywhere. And I mean everywhere.
So if you don't want to exhaust outside, you will still need to contain this somehow. An easy option
might be to proceed as above with the glass chimney and aluminium ducting, but instead of routing
it outside make a chaff container out of wire mesh and put the end of the exhaust into that.

Note that even if you don't want to exhaust outside, and even if you don't mind the chaff, you still
need some sort of chimney or containment, as otherwise most of your coffee beans will end up
ejected from the roast chamber toward the end of the roast. Don't try to roast with just the popcorn
machine (even with the stock plastic hood - that won't keep the coffee beans in in my experience).
Use at least the glass chimney or something similar.
Thanks for sharing this experience as well! Now I have a much better idea about the roasting
process this way, and for sure a chaff fountain is something to avoid in our house as well. I do not
Arduino-controlled DIY Coffee Roaster: Page 30
have a possibility to route the exhaust outside but in the shed I have plenty of opportunities, so this
will become the roasting spot.
It is joyful to read about your thoroughness with this project. Cannot wait to taste the result some
time when I finished my (our) roaster.
Good on ya, I messed around with popcorn air poppers over the years for roasting coffee. I never
went quite this far thus thus the Hurrah. Every once in a while I think about taking another run at it.
I have a coffee roaster just down the street and they would sell me some nice green beans. You
have done some good work here.
Thank you. I had to mess around quite a bit before I arrived at my current setup as well - hence I
wanted to write it all down. I'm glad you might find it useful. If you do decide to give it another go,
let me know how it goes!

And yes, local coffee roasteries are a great source of green beans! In my experience, they also
tend to be more than happy to have a chat about roasting, so they're a great source of knowledge
too.
My roasters are now my friends. Through them I have learned even more about coffee. In the
sense of making big money in coffee, their business model is crazy. She (one of the principles)
bought 400 hectares of cloud jungle in Mexico - preserving it from development. The local villages
(6) pick the wild coffee beans and she buys the coffee beans from them. Their company is called
Frog Friendly Wild. They were investigated for false advertising because the powers that be, could
not believe that anyone would use their business model, which of course they were. Truly lovely
people and truly lovely coffee.
This is fantastic! What a thorough and complete project. Thanks for sharing your build. :D

Thank you! :)

Very nice indeed. Thanks.

Thank you! :)

Wow, what an amazing instructable you've created. With a small amount of money and a whole lot
of your knowledge and skill, you have something that rivals the high-end Probat-type sample
roasters in customizing the roast. Nicely done!
Thank you! Indeed, customizability and compatibility with industry-standard software was one of
the main goals of this. :)

Arduino-controlled DIY Coffee Roaster: Page 31

Das könnte Ihnen auch gefallen