Erriez / ErriezMHZ19B

Erriez MH-Z19B and MH-Z19C CO2 sensor library for Arduino
https://github.com/Erriez/ErriezArduinoLibrariesAndSketches
MIT License
27 stars 4 forks source link

Analog Voltage Output #10

Closed FadhilLuthfi closed 1 year ago

FadhilLuthfi commented 1 year ago

Feature request

Read analog voltage output using pin Vo

Hardware setup

ESP32, Arduino Uno

Is your feature request related to a problem?

I have a project to ensure the output voltage from pin Vo is similar to the output PPM using the UART pin. But I don't have any reliable code to compare these two output.these two outputs

Describe the solution you'd like

In the library, could help me to add the reading of the voltage output from the Vo pin?

Additional context

No response

Checks

Export restrictions.

Erriez commented 1 year ago

@FadhilLuthfi Thanks for using my library. It supports reading the CO2 value only via a software or hardware serial port as is much more stable compared with Vo. For this reason I've no plans to support Vo and recommend to use the UART or another sketch.

FadhilLuthfi commented 1 year ago

Hello what about the temperature, is sensor capable to read temperature?

On Wed, Mar 15, 2023 at 6:26 PM Erriez @.***> wrote:

Closed #10 https://github.com/Erriez/ErriezMHZ19B/issues/10 as completed.

— Reply to this email directly, view it on GitHub https://github.com/Erriez/ErriezMHZ19B/issues/10#event-8754274642, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6PFCYFHQT6OIV2NERGPTTDW4GROZANCNFSM6AAAAAAV3GU2F4 . You are receiving this because you were mentioned.Message ID: @.***>

Erriez commented 1 year ago

Hello what about the temperature, is sensor capable to read temperature?

Both MH-Z19B and MH-Z19C contain a built-in temperature sensor which is used for CO2 compensation calculation. Reading the temperature registers is possible, but not documented and the accuracy of this temperature is very low (not useful, not useful for applications). For this reason, I decided in https://github.com/Erriez/ErriezMHZ19B/issues/1 not supporting the temperature sensor in master, but there is a branch https://github.com/Erriez/ErriezMHZ19B/tree/feature/add-temperature which supports reading temperature for MH-Z19B with function readTemperature().

FadhilLuthfi commented 1 year ago

Hello. Thank fo the answer. I want to ask again, I already installed your lib about temperature but I figure it out that the code for readtemperature is not working. Could you help me with to find the solution? Thank you

[image: 742834f6-b187-4e04-8f1a-8cd2b22deefe.png]

On Sun, Mar 26, 2023 at 3:04 PM Erriez @.***> wrote:

Hello what about the temperature, is sensor capable to read temperature?

Both MH-Z19B and MH-Z19C contain a built-in temperature sensor which is used for CO2 compensation calculation. Reading the temperature registers is possible, but not documented and the accuracy of this temperature is very low (not useful, not useful for applications). For this reason, I decided in #1 https://github.com/Erriez/ErriezMHZ19B/issues/1 not supporting the temperature sensor.

— Reply to this email directly, view it on GitHub https://github.com/Erriez/ErriezMHZ19B/issues/10#issuecomment-1484025778, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6PFCYAS3A3KDHLSJA7AH3LW6ABBHANCNFSM6AAAAAAV3GU2F4 . You are receiving this because you were mentioned.Message ID: @.***>

Erriez commented 1 year ago

The add-temperature branch was tested for MH-Z19B only. I'm not able to help as both official MH-Z19B datasheet and MH-Z19C datasheet does not describe how to read the temperature. So you try to implement a feature which is not officially supported by the manufacture.

FadhilLuthfi commented 1 year ago

Hello, Could you help me with this question? I am researching the characteristics of CO2 through MHZ19B for my thesis. Do you know what kind of electricity characteristics that affected by CO2 concentration change?

Noted: Electricity Characteristics: Could be voltage, current, capacitance or etc

On Sun, Mar 26, 2023 at 8:06 PM Fadhil M Luthfi @.***> wrote:

Mine is MHZ19B. But why the code is not work?

On Sun, Mar 26, 2023, 7:36 PM Erriez @.***> wrote:

The add-temperature https://github.com/Erriez/ErriezMHZ19B/tree/feature/add-temperature branch was tested for MH-Z19B only. I'm not able to help as the official MH-Z19C datasheet https://github.com/Erriez/ErriezMHZ19B/blob/master/extras/mh-z19c-co2-ver1_21.pdf does not describe how to read the temperature.

— Reply to this email directly, view it on GitHub https://github.com/Erriez/ErriezMHZ19B/issues/10#issuecomment-1484084105, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6PFCYGFKDNGN4UZHFXDHMTW6BA7HANCNFSM6AAAAAAV3GU2F4 . You are receiving this because you were mentioned.Message ID: @.***>

Erriez commented 1 year ago

Sorry, I cannot help answering your questions. Success with your thesis.