DEV Community

Cover image for warecache Sensor Bins Count Your Parts Using an STM32H723
circuitrocks
circuitrocks

Posted on Originally published at blog.circuit.rocks

warecache Sensor Bins Count Your Parts Using an STM32H723

Counting 220-ohm resistors by hand is the part of workshop life nobody misses. To automate it you need three things: a bin that weighs its own contents, a controller that can poll dozens of those bins at once, and a server that turns grams into part counts. Slant Tech's warecache ecosystem packages all three, and the hardware documentation is open enough that you can copy the approach on a bench.

What the system actually does

Instead of asking you to type quantities into a database, warecache measures what is sitting in each bin. Weight Sensor Bins handle loose stock, with variants covering a few hundred grams of small passives up to 10 kg of hardware. Switch Sensor Bins take the other approach: individual slots that report present or absent, which suits tools, connectors, and anything too irregular to weigh reliably. Every bin carries an EEPROM holding a serial number and its own configuration, so pulling a bin off the shelf and moving it does not scramble the count.

The electronics underneath

The bins hang off a Container Controller built around an STM32H723 running FreeRTOS. One controller drives up to 64 bins across an 8x8 switched I2C matrix, and that switching is the clever part: address collisions are the usual wall you hit when you fan out 64 identical sensor boards, and a matrix sidesteps it instead of demanding 64 unique addresses. The controller pulls power and network from PoE Ethernet, mounts as a USB flash drive when you need to edit config files or drop in certificates, and exposes FDCAN and RS-485 for factory gear. Readings travel over encrypted MQTT to a self-hosted server that ships as a Linux binary or a Docker image, with distributor plugins pulling pricing and stock data against your BOM. Firmware, server, and both clients are GPLv3, and the hardware release includes controller schematics, KiCad sensor templates, and STEP files for the enclosures.

Clone it at one-bin scale

You do not need 64 bins to steal the idea. An HX711 amplifier, a 1 kg load cell, and an ESP32 will weigh one drawer and publish the count over MQTT for well under PHP 1,000 in parts. The tricky bits are tare drift as the room warms up, and picking a per-part mass consistent enough that 50 screws don't read back as 47. Start with one bin of something uniform, calibrate against a hand count, then add bins once the numbers hold overnight. Full spec rundown and the Crowd Supply signup are on Hackster.


Originally published on blog.circuit.rocks.

iot #smarthome #homeautomation #connecteddevices #circuitrocks

Top comments (0)