Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

Electronic Rain Gauge

rain gauge

Overview

For my senior design project, my team was tasked with with creating an environmental sensor curriculum for middle school students. We decided to create an electronic rain gauge with a corresponding curriculum.

My role in the project included constructing the rain gauge hardware and writing C/ C++ code using the Arduino IDE for the microcontroller in order to control the various electronic components.

How the Rain Gauge Works

The rain gauge design involves a funnel attached to a PVC pipe that allowed water to be collected in the PVC. At the bottom of the PVC pipe is a PVC container that holds the waterproofed pressure sensor, which measures the pressure of the rainwater. Wires from the pressure sensor are threaded through a waterproof box to connect the sensor to the rest of the electronic components. The second pressure sensor on the breadboard is used to find the atmospheric pressure.

Using the two pressure sensors, the differential pressure can be calculated. The depth of the rainwater collected in the PVC tube can be found using the differential pressure after calibration is done. The differential pressure, along with the current time measured by the Real Time Clock (RTC), is logged onto a micro SD card every 15 minutes. The idea is that the rain gauge can be set outside to automatically collect rain data with minimal maintenance apart from retrieving the SD card to collect the data and changing the batteries.

Structure of the Rain Gauge Code

Code located in rain_gauge_datalogging.ino

  • In a continous loop:
    • Retrieve data from the pressure sensors
    • Get the time from the real time clock
    • Create new text file or open existing text file on the SD card
    • Save the pressure data and current time onto the text file
    • Put the microcontroller to sleep to conserve power
    • Wake up the microcontroller after 15 minutes

Software Libraries Used

Hardware Components

rain gauge electronics

  • Microcontroller (Wemos D1 Mini ESP8266)
  • Pressure Sensors x2 (BMP280)
  • Real Time Clock (DS1307)
  • SD Card Reader (Catalex)
  • microSD card
  • 4-AA Battery Pack
  • Switch (for turning the microcontroller on/off)
  • 10k resistor for switch
  • LCD Screen (LCD1602)

For a more details on this project, please visit my website here.

About

Electronic rain gauge using an ESP8266 microcontroller for my senior design project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages