Ideas on how to add additional sensors?

I’m currently controlling environmental conditions in a mushroom fruiting room. I’m using a HTU21D-F Altas Scientific temp/RH sensor and a MH-Z19B CO2 sensor as my sole inputs, and using a KASA smart strip for my outputs.
I’d like to control more rooms in a similar manner, with the same pi 3b+.
I’m learning more about this everyday, but I’m still pretty new. From what I understand, I can’t add any more of the MH-Z19B sensors because they communicate on the pi’s serial port on the GPIO pins (Tx, Rx). I should be able to add up to 64 i2c sensors from what I have gleaned. Is there a way to use more than one of the MH-Z19B sensors? If not, I may consider switching to Sensirion SCD30 temp/RH/CO2 sensor. Do you know how many of those sensors I can add and have controlled by one pi? Will they have differing i2c addresses, or do I have to address them differently myself? Will I be running into power issues as I add more sensors? I’m certainly willing to do the reading and calculations myself, I’m just not sure where to start.
Please and thanks!

1 Like

You can add multiple MH-Z19B sensors. Using UART to USB converters allows you to plug each sensor in via USB. Each sensor will be assigned a device (e.g. /dev/ttyUSB0, USB1, etc.).

The SCD-30 is a nice sensor, and only has 1 I2C address, but you can connect multiple sensors with an I2C multiplexer, which allows you to create multiple I2C busses (and setting the correct bus in each of your Input settings).

For long wire lengths using I2C, you will likely want to use an I2C extender, like the LTC4311.

1 Like

I’m running unshielded 50’ lengths of wire from my pi to my sensors. Haven’t had any trouble yet, but what should i be on the lookout for?
I’ll definitely look into i2c extenders in the future as i expand. Thanks a million for the help and inspiration

1 Like

50 feet is quite a length on I2C to not be experiencing any issues. About 10 feet is typically what is mentioned as the limit, but with increased shielding, and other characteristics, that distance can be increased. Typical symptoms include communication errors that prevent measurements from being acquired. Some I2C devices are more sensitive than others. It can also depend whether you are using 3.3 volts or 5 volts, since long wire lengths increase voltage drop (but this isn’t the main reason for the signal degradation, see the LTC4311 link for an explanation on that).