Rain Monitoring System using Rain Sensor, ThingSpeak and ESP32

The Rain Monitoring System integrates a rain sensor with an ESP32 microcontroller to capture and analyze real-time rainfall intensity data. Using the ThingSpeak platform, the system uploads this data to the cloud for secure remote monitoring and detailed analysis. This efficient setup allows users to track precipitation trends conveniently, making it a valuable tool for weather enthusiasts, researchers, and individuals monitoring local rainfall.

System Components

  • Rain Sensor: Detects and measures rainfall intensity.
  • ESP32 Microcontroller: Processes and uploads data to the cloud.
  • ThingSpeak Platform: Stores and visualizes real-time data.

Setting Up ThingSpeak Channel

1. Create a New Channel

  • Log in to ThingSpeak and navigate to the “Channels” tab.
  • Click “New Channel” to create a channel.

2. Configure Channel Settings

  • Name: Provide a descriptive name, e.g., “Rain Monitor.”
  • Fields: Assign “Rain Intensity” to Field 1 and “LED” to Field 2.
  • Privacy Settings: Set to Public or Private based on your preference.

3. Save Channel

  • Click “Save Channel” to finalize settings.

4. Obtain Write API Key

  • Navigate to the “API Keys” tab.
  • Generate and copy the Write API Key for use in the ESP32 sketch.

ESP32 Sketch Integration

1. Prepare Arduino IDE

  • Open the Arduino IDE on your computer.
  • Install the required library:
  • “ThingSpeak” library.

2. Connect Rain Sensor to ESP32

  • VCC Pin: Connect to 3.3V on the ESP32.
  • GND Pin: Connect to GND on the ESP32.
  • Signal Pin: Connect to an analog input pin on the ESP32 (e.g., A6).

This setup provides a reliable method for real-time rain monitoring, with data stored and visualized on the ThingSpeak platform for easy access and analysis.

Leave a comment

Your email address will not be published. Required fields are marked *