9

I have an espresso machine that gets its water from one of those 5 gallon blue water bottles (I would plumb it, but our water here is WAAAAY too hard).

If I ever accidentally let the bottle run out of water, the rotary pump in the espresso machine will be ruined, which would be a costly mistake.

I know that I can install some sort of magnetic float sensor inside the water bottle, but since I have to change it out once every few weeks, having another thing inside the bottle would make changing it out harder, and microbial contamination more likely. The pump that pumps water out of the bottle forms a tight seal at the lid, and anything running under it or through it would compromise that seal.

Is there something I could use to detect if the water level is low from the outside of the bottle? Like a laser sensor?

asheeshr
  • 3,847
  • 3
  • 26
  • 61
synic
  • 203
  • 2
  • 6

9 Answers9

10

Using a Force Sensor to Measure a Quantity of Water

To satisfy your requirement of having the sensor on the exterior of the water container, I would recommend using a force sensor to weigh the bottle at set intervals. A force sensor, such as the FlexiForce A401, is a type of resistor that changes resistance in response to the amount of force applied. While not as accurate as a scale, it should provide enough accuracy (+-3% according to the datasheet) for the application described.

The basic procedure would be to hook up the force sensor to the Arduino and first measure the resistance with an empty bottle, then measure again with a full bottle. This will give you an idea of the force that your specific platform is actually applying to the sensor, and you can then fine tune the voltage (as per the datasheet) for your installation.

A basic tutorial using a similar force sensor with an Arduino can be found here.

Other Possibilities

jlbnjmn
  • 978
  • 2
  • 9
  • 15
6

Another option is to measure the current going into the pump; when it runs dry, the current goes up, which generates the heat that fries the pump.

Or measure the temperature on the pump, but measuring the current will detect the beginning of the pump's meltdown, while the temperature may only detect the middle or end of the meltdown. :-(

Or install a current limiter or breaker inline with the pump, just in case everything else fails. :-)

PFudd
  • 61
  • 1
4

I think you want a "liquid level switch", possibly also known as a "fluid switch" ... I realize this may not satisfy your requirements, but this is one way to solve the problem for >$10. I would probably hack something together that would put this sensor inline to the bottle. it's probably too hacky, but you could have a disc of plywood the same diameter as the water bottle, with a pipe fitting in the middle where you could mount the switch, so that the water bottle routes water through it so that when it runs low, it would trigger the switch before it runs to the pump.

inline liquid level switch

Steve Cooley
  • 141
  • 3
4

Whenever light follows a path that takes it from one material to the next, it makes a sharp turn. However, the angle of deviation is different based on the characteristics of the materials.

You can use this principle.

Set a LED on the level that you want to be your lowest. When the water is full, its light will follow a certain path across the container and reach its light sensor. When the water gets bellow the level, it will miss it (or you could set up a second sensor if you really wanted to).

Based on this info, you can know when the water gets too low. Just take appropriate action.

Watch out on the recommendation to measure the water used. This could be dangerous. You may have a leakage (either now or later) or somebody might tip the machine and spill some water. In either case your water level would be lower than the level you calculate, which would certainly result in your espresso machine be ruined.

Victor
  • 41
  • 3
3

It seems to me that if you have pumped out 4.9 gallons you know the jug is close to empty. If an inline flow meter between the pump and the espessso maker is out due to water contact, then maybe you know that an espresso shot takes x amount of water, and once one has called for y shots (and calculated x times y) one is in the danger zone of running out of water?

mikeY
  • 140
  • 2
  • 9
3

Honestly - you're overthinking this.

A dipstick or a float would be all you need. Once the water level drops below your minimum, the float moves down with the water level and pulls a switch or allows a LDR to see through a hole. Then do something like turn on a light.

Less is more.

Criggie
  • 31
  • 1
3

Lasers

If your blue water bottles are like mine, they are transparent.

Here's what I would try first:

I would get a cheap laser, and shine the light horizontally through the bottle. I would aim the laser through a short chord -- not pointed directly through the middle of the bottle; perhaps 1/8 turn to the left of center.

    -------
L../.......\..........S1
  /         \
 |     o     |        S2
  \         /
   \       /
    -------
top-down view

When the bottle is empty, the laser beam will shoot pretty much straight through the bottle -- I would put one photo-sensor S1 there.

When the bottle is not quite empty, the laser beam will bend (refract) -- for redundancy, I would put another photo-sensor S2 there.

As long as the Arduino sees the laser hitting S2 alone, there's still some water in the bottle, at least up to the level of the laser -- turn on the green light.

Anything else -- light detecting only at S1, or nothing detected at either sensor, or light detected at both sensors (yes, it can happen) -- something doesn't seem right, better have the Arduino turn off the green light and turn on the red light.

I would start with the simplest thing that could possibly work. If I'm lucky, it might work. If not, there's lots of little tricks involved in getting the light where you want it to go. There's also lots of tricks for blocking sunlight, etc. from going where you don't want it to go. Little black tubes, red plastic filters, pulsing the laser at a few kHz, collimating lenses, lock-in amplifiers, etc.

There seem to be lots of tutorials that describe how to detect a laser using Arduino -- see

(This would probably work just as well with a medium-power LED or "infrared LED" and some careful optical focusing and alignment. But -- lasers!)

David Cary
  • 1,122
  • 8
  • 23
3

you can use a metal detector like setup using the fact that electronic permittivity of water is different than that of air

have a coil with AC next to the bottle and an unpowered coil inside it

then by measuring the current and/or voltage generated by the second coil you can sense the difference between with water next to it and without

ratchet freak
  • 3,267
  • 1
  • 13
  • 12
0

Try a non contact water sensor: https://www.dfrobot.com/product-1493.html I use them and they work very well. You stick it on the outside of the jug, If it falls off the jug will show empty protecting your pump. The ones I use are similar and have an open collector, so no micro is required. I think I paid about $6 a year or so ago. They make adjustable ones. Nice point nothing touches the water or can contaminate it.

Gil
  • 1,863
  • 9
  • 17