Skip to content

💧OLED screen to show the approximate water level in a ceramic water filter

License

Notifications You must be signed in to change notification settings

skhg/water-filter-sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

water-filter-sensor

A smart(er) ceramic water filter for my kitchen. This is the second version. Here you can see the first attempt.

Concept

We use a ceramic water filter at home for our drinking water and ice-making. Normally we try to keep it full, so there's always about 2L available at any time. However to be sure we haven't over-filled, we have to remove the top section to see how much is left in the bottom. Obviously, this minor effort is totally unacceptable, so I built a sensor system to tell us how full the tank is.

Finished project

Because i'm going totally overboard, it's also WiFi connected, remotely monitored and remotely configurable. Remote config/monitoring is done using my household data logger project.

Grafana dashboard

Overview

The water filter now sits on top of a circular wooden board, with adjustable legs I found in a waste bin at IKEA. Each leg has a HX-711 compatible load sensor glued to the bottom. Under the board, there's a plastic box to house the electronics. A longer ribbon cable extends up to eye level where a tiny OLED display shows the estimated fill percentage.

Materials required

Electronics

Other:

  • Soldering iron
  • 3rd hand
  • Bamboo board
  • Adjustable legs

Connecting the load cells

Normally, load cells come with matching wire colours. Unfortunately the ones I scavenged from the old bathroom scale came with different 2 different sets of wire colours, so I had to manually work out which was which.

experimenting

Eventually I found this diagram, and manually labelled the wires to match my own:

diagram

And got it wired up the same way... experimenting

Circuit diagram of the same thing, with the real world wire colours.

circuit

Construction

The 4 sensors (should) evenly distribute the weight between each other. The flexing of the sensor as weight is applied is detected and converted to a load reading.

The load cells need a little space between themselves and the legs I used, so I glued some cork blocks in between, to allow the sensor space to flex.

Everything comes together in a little plastic box to make it a bit more protected from any nearby water splashes.

looking up

The screen is wedged inside the cap of an old moisturiser jar, just like I used for the Raspberry Pi killswitch. These little plastic caps are really versatile for small projects. Since I didn't have any proper tools to cut a hole, I drew a rectangle on the front and melted a hole through it with my soldering iron. Probably toxic and not the best idea.

oled

WiFi connection

Calibration

For calibration, we need to know what reading the load sensor gives when the tank is empty, and when it's full. Then we can simply get the current reading and work out a percentage of the range. Normally, calibration would mean plugging the board into a laptop over USB, and uploading a new version of the .ino sketch with updated high/low values.

So instead, I use a GET endpoint on my household data logger project, to return the current calibration values over HTTP. The filter looks them up automatically so they can be changed at any time. The message received from the server looks like:

{
    "fullLevel" : 121000,
    "emptyLevel" : 117000
}

and the filter uses this to reset its own default values each time an update is received.

Logging

The board also sends back it's current load level to the logger approximately every 2 seconds. This is also done using JSON over HTTP in a format that looks like

{
    "load" : 1234.56,
    "fillPercentage" : 92.24
}

I record this in a time-series database and use it to create the Grafana dashboard shown at the top.

Code

See the full Arduino C++ code in water-filter-sensor.ino.

Dependencies:

Circuit

board photo

The underside of this has the mounting pins for the Arduino board, but I forgot to take a photo.

circuit diagram

This can also be viewed in the Fritzing software using the water_filter_board.fzz file.

References

These tutorials proved useful during the project

About

💧OLED screen to show the approximate water level in a ceramic water filter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages