Short Description


The Smart Coffe Tamper measures the weight applied on the grinded coffee when tamping. The ideal weight to achieve the best coffee flavour is around 15 kg and the user will be informed of how close he/she is to the "adecuate force" by a color coded 16xRGB LED Ring.

Documentation


Inner Components:

To measure the weight, a miniature load cell sensor was used. Since this cell contained a whole wheatstone bridge structure, it was possible to measure the force applied with only one sensor. This was an important aspect because the space available within the tamper was not too big and thus using only one cell was the best option. The other inner components included an Arduino Nano ATMega328, a load cell amplifier Hx711, a battery and a color coded 16 RGB LED Ring. One LED is always on to inform the user on whether the battery is charged or not. As the user keeps applying more force, more lightbulbs will light up with the color yellow. Lightbulbs number 13 to 15 light up in a blue color instead of yellow to signal to the user that the adecuate weight has been reached. If the user applies more than the necessary weight, the following LEDs will light up with a red color, eventually substituting the previously yellow and blue LEDs. It is worth mentioning that the sensor did not work linearly and so one LED does not necessarily match one Kilo. The Tamper was calibrated so that the blue LEDs could signal the 15 (+1/-1) kg that match the proper tamping force. 

Design

As for the actual tamper structure, it was designed in Onshape and 3D printed with Repetier Host. It consists of three parts. The lower part holds the miniature load cell sensor in place, while the middle and top parts (attached together with screws) press on it. In order to avoid the parts sliding away from each other, the middle part was designed with small hooks in its base to "hook" itself to the lower structure and to restrict the sliding movement to only a few millimeters.




The circuit

How the load cell and the amplifier are connected.How the amplifier and the arduino board are connected.How the LED Ring and the arduino board are connected.
The Code uploaded to the Arduino Board:

#include <HX711.h>
#include <Adafruit_NeoPixel.h>
#define DOUT 8
#define CLK 7

HX711 scale(DOUT, CLK);
Adafruit_NeoPixel LEDCode = Adafruit_NeoPixel(16, 2, NEO_RGB + NEO_KHZ800);

float calibration_factor = 1400;


void setup() {
    Serial.begin(38400);
    LEDCode.begin();
    int n;
    for (n = 0; n < 16; n++) {
       LEDCode.setPixelColor(n, LEDCode.Color(0, 0, 1));
    }
    delay(10);
    LEDCode.show();
    
    scale.set_scale();
    scale.tare();
    
    long zero_factor = scale.read_average();
    Serial.print("Zero factor: ");
    Serial.println(zero_factor);
}

void loop() {

    scale.set_scale(calibration_factor);
    float Absolute_weight = abs(scale.get_units()*0.453592);
    float Absolute_double_weight = round(2 * Absolute_weight);
    float Absolute_weight_5 = Absolute_double_weight / 2;

    Serial.print("Reading: ");
    Serial.print(Absolute_weight_5);
    Serial.print(" kg");
    Serial.print(" calibration_factor: ");
    Serial.print(calibration_factor);
    Serial.println();
    
    
    if(Serial.available()) {
        char temp = Serial.read();
        if(temp == '+')
        calibration_factor += 100;
        else if(temp == '-')
        calibration_factor -= 100;
    }
        
   
    
    for (int n = 0; n < 16; n++) {
         LEDCode.setPixelColor(n, LEDCode.Color(0, 0, 0));
    }
    LEDCode.show();

    if (Absolute_weight <= 13){
        for (int n = 0; n < Absolute_weight; n++) {
             LEDCode.setPixelColor(n, LEDCode.Color(1, 1, 0));
        }
    }
    else if (Absolute_weight <= 17){
        for (int n = 0; n < 13; n++) {
             LEDCode.setPixelColor(n, LEDCode.Color(1, 1, 0));
        }
        for (int n = 13; n < Absolute_weight; n++) {
             LEDCode.setPixelColor(n, LEDCode.Color(0, 0, 1));
        }
    }
    else {
        int red = Absolute_weight - 16;
        for (int n = 0; n < red; n++) {
             LEDCode.setPixelColor(n, LEDCode.Color(0, 1, 0));
        }
        int j = 0;
        for (j = red; j < 13; j++) {
             LEDCode.setPixelColor(j, LEDCode.Color(1, 1, 0));
        }
        int k = 0;
        for (k = j; k < Absolute_weight; k++) {
             LEDCode.setPixelColor(k, LEDCode.Color(0, 0, 1));
        }
    }
    
    LEDCode.show();
}




  • Keine Stichwörter