Find a way to measure how much coffee inside a pot

Hello everyone, :saluting_face:

I have a robot that serves coffee for anyone come across it. I am trying to develop a way to help the robot to measure how much coffee inside his pot, so it can be refilled when needed and also, he can determine the tilt angle needed to fill the cup every time.

The coffee is hot and wet, so I cannot place sensors inside the pot such as ultrasonic or similar idea sensors. Moreover, I tried to use load cell inside his arm, but the readings are not consistent and can be changed with little movement.

Any suggestions? :upside_down_face:

From this you should be able to compute the volume, after calibration, of course.

Thank you, Paul for your reply,

if you meant using load cell after calibration process, I tried many times, but I faced the following:

  • if I turn off the robot and comes for another day, the whole calibration work cannot do the required anymore.
  • if the robot moves around, and then stop, the reading of the load cell changed and the original value not back again.
  • the load cell is very sensitive even a little of air pass across the pot, change the values got from sensors.

you can check the setup of the robot on the attached photo. The load cell sensor inside his arm -below the servo holding the whole coffee pot -

No, I mean relate the pot angle, while pouring the coffee. When the flow stops measure the remaining volume. Put the measured coffee back into the pot. Pour again, when the new pour stops flowing, measure the new volume and put back into the pot. Continue until all coffee is gone.
Now relate the angle to the remaining volume using a lookup table.

A digital level mounted on the outside will measure an upright kettle at ninety degrees and an empty kettle tilted at zero degrees. You decide when degree = empty.

Is the pot separate or is it attached (more or less) permanently to the arm?

The DS1603L or similar might work. Attaches to the outside bottom of a tank. 50 mm blind distance. 1 mm resolution. @wvmarle has written a library for it. Search the forum and the internets for more info. Not sure if it would work on such a small and oddly shaped "tank" - reflections off the walls may be a problem, but it's not terribly expensive, so may be worth a go. May have a temperature limitation.

Another, brighter, thought. Put an encoder on the motor that tips the kettle to get the angle of tip.

Sorry, I do not understand you how to detect if the pouring stops or not,

the purpose of measuring the weight of the pot is to know how much coffee inside the pot, so that the robot can calculate the suitable angle to fill the cup smoothly.

@xfpd ,I tried to find some digital sensors, but there are not applicable with metal surfaces, however, I just saw @DaveEvans's suggestion of DS1603L. I think it will work but the pot will look like a bomb with such these sensors attach to it :laughing: .

Thank you for your suggestions.

You experiment. First cup starts at angle x, ends at angle y. Repeat until empty. Do this (full to empty, counting cups and angles) ten times. You will have enough data.

@xfpd This is how it was working before, but in that way the operation always should start at the same level every time. I mean what if I fill the half of the pot, and the robot start serving, then it will not fill any cups of coffee, until he reaches the angle that pour the coffee at the half level of the pot.

As a result, I am looking for a method to make this process more convenient with sensors.

@dougp the pot is a separate component that can be unmounted easily from the servo pin for cleaning purposes.

Tell the "robot" to make the coffee.

Or: k-cups.

I thought you had all this figured out from your first post! How did you get this far without getting this settled! Are you doing the whole robot and then figuring out how to use it?

I think it's an interesting problem.

I have not tried this, but perhaps you can use an acoustic method. If you're able to mount a tube inside the pot that is open on both ends (one end in the coffee, near the bottom of the pot; the other end above the surface, near the top of the pot), then it may be possible to use a small speaker and microphone to do a frequency sweep and find the resonance frequency of the air in the tube above the liquid surface. If so, then the resonance frequency will be inversely proportional to the unwetted tube length, from which you can compute the level of coffee.

So, is it possible to add a standalone scale and have the robot place the pot on the scale to take a reading after each pour?

The sensor isn't large and could be hidden with a ring of shiny stainless steel attached to the bottom of the pot.

Cable could be mostly hidden behind the pot and attachment plate.

Mount the entire robot on a scale and check the weight after each pour?

@Paul_KD7HB The robot is working fine and can pour up to 20 cups, but he should count how much cups of coffee served and adjust the tilt angle accordingly. So when 20 cups are reached, the robot give me an alarm to refill the pot, but I should refill the pot up to the starting level each time, and the count starts again from 0.

What I am trying to do is to give the robot a way to calculate the right tile angle based on how much coffee inside the pot, so that I can refill half of the pot, or one third, or quarter or any capacity, and the robot will start serving accordingly.