Top Mounting

A project log for Bin Level Monitoring

Designing an IoT device to monitor and report the fill level of bins for holding recyclable discards of various kinds.

Kris WinerKris Winer 04/21/2019 at 17:280 Comments


Well I tried various side mounting schemes and after a lot of fussing decided that top mounting (like here) is really the way to go with such a small box. The problem is that the PMMA window designed to mount over the VL53L0 ranging sensor has a step to allow flush mounting to the outside case and to allow gluing or sealing along this stepped edge for a more or less hermetic seal.

Machining such a complicated shape onto the side of the box proved impossible. But doing so on the box bottom was relatively easy (see above, thank you Greg Tomasch!). I also redesigned the VL53L0 carrier board using a 2-layer design so I could have it made at OSH Park in 0.8-mm thickness and I reduced the width a bit thinking it would be easier for side mounting. The pcb width is now the same as the PMMA window width. The PTHs are designed to be aligned with those on the main board as I was thinking I could use some sort of board-to-board mezzanine connector with the side mounting but I have fallen back to simply soldering wires.
I did test the new window location with the old rig by taping the carrier board over its top to hold it in place (the fit is pretty snug though) and placing the main board in its usual place. The main board and carrier board nearly interfere so switching to the thinner carrier board design is really a must for bottom mounting. Although I could stand the main pcb off with washers or something.
I ran the test a few days with the device mounted to the underside of the recycle bin lid and got this:

The nice thing about this is that the range is correct; the ranging sensor points straight down and sees whatever happens to be in the middle of the bin. I added some material to the bin a few times over the course of the two days and the bin level dropped from ~60 cm to ~46 cm and then to 42 cm, etc. So the main function appears to work well. I also recorded temperature, pressure, humidity, ambient light level and acceleration (really orientation of the bin lid). So all worked as it should have.
One problem I had was that when I opened the lid the device would often reset as denoted by gaps in the record. This happened because I didn't solder the coin cell battery to the pcb. So when I opened the lid the battery connection would often fail, power would be interrupted and then sometime later would be re-established and the device would reset and start reporting again. At least, this is what I think was happening. I am going to repeat the test over a longer term using the new VL53L0 carrier board and with the coin cell battery soldered to the main pcb to see if I can get weeks or months of continuous record. I am also curious as to whether the device mounting with VHB foam tape will survive the weekly bin emptying by the garbage service. We'll see....

Addendum: I replaced the VL53L0 carrier board and soldered the coin cell battery onto the main board and put everything together:
I am holding the carrier board to the case with double-sided tape, the main board is screwed into the two case mounting holes as before and with the coin cell battery soldered to the main board the package is reasonably rugged and without jitter. A little pre-deployment bench testing to make sure all is working then out to the bin lid it goes. After a few weeks of real-world bin monitoring I will report results...