# How to calculate volume i should pour?

Hi, I want to make a coffee maker machine:
1-Take the order ( sugar and coffee quantity, number of cup 1,2 or 3)
2- The machine put all ingredient in a mixer bowl
3- After mixing, a valve is opened to pour the coffee in a cup, when is full a circular base turn to put the next cup

But the problem is how to pour in the mixer the volume needed for the number of cups example someone wants two cups of coffee, the mixer should pour 16 oz of hot water in the mixer and coffee and sugar,
after mixing, the valve opened to pour 8 oz or 3/4 of the first cup when is full, the circular base turn to put the next cup to pour also 8 oz or 3/4 of it.

I have an idea to use ultrasonic Sensor HC-SR04 alongside the valve the calculate the distance reached by the coffee in the cup, I do not know if it is affected by vapor or not, but for the mixer, i have no idea how to pour the volume needed

NB: I use Boiling water 100C so I can't use a flow sensor because the max temperature is 70C
: I use a simple pump

1. Weigh the cup or mixer bowl while pouring and turn off the flow at the appropriate moment.

2. Experiment to determine how long the valve has to be open or the pump be on to deliver the correct volume.

Why not mix one cup at the time and repeat it 3 times? How often does a group of people order the same kind of coffee? How to fullfill an order with one cup of black coffe, one with sugar, one with milk and one with both milk and sugar?

jremington:

1. Weigh the cup or mixer bowl while pouring and turn off the flow at the appropriate moment.

2. Experiment to determine how long the valve has to be open or the pump be on to deliver the correct volume.

And for for the water in the mixer?

Railroader:
Why not mix one cup at the time and repeat it 3 times? How often does a group of people order the same kind of coffee? How to fullfill an order with one cup of black coffe, one with sugar, one with milk and one with both milk and sugar?

I think is a waste of time to repeat the action 3 time

Wasting time, yes, but how often are several cups ordered with the same composition?

And for the water in the mixer?

aymannox:
And for the water in the mixer?

(shameless copy of #1 as of course it also applies to this)

1. Weigh the cup or mixer bowl while pouring and turn off the flow at the appropriate moment.

2. Experiment to determine how long the valve has to be open or the pump be on to deliver the correct volume.

wvmarle:
(shameless copy of #1 as of course it also applies to this)

1. Weigh the cup or mixer bowl while pouring and turn off the flow at the appropriate moment.

2. Experiment to determine how long the valve has to be open or the pump be on to deliver the correct volume.

1- The mixer bowl is fixed, I can not weigh it

2- The pump not always deliver the same volume, waiting for several time, is Not an accurate method

If I don't pour the correct volume in the mixer, the last cup will always different from the others cup in the amount of coffee, Because it will always take the rest So, it's not a practical method

Commercial vending machines have a boiler with level sensors to keep the water level topped up, with only a small variation in depth.

Hot water is let out of the bottom of the boiler by a timed operation of a solenoid valve.
The timer is adjustable to alter the volume dispensed.

The constant head of water is essential to get a consistent volume being dispensed.

Your insistence in wanting to make three cups at the same time is just complicating the process. Each drink needs a different time to dispense as the volume in your mixing bowl decreases.

Do as others have suggested and make the three drinks one after another.

consider using a peristaltic pump to dispense the fluid. 1 rotation - 1/4 ounce
then just count rotations.

No matter what you want to do, you will have to add something.
there is no way to get there without more stuff.

your task is to determine what the simplest way is.

you could add a 1/4 cup under and the fill that, tip it into your final mug.
you could weight each mug, then fill with the weight desired.

JohnLincoln:
The timer is adjustable to alter the volume dispensed.

Do as others have suggested and make the three drinks one after another.

So they power on the pump for a time to dispense the water

I can do this when I have three different drink, but with 3 same drinks, if we take for each one 1 min we need 3 min in total, why we not prepare them all in one time and don't waste time.

dave-in-nj:
consider using a peristaltic pump to dispense the fluid. 1 rotation - 1/4 ounce
you could weight each mug, then fill with the weight desired.

I want to use a peristaltic pump but the max temperature is 40C
If i want to weight each cup it will be very expensive 15\$ for three sensor

Hire a junior shop assistant.

You have any others ideas

In commercial vending machines, the drink is first mixed with approximately half the quantity of water.

This is dispensed into the cup, and then the second half of the water is used to rinse out the mixing bowl into the cup to give the desired volume.

Gravity fed - no pump used, just a solenoid valve being opened and closed.

The mixing bowl is left in a clean condition for the next customer.

Your system leaves the mixing bowl dirty.
Your system leaves coffee residue in the pipes and pump.

The pipe pump will be always clean because it just delivers the water, for the mixer I have no problem If few millimeters remain stuck, my problem is how to pour the volume needed in mixer bowl and cups

1-What do you think if I use an Ultrasonic Sensor HC-SR04 for the mixer bowl, the cups and the hot water tank, but I don’t know if Will be affected by vapor

2- the second idea is using this level sensor with aluminum or copper probes for the water tank and the mixer bowl

The HC-SR04 is not waterproof. It's likely to die soon in 100ୖ°C, 100% humidity. You shouldn't expect anything else. It may not even work at those temperatures - most electric parts are rated up to 85°C. See data sheet.

The second solution will work unless you care about getting aluminium or copper in your water. You have to use something like 304 stainless probes (which you can't solder, by the way), to prevent this from happening. Another way is to use high frequency AC to stop the electrolyses.

That said, connecting 5V to the water is a terrible idea. That M1 should be connected to ground, so same potential as the container itself, and everything else that connects to the water. You'll have to amend the rest of the circuit accordingly (i.e. use PNP transistors).

Better may be a capacitive sensor. This can be as simple as two parallel strips of aluminium foil glued to the outside of the container (if made of non-conductive material - so not metal), simple and quite effective. Alternatively you can coat the sensor with something that's non-conductive and can handle the temperature and immerse it in the liquid. The capacitance changes with the water level. Your device will still have to deal with the temperature changes (it'll have many changes from room temperature to boiling and back), and all the thermal expansion/contraction effects that come with it.

wvmarle:
The second solution will work unless you care about getting aluminium or copper in your water. You have to use something like 304 stainless probes (which you can't solder, by the way), to prevent this from happening. Another way is to use high frequency AC to stop the electrolyses.

That said, connecting 5V to the water is a terrible idea. That M1 should be connected to ground, so same potential as the container itself, and everything else that connects to the water. You'll have to amend the rest of the circuit accordingly (i.e. use PNP transistors).

If i connect the M1 to ground i will have a short circuit, what will happen if I connect the 5v to water?

wvmarle:
Better may be a capacitive sensor. This can be as simple as two parallel strips of aluminium foil glued to the outside of the container

I have found this no contacting sensor link

I will use this sensor for low level in the tank, and the transistor sensor for the high level and also in the mixer bowl
What do you think?

aymannox:
If i connect the M1 to ground i will have a short circuit,

Short circuit to what? You connecting 5V to your water as well?

what will happen if I connect the 5v to water?

A current path to whatever is actually grounded in your device of course, such as the chassis of it.

I will use this sensor for low level in the tank, and the transistor sensor for the high level and also in the mixer bowl
What do you think?

I doubt that sensor can handle 100°C. Or even more higher temperatures your heating elements are there, too.

What material is that cup made of?

wvmarle:
Short circuit to what? You connecting 5V to your water as well?

A current path to whatever is actually grounded in your device of course, such as the chassis of it.

You have tell me, sir, to connect the M1 to the ground, but the M1 is a 5v wire if i connect it to the ground i will have a short circuit

wvmarle:
I doubt that sensor can handle 100°C. Or even more higher temperatures your heating elements are there

This sensor is for 105C, I will use it for the low level and a floating sensor for high level , I will not use this transistor sensor in the tank because at the bottom I have a 220v heater tube so, i will use it in the mixer bowl because is just a plastic and it's isolated from any power source

wvmarle:
What material is that cup made of?

Simple plastic coffee cup, i have an idea to put 3 level in the mixer bowl each one for one cup, for example, the valve to pour the coffee in the first cup is opened, when the liquid reaches the second level, the valve is turned off and the second cup placed under the valve ...

What do you think ?

Well, first of all: don't connect M1 to both GND and +5V of course, as that'd be a stupid thing to do, and I never suggested that. I said connect it to GND. Not to GND and +5V.

Then a simple plastic coffee cup - those polystyrene ones - can not handle boiling water. They'll soften and break. And the question of material was about the mixer bowl thing, the one you want to measure the water levels of.