Raspberry Pi Controlled Water Cistern With Web Interface

by QuintenDauwe in Circuits > Raspberry Pi

1153 Views, 4 Favorites, 0 Comments

Raspberry Pi Controlled Water Cistern With Web Interface

waterput.png

Hi there!

As a Multimedia and Creative Technologies student at Howest Kortrijk (Belgium) I had the opportunity to make my own IoT-project from scratch.

A smart rainwater cistern keeps your rainwater tank from getting out of water. This IoT-system knows when your cistern is getting empty and will fill him automatically afterwards.

The water level of a tank is continuously measured by an ultrasonic sensor. After a preset value has been reached, an electro valve will open causing drinking water to stream into your cistern.

This way, your rainwater tank will never be out of water ever again!

This instructable goes all about making the test setup for this project.

Supplies

Cut the Plexiglass

DSC_0462.JPG
DSC_0453.JPG

First you have to saw the plexiglass. This pieces will be used as a mounting plate for this project and for the water cistern.

the required sizes are:

  • 2 times 30 x 8 cm for the support plates
  • 30 x 40 cm for the base plate
  • 40 x 70 cm for the back plate
  • 2 times 17 x 19 cm
  • 2 times 19 x 18 cm
  • 2 times 18 x 19 cm

Glue the Mounting Plate

DSC_0470.JPG
DSC_0476.JPG
DSC_0481.JPG
DSC_0487.JPG
DSC_0505.JPG
DSC_0528.JPG

Now it's time to glue everything together.

you will need a special type of glue called methylene chloride to bond two pieces of plexiglass together.

Glue everything together like shown in the pictures. The distances between the different parts doesn't really matter in this case.

At the end, you can put the mounting plate into the box.

Build the Water Cistern

286608159_1172205520243743_3933584462528308557_n.jpg
287066744_470065761589804_3307888833769341608_n.jpg
286713468_1246386359435365_2149004957698180084_n.jpg
DSC_0610.JPG
286901300_834735044219285_5294049149667045639_n.jpg

Now we will make the water cistern.

Glue the plexiglass pieces together like shown in the pictures and make a hole in the top plate with a drilling machine. This hole will be used to fill the cistern.

Drill a pair of holes at the top of the tank. Those holes will be used to mount the ultrasonic sensor.

The measurements of those holes depend on your sensor. Use your ultrasonic sensor to indicate where those holes should be.


Extra: You may also need a support for the water cistern. You can make this out of plexiglass just like the one in the picture.

Place the Pump

DSC_0531.JPG
DSC_0532.JPG
DSC_0533.JPG
DSC_0536.JPG

Now it's time to place the pump. This pump has to keep the water under pressure.

First you have to make a few holes into the base plate. One hole to guide the water hose to the cistern and another one to mount the cable outside the plastic box.

After those holes are made, you can mount the pump as shown in the pictures.

Mount the Electronic Valve

DSC_0537.JPG
DSC_0558.JPG
DSC_0539.JPG
DSC_0543.JPG
DSC_0544.JPG

The next step is to mount the electronic valve.

First you have to make a square hole where the valve can be mounted. This part can be tricky but I suggest to start with 4 holes in every corner of the square. After that, you can saw the square out of it with a jigsaw.

Mount the valve into the hole and tighten the hose connectors.

Mount the Flow Sensor

DSC_0552.JPG
DSC_0556.JPG

The next step is a little easier. Mount the flow sensor by tightening the hose connectors.

You should also drill a little hole near the sensor where you can easily mount the cable.

Mount the LCD

DSC_0559.JPG
DSC_0567.JPG

To mount the LCD display, you need a hole where the display fits.

You can to this the same way as we made the hole for the valve.

Mount the Potentiometer and Rotary Encoder

DSC_0591.JPG

Now we can mount the potentiometer and rotary encoder. Those components are used to control the LCD display.

This can easily be done by drilling some holes in which the rotary knobs fit.

Setup PCB Breadboard

DSC_0596.JPG
DSC_0601.JPG

You need a PCB to link the electronical parts together. You can mount a breadboard power supply on this pcb. This power supply will be used to supply the power for almost every component.

Mount the Tap

DSC_0605.JPG
DSC_0606.JPG

You need a tap to simulate water usage.

Drill a hole into the water Cistern in which this tab can be mounted.

Mount the Level Switch

DSC_0611.JPG
DSC_0614.JPG

Now it's time to mount the final sensor!

For the level switch, you have to make an oval hole. place the switch into the opening and paste a plastic foil on the inside. This foil has to seal the gap such that the water in the tank does not leak.

Electrical Circuit

QuintenDauwe_breadboard_schema.jpg
QuintenDauwe_fritzing_schema.jpg

Now the construction is ready, it's time to link all the components together. Use the circuit diagram to build the electronical circuit.

Finishing Touches

waterput.png

Congratulations! If you made it this far, you made your very own smart water cistern!

It's always possible to extend on this construction. In my case I designed a wooden box to protect my electrical wiring while transporting this project.

Adding Some Code

There is just one thing left to do.

Without the required code, this project will never work. You can find this code on github.