รหัสสินค้า | AS00367 |
หมวดหมู่ | Gas Sensors แก๊สเซ็นเซอร์ |
ราคา | 2,750.00 บาท |
สถานะสินค้า | พร้อมส่ง |
จำนวน | ชิ้น |
Num | Label | Description |
---|---|---|
1 | SDA | I2C System Data Line |
2 | SCL | I2C System Clock Line |
3 | GND | - |
4 | VCC | + |
Download the program to Arduino UNO and open the serial monitor to check the O2 concentration.
Hardware
Software
1.According to the connection diagram to connect the module to Arduino UNO. In default, the I2C address is 0x73 which corresponds to the ADDRESS_3 in the code. If you want to modify the I2C address, please configure the hardware I2C address by the dial switch and modify the IIC address part: ADDRESS_X in the sample code. The relationship between the dial switch and I2C address is shown as below:
2.Download and install the DFRobot_OxygenSensor Library (About how to install the library?)
3.Open Arduino IDE and upload the code below to Arduino UNO.
4.Open the Arduino IDE's serial monitor, adjust the baud rate to 9600, and observe the serial print results.
/*!
* @file ReadOxygenData.ino
* @brief Read oxygen concentration ,The unit is concentration percent (% vol).
* @n step: we must first determine the iic device address, will dial the code switch A0, A1 (ADDRESS_0 for [0 0]), (ADDRESS_1 for [1 0]), (ADDRESS_2 for [0 1]), (ADDRESS_3 for [1 1]).
* @n And then read the data.
* @n note: it takes time to stable oxygen concentration, about 8 minutes.
*
* @n The experimental phenomenon is that a certain percentage of oxygen concentration is printed on the serial port.
* @n Because the oxygen concentration in oxygen air is certain, the data will not be greater than 25% vol.
*
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @licence The MIT License (MIT)
* @author ZhixinLiu(zhixin.liu@dfrobot.com)
* @version V0.2
* @date 2019-10-10
* @get from https://www.dfrobot.com
* @url */
#include "DFRobot_OxygenSensor.h"
#define COLLECT_NUMBER 10 // collect number, the collection range is 1-100.
#define Oxygen_IICAddress ADDRESS_3
/* iic slave Address, The default is ADDRESS_3.
ADDRESS_0 0x70 // iic device address.
ADDRESS_1 0x71
ADDRESS_2 0x72
ADDRESS_3 0x73
*/
DFRobot_OxygenSensor Oxygen;
void setup()
{
Serial.begin(9600);
while(!Oxygen.begin(Oxygen_IICAddress)) {
Serial.println("I2c device number error !");
delay(1000);
}
Serial.println("I2c connect success !");
}
void loop()
{
float oxygenData = Oxygen.ReadOxygenData(COLLECT_NUMBER);
Serial.print(" Oxygen concentration is ");
Serial.print(oxygenData);
Serial.println(" %vol");
delay(1000);
}
Turn on the serial monitor and heat it up for about 3 minutes to get the final data. (Test environment: closed environment with ozone generator)
The oxygen sensor can be calibrated using the characteristic that the oxygen content in the atmosphere is 20.9%.
Calibration Method:Place the oxygen sensor in the outdoor environment, after the sensor data is stable, long press the calibration button on the sensor for 2 seconds, the sensor will be calibrated.
ชำระเงินค่าสินค้าโดยการโอนเงินเข้าบัญชีธนาคาร KBANK, SCB, BBL,TMB
กรุณาเก็บหลักฐานการโอนเงินของท่านไว้เพื่อแจ้งการชำระเงินด้วยค่ะ
ท่านสามารถแจ้งการชำระเงินผ่านระบบอัตโนมัติได้โดย Click Link ข้างล่างค่ะ
https://www.arduitronics.com/informpayment
หน้าที่เข้าชม | 15,375,197 ครั้ง |
ผู้ชมทั้งหมด | 5,878,275 ครั้ง |
เปิดร้าน | 21 พ.ค. 2556 |
ร้านค้าอัพเดท | 5 ก.ย. 2568 |