사이트 도구


gss:cozir:lp3

CozIR-LP3

UART 또는 I2C 제어 인터페이스, 디지털 및 아날로그 CO2 측정, 오류 방지 디지털 경보 레벨 모니터를 제공합니다. 제품에는 자동 영점 조정이 내장되어 있어 자동으로 교정이 되어 사용자의 개입없이 센서를 장기간 작동시킬 수 있습니다.


제품 사양

항목 내용
측정 범위 Type 1) 0-2000ppm
Type 2) 0-5000ppm
Type 3) 0-10,000ppm
최대 10,000ppm 측정 가능
측정 방식 Solid-State, 가열된 필라멘트 없음
통신 방식 UART 또는 I²C
전원 전압 +3.25VDC~5.5VDC
전력 소비량 3.5mW(제품 작동 및 측정 시)
센서 치수 및 무게 L x W x H(36.82mm x 19.5mm x 9.5mm)
Weight(4.9g)
센서 내구성 진동 및 충격에 강하고 비가열성
센서 교정 자동 교정 기능 내장(단, 제품 사용 전 ZERO 교정 저장 후 활성화)
센서 적용 애플리케이션 IAQ(실내공기질), HVAC(공기조화기술), BMS(건물 관리 시스템), IoT(사물 인터넷)

Sensor Datasheet 치수 도면


제품 구성

  • CozIR-LP3용 PCB(Allsensing 자체 제작 PCB가 있으면 작업이 더욱 수월)
  • Arduino Uno Rev3(5V) 가능, CozIR LP3 Supply Voltages Min:3.25V Max:5.5V)

아두이노 연결 방법 및 예제

1. I2C


2. UART


* Arduino Uno로 I2C와 UART의 코드가 다르므로 제작에 알맞은 코드 사용 권장

CozIR-LP2_Uno_I2C.cpp
//Arduino Uno I2C Rev3 Code
#include <Wire.h>
 
void setup() {
  Wire.begin();
  Serial.begin(9600); 
  Serial.println("-Cozir-LP3 I2C Communication-");      
}
 
int reading = 0;
int reading111 = 0;
 
void loop() {
 // Wire.beginTransmission(0x41);                
 // Wire.write(0x02);                 
 // Wire.endTransmission();       
 Wire.beginTransmission(65); // transmit to device #DEVICE ADDRESS 0x41
 Wire.write(2);              // sends one byte #REGISTER 0x02
 Wire.endTransmission();    // stop transmitting
 
  Wire.requestFrom(65, 2); //슬레이브(1)에 2byte 요청
  while (2<=Wire.available()) {
    reading = Wire.read();  // receive high byte (overwrites previous reading)
    reading = reading << 8;    // shift high byte to be high 8 bits    
    reading |= Wire.read(); // receive low byte as lower 8 bits
 
    Serial.print("CO2 Level (ppm)");
    Serial.println(reading);   // print the reading         
  } 
 // Serial.println();     
  delay(1000);
}

CozIR-LP3_Uno_UART.cpp
//Arduino Uno UART Rev3 Code
#include <SoftwareSerial.h>
 
SoftwareSerial mySerial(12, 13); // RX, TX pins on Ardunio
 
int co2 =0;
double multiplier = 1;// 1 for 2% =20000 PPM, 10 for 20% = 200,000 PPM
uint8_t buffer[25];
uint8_t ind =0;
uint8_t index =0;
 
int fill_buffer();  // function prototypes here
int format_output();
 
void setup() {
  Serial.begin(9600);
  Serial.print("\n\n");
  Serial.println("             AN128 Ardunio to Cozir CO2 Sensor - Demonstration code 11/29/2017\n\n"); 
  mySerial.begin(9600); // Start serial communications with sensor
  //mySerial.println("K 0");  // Set Command mode
  mySerial.println("M 6"); // send Mode for Z and z outputs
  // "Z xxxxx z xxxxx" (CO2 filtered and unfiltered)
 
  mySerial.println("K 1");  // set streaming mode
 
}
 
void loop() {
  fill_buffer();  // function call that reacds CO2 sensor and fills buffer
 
   //Serial.print("Buffer contains: ");
  for(int j=0; j<ind; j++)
  //Serial.print(buffer[j],HEX);
 index = 0;
 format_output();
  Serial.print(" Raw PPM        ");
 
  index = 8;  // In ASCII buffer, filtered value is offset from raw by 8 bytes
  format_output();
  Serial.println(" Filtered PPM\n\n");
}
 
int fill_buffer(void){
 
 
// Fill buffer with sensor ascii data
ind = 0;
while(buffer[ind-1] != 0x0A){  // Read sensor and fill buffer up to 0XA = CR
  if(mySerial.available()){
    buffer[ind] = mySerial.read();
    ind++;
    } 
  }
  // buffer() now filled with sensor ascii data
  // ind contains the number of characters loaded into buffer up to 0xA =  CR
  ind = ind -2; // decrement buffer to exactly match last numerical character
  }
 
 int format_output(void){ // read buffer, extract 6 ASCII chars, convert to PPM and print
   co2 = buffer[15-index]-0x30;
  co2 = co2+((buffer[14-index]-0x30)*10);
  co2 +=(buffer[13-index]-0x30)*100;
  co2 +=(buffer[12-index]-0x30)*1000;
  co2 +=(buffer[11-index]-0x30)*10000;
  Serial.print("\n CO2 = ");
  Serial.print(co2*multiplier,0);
// Serial.print(" PPM,");
//    Serial.print("\n");
  delay(200);
 }

Serial Monitor

1. I2C

2. UART


* 추후에 업데이트 예정

gss/cozir/lp3.txt · 마지막으로 수정됨: 2023/01/17 00:20 저자 Allsensing Co., Ltd