Connection recommendations / New CO2 Sensor?
Hi again Kyle, and everyone
I am finding a barrier to my usage of mycodo to be simply an easy way of connecting the sensors in a way that seems secure and reliable and easy to do. I've bought a tool to manually crimp on the 2.54 MM pins that fit in a breadboard, but it ends up being too much trouble to quickly add sensors this way.
Curious if anyone has used these 'grove' connectors. Pretty large variety of low-cost sensors, and ready to go 'hats' with multiple ports.
Also, I was impressed with the Sensirion Smart Gadget, and the Sensor Push wireless sensor tags which use sensirion SHT2X,
this Sensirion SCD30 might be worth a look:
Thank you again Kyle for your amazing work!
I've heard a lot of positive reviews of Grove products. They're simple, quick, and secure. I've never used them myself, though I'm not opposed for any reason. But I believe their connector is proprietary, so you can only get it from them.
Sparkfun makes a system similar to Grove, called Qwiic, which uses a 4-pin JST. I haven't used these, but they appear sturdy and nice for prototyping and production. The connector is JST, so you can source the parts cheap and make your own cables.
I've also used those Dupont connectors (male/female used on jumper wires) that need to be crimped. They seem to work fine for development, but for a production environment, I'd be more confident with something more secure like a socket/plug type connection. The JST connectors work fine, and I've used these in a few products I developed, but I found if the wires aren't crimped perfectly and tightly, they can pull out of the connector. Definitely not good for a customer to experience! For some, I soldered after crimping to ensure they stayed, and even then I had to make sure I always pulled on the connector and not the wires when trying to disconnect it.
I have so little time to research these things, so it is a bit of a bummer to see that they are proprietary.
I suppose there's probably lots of rj45 / phone connector type of rpi shields out there to make generic connections, and i've never used them but assume a crimp tool can easily attach the connectors to all sorts of wires.
with grove, i don't know if their shields need some drivers for mycodo to recognize the connections vs connecting sensors directly to pins, but it's a cheap enough system to experiment with either way.
Kyle, of the currently supported co2 sensors, is there a clear cut 'best' one in terms of accuracy? I just want to use the best sensor I can get that's ready off the shelf for mycodo.
Being proprietary doesn't mean it's bad. They're a reputable company, so you probably don't have to worry about them going out of business and not being able to find connectors/sensors if you start investing in their system. I just wanted to give you another option. I'm not even sure if there are any CO2 Qwiic sensors.
The SCD30 looks like a great sensor. We can probably interface it easy into Mycodo, as I'm sure they have a Python library for it. As far as accuracy, you'll have to look at the specs and see if it works for your application, but for the most part, NDIR CO2 sensors will be pretty accurate. If you want a CO2 sensor that's half the cost of the SCD30, I'd look into using the MH-Z19 ( https://www.amazon.com/Bestol-module-MH-Z19-infrared-monitor/dp/B07FZJVQYC ) with a UART to USB adapter ( https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 ), so you can plug it directly into the Raspberry Pi's USB port and use it with Mycodo. This will require some crimping or soldering of wires to make a connection between the two devices, but it's a great combo that makes it easy to experiment with, as all it needs is to be connected to the Pi's USB.
There's also the K30 CO2 sensor, but this is a little more involved to connect it and to set up the software to read it. Although it's a quality sensor, it's expensive and finicky, so I would suggest this one last.
I too would suggest the MH-Z19 for most uses. I recently used the automatic-base-calibration built in to Mycodo and found it worked quite well. I sell a pre-built version of what Kyle suggests on Tindie - but I would be happy to help if you want to build yourself from components. I use mini-screw blocks on the CP2102 adapter to avoid exactly the concerns expressed above. Tin the leads with solder ( to prevent strays and fraying ) or solder directly to the usb adapter for reliability.
Connectors are a thing - and most have one issue or many. Grove is pretty good and inexpensive. Relatively reliable for 30-50 plug/remove cycles and vibration resistant. But there are some slightly incompatible connectors that look almost the same - the truth is the Grove design specifically is proprietary ( I think Seeed owns the IP ) for exact fit. YMMV. I have used grove quite a bit and have lots (too much) backstock.
These days I favor Qwiic because it is actually standardized ( has to be! ) and the interconnect wires are scaled more properly to the loading. You simply don't need 22ga wire for I2C.
The MH-Z19 is good for general purpose - but should be calibrated every so often. 60 days seems reasonable to me.
For long term stability and fast response for a control system - I prefer the MH-z16 probe. It is more expensive, uses more power, etc however I have field tested that model for over 3 years and I'm still quite happy with the results. I have found there is still some need for ABC, but it is much less than the MH-z19.
NDIR sensors are pretty much the same except for the chamber design. I think the overall difference is in the size of the chamber which probably has some effect on the S/N ratio. I would say that NDIR is better than the calculated CO2 (CCS811) devices.
Thank you for that insight!
I’m having trouble imagining most of these in a 70-95% RH environment for any amount of time, and will need either a long usb or longer cables to go from the pi to the sensor (~50ft).
Co2meter.com sells an off the shelf controller I could use to exhaust above 800 ppm co2, but it’s $250 and dumb in the sense that I can’t remotely adjust it or benefit from seeing the data it collects. I presume any co2 meter will need calibrating, and my understanding is that they take quite some time to get good readings on changes.
I’ll look into that mh-16z and the sensirion I mentioned, maybe I can finally contribute some help with supporting it!
i love the screw terminal idea. Seems easy to replace sensors etc that way without too much fuss
You will typically want your sensors close to your Pi if they're directly wired, but I've been able to successfully operate sensors at distances of 100 to 400 ft, depending on the sensor and interface, but this is neither typical nor recommended. USB would likely need to be much shorter. Any long distances and you're probably going to want to go wireless. There are some pretty cheap LoRa transceivers that you could build a simple receiver for the Pi and multiple transmitters (nodes), or a single node that acquires and sends data from multiple sensors, that periodically send measurements from wherever they need to be in/near your measuring environment.
As for humidity, I haven't noticed high humidity affecting the NDIR CO2 sensors too much, but I also don't have a lot of water particles in my airspace and I also sample my air from my chamber with a pump and tubing with an in-line water trap.
Duly noted, I suppose that’s the beauty of the pi, just buying another to be the co2 sensor/ controller, and it only marginally adds to the cost, although then I have another web server to login to.
If There’s a particular resource with info about LoRa systems, I’ll check it out, probably just googling will work. With your air sampling, did you write a script to sample the air that you feed into Mycodo? I’ve heard that’s the proper way to take measurements in general, I’ll have to google it too.
Mycodo has an API, so you could have one Pi acquiring CO2 measurements, then have your main Pi use the API to pull measurements and add them to your main Pi's database. There's also an MQTT Input so you could just have your CO2 sensor Pi have Mycodo push the sensor measurement to the MQTT server on your main Pi and your main Pi's Mycodo would get that measurement from its subscription to the MQTT server. There are quite a few ways to accomplish what you want if you wanted to use a Pi rather than building a node with a microcontroller.
For the air sampling, Mycodo has a built in option for every Input to be able to link it to an output so the output will be active while the measurement is being acquired (with a pre-measurement duration able to be set that will run the output for that length of time prior to acquiring the measurement). For the CO2 sensor, I use the pump as the output and set it to 30 seconds. This runs the pump for 30 seconds, acquires the measurement, then turns the pump off.
There are a lot of LoRa devices. If you check out my Remote Radiation Monitoring project and the comment section, I discuss a few LoRa boards I've used. That should help with looking up some good hardware.