Close

more of the same

A project log for automated gardening - reservoir infrastructure

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

helgehelge 07/21/2018 at 15:070 Comments

With the Silvercrest SKWD-A1 inspected and found to be nicely hackable it is reasonable to get enough scales to make it through the first iterations without yet again having to gamble and possibly ending up with a less elegant solution.

Futhermore it's hard to beat the 17 mm of this low profile scale. Buying online also made it possible to select a slightly less obtrusive pattern and colour scheme.

It is worth noting that while designs may vary over time the internal construction should be kept more or less consistent once settled upon. It also seems doubtful that there is a lot more room left for further simplification and price reduction so hopefully it'll just stay as is in the next 1-3 years.

In the previous post it has been found that HX711 enters power down when CLK is high for longer than 60 µs and a high to low transition occuring after power down will trigger a reset.

When used behind an I2C multiplexer, DOUT connected to a third data line and SCK connected to SCL, HX711 will see SCK high for a long time before selection (I2C pull-up), followed by bitbanged SCL waveforms which will be composed of the following sequences:

[ side note: Completion of the first sampling + conversion is indicated by DOUT high-to-low transition. The datasheet only states, "When output data is not ready for retrieval, digital output pin DOUT is high. Serial clock input PD_SCK should be low. When DOUT goes to low, it indicates data is ready for retrieval." which leads to conclude that this also applies to the first conversion after reset. ]

The protocol co-existence described above is enabled by routing DOUT via a third line so it does not interfere with SDA. If connected to SDA, DOUT could create start conditions and lead to invalid I2C command interpretation and lockup.

If only I2C lines are available, one could generate clock pulses to trigger the DOUT high "no new data" state to follow up with I2C multiplexer de-selection but this would also demand converting DOUT to open drain with a diode or MOSFET.

Connecting it to a MOSFET and effectively inverting the output level will have further implications: as long as DOUT is high, SDA will be pulled low so the I2C bus will be in lockup during conversion and possibly also during HX711 power down (not specified in the datasheet).


Next a bit of hardware will be needed to demonstrate the functionality. Ideally the I2C peripheral could be temporarily deactivated and the pins reconfigured for GPIO. Alternatively SCL could be bridged with another GPIO configured as open drain or push-pull if it is guaranteed that I2C will not be driven in the meantime.

Discussions