Recommendation for CO2 sensor

I will need to order a co2 sensor soon. I see there are plenty of compatible models in Mycodo?
Which one did you choose? Which ones can you recommend?

Hey, for what application?
I am using the SCD 30 that gets recommended really often. You could use the MHZ 19 B aswell, its half the price.

I use an SCD41. A little expensive but it’s very good.

Thanks for the advise!

If size doesn’t matter, i would go with the SCD30, almost same price.

I was able to get the scd41 and connected it today.
Unfortunately it doesn’t collect any measurements. I double checked the wiring.

Is there any way to check what’s wrong?

Diagnostics always starts with the logs

Here is the recent log:

Last 30 lines of /var/log/mycodo/mycodo.log:

2024-01-29 06:51:16,152 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:51:31,196 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:51:46,164 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:51:46,165 - ERROR - mycodo.controllers.controller_input_d06a1a03 - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.
2024-01-29 06:52:01,196 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:52:16,301 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:52:31,182 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:52:31,182 - ERROR - mycodo.controllers.controller_input_d06a1a03 - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.
2024-01-29 06:52:46,226 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:53:01,159 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:53:16,201 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:53:16,203 - ERROR - mycodo.controllers.controller_input_d06a1a03 - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.
2024-01-29 06:53:31,239 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:53:46,177 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:54:01,205 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:54:01,205 - ERROR - mycodo.controllers.controller_input_d06a1a03 - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.
2024-01-29 06:54:16,144 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:54:31,188 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:54:46,224 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:54:46,225 - ERROR - mycodo.controllers.controller_input_d06a1a03 - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.
2024-01-29 06:55:01,164 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:55:16,211 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:55:31,191 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:55:31,191 - ERROR - mycodo.controllers.controller_input_d06a1a03 - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.
2024-01-29 06:55:46,236 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:56:01,174 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:56:16,214 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:56:16,214 - ERROR - mycodo.controllers.controller_input_d06a1a03 - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.
2024-01-29 06:56:31,165 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data
2024-01-29 06:56:46,202 - ERROR - mycodo.inputs.scd4x_circuitpython_d06a1a03 - InputModule raised an exception when taking a reading: CRC check failed while reading data

type or paste code here

Is your sensor detected? You can use i2c-detect to view your i2c bus device trees.

Something is detected but not sure id the scd41 is among them:

That is not normal. You ether have 127 devices connected, all with a different address, or one device connected improperly and causing a short that’s resulting in it appearing as though the entire device tree is filled with devices.

I now have removed all wires from the Pi and ran the i2cdetect again with the same results.

  1. Is i2c enabled from raspi-config?
  2. Do you get the same result from “i2cdetect -y 1”?
  1. Yes, it is enabled
  2. Yes, same result.

There’s something wrong with either your operating system or hardware. Your device tree is indicating all addresses are in use. I would reinstall Raspberry Pi OS and see if a fresh install of the operating system, enabling I2C, and rebooting yields the same result.

I have reinstalled Pi OS and then Mycodo.
I have removed all wiring and now I got only the SDC41 and the DS18B20 connected.

i2cdetect shows that there is no device connected. I have restarted the system. I have rebooted the Pi from terminal and then have also restarted it by disconnected the power.
The SCD won’t show up.

The one-wire DS18B20 worked right away.

asdfw2

To see whether the I2C bus actually works I connected the IO expander board and it worked right away. It’s address - 20 - also registered correctly in the device tree.
I reckon something is wrong with the SDC41. I will try to resolder the pins.

Can you provide a link to the product you’re using?

This one:

It’s difficult to tell from the picture from the link (below), and you would need to measure to verify, but it looks like that board has pull-up resistors in place on the SDA and SCL lines. If that’s the case, you should not be connecting this board to 5 volts, since this would expose your SDA and SCL to 5 volts when the max they’re rated for is 3.3 volts. Your Pi already has pull-up resistors in place to 3.3 volts. Good breakout board manufacturers do not include pull-up resistors and allow the user to make the decision to include pull-ups or not, since this misunderstanding can cause hardware damage.

In your photo, I can see you have your I2C power connected to 5 volts, not 3.3 volts. This may be causing your issue.