Based on:
https://github.com/chris7topher/SmartPhilips2200
https://github.com/micki88/Philips-ep3200-testing
https://github.com/walthowd/Philips-ep3200-ha
https://github.com/veonua/SmartPhilips
A video for explanation can be found here: https://youtu.be/jhzEMkL5Xek
Used these parts:
For NodeMCU boards you don't need to convert voltage as they have onboard voltage regulators.
ESP32:
- uses Serial / UART0 to connect to the coffee machine
- uses HardwareSerial(2) / UART2 - RX2_PIN / TX2_PIN to connect to the display:
#define RX2_PIN 16 // Rx from display
#define TX2_PIN 17 // Tx not used
#define NPN_E_PIN 23 // Gnd for display (to switch it on and off)
ESP8266:
- uses Serial / UART0 to connect to connect to the coffee machine
- uses SoftwareSerial - RX2_PIN / TX2_PIN to the display:
#define RX2_PIN 14 // Rx from display
#define TX2_PIN 12 // Tx not used
#define NPN_E_PIN 13 // Gnd for display (to switch it on and off)
Consider the following Arduino IDE project example:
// path to this library
// note: Arduino IDE accepts custom libs in "src" dir only
#include "src/esp-phillips-3200/esp-phillips-3200.h"
Phillips3200 machine;
void on_machine_state_changed() {
// callback is fired when state of the coffee machine changes
// available public properties:
// false - off, true - on
bool power_status = machine.current_power_status;
// machine statuses:
// "off"
// "heating" - the machine is heating / initializing
// "ready" - ready, nothing is selected
// "ready_aqua_clean" - ready + aqua clean warning
// "selected" - brew is selected
// "brewing" - brewing
// "error_no_water" - no water / water tank is ejected
// "error_grounds_container" - grounds container light is on
// "error" - other errors
std::string machine_status = machine.current_machine_status;
// brews, available for "selected" and "brewing" machine statuses:
// "espresso", "2x_espresso", "coffee", "2x_coffee",
// "americano", "2x_americano", "cappuccino", "latte",
// "hot_water"
// "none" - if not available
std::string brew = machine.current_brew;
// 0 - unavailable; values: 1 - 3
uint8_t strength_level = machine.current_strength_level;
// 1 - "normal"; 0 - powder
uint8_t grinder_type = machine.current_grinder_type;
// values: 1 - 3
uint8_t water_level = machine.current_water_level;
// 0 - unavailable; values: 1 - 3
uint8_t milk_level = machine.current_milk_level;
}
void setup() {
// pass callback function
machine.setup(on_machine_state_changed);
}
void loop() {
// required:
machine.loop();
}
// API to control the machine:
// available commands:
// power: "power_on", "power_off"
// select brew:
// "espresso", "coffee", "americano", "cappuccino", "latte", "hot_water"
// levels:
// "coffee_strength_level", "coffee_water_level", "coffee_milk_level"
// start: "start_pause"
// other: "aqua_clean", "calc_clean", "request_info"
std::string command;
machine.send_cmd(command);
The wiring within the coffee machine is as shown in the picture:
Warning! You need a voltage regulator if your ESP8266 can't handle more then 3V.
- PIN1 - 4-5V from Coffee Machine
- Connect to ESP8266 and PIN1 on Molex 90325-0008 Connector that goes to display
- PIN2 - Ground
- Connect to Ground / GND on ESP8266 and connect to collector leg of NPN transistor
- PIN3 - Not used
- PIN4 - Not used
- PIN5 - RX
- This is actually TX from the coffee machine, but connects to RX pin on ESP8266
- This pin is
RXD0
/GPIO3
on most boards
- This pin is
- Also connect to PIN5 on Molex 90325-0008 Connector that goes to display
- This is actually TX from the coffee machine, but connects to RX pin on ESP8266
- PIN6 - TX
- This is actually RX from coffee machine, but connects to TX pin on ESP8266
- This pin is
TXD0
/GPIO1
on most boards - This is the pin that we are stealing and routing through the ESP8266
- This pin is
- This is actually RX from coffee machine, but connects to TX pin on ESP8266
- PIN7 - Not used
- PIN8 - Not used
D5
/GPIO14
for TX that connects to PIN6 on Molex 90325-0008 Connector that goes to displayD7
/GPIO13
for GND to turn off display- Connects to middle base leg of NPN transistor
- Emitter leg of NPN transistor to PIN2 on Molex 90325-0008 Connector that goes to display