Non‐contactLiquidLevelSensorXKC‐Y25‐T12VSKU:SEN0204
FromRobotWiki
Contents
1Introduction
2Specification
3PinDescription
4Tutorial
o
4.1Requirements
o
4.2ConnectionDiagram
o
4.3SampleCode
o
4.4Results
Introduction
The non-contact liquid level sensor utilizes advanced signal processing technology by using a
powerful chip with high-speed operation capacity to achieve non-contact liquid level detection.
No contact with liquid makes the module suitable for hazardous applications such as detecting
toxic substances, strong acid, strong alkali and all kinds of liquid in an airtight container under
high pressure. There are no special requirements for the liquid or container and the sensor is easy
to use and easy to install.
The liquid level sensor is equipped with an interface adapter that makes it compatible with
DFRobot "Gravity" interface. There are 4 levels of sensitivity which are set by pressing the SET
button.
Specification
OperatingVoltage(InVCC):DC5~24v
Currentconsumption:5mA
Outputvoltage(highlevel):InVCC
Outputvoltage(lowlevel):0V
Outputcurrent:1~50mA
Responsetime:500ms
OperatingTemperature:0~105
Rangeforthicknessofinduction(sensitivity):0~13mm
Humidity:5%~100%
Material:ABS.
Waterproofperformance:IP67
Dimension:28*28mm/1.1*1.1inches
PinDescription
NoncontactLiquidLevelSensorprobe
XKCY25T12V
LiquidLevelSensorXKCY25T12VPindefination
Num.Name Description
1(Brown)VCC InVCC(range:+5V~+24V)
2(Yellow)OUT Liquidlevelsensorsignaloutput
3(Blue)GNDGND
4(Black)ADJ
Sensorsensitivityadjustingswitch(Adjustthesensor
sensitivity,4modesinall.ClicktheSETbuttononthe
adaptertosetthesensorsensitivity.)
Tutorial
Requirements
Hardware
o ArduinoUNOx1
o Liquidlevelsensorx1
Software
o ArduinoIDEV1.6.5ClicktoDownloadArduinoIDEfromArduino®
https://www.arduino.cc/en/Main/Software
ConnectionDiagram
NoncontactLiquidLevelSensorXKCY25T12VInstallationInstruction(Nonmetal)
NoncontactLiquidLevelSensorAdapter
LiquidLevelSensorXKCY25T12VPindefination
Num. Name Description
Left_1VCC InVCC(range:+5V~+24V)
Left_2OUT Liquidlevelsensorsignaloutput
Left_3GNDGND
Left_4ADJ
Sensorsensitivityadjustingswitch(Adjustthesensor
sensitivity,4modesinall.ClicktheSETbuttononthe
adaptertosetthesensorsensitivity.)
Right_1OUT Signal
Right_2VCC InVCC
Right_3GNDGND
NoncontactLiquidLevelSensorXKCY25T12VInstallationInstruction(metalsurface)
Non_contactLiquidLevelSensorXKCY25T12VConnectiondiagram
SampleCode
1 /***************************************************
2 * Liquid Level Sensor-XKC-Y25-T12V
3 * ****************************************************
4 * This example is to get liquid level
5
6 * @author jackli(Jack.li@dfrobot.com)
7 * @version V1.0
8 * @date 2016-1-30
9
10 * GNU Lesser General Public License.
11 * See <http://www.gnu.org/licenses/> for details.
12 * All above must be included in any redistribution
13 * ****************************************************/
14 int Liquid_level=0;
15 void setup() {
16 Serial.begin(9600);
17 pinMode(5,INPUT);
18 }
19
20 void loop() {
21 Liquid_level=digitalRead(5);
22 Serial.print("Liquid_level= ");
23 Serial.println(Liquid_level,DEC);
24 delay(500);
25 }
Results
If the liquid level sensor detects the liquid level, it will output HIGH and turn the LED ON. If no
liquid is detected it output LOW and turn the LED off.
Powered By DFRobot © 2008-2017