I am making a storage box for small glass bottles (medicine). Once a few bottles are taken out (and used) I want the box to order new bottles automatically. Therefore, I need Arduino to sense how many bottles are still in the box. It would be very nice if I can use one sensor that increases (or decreases) the value when a bottle is taken out. With some testing, I can only use 1 sensor to sens the number of bottles in the container.
The storage box is made out of 3d printed plastic. In total, 11 bottles will fit in. Some users need to order new ones when there are still 5 in the box, others will order new ones when only 1 is left.
Long story short: Do you know a sensor the sens the presence of glass bottles?
If you are 3D printing this box, it would be easy to put a momentary switch on the bottom of the box for each bottle location. Bottle present -> button pushed
I support @blh64 's answer, but another (less clear-cut) alternative is to use a strain gauge/load cell beneath the surface that the bottles sit on to measure how many are left using their weight.
Although it is an option, I would preferably use a sensor without any "open" mechanisms. As it goes in the fridge there will be some moisture presence. Therefore I prefer to have a "closed" container. I was thinking about conductive, capacative sensors, etc. Something that doesnt need to "move"