Cảm Biến Khí Gas MQ8 sử dụng để cảm biến khí gas trong môi trường. Cảm biến có độ nhạy cao khả năng phản hồi nhanh, độ nhạy có thể điều chỉnh được bằng biến trở. Cảm biến MQ8 có thể phát hiện khí hydrogen gas.
Thông số kỹ thuật:
- Kích thước: 32 x 22 x 27mm
- Chip chính: cảm biến khí LM393, MQ-8
- Điện áp làm việc: 5 VDC
- Có LED hiển thị trạng thái ngõ ra.
- Đầu ra tín hiệu kép (đầu ra mức TTL và đầu ra analog)
- Tín hiệu đầu ra TTL cho mức thấp. (đèn tín hiệu đầu ra chớp 4 lần thời gian thông thường, có thể trực tiếp nhận SCM)
- Tín hiệu Analog 0 ~ 5 VDC, nồng độ càng cao thì điện áp càng cao.
- Độ nhạy cao với hydro
Sơ đồ chân:
Code tham khảo Arduino:
const int AOUTpin=0; //the AOUT pin of the hydrogen sensor goes into analog pin A0 of the arduino
const int DOUTpin=8; //the DOUT pin of the hydrogen sensor goes into digital pin D8 of the arduino
const int ledPin=13; //the anode of the LED connects to digital pin D13 of the arduinoint limit;
int value;void setup() {
Serial.begin(115200);//sets the baud rate
pinMode(DOUTpin, INPUT);//sets the pin as an input to the arduino
pinMode(ledPin, OUTPUT);//sets the pin as an output of the arduino
}void loop()
{
value= analogRead(AOUTpin);//reads the analaog value from the hydrogen sensor's AOUT pin
limit= digitalRead(DOUTpin);//reads the digital value from the hydrogen sensor's DOUT pin
Serial.print("Hydrogen value: ");
Serial.println(value);//prints the hydrogen value
Serial.print("Limit: ");
Serial.print(limit);//prints the limit reached as either LOW or HIGH (above or underneath)
delay(100);
if (limit == HIGH){
digitalWrite(ledPin, HIGH);//if limit has been reached, LED turns on as status indicator
}
else{
digitalWrite(ledPin, LOW);//if threshold not reached, LED remains off
}
}
Video tham khảo: