Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use MKE-S12 Rain Water Sensor: Examples, Pinouts, and Specs

Image of MKE-S12 Rain Water SensorDesign with MKE-S12 Rain Water Sensor in Cirkit Designer

Introduction

The MKE-S12 Rain Water Sensor is an electronic device designed to detect the presence of water, with a particular focus on rain detection. It is a valuable component for weather monitoring systems, automated irrigation systems, and any application where water detection is crucial. By sensing rain, the MKE-S12 can help in conserving water by automating watering processes, alerting users to potential flooding, or simply by providing data for weather analysis.

Explore Projects Built with MKE-S12 Rain Water Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Arduino-Controlled Rain Sensor with Relay-Activated Water Pump: A project utilizing MKE-S12 Rain Water Sensor in a practical application
Arduino-Controlled Rain Sensor with Relay-Activated Water Pump

This circuit is designed to detect rain using a rain sensor and activate a water pump when rain is detected. The rain sensor's digital output is connected to an Arduino UNO, which controls a relay module to switch the power to the pump. The pump and the relay are powered by a 18650 Li-Ion battery, with the relay acting as an intermediary to safely control the high-power pump based on the sensor input.

Open Project in Cirkit Designer
Image of Arduino UNO Based Automated Soil Moisture Monitoring and Water Pump Control System: A project utilizing MKE-S12 Rain Water Sensor in a practical application
Arduino UNO Based Automated Soil Moisture Monitoring and Water Pump Control System

This circuit is designed to monitor soil moisture levels using an MKE-S13 Soil Moisture Sensor and control a water pump via a 2-channel relay based on the moisture data. The Arduino UNO reads the sensor data and activates the pump when the soil moisture falls below a predefined threshold. An LCD I2C display is likely used to show the moisture levels or system status, and the system is powered by a 9V battery.

Open Project in Cirkit Designer
Image of Arduino and ESP32-Based Solar-Powered IoT Roof Water Sprinkler System: A project utilizing MKE-S12 Rain Water Sensor in a practical application
Arduino and ESP32-Based Solar-Powered IoT Roof Water Sprinkler System

This IoT-based solar-powered roof water sprinkler system uses an Arduino UNO to read data from a DHT11 temperature-humidity sensor and a water level sensor, and communicates this data to an ESP32. The ESP32 controls a water pump via a relay module based on the received data, and sends updates to a Blynk app, while the system is powered by a solar panel and a 12V battery managed by a solar charge controller.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Name Description
1 VCC Connect to 5V power supply
2 GND Connect to ground
3 DO Digital output; goes high when rain is detected
4 AO Analog output; provides an analog signal based on the amount of water detected

Usage Instructions

How to Use the MKE-S12 in a Circuit

  1. Connect the VCC pin to a 5V power supply.
  2. Connect the GND pin to the ground of the power supply.
  3. Connect the DO (Digital Output) pin to a digital input pin on your microcontroller if you wish to use the digital output.
  4. Connect the AO (Analog Output) pin to an analog input pin on your microcontroller if you wish to use the analog output.

Important Considerations and Best Practices

Example Code for Arduino UNO

// Define the digital and analog pins
const int digitalPin = 2; // Digital output from the sensor
const int analogPin = A0; // Analog output from the sensor

void setup() {
  pinMode(digitalPin, INPUT); // Set the digital pin as input
  Serial.begin(9600); // Start serial communication at 9600 baud
}

void loop() {
  int analogValue = analogRead(analogPin); // Read the analog value
  bool isRaining = digitalRead(digitalPin); // Read the digital value

  // Print the analog value to the serial monitor
  Serial.print("Analog Value: ");
  Serial.println(analogValue);

  // Print the rain detection status to the serial monitor
  Serial.print("Is it raining? ");
  if (isRaining) {
    Serial.println("Yes");
  } else {
    Serial.println("No");
  }

  // Wait for a second before the next reading
  delay(1000);
}

Troubleshooting and FAQs

Common Issues

Solutions and Tips for Troubleshooting

FAQs

Q: Can the MKE-S12 be used to measure the amount of rainfall? A: The MKE-S12 can detect the presence of rain but is not designed to measure the volume of rainfall.

Q: Is the sensor waterproof? A: The sensor is water-resistant but not fully waterproof. It should not be submerged or exposed to heavy rain without proper shielding.

Q: How do I adjust the sensitivity of the sensor? A: Turn the onboard potentiometer clockwise or counterclockwise to increase or decrease the sensitivity, respectively.

Q: Can the sensor operate at voltages other than 5V? A: The MKE-S12 is designed to operate at 5V. Operating it at a higher voltage may damage the sensor, while a lower voltage may result in inaccurate readings.