kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
2.89k stars 486 forks source link

Add K-96 multi gas GHG sensor for CH4, CO2, N2O #1196

Open alonrab opened 2 years ago

alonrab commented 2 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Dear Mycodo team, We are developing a new open-source soil greenhouse gas reader for farm application. this will use the newer Sense-air K-96 NDIR sensor or the existing K30 NDIR sensor to record CH4 and CO2 gas flux. This project is part of a USDA NIFA-supported program for open-source farming.

I'm interested in a new feature - adding a K-96 sensor.

Describe the solution you'd like A clear and concise description of what you want to happen.

I need to add the K96 code to the input library.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

This will supplement the K30 sensor option with a newer generation of more precise multi-gas NDIR sensors.

Additional context Add any other context or screenshots about the feature request here.

Sens-air provided the python code they are using to operate the sensor - see attached.

K96_ReadLog_v220516.txt

kizniche commented 2 years ago

It's not immediately clear to me, looking at the code, where the final measurement values are located. I don't have the sensor, so I can't actually run the code. Can you provide some more information?

Are there several values from the response and are those values for every string in name (lines 36 - 39)?

Also, can you link to the product?

alonrab commented 1 year ago

Thanks for looking into this! I finally got the units and will test run them and see how it goes. This is a senseair prototype, so no official website yet

alonrab commented 1 year ago

I got the sensor, now trying to run it. seem like the data is being saved to a folder. It is a UART connection I attached the product install file [K96_Integration (003).pdf](https://github.com/kizniche/Mycodo/files/9292681/K96_Integration.003.pdf)

kizniche commented 1 year ago

Any progress with this? Can I be of any assistance?

alonrab commented 1 year ago

I got the sensor to run with python code, and it works ok. The sensor software saves data as a CSV file, and I would like your help in importing it into the MyCodo database I attached the python code, output file, and explanation of the output file. NaN is no-reading saved. I think that once a air sampler dryer is added, it will give accurate methane readings Many thanks!

On Sun, Nov 6, 2022, 09:49 Kyle Gabriel @.***> wrote:

Any progress with this? Can I be of any assistance?

— Reply to this email directly, view it on GitHub https://github.com/kizniche/Mycodo/issues/1196#issuecomment-1304818232, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDIK3EY4EJ4JBVGD4WACU3WG6ZNFANCNFSM5WPQWJOQ . You are receiving this because you authored the thread.Message ID: @.***>

kizniche commented 1 year ago

You need to use a web browser if you want to add files to a comment.

alonrab commented 1 year ago

got it; attached files

k96 sensor code for pi.txt reader k96 explained.xlsx k96221024_RawData.csv

kizniche commented 1 year ago

This should be relatively easy to create an Input with. I'll see what I can come up with.

kizniche commented 1 year ago

Do you have a link to a product page? I can't find this sensor at all anywhere.

kizniche commented 1 year ago

I just added the K96. You can upgrade to master to test.

alonrab commented 1 year ago

Thank you, I was able to test it today. the new input works. I think it would be good to be able to set several UART sensors simultaneously (i.e., assign different UART ports to pins/ USB)? In my case, I'm running K96 and K30 simultaneously to compare them. I think it looks straightforward to do it on Pi but I would be interested in doing it during the input setup for ease of use for participating farmers that are not familiar with pi coding at all.

kizniche commented 1 year ago

If that's the case, it may be best to provide them with a system that's already set up. Mycodo has become mostly hardware agnostic, as long as a Debian-based OS is installed. Do you have a link where this sensor can be purchased?

alonrab commented 1 year ago

yes, this is the plan; I am making a download ready *img file. The K96 is still in the prototype stage at sensair. I'm hoping it will be available soon, they sell the K30 in the U.S so hopefully, once they are happy with the K96 it will be available too. thanks,

kizniche commented 1 year ago

This issue has been mentioned on Radical DIY Forum. There might be relevant details there:

https://forum.radicaldiy.com/t/mycodo-v8-15-0-release/1362/1