The Brita Project

Never reach for an empty pitcher again

Similar projects worth following
In our journey in the world of making we decided it's time we solve a common and sourios problem.
In my rented apartment I use a Brita pitcher for water filtering. As a result of me being lazy and forgetful i often find myself reaching for an empty pitcher.
One day it hit me - I got to build an automated filling station for the pitcher. And if something worth doing - it’s definitely worth overdoing - so we added IoT to the picture.
We decided to make this project as A Satirical tribute to the internet of everything.

General feature: automated filling, pitcher out of station for too long mobile notification, water filling stat, filter replacement notification, drink some water reminder when the pitcher is in the base for too long.

The brain of the system is a WeMos D1 mini, it was chosen mainly due to its wifi capabilities and small form factor.

We used the arduino IDE for the code part, and you will need to install some libraries (see github). 

We believe that in order to overcome what looks as a complex project you need to break it apart into its component and build them separately.  Once you mastered each of them, it makes it easier to combine them together into a complete system.

Saying all that, lets go over the system components: The first thing we did was to connect a load cell, together with hx711 to amplify it. We used

One of the things we never did before is to calibrate a load cell. The process is pretty easy and straightforward and will cover it in on of our upcoming logs.

Once that was working and we setup a web server on the Wemos, using the example in the IDE. we then altered it to show the weight from the scale. It was a very interesting study, on how to setup a web server, let it serve pages and allow http request - that in return - return data to the user. 

At this point we realized that to take it to the next step will have to build the machine itself, and here is were Ilia saved the day and helped us building it.

Getting the case just right, with the limits of the load cell under was not a simple task - but we made it happen. The next big mechanical thing was the servo that opens the lid - damm that took longer than anything else in the system. And in one word - its all in the pivot point and structural integrity. 

Defining and coding the different state machine was the next task. We learned important things in the process, for example we only take a final weight of the pitcher after it was for over 1 second in the base - to let the water stop moving.

We did a lot of runs to make sure the system works well. Addressable led with the Fast Led library were added as well, for UI. Blue - No pitcher, Orange - 

pitcher placed, Red - pitcher in filling process, Green - full pitcher.

The next big thing was to get some water going, so with the help of an AC submerged water pump that is toggled by a relay, we got a water pipe to fill the pitcher. 

 Next on the to do list are time related notification, like filter change and “put me back in place” reminder. 

Level shifting 

Due to the wemos 3.3V logic voltage level it does not work well with the addressable LEDs.

The obvious solution was to use a logic level converter. 

Adafruit already covered this topic so if you want to know more go to: 

Looking through the (way too many) boxes I have in the lab I found a 74HC4050 ICs that are commonly used as a logic level converter between SD cards and 5V powered arduino. According to the datasheet the 74HC4050 is intended to be used as HIGH-to-LOW level shifter but we didn't see anything in the datasheet that will prevent us from trying the other direction and it worked very nice when we tested it with a multimeter and a simple code that toggle the connected pins so we used it. Not the best solution but it works.

The servo and relay outputs are also connected through the 74HC4050 IC.

The Load Cell Amplifier was a different story. I had a chines HX711 breakout board that I bought from Aliexpress along with 10KG Bar-Type Load Cell.

As you can see in the drawing the HX711 has a few power pins, the one that we are interested in is the  DVDD and it should be supplied with the same voltage as the MCU, in our case 3.3V.

We found out that in the chines breakout board the DVDD pin is connected to the VSUP pin and doesn't function well at 3.3v volt power supply.

So we did a test and connected the communication lines directly to the wemos without converting it and it worked well, so for now we'll leave it as is.

You can see the difference between SparkFun breakout...

Read more »

  • 1 × wemos d1 mini
  • 1 × Load Cell Amplifier - HX711
  • 1 × servo motor
  • 1 × Load Cell - 10kg, Straight Bar
  • 1 × lm2596 dc-dc buck converter

  • What a wemos is doing in my fridge ??

    ofer zvik09/12/2019 at 14:36 1 comment

    While working on the laser cut version of this Invention and adding new features to the code.

    We decided that one of the discussions in the comments was interesting enough for us to do a little detour and test it out. 

    The discussion was about the possibility of placing the device inside the fridge. 

    Some pointed out that the main obstacles might be the fridge blocking the WiFi signal. 

    Will the fridge block the WiFi signals to the wemos? 

    Can we use the fridge as a Faraday cage?

    You can find the answer to this question in the video.

  • We got some IoT features running

    talofer9908/28/2019 at 09:58 0 comments

    In our last group meeting we made some great progress. 

     The first thing we did is to add NTP to our system. The main reason is to be able to track and notify on things based on time. 

    We added output on the web interface for the time. We still need to work out the Day light saving issue – but we decided will add a way to handle it via the web interface. 

     The next thing we tackled was getting some data out of the system, so we can get stat. We setup a channel on ThingSpeak and experimented for a while on getting the data there, and setting up nice widget that we placed in the wen interface. 

     Once that was sorted out, we added a post to the ThingSpeak each time a refill is done. So we measure the weight on the start of the fill and we know what is the weight on the end and its 1 to 1 from grams to milliliters – and this value is posted. 

     We then went on doing a full run and you can see in the video we noticed 2 issues. the update of the display on the web interface is not refreshing fast enough to show the data from the ThingSpeak in real life – but I think we can live with that, but the other issue is more urgent. 

     Once we place a full pitcher on the scale for the first few seconds it consider it not full and try to refill it. 

     We did notice that the reading from the HX711 are not that stable – but it was in grams and we did not care all that much. But now – we do – so I think will add some low pass filter and maybe adjust the top threshold for cutting the power to the pump comparing to what we consider as full pitcher (a 2% diff will solve the problem). 

     So stay tune, more to come soon.

  • First auto refill test of the system - success !!

    ofer zvik08/27/2019 at 09:00 0 comments

    We added the water pipe, pump and improvised reservoir.

    We use an AC submerged water pump, the kind is used in aquariums , that is switched  by a relay.

    We added start and stop for the pump in the code and did a dry run to make sure all is working well.

    Next we filled the reservoir, crossed our fingers and it worked like a charm ... 

    Watch the video

View all 3 project logs

Enjoy this project?



Andrey V wrote 08/28/2019 at 07:03 point

Also, I think you will need to add a moisture sensor or implement some software algorithm to avoid flood if Brita is not properly installed in your device.  

  Are you sure? yes | no

talofer99 wrote 08/28/2019 at 07:08 point

That's a good point, which we thought of.
We are going to add guides in the side of the case to make sure the pitcher is well aligned to the center.
We might need add something to make sure the lid did get properly lifted (IR sensor, or alike) and not allow water flow if not.
Thanks for the great ideas - it makes us think :)

  Are you sure? yes | no

Tim Rightnour wrote 08/28/2019 at 00:48 point

So 1) I love this project, following along because I want to build something with very similar settings.  (I want to weigh an RO resevoir to determine usage).

2) Some warnings from someone who does alot of work automating aquariums, and has flooded his house:

First, I see that currently you are using a resevoir for the supply.. This is really good, because it puts a limit on how much water can potentially be on your floor.

One thing you might want to do, is calculate how long it takes to fill.  Say for example it takes 30 seconds to fill an empty pitcher.  Then put in your code, something like "if this pump runs for more than 45 seconds, hard shutdown and assume the weight sensor is broken"

Now eventually you might want to connect this to some kind of infinite water source, like a mains water, or a tap or something. (This is how I flooded my house).  What you need are multiple physical checks in place.  For example, don't fill from mains->britta.  Fill mains->resevoir.  Then put in a float valve that stops flow.  Don't trust that though because they like to jam. Get one of those water safety stops.  It's a little device that when it gets wet, pops, and slams a gate valve shut.  This way you have a few in-line checks so if something breaks, you need like 4 things to break to be super wet.  :)

  Are you sure? yes | no

talofer99 wrote 08/28/2019 at 04:24 point

first of all thanks :)
We are very aware of the possible for over flow. - and did tons of dry runs before trying things with the actual pump. and water 
We already thought of adding the time limit (great mind think a like) - and its more like 15-20 Sec I will guess.
At the place we work in right now - there is no way for us to connect to water source - this is (one of the reasons) we went with a reservoir.

  Are you sure? yes | no

Tim Rightnour wrote 08/29/2019 at 01:30 point

One other thought..  Aquarium pumps tend to pump faster when in deep water, and slower when in shallow (at least depending on where they are pumping to). Point is, they are highly variable depending on circumstances.

What might be more predicatble, time-wise, is a small peristaltic pump. Even the pre-set 12v cheap ($5) ones put out a specific quantity of water per time unit, like maybe 80ml/min.  This is slower than an aquarium, but also far more predictable.

I guess it depends on your goal.  If your goal is "set down pitcher, wander off, pick it up a minute later full", then aquarium pump.  If the goal is "leave it on the stand and it will always be full" then I would think controls for a peristaltic would be easier.  It would also be possible to use something like a 5gal plastic jug for the resevoir, even though the neck is too small to put the pump in, because a peristaltic can pull water up a vertical lift.

  Are you sure? yes | no

talofer99 wrote 08/29/2019 at 06:29 point

Thanks Tim, thus are really important points. 
Since the filling is not time controlled but weight controlled this issue will not effect us.

And once the pitcher is full, it wont get empty unless you pick it up and pour some water out of it. 

we also going to add a reminder for placing the pitcher back in place, and a reminder that it been there for too long ..... which means you did not drink enough :)

  Are you sure? yes | no

Andrey V wrote 08/27/2019 at 19:04 point

It will look awesome, with mechanical parts from the acrylic glass! Laser-cut is not expensive.

  Are you sure? yes | no

talofer99 wrote 08/27/2019 at 19:39 point

We totally agree with you, this is a low cost (trashed cabinet) fabrication - just to see that it can be done.

  Are you sure? yes | no

Mike Szczys wrote 08/27/2019 at 07:26 point

This is great! I had a Brita pitcher for a decade and hated filling it (always empty, slow to filter)... but it was cold. Now I have under-sink filtration which means a faucet... but it's not cold water.

Will the base live in the refrigerator?

  Are you sure? yes | no

ofer zvik wrote 08/27/2019 at 08:48 point

Thanks :)

You got an intresting point here. We never thought of poting it in the refrigerator but talking it over we can see some obstacles like power consumption, water tank and general size.

But I'm sure that its doable some how, with the right size refrigirator.

  Are you sure? yes | no

Mike Szczys wrote 08/27/2019 at 11:01 point

Yeah, also probably can't transmit wireless when the door is closed. I think there is no perfect system. You can get those refrigerators that have water and ice built into the door, but I don't like the tall doors with side-by-side fridge and freezer... feels like you use two much space.

I think the only real option here is to build a chiller that keeps the brita cold when it's on this base :-D

  Are you sure? yes | no

Martin wrote 08/28/2019 at 11:38 point

Once in Florida, the guy had an under-sink filter and he just piped it also into his side-by side fridge. This had an ice and cold water dispenser.

Edit: OK, I just read, that you mentioned this. It is also worth testing the radio reception out of the fridge.I expect the wide space of the elastic sealing/gasket of the door will not hinder radio transmission very much.

  Are you sure? yes | no

talofer99 wrote 08/28/2019 at 16:59 point

Thanks for the input, We had that same conversation yesterday,, on will the fridge block the wifi single. 
It should be a simple test to just put a wemos in the fridge with a power bank and see if it connects :) 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates