Hi. I'm new to the forum. I'm trying to use the arduino UNO to interface the K33 BG CO2 sensor with a click PLC. Right now I just want to get the CO2 value from the K33 via serial (TTL/UART) not i2C.
Using the great references on this site such as https://www.openhomeautomation.net/wireless-co2-sensor-arduino/ I connected pins 12 and 13 as RX and TX and 5V and Ground from the Arduino to the K33.
I then used the manufacturers arduino script (Jason Berger) and get what appear to be readouts. Indoor Air Quality Products | CO2Meter.com
The temperature and relative humidity look plausible and change with changes in the environment (hot air) but CO2 is static at 32767PPM. The IR LED that actually measures CO2 is flashing.
Any ideas on what is causing this high static reading? My understanding is it should be closer to 300 ppm and it doesn't seem to respond to my breath.
#include "kSeries.h"
kSeries kSensor(12,13);
bool _K33;
void setup()
{
// put your setup code here, to run once:
Serial.begin(9600); //Opens the main serial port to communicate with the computer
//kSensor.chkSensorType();
kSensor.cmdInit();
delay(15000);
}
void loop()
{
double valCO2 = kSensor.getCO2('%');
Serial.print("Co2 ppm = ");
Serial.println(valCO2);
double valTemp = kSensor.getTemp('C');
Serial.print("Temp C = ");
Serial.println(valTemp);
double valRH = kSensor.getRH();
Serial.print("RH % = ");
Serial.println(valRH);
delay(15000);
}
May just be a hardware issue but many of you seemed familiar with this sensor. Fingers crossed.
K30_basic.ino (698 Bytes)