Close
0%
0%

Yet another "smart" kitchen scale

A kitchen scale that connects to my Google spreadsheets for bread baking

Similar projects worth following
A hacker friendly kitchen scale platform using ESP32, HX711, and OLED screen(s), that lets me get and save data from and to my Google spreadsheets.

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...

Read more »

LOAD_CELL_NEW.fzpz

A Fritzing part for a typical beam type load cell, with full Wheatstone bridge, and 4 wires.

x-fritzing-fzpz - 8.03 kB - 04/30/2019 at 23:46

Download

  • Back to life, back to reality

    uri.shani08/05/2019 at 08:28 0 comments

    I've had a bit of a crisis in the past few months. Both of our (very) old cats decided it was their time to pass - which they did with only a couple of weeks between them. It was heart breaking, both for me and for my wife. But mostly, it made me stop working on anything that mattered to me. That included the scale, but also caused me to abandon my sourdough altogether. Sort of a "leaving the past behind" thing, I suppose.

    Anyway, since I did not make any progress and had no progress in the past few months, I decided to publish the source code in its present state, with all its flaws. I'll list here some of the things I think should be addressed, in no particular order:

    • Documentation is really horrible. That's got to be fixed.
    • Also, Arduino sketch can be separated to several files to help readability and modularity.
    • Since all testing was done with the esp32 connected to USB, I did not include any provision for battery powered operation in software - i.e. I need to add some code to power down the screens, then after some more time go to the esp32's ultra-low-power core for prolonging battery life. I should probably add some transistor to power down the load cell as well.
      • On that note, I'll probably have to add some way to measure voltage level, then a battery level GATT service, and a battery level indicator on one of the screens.
    • Most of the effort was given to the esp32 code, but there are (at least) two other components to the system: a pseudo-database (Google Sheets), and a configuration app to handle the connection and WiFi credentials.
      • The Google app script should probably be configured as a plug in, for people to easily use it. That requires diving into Google's Oauth2 documentation, and I haven't done any of that yet.
      • At the moment I'm using Bernd Giesecke's ESP32 WiFi setup over BLE (ESP32 code) as the basis for configuring WiFi credentials, and used his Android configuration app, or, alternatively, Nordic's nRF connect app. Since I no close to nothing about Java and Android app development, I decided to create a basic web-ble web app to replace the native Android app. The advantage for me is that I'm more comfortable with JS than Java, and this app will be able to run on many more platforms - such as from a desktop PC or any smartphone that supports web-ble, including iOS devices.
      • Even more than that, I will also be able to configure server side access using Google's 'server-side flow' to define Oauth2 credentials on the esp32, and will probably try and venture into creating a progressive web app from that, which will allow me to use this app as a remote display for the scale as well, even without a working network connection.

    Anyway, I really hope to dive into this project soon. You can check out the Github repo for the esp32 code, and have a go with my version of Akshaya Niraula's (further development by Allan schwartz here) Google app script.

  • Prototyping setup

    uri.shani04/30/2019 at 16:59 0 comments

    As I wrote in the introduction section, I started this project by hacking together a discarded scale, an ESP32 dev board (Lolin32 clone), a HX711 breakout board, and a monochrome 0.96" OLED screen. At first, I used the serial port for mode changes, etc., but soon after I added a few buttons for menu navigation and typical counter-top scale functions such as Tare and unit swap (g, kg, pound). The display also seemed a bit crammed on a single 0.96" screen (128x64), so I added a second one - now one screen displays measured weight, and the other can display, for example, the currently selected ingredient I pulled from my formula spreadsheet, and it's relative percentage. 

    As this first update on the project is about the prototyping setup I use, I created a Fritzing breadboard scheme so others can follow along. I couldn't find a load cell object, so I created my own - you can find that in the files section above, if you're interested. Also, I used simpler OLED I2C screen objects, since they're much easier to handle than the 6 pin versions I have. With the 6 pin versions, the board is configured for SPI but does not break out the CS pin, and changing to I2C is quite a pain.  

    For the firmware, I settled on developing it using Visual Studio code with the Arduino extension (+ Arduino-ESP32 core), I find it much nicer to use than the Arduino IDE. 

    I hope to have the firmware stable enough by end of next week. Then I can go into more detail about the code, and maybe even start with mechanical + electronic design considerations.

View all 2 project logs

Enjoy this project?

Share

Discussions

mahadevaiah.rashmi wrote 12/02/2019 at 21:40 point

Hi,

https://www.circuito.io/static/reply/index.html?solutionId=5da6ee4a9cfabe003054245f&solutionPath=storage.circuito.io

I am trying to build the above circuit powered by battery alone. Sparkfun HX711 is expensive and hence I am using Amazon HX711

HX711 module has Operating Voltage: 2.7V to 5VDC and Operating current: <10 mA

https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide

Sparkfun HX711 has VCC and VDD. VCC is the analog voltage to power the load cell. VDD is the digital supply voltage used to set the logic level. In many cases, you can just short VCC and VDD together. If your microcontroller uses 3.3V logic however, you'll want to connect VCC to 5V and VDD to 3.3V.

https://www.amazon.in/Generic-HX711-Weighing-Dual-Channel-Precision/dp/B00OUZCS2Y/ref=asc_df_B00OUZCS2Y/?tag=googleshopdes-21&linkCode=df0&hvadid=396979667742&hvpos=1o1&hvnetw=g&hvrand=2244786411104874136&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9062038&hvtargid=pla-553388600392&psc=1

Amazon HX711 has only VCC and no VDD. Therefore, can I connect LoadCellHX711SF VCC to NodeMCU1 3V3 instead of connecting LoadCellHX711SF VDD to NodeMCU1 3V3?

Thanks and regards,

Rashmi

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates