How I massively over-engineered a trivial problem again because I just can't help myself
Home Assistant already knows which bins (trash cans, for the international readers) are due for collection. It can tell me it's bin night, put the right colours on a dashboard, and send me a reminder. What it can't tell me is whether I've actually done anything about it.
I'm pretty sure most folk would just set a recurring reminder on their phone. As my wife will no doubt tell you, I am not most people. Some would just remember to put the bins out, like a normal person. I'm well aware that I've ridiculously over-engineered this. I'm also so far from normal that six radio-equipped bins seemed like an enjoyable way to spend my evenings ;)
I had an idea a number of years ago to stick cheap Bluetooth tags on my wheelie bins and use an outdoor Bluetooth proxy to work out whether they were nearby. It was frustrating. The batteries drained quickly, the proximity readings wandered about, and the proxy was unreliable. AirTags were what first got me intrigued by ultra-wideband radio, or UWB. Over the last few weeks it's become BinRange: a fixed radio anchor, six little battery tags, and a Home Assistant setup that combines where the bins have been seen with when they're due.
Six bins, several schedules
We have one general waste bin, one food compost bin, one garden waste bin, two recycling bins, and a glass bin. Six bins. At one house. They're not even all on the same collection schedule.
With cheap Bluetooth tags, distance estimation via RSSI was imprecise. UWB was interesting because it measures the time taken by radio signals to travel between devices. For the bins, I only needed to know whether each one had moved far enough from its usual storage area to count as Out. One anchor was enough to start testing that. I used a ten-metre boundary: inside is Home, beyond it is Out.
Two boards and a walk outside
The first experiment used two Makerfabs ESP32-WROVER/DW3000 boards. Antenna orientation made a surprisingly large difference. At about ten metres, changing the boards from flat to upright took the observed success rate from 37% to 100% in that test. The first time I calibrated it with a tape measure and watched the reported distance differ from my measurement by less than two centimetres, my mind was utterly blown.
In a later recorded test, a measured gap of 10.1 metres produced an average reading of about 10.09 metres, with a standard deviation of three centimetres. Outdoor walk tests were reliable to roughly thirty metres. The anchor publishes readings over MQTT, and Home Assistant discovers a separate device for each tag.
Something small enough to put on a bin
The bin-side hardware needed to be a small, self-contained puck. I bought KKM K4W tags with an nRF52833, DW3110 radio and LIS3DH accelerometer, running my own firmware. The accelerometer interrupt lets the nRF sleep for long periods and wake on motion. Once a tag is mounted, the anchor can deliver signed firmware updates over Bluetooth with rollback.
Reminders and Notifications
The Waste Collection Schedule integration scrapes the council's schedule. BinRange adds physical information about the bins, and Home Assistant puts the two together. Reminders at 6pm and 9pm the evening before collection, a final reminder at 6am if they're still confidently Home, and a bring-back reminder the next day. Tip detection via accelerometer tilt beyond ninety degrees tries to notify when bins have been emptied — though the first real Garden collection exposed a reception gap that taught useful lessons about presumed Out vs Unknown state.
Waiting for more bin days
BinRange is installed and in use. There's still observation to do: coverage, complete cycles, battery behaviour, and dependable OTA. The repository has the firmware, case files, measured findings, and Home Assistant examples. Of course, now I've seen what UWB can do, I'm wondering whether I could put tags on the cats' collars…
Most people would probably just look for the cat.