Introduction: Rain Gauge Using Ultrasonic Sensor

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)

Step 1:

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

Step 2:

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

Step 3:

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

Step 4: Building the Sensor Chamber

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.

Step 5: Making the Funnel

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.

Step 6: Setting Up the Arduino

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.

Step 7: Making Wooden Frame

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.