Close

starting small

A project log for automated gardening - reservoir infrastructure

Building Reservoirs and Weighing Water for level gauging and flow metering.

helgehelge 07/15/2018 at 23:450 Comments

Bad puns about "starting on a small scale" aside, using compact low profile kitchen scales should have its advantages from development to practical use, particularly because 3-5L water jugs are both cheap and keep a small footprint perfectly matched to kitchen scales and it might be interesting to directly monitor plant pot weight.

Motivated by easy availability, the local supermarket was searched and two kitchen scales with different geometries were acquired.

Load cell types

While industrial applications call for button and pancake load cells, kitchen scales seem to work just fine with single point load cells of the cheap kind. Here's a bit of load cell taxonomy:

http://www.loadstarsensors.com/what-is-a-load-cell.html

With strain sensitive resistors as the fundamental building block:

(AliExpress)

Pairs are used to detect simultaneously occuring tensile and compressive strain on adjacent sides of a bending beam.

(AliExpress)

http://www.loadstarsensors.com/what-is-a-load-cell.html

There may be some cancellation of drift related to cyclic stress but both hysteresis and offset problems seem to arise from the load cell body as opposed to the sensing element. (https://de.wikipedia.org/wiki/Dehnungsmessstreifen#Hysterese)

Specimen #1 ...

has a single mounting point and looks pretty much like this scale:

Inside there's likely just a single point load cell as shown above. Some scales use the same hollowed-out aluminium beam but replace the resistive lements with a plate capacitor. These obviously cannot be used for our purposes without appropriate capacitance-to-digital conversion.

The resistive strain gauge type implied here has s differential output and should work with industrial force transmitters (e.g. https://www.bosche.eu/en/scale-components/weighing-indicators/indicators/weight-transmitter-wts ) as well as embedded solutions (discussed below).

Speciment #2 ...
The local supermarket sells these rather flat and simple Silvercrest SKWD A1 scales with a 5kg range and capacitive touch buttons.

From the back side a set of 3-wire strain gauges can be seen. Just like in the body weight scale torn down before they are connected to form a Wheatstone bridge that outputs a sum signal differentially.

Conveniently the test pads breaking out the excitation (E+, E-) and sense nodes of the bridge (S+, S-) are denoted in the silk screen:

Good enough, we'll run with that.

HX711 load cell frontend with 24 bit ADC

$1 buys a PCB with an HX711 IC, discrete linear regulator and some passives these days. Starting with a quick peek into the datasheet:

https://www.mouser.com/ds/2/813/hx711_english-1022875.pdf

All strain gauge elements being resistive, the differential output amplitude scales with the excitation voltage V_AVDD. The common-mode voltage does so too, but it's suppressed and only relevant in as much as the ADC is built to operate around V_AVDD/2 and must not go below AGND + 1.2 V (see KEY ELECTRICAL CHARACTERISTICS). Furthermore VFB is adjusted to VBG = 1.25 V so one can deduce the excitation voltage configuration from resistor codes before buying the PCB online.

The serial interface is pretty minimalistic - there are no configuration commands, no !CS and no MOSI pin.

DOUT is used as synchronous MISO and asynchronous "data ready" signal while configuration is implemented by counting clock pulses. This might spell trouble in some situations due lack of a proper chip select.  "PD_SCK clock pulses should not be less than 25 or more than 27 within one conversion period, to avoid causing serial communication error."

When considering co-existence alongside I2C lines, it's interesting to see that "when PD_SCK pin changes from low to high and stays at high for longer than 60 µs, HX711 enters power down mode."

Recovery: "When PD_SCK returns to low, chip will reset and enter normal operation mode."

So it seems HX711 is ok with being fed some garbage after proper operation when SCK is kept high for a while, then reset and be back in operation.

Hacker-friendly white goods

With a clear pinout and room to stick down another PCB with double-sided adhesive tape, the modification is straight forward (tm).

Channel A offers 128x gain and is the default channel selected after reset, corresponding to +/-20mV full-scale differential input voltages (also matching industrial load cells like the TE FC2311-0000-1000-L). The resulting FS range of the load cells in the scale is unknown right now but it's a matter of soldering the connections to the B inputs and a change the number of clock pulses to adapt to different sensor elements.

The kitchen scale now has a new cable sticking out on the bottom side. Pinout:

Test after modification

Before replacing the back cover the excitation voltage was measured in operation and found to be around 2.4V. If the HX711 exictation voltage is made to coincide with the scale exc. voltage, the scale electronics might be used alongside the digital readout although the tare step on startup will interfere with the intended display function. One will have to lift the measured object off the scale before or after zeroing.

After the mod and with the 3V coin cell back in place the original board doesn't seem to mind the added HX711 headcrab. This is not at all obvious because the behaviour of the unpowered HX711 is not specified.

Another test is conducted by injecting 2.4V without the battery to see if leakage currents can destroy the original scale circuitry (result: negative). If HX711 is immune to receiving 1.2V through the IN+, IN- pins when unpowered (edit: and 2.4V through E+ which will backfeed the regulator and possibly internal circuitry) the scale can continue being a regular scale without either part getting damaged.


Good to go?

Discussions