No announcement yet.

Automatic scale for grinder (Automatic coffee weighing) DIY project

  • Filter
  • Time
  • Show
Clear All
new posts

  • Automatic scale for grinder (Automatic coffee weighing) DIY project

    As per a previous post, I had been wanting to create a way to weight my coffee as I grind it. Someone suggested to look at Decent Doser. It’s a nice solution, but at $500, it was a bit steep. I essentially created a DIY version of this which costs around $50. I thought I would post what I've done in case anyone wants to replicate/contribute

    Here is a video of it in action: (sorry it is hard to read the LCD, but it reaches 15.0g)

    Advantages: Portable, can be used on any grinder. Height adjustable. Has a tare function, an auto mode and a manual mode. Reasonably accurate – can reach target within 0.2g) Can be upgraded (wifi/Bluetooth).

    Disadvantages: not pretty (can be made pretty). A bit of fluctuation in scale readings (by 0.1-0.2g). Scale takes a few seconds to reach steady state.

    Hardware from Bunnings:
    • MDF slab – cut into a platform and a base ~$6
    • Four 3/8” x 2” zinc hex bolts – used as adjustable legs $0.72 each
    • Four 3/8” hex nuts and washers – used to secure leg height $0.14 and $0.17 each
    • Four Round Black Rubber External Chair Tip – to give grip to legs ~ $2.50
    • 3 Brackets to accommodate portafilter (I bought Carinya 25x50x40x1mm) $0.83 each

    Electronics for scale (Ebay):
    • Arduino Uno clone $4.77
    • Jumper cables to connect Arduino and circuitry $1.76
    • HX711 Shieding Weighing Sensor 24-bit A/D Conversion $1.00
    • LCD 1602 Display Module Keypad Shield $4.69
    • Electronic Balance Weighing Load Cell Sensor 0-5Kg WS –$3.06

    Enclosure + relay sensor to activate grinder:
    • Wall Plate Modular Telephone Socket $4.95
    • HPM Standard Wall Junction box from Bunnings $3.92
    • Extension cord $3 Kmart
    • Old telephone cable - free

    • M4 and M5 nut and bolt pack from Bargain City, I think ~$2 (to secure weight sensor and brackets)
    • Silicone Liner to protect MDF, $3.26 Ebay
    • Drill/Screwdriver/Soldering iron (iron may be optional depending on the parts purchased, I needed to solder the wires coming from the load sensor to the HX711 module)

    The project essentially has 2 components: the weight sensing portion, which requires the first 2 lists of parts, and the grinder activating portion, which requires the latter (essentially just a solid state relay (SSR) and its associated enclosure and wiring).

    The weight sensing portion uses the MDF as platforms as pictured, with a weight load cell sensor wedged in between and secured as pictured. The load sensor requires the HX711 module to interface with the Arduino as pictured in the illustration. The platform can be made of ANY material. I chose MDF as it was cheap and could be cut to whatever dimensions I pleased. I used the brackets as portafilter holders, which isn’t the most elegant solution. The bracket supporting the portafilter handle is folded to accommodate the shorter weight of the handle compared to the basket. Again, portafilter holder can be made of anything. A 3D printer could’ve handled this portion of the project with more elegance. The bolts allow me to adjust the height of the whole platform to be able to use this on another grinder.

    The grinder activating portion caused a little bit of difficulty for me, as I went through 3 separate SSRs I purchased from Ebay before realizing that they were NOT built to spec, and were failing as a result. I would strongly advise anyone who is buying an SSR to AVOID the FOTEK look-alikes on Ebay. After posting on another forum, I elected to purchase a PQLYT SSR which works perfectly. I chose a 40A rated one, which is COMPLETE overkill, since the grinder probably only draws a few amps. A 10A SSR would have been ample. The SSR is connected to the outlet via a cheap extension cord in the following manner: the LIVE wire from the extension cord was cut and attached to the two AC (load side) terminals of the SSR. The ground and earth wires were left intact. I chose a wall junction box because they commonly contain electronics, and the telephone socket was made to fit it perfectly. The old phone cord was used as an easy way to plug the Arduino to the SSR. For those who don’t know how SSRs work, the Arduino essentially activates the grinder by applying a voltage (5V) to the DC switch side of the SSR, which allows the current to flow from the wall to the grinder through the SSR. The grinder switch needs to obviously be taped in the “On” position (as pictured).

    Of course, the grinder activating portion is optional. In fact, I was using the weight sensing and manually activating the grinder while I was troubleshooting the SSR and waiting for them to arrive from China (it took 6 months before I got this part working).

    I programmed the Arduino to have an adjustable target weight – there are multiple “programs” in the Arduino which can be cycled by pressing the left and right buttons on the LCD shield. Currently there are 2 programs – weighing mode and setting mode, but I can easily add more options (single and double basket modes with different weight targets for instance). The target weight is saved in EEPROM so that it doesn’t erase each time the Arduino is turned off.

    The project can operate in auto mode (grind until reaches target) and in manual mode (press a button to activate grinder, press a button to stop). There is a button to tare it.

    I would be happy to share the code here with some explanations if someone is interested

    Future directions
    I will be adding a WIFI module to the project (not because it needs it, just cuz it’s cool). The goal is to be able to activate the grinder from my phone using something like Blynk (essentially the phone would be playing the role of the LCD).
    Attached Files

  • #2
    I wish I had the time (and talent...)


    • #3
      Love it!

      V2: coming soon to a crowdfunding site near you?


      • #4
        Hi Danyboy, that is exactly what I was looking for. Would you be able to post the .ino file?


        • #5
          Hi mcudogs, it is my pleasure to attach it
          Please find a revised diagram that matches up with the code (I illustrated connections into the LCD shield rather than an arduino). Please note this will look different to the pics above.

          Note I am not a professional programmer, it's just a hobby. If anyone has suggestions about how to improve the code, I am open to them. However, the program seems to work fine as is
          Attached Files