Features:
1. High quality double panel design, with power indicator and TTL output signal.
2. Have DO switch signal(TTL) output and AO analog signal output.
3. TTL output signal for low level effectively. (when the low output electric signal lights at ordinary times, can be directly connect single chip microcomputer or relay module)
4. Analog output voltage with concentration, the higher concentration, the higher voltage.
5. Has better sensitivity with the liquefied petroleum gas, natural gas, city gas, smoke.
6. Has long service life and reliable stability
7. Rapid response recovery features
Specifications:
Input voltage: DC5V
Power consumption (current) : 150 mA
DO output: TTL digital 1 and 0 (0.1 and 5 V)
AO output: 0.1-0.3 V (pollution-free)
Highest concentration of voltage: Approx 4 V
Detection range of alcohol: detection range of 10 ~ 1000 PPM
Connection mode:
1. VCC: Positive (5 v)
2. GND: Connect power negative
3. DO: TTL switch signal output
4. AO: Analog signal output
ไม่จำเป็นต้องใช้ code แบบมี library
หรือโหลดจากที่นี่
ตัวอย่างโค้ด
const int AOUTpin=0;//the AOUT pin of the alcohol sensor goes into analog pin A0 of the arduino
const int DOUTpin=8;//the DOUT pin of the alcohol 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 arduino
int limit;
int value;
void setup() {
Serial.begin(9600);
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 alcohol sensor's AOUT pin
Serial.println(value);
if(value<200)
{
Serial.println("You are sober.");
}
if (value>=200 && value<280)
{
Serial.println("Alcohol detected");
}
if (value>=280 && value<350)
{
Serial.println("More than one drink going on here....");
}
if (value>=350 && value <450)
{
Serial.println("Serious Booze here! ");
}
if(value>450)
{
Serial.println("You are drunk!");
}
delay (500);
}