Rain Gauge Using Ultrasonic Sensor

by solocap in Circuits > Arduino

48 Views, 1 Favorites, 0 Comments

Rain Gauge Using Ultrasonic Sensor

7c755a7e-954d-45a6-8410-8da83e5fc80f.jpg

Built a Rain Gauge that aims to make exact measurements at small intervals of time

Supplies


Materials:

Pipe with at least 50mm diameter (needs to be slightly wider than the distance sensor)

1 Pipe Cap same diameter as the pipe

Rubber hose

Ultrasonic distance sensor (other type of distance sensors might work)

Arduino

Display that supports at least 3 digits

Plastic Cup

4 Wood Pieces (see sizes below)

Metal Wire

Glue and PVC glue

Duct Tape

Bucket with a hole or other recipient that can constitute a funnel

Arduino code for making the readings and processing it

4 wires with l > 1m for connecting the sensor to the Arduino

12 wires of any length for connecting the 7 segment 4 digit to the Arduino

4 330 ohm resistors

2 planks with l = pipe length + funnel length + 5 cm at least

2 planks with l = funnel width + 2* the other 2 planks width

Tools:


Saw

Metal Wire Cutter

Drill

Glue Pistol

Computer

Arduino

Scissors / Cutting Pliers (make the duct tape fit the round shapes)

Cutter

Circular File (for making the holes)

Use the Pvc Glue to put the cap on one of the ends of the pipe. Wait for th glue to dry

0f52df7a-17f8-4ab8-a54a-4985d0d1c469.jpg

Drill a hole as close to the bottom of the pipe as you can get at the side where u glued the cap

a1030718-c1c5-4552-85bf-f3dcda5cba00.jpg

Put one end of the hose pipe inside the hole at the bottom and tie the rest to the pipe using the metal wire

Building the Sensor Chamber

d564f3b1-553d-440d-940a-9b1a98ed5001.jpg
a4256b5e-3c7f-4140-b48e-aa707b44d41b.jpg

Now we need to build the sensor chamber. To start cut the bottom of a plastic cup. Make 4 cuts into the bottom of the cup like in the image bellow so the wood pieces can fit into it + one more so you can connect the sensor to the arduino. Place the sensor into the cup facing outwards and lock it in place using the wood pieces. After you made sure that the sensor is straight enough use duct tape hold the sticks glued to the cup.

Making the Funnel

6f782a30-dae7-4224-9397-5324e8580821.jpg
bb5bd65b-461a-447f-946f-5842d1e0ccab.jpg

To make a the funnel get the bucket and make a hole with the same diameter as the pipe. Now Tape the Sensor Camber to The bucket such that the sensor is facing the hole and it permits water to flow from the bucket into the pipe.

Setting Up the Arduino

20240920_113544.jpg

Download the Arduino IDE and upload the code bellow to it.

Now to connect the pins of the arduino to the sensor and the display follow the schematic.

Dont forget that the D1, D2, D3 and D4 pins on the display require a 330 Ohm transistor (Orange Orange Brown Gold) before connecting to the arduino.

Paste the attached code into the IDE and press the upload button after you have connected your arduino to the computer trough USB.

Making Wooden Frame

03a661da-528b-4d5b-9178-9c4203b6271a.jpg
79ae8d5d-872b-4eb4-bdd9-06e793d40c4a.jpg
4607d12b-5da2-4660-bdf3-8de4fe636def.jpg

The structre right now is very instable to improve the stability of the funnel and the sensor we will build a woden frame around the device. This will be one by using the 2 long planks as pillars and the 2 shorter ones will be screwd such that the space between them is exactly the height of the funnel such that when place inbetween it will stay completly still. You might still need to add a weigth on top of your sensor chamber to inscrease the stability.