I have been making sourdough bread for about 7 years now. I experimented with different formulas, learned what flours work for me, and most importantly - what me and my wife like (and dislike) in our bread. I make my breads about once every two weeks. Even though I like baking OK, I mostly end up mixing the dough at random hours - either when I've just woken up, or when I'm half asleep in the middle of the night. While it's nice to always have "surprise" bread, I'd like to have some degree of control over the ingredients. Other variables, namely time and temperature, are more often than not a given - rising, proofing, and sometimes even the baking itself occur between other chores and activities. The ingredients themselves are more or less constants (the same water and salt, sourdough that have been refreshed just before baking), and the flour is mostly chosen beforehand and stored in the fridge. 

But weighing per my formulas is more often than not a case of grabbing an old piece of paper filled with notes and corrections, doing some math in my head while I get my trusty calculator (my cheap smartphone) out of my pocket, then calculating the main ingredients' relative weight. Then, while weighing the first ingredient, my smartphone darkens the screen. Anyway, it's a mess. And my phone is a most likely the most non-hygienic apparatus I use in the kitchen, which needs to stop.

What also happens while weighing and mixing the ingredients, is that I'll substitute some of the flour with another for experimentation, or that I'll use a bit more or less water because I feel the flour needs it, or because I know I need to lengthen the rising time. Stuff like that never gets written, since I can hardly remember doing it by the time I've washed my hands and go on with my day.

Since that's the way I bake for the last year or two, I settled on a couple of formulas that sorta works... I don't particularly like them, but they're easy enough to calculate mentally, or at least remember the weights of ingredients as they're multiples of each other in either two or ten. That is definitely the right way to ruin a hobby.

So, after trying to explain how to get the formula right to a friend and not doing a very good job at explaining baker's percentage, I decided to send my friend my spreadsheet (breadsheet? Yay, Star!), and doing that got me thinking that maybe I should replace my kitchen scale with a "smarter" one. There are already commercial kitchen scales out there that connect to the internet in some way or another, but I could not find one that would let me define my own recipes, and also let me save my measurements in a way that's meaningful to me. So, I picked a ESP32 dev board, an old dumpster find 2 kg scale, and an OLED screen, and started hacking.

I started off with a ESP32 dev board I had laying around, a Wemos Lolin32, and got an el cheapo especial HX711 breakout board off of Aliexpress. The reasons for the ESP32 were, to me, quite obvious - it provides both BLE and WiFi functionality, and a basic firmware can be easily prototyped in the Arduino environment. And besides, it's cheap. It does have other issues though, especially for battery powered devices - it consumes quite a lot of power when connected to WiFi (around 480 mA), and even worse, it is not  a very "low power" BLE device, at 84 mA, according to Andreas Spiess. But I still believe that it is the right choice for this project, and especially so if it is going to be a maker product eventually, thanks to the many examples for it using the Arduino IDE.

The HX711 was selected for similar reasons. It has quite a few guides Arduino libraries, there are numerous projects using this load cell amplifier + ADC chip, and there are several good guides for using it, like this one from SparkFun for example, and even a ESP32 dedicated one from Andreas Spiess. And it's dirt cheap, costing less than 60 cents in quantity 1. It does have some issues, of course, but as Andreas shows in his video, nothing that can't be overcome.

The main reason for the OLED screen was that I needed a way to display both large font sized number (for the weighing, obviously), and also display selection menus and small details, such as connectivity status. Most significantly a graphic display gave me the possibility to select different formulas and ingredients stored in my spreadsheet. I soon found out that besides the graphical display benefits, and unlike the digit LCD in my current plate glass "flat bed" scale, I also got the benefit of a lit screen. Being able to see clearly the displayed values is a very significant improvement, as our kitchen is not very well lit - and even when properly lit, weighed items may block the light from outer sources. To that end, I have also decided that a smartphone BLE app which will display measurements might give an even better experience for short-sited people. That said, I still wanted to have the functionality of the scale be complete without the use of a smartphone.

The BLE connectivity of the ESP32 can also help me define a WiFi access point's SSID and password, and will probably help me with sign in to my Google account, so that I will be able to use a Google script webapp to connect to my spreadsheet of choice.