Recently we had a customer contact us regarding opening a serial connection via Python to our CM-0039 CO2 Probe. The Probe is a ruggedized enclosure for our SenseAir CO2 sensors that allow USB tethered, real-time reading of CO2 levels from a PC.
While we don’t have any pre-written Python code to talk to the Probe, with a bit of work, the customer should be able to do it on his own. The same is true for any programming language that will let you communicate with a serial device.
The first thing to do is to verify that the hardware is working correctly by installing our Gaslab software. If the Probe can output CO2 levels in real-time using GasLab, the next step would be to get started writing Python code.
If the Probe does not work using Gaslab, there are 2 things to check:
- Is the sensor blinking? If not, there may be a problem with a bad USB port or not enough voltage from the port to power the sensor. Solutions include unplugging other USB devices or using a powered USB hub.
- Was the Probe plugged in before GasLab was installed? If the Probe is plugged in first, Windows will install a generic USB driver instead of the FTDI driver required to talk to it. The FTDI driver is an industry-standard virtual COM port driver that emulates a standard PC serial port via the USB connection. To install the FTDI driver, you have to manually remove the generic driver, install Gaslab, and then plug the Probe back in so that the FTDI driver is automatically installed.
Once Gaslab is installed and working properly, you will be able to see the ASCII communication in real-time from the Probe using the stream view function. The only thing remaining is to access the stream using your chosen programming language.
Since the CM-0039 Probe uses SenseAir’s K-30 sensor, it may help to review our application notes and articles regarding communicating with the K-30. The 30% Probe uses a SenseAir K-33 sensor, while the 100% CO2 Probe uses the COZIR GC-0016 Wide Range CO2 sensor.