กลับไปหน้ารวมไฟล์
weight-based-coffee-grander-with-blynk-app-73c189-en.md

I have finally starting to reach my goal to modify a Rancilio Rocky coffee grinder to become a smart grinder.

This is the way the grinder hopefully will look. I will remove the portafilter holder. I rather use a long-drink glas to catch the ground beans the poured in to the portafilter or french press (less messy since I can transfer the ground coffee to the brewer/portafilter above the kitchen sink. ;0)

The glas will rest on the scale and scale tare’d before each grinding session.

Description of my grinder mod

My grinder will have the following features when completely modified.

A way to step-less adjustments of coffee grain size from the app and maybe also some presets (adjustable) like Espresso, French-press, Drip etc. the first ones above are already implemented, the italics are not!

  • A smart scale that grind and then turns off the grinder at a preset weight.
  • A app to turn the coffee grinder on and off and that allow me to step-less adjustments of the preset for the final weight of grinding session.
  • Wifi interface.
  • Future ideas to come.

For coding the ESP8266 (I mostly use dev units like WeMos D1 Mini) I have chosen Arduino IDE that are popular and quite easy to get started with. I will not publish any Arduino, Blynk or ESP8266 tutorials here, you can easily find hundres of them by searching the www.

The hardware for the smart grinder

Hardware used in this project (All product links below goes to AMAZON and will help me to run this website).

ESP8266 Relay board I prefer this one ->

The code and the circuit

The code and circuit as it stands right now: 27 Mar 2019(Will be updated many times for sure so keep visiting this space).

Arduino Libraries used in this project

HX711_Arduino_Library at version 0.7.2ESP8266WiFi at version 1.0Blynk at version 0.6.1

 Download Arduino sketch 
//#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include "HX711.h"
BlynkTimer timer;
int relayPin = D5; // Change to suit your board.
// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = D2; // Change to suit your board.
const int LOADCELL_SCK_PIN = D1; // Change to suit your board.
HX711 scale;
//Blynk project auth.
char auth[] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YOUR-SSID";
char pass[] = "YOURPASS";
BLYNK_WRITE(V0) { scale.tare(); // Strain sensor tare
}
BLYNK_WRITE(V2){
if (param.asInt()) {
digitalWrite(relayPin, HIGH); // Relay ON.
} else {
digitalWrite(relayPin, LOW); // Relay OFF.
}
}
BLYNK_WRITE(V3) {
Blynk.virtualWrite(V2, 0);
digitalWrite (relayPin, LOW); // Grinder interupt (Emergecy stop), Relay OFF.
}
int slider;
BLYNK_WRITE(V11)
{
slider = param.asInt(); // Assigning incoming value from pin V11 (Slider value) to a global variable.
}
void setup() {
Serial.begin(57600);
Blynk.begin(auth, ssid, pass, "192.168.254.110", 8080);
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
scale.set_scale(1040.f);
timer.setInterval(500L, HX711data); // .5 sek delay to unstress the server and stabalize readout on numeric widget @ V1.
timer.setInterval(60L, HX711relay); // 60ms delay ono to keep fast stop grinder response and not overshoot grinding to much.
digitalWrite(relayPin, LOW); // To make sure grinder doesn't start running during boot.
pinMode(relayPin, OUTPUT);
BLYNK_CONNECTED();
Blynk.syncAll();
}
void HX711data()
{
Blynk.virtualWrite(V1, scale.get_units(20)); // sending calibrated strain sensor value to Blynk value widget.
}
void HX711relay()
{
if (scale.get_units(20) >= (slider-0)) {
Blynk.virtualWrite(V2, 0);
digitalWrite(relayPin, LOW); //Relay OFF change the (slider-0.0) number in seconds with one decimal to compensate if grinder overshoot "Grinder calibration".
}
}
void loop()
{
Blynk.run();
timer.run();
}

Above my wire nest test setup, the wires running from the 500g digial scale are soldered to the internal circuit board (The scale still operating normally in parallel no batteries needed and display works to !)

The Blynk Android interface for my prototype I will list the elements an their settings and functions below. V1 etc stand for virtual pins, se Arduino sketch above and read the Blynk manual for further info.

The “Labled value” Widget here it shows the preset from the slider 3. (V11 0-80 ‘or your choice’, Push).The “Slider” Widget to adjust your desired amount of ground coffee (V11 7-80 ‘or your choice’ , send on release OFF, Show value OFF, #, # for one decimal adjustments).

  • The “Level V” widget will fill up with color as we grind. (V1 0-100 corresponds to grams in my version).
  • “Styled Button” Grind (V2 0-1 Switch button) I labeled my button Grind when off and Grinding on orange background when the grinder are running.
  • “Styled Button” Stop (V3 0-1 Push button) can also be stoped by pushing “Grind/Grinding” button when it shows “Grinding”.
  • “Styled Button” Tare (V0 0-1 Push button) to zero scale with empty canister resting on the scale surface do this before each grinding.

This project will be updated as it progress stay tuned and keep visit :0)

stockholmviews.com

EXPANDED TECHNICAL DETAILS

Precision Barista Automation

This high-end coffee tool automates the "Dosing" of coffee beans with gram-level accuracy, controllable from a smartphone.

  • Precision Load-Cell Interfacing: Uses a 500g or 1kg Load Cell with an HX711 24-bit ADC. This provides the resolution needed to measure coffee weight within +/- 0.1g.
  • Relay Controlled Actuation: The Arduino (via ESP8266 or ESP32) drives the coffee grinder's motor through a 10A Relay.

Mobile Integration

  • Blynk IoT Interface: Users can set the "Target Weight" on the Blynk app. The Arduino starts the grinder and shuts it off instantly when the scale reaches the target, providing the perfect dose every time.

ข้อมูล Frontmatter ดั้งเดิม

title: "Weight-Based Coffee Grander with Blynk App"
description: "Make your stupid coffee grinder smart with this IoT and weight-based coffee grinder modification."
author: "stefan63"
category: ""
tags:
  - "home automation"
  - "smart appliances"
  - "food and drinks"
  - "remote control"
  - "internet of things"
views: 3008
likes: 1
price: 299
difficulty: "Intermediate"
components:
  - "1x Capacitor 100 µF"
tools: []
apps:
  - "1x Blynk"
  - "1x Arduino IDE"
  - "1x Arduino IDE"
  - "1x Blynk"
downloadableFiles: []
documentationLinks: []
passwordHash: "349d857901acba5f32c98b22cb977b9c91ec396aa08dcaf54cddef7d94792ccb"
encryptedPayload: "U2FsdGVkX1+YvD/NKXLulyo4STGIyguy083Bj89AFrlpSiCNPzOWWqhI2LCL9Z0g5hUnoX4oVOxhDbJAwLATRsUmo5qPjgptvp3FU8EEIMGgj9kNeBlYxOnaDXkyDVdXJkhL+e/Yv28F0OWIot3V4w=="
seoDescription: "Smart Coffee Grinder DIY project using IoT and Weight-Based technology controlled via Blynk App."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/weight-based-coffee-grander-with-blynk-app-73c189_cover.jpg"
lang: "en"