The Problem

Nowadays there are countless coffee machines however with limited to no smart functionality. With this new way of doing work remotely buying a cup of coffee for a colleague, friend or family is not possible.

The idea

This Home Automation Smart Coffee Machine Add-on was designed and prototyped by me using KiCad. Is of easy installation on any home or office coffee machine, and enables any vintage coffee machine connectivity to the internet (or a personal network).

The PCB uses an ESP32 S3 packed with Bluetooth, BLE, and WiFi compatible with major software vendors such as Apple Home, Google Home, Matter/Zigbee, Home Assistant, and many others.

The custom firmware coded includes the functionality of someone sending for a cup of coffee (or other) request from the Telegram Messenger App. In return, it sends a receipt as proof a coffee was indeed brewed on the coffee machine.

Join the WhatsApp group here.

image.png


Philips Senseo Coffee Machine

Functionalities available:

  • Control water temperature;
  • Low water detection in the water tank;
  • Order a cup of coffee (with the possibility to control the quantity of coffee in a cup);
  • RGB LED;
  • Magnetic Buzzer;
  • This PCB can be powered using 220V AC or regular 5V DC.
  • Control of the coffee machine is made using a 220V relay or alternatively any other 3.3V switch.

OEM Firmware code

The OEM version of the firmware code can be found in the folder firmware code. It has by default OTA updates, meaning the smart coffee machine add-on device automatically updates itself when newer updated versions are made available here.

This code uses my own ESP32 C++ class libraries to expedite the development of code for ESP32 microcontrollers. The repository is located here for anyone to use.

This smart device add-on Is able to connect to a WIFI network for handling message requests from the Telegram Messaging App. Below is the full code for the smart_cofee_machine.ino file . The remainder of the code can be found on my repository.

#define uS_TO_S_FACTOR 1000000
//----------------------------------------------------------------------------------------
// Components Testing  **************************************
bool SCAN_I2C_BUS = true;
bool TEST_FINGERPRINT_ID_IC = false;
//----------------------------------------------------------------------------------
#include <math.h>
#include <cmath>
#include "SPI.h"
#include <semphr.h>
#include "esp32-hal-psram.h"
// #include "rom/cache.h"
extern "C"
    {
    #include <esp_himem.h>
    #include <esp_spiram.h>   
    }

// custom includes **********************************
#include "nvs_flash.h"  //preferences lib
// External sensor moeasurements
#include "telegram.h"
TELEGRAM_CLASS* telegram = new TELEGRAM_CLASS();
// custom functions
#include "src/m_file_functions.h"
// Interface class ******************************
#include "src/interface_class.h"
INTERFACE_CLASS* interface = new INTERFACE_CLASS();
#define DEVICE_NAME "Smart Coffee Machine"
// GBRL commands  ***************************
#include "src/gbrl.h"
GBRL gbrl = GBRL();
// Onboard sensors  *******************************
#include "src/onboard_sensors.h"
ONBOARD_SENSORS* onBoardSensors = new ONBOARD_SENSORS();
// unique figerprint data ID
#include "src/m_atsha204.h"
// serial comm
#include <hardwareserial.h>
HardwareSerial UARTserial(0);
#include "src/mserial.h"
mSerial* mserial = new mSerial(true, &UARTserial);
// File class
#include <esp_partition.h>
#include "FS.h"
#include <littlefs.h>
#include "src/m_file_class.h"
FILE_CLASS* drive = new FILE_CLASS(mserial);
// WIFI Class
#include <esp32ping.h>
#include "src/m_wifi.h"
M_WIFI_CLASS* mWifi = new M_WIFI_CLASS();
// Certificates
#include "src/cert/github_cert.h"
// Coffee Machine
#include "coffee_machine.h"
COFFEE_MACHINE_CLASS* coffeeMachine = new COFFEE_MACHINE_CLASS();

/********************************************************************/
#include <bledevice.h>
#include <bleserver.h>
#include <bleutils.h>
#include <ble2902.h>
// See the following for generating...
Read more »