Close

Finally Collecting Data

A project log for Weighing Plants

Tracking plant health through weight

kevin-arneKevin Arne 07/05/2021 at 03:340 Comments

Making Progress

While investigating ready-made boards for reading load cells, I stumbled across the HX711 load cell amplifier. The HX711 has 24 bits(!!) of resolution instead of the paltry 12 from the ADC I was using.

Sparkfun has a great intro to load cells (link here) complete with some example code. The code fit nicely in a sketch I wrote to send data to a database via HTTP processed by a PHP script server-side.

I designed and 3D printed a base with the load cell to match my planter.

Looks a lot better than the before picture doesn't it?

I know you're all really here for the internal shot though:

The internals aren't pretty, but it's an early prototype.

If you think that platform looks a little thin, you're right. Below is the data I collected by hand, and by sensor with the thin platform and the thicker platform. Note the line where I changed from thin to thick platforms.

Hopefully my graphs are slowly getting better.

There's a good deal of variation before the stand replacement (and a little after). I don't exactly know why, but I thought the deflection of the platform was somehow reducing the deflection at the load cell. Will that remaining wiggle go away with an even thicker platform? I may try it, but I might also say this is good enough based on how well it seems to track the manually-entered weights.

So What's Next?

Hardware

While a strain gauge integrated into the PCB is an interesting idea, it may be easier to move forward with the commercial load cell right now. The latter would allow me to focus more on developing the software side of things more, which is what I'm really trying to learn in all of this. The former could potentially make for a more affordable product with a lower BOM cost, but that's probably something to worry about later.

It's likely that I'll spin up a board (sounds so professional) to make wiring the ESP32, power, load cell, and HXT711 breakout board easier. 

Enclosure

This setup is great for my little idiosyncratic planter, but it'd be great if it worked with the more common 6" planters found at every garden center (at least in the US, I'm sure they're 150 mm or so elsewhere). That's a pretty easy change and gives me a lot more room to work with for the electronics. 

The model will have to be done before I can get the edge profile for a PCB.

Software

The ESP32 sketch needs work. Ideally it should serve up a status webpage when in operation. It should also allow for remotely taring the scale. When it's not connected to the network, it should instead serve up a page that allows you to connect to the network and log you in as a user. All that I've done on those fronts is start to learn the terms to search for (like captive portal). Well that's not entirely true, I've also tried (and failed) to get captive portal examples to work.

My kludged together web interface is gross so I'd also like to convert it to run on Flask. I've worked through a practice Flask project but have a little more planning to do before I'm ready to implement it.

Discussions