Ks0048 keyestudio Water Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
Line 6: Line 6:
iii)low power consumption and high sensitivity;
iii)low power consumption and high sensitivity;
iv)directly connected to microprocessor or other logic circuits, suitable for a variety of development boards and controllers such as Arduino controller, STC single-chip microcomputer, AVR single-chip microcomputer etc.
iv)directly connected to microprocessor or other logic circuits, suitable for a variety of development boards and controllers such as Arduino controller, STC single-chip microcomputer, AVR single-chip microcomputer etc.
<br>[[File:481.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0048(1).png|500px|frameless|thumb]]<br>
 


==Specification==
==Specification==

Revision as of 08:28, 16 October 2017

Introduction

Our water sensor is easy- to-use, portable and cost-effective, designed to identify and detect water level and water drop. This sensor measures the volume of water drop and water quantity through an array of traces of exposed parallel wires. Compared with its competitors, this sensor is not only smaller and smarter but also ingeniously equipped with following features:

i)smooth conversion between water quantity and analog quantity; ii)strong flexibility, this sensor outputs basic analog value; iii)low power consumption and high sensitivity; iv)directly connected to microprocessor or other logic circuits, suitable for a variety of development boards and controllers such as Arduino controller, STC single-chip microcomputer, AVR single-chip microcomputer etc.
thumb

Specification

  • Product Name: Water Sensor
  • Operating Voltage: DC5V
  • Operating Current: ﹤20mA
  • Sensor Type: Analog
  • Detection Area: 40mm x16mm
  • Production Process: FR4 double-side tinned
  • Humanized Design: Anti-slippery semi-lunar recess
  • Working Temperature: 10℃-30℃
  • Working Humidity: 10%-90% without condensation
  • Product Weight: 3g
  • Product Size: 65mm x 20mm x 8mm

Connection Diagram


thumb

Sample Code

int analogPin = 0; //connect water sensor to analog interface 0
int led = 13; //LED to digital interface 13 
int val = 0; //define the initial value of variable ‘val’ as 0
int data = 0; //define the initial value of variable ‘data’ as 0 
void setup()
{
pinMode(led, OUTPUT); //define led as output pin
Serial.begin(9600); //set baud rate at 9600
}
void loop()
{
val = analogRead(analogPin); //read and assign analog value to variable ’val’
if(val>700){ //decide whether variable ‘val’ is over 700 digitalWrite(led,HIGH); //turn on  LED when variable ‘val’ is over 700
}
else{
digitalWrite(led,LOW); //turn off LED when variable ‘val’ is under 700
}
data = val; //variable ’val’ assigns value to variable ‘data’
Serial.println(data); //print variable ‘data’ by Serial.print
delay(100);
}

After the above steps are done, let’s do a test on lower water level and check what happens:
The LED can’t light up when water level haven’t reach alarm value;
The LED turns on and released an alarm when water level reaches alarm value.

Resources

Video

http://www.keyestudio.com/wp/2016/05/ks0048-keyestudio-water-sensor/

Datasheet

http://www.keyestudio.com/files/index/download/id/1463713602/

Buy from

http://www.keyestudio.com/keyestudio-water-sensor-for-arduino.html

https://www.amazon.com/Keyestudio-Water-Sensor-Arduino-raspberry/dp/B0176BRAOY/ref=sr_1_1?srs=13497667011&ie=UTF8&qid=1480299196&sr=8-1&keywords=keyestudio+Water+Sensor+for+Arduino