Mug Volume Detection


It would be really cool if the Mugsy could automatically move up or down to accommodate mugs of different sizes and detect the volume of the mug somehow. Imagine holding your ridiculously tall thermos up to your Mugsy, seeing it open up it’s “jaw” to swallow it up and then scanning the inside of it to fill it appropriately to full, half full or quarter and a half full, whichever setting you choose no matter how big it’s volume is. If you tell Mugsy to fill your mug so that it’s full it should do so even if your mug is actually a pot. I don’t know why you would use a pot but perhaps you are a big man. One of the issues I have with my current coffeemaker is that it would overflow all over the counter if I didn’t watch it and it can’t dispense directly into my travel thermos. The end result is always a mouldy pot of coffee from last week or a coffee stained countertop. This would be a huge improvement for me.

Make my morning perfect!

No more cleaning coffee jugs

Just my thermos :slight_smile:


RFID tag mugs, or QR code on bottom and configure for size and the selection of how full would be a percentage of that. Automatically determining the size would likely be somewhat difficult, but if you know the size and use the same or similarly sized mugs all the time then tags with the settings should take care of that.


Let’s think over some methods of volume detection

You can measure the volume of the mug by filling it totally full of water, then pouring out all the water into a graduated cylinder.
You could then encode this information onto an RFID or QR code sticker using a web form after which you can get the sticker sent to you using a service at and put it on the mug for Mugsy to look at using a sensor attached via GPIO if there’s any left at this point. Your suggestion after all.

Volume Sticker produced using online service and graduated cylinder

You could plug in a webcam to the Raspberry Pi board and take a picture of the mug while it’s under the pour nozzle. You could make a clever little flip out design with the Raspberry Pi camera that would give Mugsy a little mustache under it’s screen I guess. I really need to look at a diagram so I can design this and send it to Matt wow. Anyway you flip this down and then snap a pic of the mug and enter in the measured volume which of course you still obtain with a graduated cylinder, using the knob. You could have a selection of mugs in the menu. You need a picture because Mugsy doesn’t have a keyboard but you could add a text description via BASH I guess.

Camera stache, menu of mugs, graduated cylinder, requires camera and stupid hard design

You could also have Mugsy fill the mug with water using yet another small pump and piece of tubing until it overflows into a tray with a liquid sensor in it. Mugsy does some math and figures out the volume using this and then beeps out a warning telling you to empty the mug and tray back into the tank before it fills your consumptible liquid vessel with coffee to the degree you desire. Full, half full, quarter full. It’ll be in fractions no doubt how many is up to Matt.

Has the benefit of being automatic but would make making a coffee very slow. Imagine the proccess!

Person puts pot bigger than tray on and water goes on the floor, requires tray and sensor

Scan the container to get it’s volume using a camera or scanner by the nozzle or something. My original suggestion

Looking through all these it seems you actually got it right the first time.


Although if laminar coffee flow (another suggestion I put in) is achieved by Matt during his next round of design this feature will be totally unnecesary. It would fill up your mug so fast there wouldn’t be any point in having a timer or volume detection. Given that the Mugsy has so many integrations though… it seems unlikely that he would make making coffee so darn fast! What would be the point of scheduling then? I only would want this feature if Matt is going to make the Mugsy drip very, very slowly.

Which he probably is!

Good coffee takes time after all

Which means I need to revise my laminar flow suggestion because when I wrote that I forgot that the water has to seep through the grounds which is the whole reason it drips and splutters in the first place! Making a very slow flow of what’s essentially very dirty water into a fine stream might be a taller order than I thought.

Something that occurred to me also

How does Mugsy know how much coffee it’s poured in this scenario?

That’s a whole other can of worms you would have to open to figure this feature out.

Additionally forcing water through the grounds too fast might make you have to redesign to not use a normal filter now that I think about it.

It’s pretty cool thinking about design because it’s so difficult to take everything into consideration. It’s very challenging!


Figuring out the amount that has been poured so far should be fairly simple with either capacity detection on the tank (either weight or water level detection) or a flow meter inline somewhere. Alternatively it could be just as simple as manually testing a few times to get the flow rate and simply time based without any additional measurements. I would tend to prefer the flow meter in this case as modifications can change flow rate or tank capacity so a flow meter should be most accurate if someone decides to change things up a bit.

Also I think it should be pretty easy to do #3 when assigning an RFID or QR code to a mug, then storing the results locally so it does not have to re-measure every time. Also it would probably be quicker and easier if you have a measuring pitcher to just measure yourself, but I do see where people might just want Mugsy to do it for them.


“Alternatively it could be just as simple as manually testing a few times to get the flow rate and simply time based without any additional measurements”

You are an absolute genius

All you have to do is measure how much time it takes to fill up the mug and have the person hit the button once it’s full to find out the volume. Why the heck do you need a graduated cylinder? Nobody even has those except scientists! This way you only need capacity detection under the tank which is super simple and would take up two GPIO pins max.

Man I feel dumb now!


If you’re still after wacky ways of telling if a cup is full… How about recording the sound that the pouring makes, then sampling it and working out the frequency. The pouring stops when the sound is high-pitched enough.


Ah no way that would work

too much screaming in the background would cause a coffee disaster


Although not strictly related. How much water and coffee can mugsy hold? It is enough to brew several cups…


It should have a 1.7 liter removable water container and the bean hopper should be able to hold quite a bit of beans


That’s really interesting… What I am thinking is using a jug when I need to make a number of cups. Something like this:


I have one from an old coffee filter machine that is under 150mm tall so will fit without adaptation. Was just trying to work out the practicalities of using it…


Wide bottom carafes like this will not fit on the mug platform unfortunately…


If width is the only issue I’m sure I can come up with something :hammer_and_wrench::straight_ruler: