I am using k30 co2 sensor to connect with my Arduino UNO. However, it generates wrong output (e.g. -203ppm).
As you can see from the graph in the attachment (image.jpeg), I connect the K30 exactly the same as the document. I tried to use multi-meter to test whether there is any electricity moving around and it seems that it's the case. (image (2).jpeg). (5.38V) detected from the sensor's power.
Do you guys have any similar experience? Please drop me a line if you can kindly shed me some light.
All I want to say is that I can't figure out what's the problem as I can detect electricity from the sensor power, Tx and Rx. The code is as follows:
/*
Reports values from a K-series sensor back to the computer
written by Jason Berger
Co2Meter.com
*/
#include "kSeries.h" //include kSeries Library
kSeries K_30(12,13); //Initialize a kSeries Sensor with pin 12 as Rx and 13 as Tx
void setup()
{
Serial.begin(9600); //start a serial port to communicate with the computer
Serial.println(" AN-216 Example 2: uses the kSeries.h library");
}
void loop()
{
double co2 = K_30.getCO2('p'); //returns co2 value in ppm ('p') or percent ('%')
Serial.print("Co2 ppm = ");
Serial.println(co2); //print value
delay(1500); //wait 1.5 seconds
}
Or the electricity detection is not enough to prove that the sensor's hardware is working? I see nothing wrong no matter the connection between the sensor and the board, or the code itself.
Be careful with the supply voltage as the signals from the sensor may be too high for the Arduino. Hopefully, the sensor has an onboard regulator for 5V. Measure the voltage on the sensor TX and RX pins when it's powered but not connected to the Arduino. It should be close to 5V.
If you use PC USB to power Arduino his regulator doesn't give enough current to start properly these CO2 sensors.
It happened to me with a similar sensor.
If you use the Power Jack or a Power Bank on USB it works.
I met the same trouble with you. But unfortunately though I used 9V voltage the value is still -203ppm. And the output voltage between RX and TX is 0.003V, which is quite small compared to 5V which mentioned bu Eddie. Does that mean this sensor has broken down?
Have you checked the voltage coming in and out of the sensor? There will be LED flashing around the sensor's edge if it's connected from the power source.