Water Depth Sensor Based on Archimedes' Principle

by feikescholtens in Teachers > University+

82 Views, 1 Favorites, 0 Comments

Water Depth Sensor Based on Archimedes' Principle

Collage.jpg

Motivation

This device is a sensor that measures the depth of a water body. We designed and made this for the assignment of the course 'Measuring Water' as part of the Delta minor of Delft University of Technology. In pairs had to choose a water phenomenon that we would have to measure with our sensor. We chose water depth and decided to do this using the Archimedes' principle. There are many ways to measure the water depth, and this is for sure not the best way to do it. We chose this method because it was practical and fun to build.

The principle and basic workings

The Archimedes' principle is as follows (source):

Archimedes' principle (also spelled Archimedes's principle) states that the upward buoyant force that is exerted on a body immersed in a fluid, whether fully or partially, is equal to the weight of the fluid that the body displaces.

This means if we (partially) immerse an object in the water, it wants to float (you probably know that pushing a football under water is quite hard). The force that is thus exerted on the object is equal to: F_A = ρgV.

If the object is completely under water, the force at which it wants to float is independent of the depth. That's because the volume that is displaced is just the same as the volume of the object. However, is we let this volume of displaced water be variable, by letting a part of the object stick above the water line and fixing the object to the bottom, the buoyant force becomes dependent of the water depth. The more the object is under water, the greater the buoyant force becomes, and vice versa.

Comment on the type of object you'll need

You'll need an object of which the volume has an easy relation to the height of the object. A cylinder is perfect for this as it has a strong shape and the height-volume relation is easy (unlike a sphere for example). You want the cylinder as light as possible because when you make the object too heavy, the object will only start floating when the water is standing really high, or it won't float at all. The net force that determines if the object is going to float, is equal to the buoyant force minus the force exerted by gravity. We chose a PVC pipe with a length of 0.75 m, diameter of 75 mm and wall thickness of 2.2 mm, since this was the easiest to get.

User instructions

  1. The load cell has to be tared in order to take accurate measurements. This must be done every time the Arduino is powered on or something on the circuit is changed whilst the Arduino is powered on. Taring can be done with the push button connected to pin 7.
  2. The measurement can be taken by pressing the push button that's connected to pin 13. The water depth is displayed in the LCD screen and is sent to the serial monitor.
  3. Before putting the anchor and attached floater in the water, make sure the water depth falls within the measuring range of your sensor. You can find out these ranges by taking measurements on the dry. Manually pull the load cell up (for the maximum water depth) and down (for the minimal water depth) and push the measurement button. The minimum and maximum water depths are displayed on the screen.

Supplies

These are the materials that we used. Feel free to use different materials! There are many ways to build this sensor.

Electronics

  1. Arduino Uno
  2. USB B to USB A cable (or USB C, depending on your laptop)
  3. Powerbank for when sensor is 'in production'
  4. Two push-buttons
  5. 2 10k Ohm resistors
  6. 16x2 QAPASS LCD With I2C Module
  7. Breadboard and lots of wires
  8. Piece of wood to fix electronics to (optional)

Floating object

  1. PVC pipe with a length of 0.75 m, diameter of 75 mm and wall thickness of 2.2 mm
  2. PVC end cap that fits over this pipe
  3. Some PVC glue (regular silicone sealant will work too)
  4. A screw eye
  5. Small piece (50 cm) of strong rope (preferably Dyneema, polyester or nylon)

Anchor

  1. Whadda Electronic scale load cell WPSE471
  2. 1.8 m USB cable (or any other cable with 4 wires inside)
  3. Solder and heat shrink tubing
  4. Silicone sealant
  5. Paving stone
  6. Piece of wood (like 2x2x10 cm)
  7. Two wood screws for attaching the load cell to this piece of wood
  8. Thick and strong wood screw for fixing the piece of wood to the paving stone
  9. Some weights
  10. Rope for pulling the anchor out of the water

Tools

  1. Drill
  2. Masonry and wood drill bit
  3. Screwdriver
  4. Soldering station
  5. Laptop with Arduino IDE

Make the Electronics Ready

Screenshot from 2024-09-20 16-58-37.png

Take all the electronic components and install them on the breadboard using the schematic. The black 8-pin header is used for the load cell circuit board. This board plugs in with the pins of the circuit board in the following order, from top to bottom in the picture: VCC, SCK, DT and GND. Be sure to also read the manual of the load cell sensor on this page.

It is also important to calibrate the load cell sensor. This can be done with the example script from the same link. Use the calibrate_sensor sketch, and copy the calibration_factor once done. For the calibration process itself, use an object that is around the weight that you would expect the load cell sensor to measure once in practise. We used a long socket extension of which we measured the real weight with a precise scale.

Download and open the attached sketch. Change the variables at the top of the code to that of your floater and update the calibration factor. Also pay attention to the pins and change them if yours are different from the schematic. Then upload the code. Be sure to have the LiquidCrystal I2C library installed!

Make the Floating Object

IMG-20240922-WA0008.jpg
  1. Cut the PVC pipe to the desired length, 75 cm for our design.
  2. Glue the end cap onto the pipe using the instructions on the PVC glue or silicone sealant.
  3. Drill a hole in the center of the end cap of the appropiate size.
  4. Screw the screw-eye in the hole and seal it with silicone.

Making the Anchor

IMG-20240922-WA0004.jpg

The non-electrical stuff

  1. Drill a hole in the paving stone (with a masonry drill bit!!!) so that the thick screw fits through. Mount the piece of wood on top by screwing it secure through the paving stone. Be sure to pre-drill the wood.
  2. Fix some weights to the paving stone. This is needed to keep the anchor under water. Or use a paving stone with a lower porosity making it heavier under water.
  3. Don't forget to tie a rope to the paving stone to haul it out of the water.

The electrical part

The most important and perhaps difficult part is to make the whole circuit waterproof for the whole range your sensor will be measuring. The wires that are on the load cell are probably too short (like 20 cm).

  1. Take a 1.8 m USB cable (type doesn't matter) and chop both ends off. Expose each individual wires and remove the insulation.
  2. Prepare the heat shrink tubing (put them over the wires first) and solder the connections. Then let the heat shrink heat shrink.
  3. Now take your silicone sealant (caulking) and put sealant over the whole connection. Be generous with the sealant. Let it dry to the instructions on the packaging.
  4. Mount the load cell to the piece of wood with the two screws. If such a small block of wood is used like in our design, pre-drilling is essential. Be sure the load cell is fixed very well to the wood and the wood to the paving stone. Not having the load cell tightly mounted will cause a decrease in precision.
  5. Take a small piece of rope (if you're using nylon, polyester of Dyneema, you can just use a single strand), and tie it to the load cell. Make a loop at the other end.
  6. At the other end of the USB cable, solder some headers to connect to the load cell circuit board.