Electrical – Measuring water level inside a drinking glass

arduinoconductivitywater

  • Background: I am creating an automatic tea brewing machine using an
    Arduino and an electric water kettle from Amazon. My family and I
    drink lots of tea and we have many different sizes of glasses. I was going to use a peristaltic pump to transfer the water from the kettle to the tea glass (mainly because it's food safe and self-priming).
  • Task at hand: I need a way to know when to stop pumping the boiling
    water from the kettle as to not overflow the tea cup. I was thinking of 3D printing a bracket that will hang over the lip of the cup (like on the side) that will have two wires facing down towards the bottom of the cup. One wire would be connected to ground and one to an input on the Arduino. That way, as the water fills to the top and eventually touches the exposed ends of the wire, the Arduino would know to stop pumping because the wires are now conducting to Ground.

  • My question is: Is my method listed above safe to do in drinking
    water (exposing a path to ground in the water for a few seconds), or
    is there a better/safer/easier way to accomplish my task?

Best Answer

I was thinking of 3D printing a bracket that will hang over the lip of the cup (like on the side) that will have two wires facing down towards the bottom of the cup. One wire would be connected to ground and one to an input on the Arduino.

That technique should work for you. It is commonly used by visually impaired people for that task.

enter image description here

Figure 1. Liquid level sensor alarm for cup / mug.

Because you are feeding into a micro-controller GPIO you will need to make some test measurements.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Probes and pull-up.

Without the micro-controller connected run some tests with a volt-meter connected between 'GPIO' and GND. Adjust R1 (a pot might be handy for this) until you can guarantee that GPIO gets reliably pulled down to about 1 V or so when the probes are covered to the required depth. 'GPIO' will read 5 V when probes are dry.