12 인치 화학용 eTape 액체 레벨 센서 -플라스틱 케이스
(12 inch Chemical eTape Liquid Level Sensor with Plastic Casing)
개요
- 본 제품은 12 인치 체미컬 eTape 수위 레벨 센서입니다.
- 수위에 따라 가변적으로 변하는 저항값을 가지고 있는 센서입니다.
- 본 센서는 플라스틱 케이스를 가지고 있어 센서가 손상 받는 것을 방지하여 주며 센서를 일자 형태로 유지하는데 도움을 주게 디자인 되어 있습니다.
- 수위가 높을수록 저항은 낮으며, 수위가 낮을수록 높은 저항값을 가집니다.
- 센서는 저항이므로 voltage divider 회로를 구성하여 쉽게 마이크로컨트롤러의 ADC 핀으로 값을 읽을 수 있습니다.(3선 인터페이스 제품의 경우 제품에 따라 검정 케이스안에 voltage divider 포함되어 있음)
특징
문서
- Connect pin #2 of the sensor to ground, then pin #3 to a 560 ohm resistor. The other side of the 560 ohm resistor to VCC (3.3V or 5V for example) to create a resistor divider. The ADC pin connects to the point between the resistor and sensor.
-
// the value of the 'other' resistor
#define SERIESRESISTOR 560
// What pin to connect the sensor to
#define SENSORPIN A0
void setup(void) {
Serial.begin(9600);
}
void loop(void) {
float reading;
reading = analogRead(SENSORPIN);
Serial.print("Analog reading ");
Serial.println(reading);
// convert the value to resistance
reading = (1023 / reading) - 1;
reading = SERIESRESISTOR / reading;
Serial.print("Sensor resistance ");
Serial.println(reading);
delay(1000);
}