Introduction: Coffee Darkness Meter

One of the difficulties in roasting your own coffee is determine quantitatively the darkness of your roast. Most home coffee roasters can say they roast somewhere between first and second crack, but where exactly in that "medium" roast you are is usually a mystery. Coffee darkness charts help, but are often influenced by room lighting and your own eyesight. A infrared coffee darkness meter aims to help the home roaster determine where in the medium roast you are.

Supplies

For this meter you will need:

Arduino Nano (or Uno, but you will need to redesign the case)

0.96" OLED display

TSL2561 lux and IR sensor on a brake-out board (I used Adafruit's)

ON/OFF toggle switch

Momentary push button

9V battery and battery clip

2x IR LEDs

2x 100ohm resistors

2x 10K resistors

2x 2.2K resistors

wire for connecting

case for everything (3D printed)

Note: I have allowed for using 2 regular light LED's in the circuit, but I ended up not using these for the readings.

Step 1: Wiring the Major Components

The wiring is pretty straightforward.

1) The IR LEDs are wired in series with 100 ohm resistors D6 and D7. I have shown red LED's, however, I ended up not using these in the final darkness calculation as only the IR sensor is used.

2) The 0.96" OLED is wired to the I2C bus.

3) The TSL2561 sensor is also wired to the I2C bus.

4) Pull up resistors (10K) are used on the I2C bus.

5) Push button is wired to D2, with a 2.2K pull down resistor.

6) 9V battery and on/off switch is wired to the Vin pin of the Arduino.

Note: that I am using the Arduino Nano's voltage regulator to supply power to the LED's, sensor and OLED. I'm pretty close to maxing out the regulator.

Step 2: Programming You Arduino

Flash the code to your Arduino. You will need to download some libraries to run the code. Look for these libraries in the Arduino library manager: Adafruit_TSL2561 and for the OLED display: SSD1306Ascii

The Arduino code can be found on my GitHub feed: https://github.com/VinceC7/coffee-meter

Step 3: Printing Out the Case

There are 4 files to print out and are available on the GitHub page above:

1) Board plate.stl - holds the Adafruit TSL2561 breakout board - if you use a different one, you'll need to redesign this.

2) Offset ring.stl - goes onto the board plate, it holds the sensor the right distance (offset) to centre the LED's light beam in the centre. Since this is touching your coffee beans, you can coat this part with food safe epoxy to be extra cautious.

3) Middle ring.stl - holds the battery and Arduino nano

4) Top panel holds the OLED screen

I hot glued all the parts together. Its strong enough to hold, and easy enough to take apart if I want to change anything.


Step 4: Calibration and Using Your New Meter

To enter calibration mode: press the push button while powering up. You will need two calibration roast. I calibrate with ground coffee (a coarse grind for filter coffee), but the choice is up to you. You need a cinnamon roast (beginning of first crack). The software takes this as "eggtron" = 70, and an Italian roast (just end of 2nd crack) "eggtron" = 30. The rest of the measured "eggtron" values are based off of these two calibration points. Once the calibration routine is done, the values are stored in non-volatile memory. So the calibration values are remembered every time you use the meter.

To use the meter, just turn on the power. (with the button un-pressed). It will go through the start up routine, and then wait for you to hit the button to take the first reading. The meter requires 4 readings, and then displays the average raw IR value, as well as the calculated "eggtron" value, with a roast level.

I have a short video on how to use the meter on YouTube: https://youtu.be/GFptb66RO1I