简介

这是一款体积小巧的arduino兼容的臭氧传感器模组,可方便、准确地测量环境中臭氧气体的浓度。可广泛应用于便携式仪器仪表、空气质量监测设备、消毒柜、智能家居等设备场所。 DFRobot推出的臭氧传感器,采用电化学原理,出厂前已经进行过标定,可以准确测量环境中的臭氧浓度。并具有抗干扰、稳定性高、灵敏度高等特点。分辨率可以达到10ppb,支持3.3~5.5V宽电压输入,使用I2C输出,兼容Arduino、ESP32、树莓派等主流设备,具有良好的兼容性,空气中的使用寿命长达两年。简单易用的Gravity接口,配上我们的样例代码,可迅速搭建出自己的臭氧浓度检测仪。

特性

产品参数

引脚说明

SEN0321 臭氧传感器接口定义

标号 名称 功能描述
1 SDA I2C数据线SDA
2 SCL I2C时钟线SCL
3 GND
4 VCC 电源

使用教程

将程序下载到UNO,打开串口监视器查看O3浓度。

注意:预热时间输出的O3浓度值将在3分钟以后逐渐趋于稳定,请忽略预热3分钟内的O3浓度值。

准备

接线图

样例代码

/*!
  * @file  ReadOzoneData.ino
  * @brief Reading ozone concentration, A concentration of one part per billion (PPB).
  * @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       Then configure the mode of active and passive acquisition, Finally, ozone data can be read.
  * @n note: it takes time to stable oxygen concentration, about 3 minutes.
  *
  * @n The experimental phenomenon is to print one billionth of the ozone concentration on the serial port.
  * @n Because the value measured by the sensor is less than 10000, the value obtained will not be greater than 10000
  *
  * @copyright   Copyright (c) 2010 DFRobot Co.Ltd (https://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_OzoneSensor.h"

#define COLLECT_NUMBER   20              // collect number, the collection range is 1-100
#define Ozone_IICAddress OZONE_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_OzoneSensor Ozone;
void setup() 
{
  Serial.begin(9600);
  while(!Ozone.begin(Ozone_IICAddress)) {
    Serial.println("I2c device number error !");
    delay(1000);
  }  Serial.println("I2c connect success !");
/*   Set iic mode, active mode or passive mode
       MEASURE_MODE_AUTOMATIC            // active  mode
       MEASURE_MODE_PASSIVE              // passive mode
*/
    Ozone.SetModes(MEASURE_MODE_PASSIVE);
}


void loop() 
{
/*   Smooth data collection
       COLLECT_NUMBER                    // The collection range is 1-100
*/
  int16_t ozoneConcentration = Ozone.ReadOzoneData(COLLECT_NUMBER);
  Serial.print("Ozone concentration is ");
  Serial.print(ozoneConcentration);
  Serial.println(" PPB.");
  delay(1000);
}

结果

打开串口监视器,预热约3分钟后,得到最终的数据。(测试环境为:带有臭氧发生器的封闭环境)

注意: 1. 臭氧传感器可能会存在数据漂移的现象。 2. 臭氧传感器初次上电需要预热24小时。

Mind+(基于Scratch3.0)图形化编程

1、下载及安装软件,版本不低于1.6.2 RC2.0。下载地址:https://www.mindplus.cc 详细教程:Mind+基础wiki教程-软件下载安装

2、切换到“上传模式”。 详细教程:Mind+基础wiki教程-上传模式编程流程

3、“扩展”中选择“主控板”中的“Arduino Uno”,“用户库”中搜索加载 臭氧传感器 详细教程:Mind+基础wiki教程-加载扩展库流程

4、进行编程,程序如下图,先使用程序1从串口获取基数数据,然后使用程序2正常获取数据,其中程序1获得的基数填写到程序2的初始化中。

5、菜单“连接设备”,“上传到设备”

6、程序上传完毕后,打开串口即可看到数据输出。详细教程:Mind+基础wiki教程-串口打印

常见问题

还没有客户对此产品有任何问题,欢迎通过qq或者论坛联系我们!

更多问题及有趣的应用,可以 访问论坛 进行查阅或发帖。

更多

DFshopping_car1.png DFRobot商城购买链接