ggramlich26 / BZ10_upgrade

GNU General Public License v3.0
11 stars 2 forks source link

Bezzera BZ10 Upgrade

This Project is a replacement for the original Bezzera BZ10 electronics bringing many new features including the following:

Building the project

This project is set up to be built with Eclipse Sloeber, which adds Arduino support to the Eclipse IDE. It uses the following Libraries, which can be installed through the library manager:

Some libraries are also added as source code. If you use the Arduino IDE, please move all files from the libraries/library name/src/ directly into your project directory. If you use Sloeber, you might have to add the library paths in the project settings: Right click your project/Properties/"C/C++ Build"/Settings. In the Tool Settings Tab, expand the compiler and click Include Folders. Add the following paths "${workspace_loc:/BZ10_upgrade/libraries/AsyncTCP/src}" and "${workspace_loc:/BZ10_upgrade/libraries/ESPAsyncWebServer/src}" under each of the three compilers.

Board settings: You need to install the ESP32 board for Sloeber. Select NodeMCU-32S as board, Upload Protocol: Default, Flash Frequency: 40MHz, Upload Speed: 115200

Windows: Under windows you need to make sure you have make command installed (e.g. through MinGW64: select mingw32-make package). You might also have to install CP2102 drivers if you get a timeout error when trying to upload your sketch.

Before building You will additionally need to modify User_Setup.h in the TFT_eSPI library folder. Uncomment #define ILI9341_DRIVER (line 39) and make sure all other lines in this block are commented out. Then search for the uncommented pin definitions and change them to the following:

#define TFT_DC      23
#define TFT_CS      17
#define TFT_MOSI    32
#define TFT_SCLK    33
#define TFT_MISO    14
#define TFT_RST     16

Setting your WiFi credentials

The machine can be configured to connect to your own home WiFi network via the web interface:

  1. Turn the machine off.
  2. Set the brewing switch to manual mode, hold both buttons pressed (This step resets the wifi configuration. You can omit it if you have a fresh setup).
  3. Turn the machine on while holding the buttons pressed. You can release them once the screen is ready.
  4. Wait for 30 seconds
  5. Connect with any device to the WiFi network "BZ10" with no password required.
  6. Open your web browser and type 192.168.4.1 into address bar, hit enter.
  7. Now you will be presented a prompt to enter the new SSID (your WiFi name) and password. You can also set your machines Bonjour name. Finish by hitting the "Set" button.

Connecting to the machine

You can connect to the machine with a browser on any device. You can use your computer, smartphone or tablet, for example. Please note: The machine currently only supports http and not https. If you cannot connect, you might have to change the line ine your browser to http://your-ip. There are multiple ways to connect:

Access point mode

When the machine cannot establish a connection to a wifi network, it automatically creates a hotspot after 30 seconds. Simply connect to the network BZ10 with your device. In the browser type in 192.168.4.1 to go to your machine and change the settings.

Local WiFi

If the machine is connected to your local WiFi network (little wifi icon shown in the bottom), you can reach it by typing its IP in your browser (use your router configuration website to find out what that is and to make it always the same). Alternatively, you can find it with Bonjour. This works out of the box on Apple and Linux machines and requires an extra installation from the apple resources on windows. You can then reach the machine by typing bz10.local into your browser. If you want to change the address to something else than bz10, you can modify the Bonjour name on the machine website.

Usage

Your new espresso machine has a lot more functions than before. This is how you can use them

Code overview

The machine functionality is based on state machines. There are two state machines for boiler and brewing unit temperature control. Another state machine controls the brewing cycle, one is used for the display, and a last one is responsible for the overall machine state including standby functionality. All state machines are visually shown under /State machines/State machines.odg. In order to make the program more flexible for other hardware, a hardware abstraction class has been written (dev.c). Adapting this class will allow the project to run on a different hardware as well. Besides machine logic, a faster library for TSIC temperature sensors has been developed.

Brewing state machine

Boiler heater state machine

Brewing unit heater state machine

Display state machine

Machine status state machine

The Hardware

There are eagle layout and gerber files available for a PCB designed with this project. You can simply send those files to a manufacturer such as JLCPCB or Seeedstudio. At the moment I also have a few available from my order, that I could have sent to you for very little money. In case you have trouble soldering SMD (surface mounted device) components, we could also discuss having an assembled PCB shipped to you.

Hardware on the PCB

You will need all need the components listed below to complete the PCB. All of them can be bought from standard suppliers, including Reichelt, Farnell, Mouser etc.

Resistors: Value Package Quantity Link
2.2k 0603 1
4.7k 0603 2
10k 0603 2
22k 0603 3
47k 0603 2
100k 0603 1
220k 0603 2
330k 0603 3
1M 0603 1
4.7M 0603 1
Capacitors: Value Package Quantity Link
2.2n 0603 1
10n 0603 2
22n 0603 1
100n 0603 2
Semiconductors: Name Package Quantity Link
Transistors
IRLML5203 MICRO3 1 farnell
BSS138BK SOT-23 6 farnell
Diodes
BAS21 SOT-23 2 farnell
ICs
MCP23017SO SO28W 1 farnell
NE555D SO-8 1 farnell
MCP6002-E/SN SOIC-8 1 farnell
ADS1115 MSOP10 1 e.g. from far east
Boards: Name Package Quantity Link
ESP32 nodeMCU with external antenna 1 from far east
Power supply: Name Package Quantity Link
HLK-PM01 (5V power supply) 1 from far east
Connectors: Name rows positions m/f Quantity Comment
pinheader 2.54mm 1 2 f+m 4 boiler SSR, boiler probe, NTC, tank switch
pinheader 2.54mm 1 3 f+m 5 connecting TSIC temperature and flow sensors
pinheader 2.54mm 1 6 f+m 2 connecting arduino SSR board
pinheader 2.54mm 1 8 f+m 2 connecting switches and LEDs
pinheader 2.54mm 1 9 f+m 2 display
wire to board connectors, RM5 with screws 1 2 f 1 230V connector farnell

Hardware off the PCB in the machine