K30 Co2 sensor outputs wrong data

Hi everyone.

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.


Your images do not correspond to what you have written. Do you perhaps, have fluorescent lights near your breadboard?


Hi Paul,

I don’t have the fluorescent 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
#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.


Check your soldering work on the sensor's four wires and also further down the edge of the board. You may have two pins shorted together.

Your wiring at the Uno does not look correct based on your photo and the document link.

Hi Eddie,

I have re-soldered them but still no luck.

Meanwhile, I have also checked the wiring between sensor and Uno and it is correct as well.

So, do you think it's related to the power? It's interesting that they recommend the power should be between 6-9V, as specified from this document - http://www.co2meters.com/Documentation/AppNotes/AN126-K3x-sensor-arduino-uart.pdf

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.

Hi Eddie,

I got it working by providing 9V electricity to it. I guess it requires at least 6V rather than 5V.

Cheers, AC

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.

Hi zoomx,

Your information is really useful and I will definitely try it because the battery pack is too bulky.

Cheers, AC

Hi angelochu,

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.

Thanks for your reply!

I measured the input voltage and it was 8.3V. I did see the light one sensor flashes roughly every 2 seconds.

I saw this documents, which lists 5 reasons. http://www.co2meters.com/Documentation/AppNotes/AN144-K30-Sensor-Lockup-Arduino.pdf

I have changed the delay time to 7s but the value is still -203.

Do you remember the output voltage on your sensor when it was working?

Many thanks


I remembered the voltage is around 4 point something.

Please try to connect your sensor data in out to different pin (e.g. Digital pin 8,9) and see how it goes.

P.S. Change your code accordingly for the digital pin setting.

First time I powered only the sensor and used an USB-serial adapter. I checked it using a PC and a terminal program.

Then I used Arduino. My problem was low power, the sensor still works but reboots forever.

These sensors require some peaks in power during measurement. Maybe a little capacitor can help as the capacitor used in NRF24L01 modules.