ZMOD4510 read adc result always zeros

Goodmorning, 

i'm facing a problem trying to integrate the last version of the ZMOD4510 library (release date May 31, 2024) into a custom firmware running on a STM32 microcontroller. In particular, I noticed that calling the function zmod4xxx_read_adc_result put in the array adc_result[ZMOD4510_ADC_DATA_LEN] all zeros (following the variable name of the examples). I control many times and i followed all the initialization function provided by the library. No other problem (like I2C communication problem) are raised. Running the function  calc_no2_o3 in time, it raises NO2_O3_DAMAGE error after a while. The returned rmox value are all 100 ohm and the output of the air quality index are all 0. I see that there is another thread on this forum reporting the same problem on a arduino interface. For debug purposes, I report a screenshot of the zmod4xxx_dev_t struct values:

All fields seem to be valued, unless the mox_er and mox_lr that are always equal to 0.

To test the correctness of the I2C operation I've also tried to read the tracking number and I've seen that the received buffer it's correcty valued.

Someone knows how it could be the problem?

Thank you.

Best,

Matteo

  • Hello Matteo,

    Thanks for reaching out Renesas Engineering Community.

    If I remember correct from your previous post you are using the NO2 and O3 algorithm library. Is that correct?

    1.Which target MCU you are using and which files with the precompiled libraries  from which folder of Arm-Cortex M libs?

    2. For how long is the sensor powered on in the tests you made? Is it possible to provide us  some log files to check how many samples have you measured?

    Regarding the damage error you are getting: Are you maybe wiring the sensor to your MCU board and probably something happened with the sensor and the cables were disconnected so that a power on reset occurred to the sensor and the algorithm is reporting this message?

    Are you sure that this did not happen?

    Please let me inform you that depending the Mode you are using there is a stabilization time necessary that the sensor needs to be powered on from the first time you power it on. And as mentioned in the datasheet for ZMO4510 and NO3 O3 version library:

    The sensor must take  at least 50 samples and the interval between each measurement is 6 sec so the necessary time that the sensor needs to stabilize and calculate the baseline RMOx resistor is at least  5 minutes and of course all the set up and the wiring must be OK.

    Something else I would like to point out also is that in your code you should follow this sequence of steps exactly:

    Are you following these steps?

    Generally for our MOX sensor we suggest the customer to have the sensors powered on and working for at least 48 hours, a warm-up of 48 hours is necessary so that the sensor will report accurate results. Since for as long as the sensor is powered on the most accurate measurements it gives.

    Hope these info will help.

    Best Regards,

    IK

  • Goodmornig,

    I'm using the evaluation kit provided by Renesas to test the sensor, connecting the VEXT to a DC power analyzer (to see the current consumption and provide the required power supply) and connect the SDA and SCL to the microcontroller. Of course, the GND is in common between the devices. I don't think it can be a reset or something related to the wire becasue otherwise I would have seen a communication error. What I see it's that the power consumption is always below 2 mA. Shouldn't be an higher value during measurements? 

    These are the function provided by your firmware package that i'm using (in order):

    - zmod4xxx_init

    - zmod4xxx_read_sensor_info

    - zmod4xxx_prepare_sensor

    - init_no2_o3

    - zmod4xxx_start_measurement

     - wait 6 second

    - zmod4xxx_read_status

    - zmod4xxx_read_adc_result (and here i watch alway zeros)

    - zmod4xxx_check_error_event

    - calc_no2_o3 (and here a NO2_O3_DAMAGE error occurred after a while)

    - repeat from zmod4xxx_start_measurement

    I can't understand if i'm missing something but it seems like no measurement is starting.

    These are some logs of the measurements: 

    11:55:14:082 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:55:20:078 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:55:26:076 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:55:32:072 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:55:38:069 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:55:44:066 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:55:50:063 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:55:56:058 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:56:02:055 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:56:08:052 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:56:14:048 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:56:20:045 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:56:26:041 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:56:32:037 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:56:38:033 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:56:44:028 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:56:50:024 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:56:56:020 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:57:02:015 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:57:08:011 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:57:14:008 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:57:20:003 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:57:26:001 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:57:31:996 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:57:37:992 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:57:43:989 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:57:50:002 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:57:55:998 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:58:01:980 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:58:08:011 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:58:13:975 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:58:19:971 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:58:25:967 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:58:31:963 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:58:37:960 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:58:43:957 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:58:49:953 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:58:55:949 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:59:01:945 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:59:07:942 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:59:13:938 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:59:19:935 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:59:25:931 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:59:31:926 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:59:37:922 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:59:43:919 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:59:49:913 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    11:59:55:909 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    12:00:01:905 -> ZMOD4510,-56.346,0,0,0.000,0.000,100.000,100.000,100.000,100.000,1
    12:00:08:021 -> [Sensor_Utils_Get_Measurements] Error getting sensor measurements of the sensor ZMOD4510

    where each raw is in the format: 

    ZMOD4510,temperature, aqi_epa, aqi_fast, no2_ppb, o3_ppb,R0,R1,R2,R3,stabilization_status. As a temperature for now i set to -300°C as shown in the example provided to use internal temperature sensor (but I try also with other value and the temperature is correctly set).

    Thanks.

    Best regards,

    Matteo Verzeroli

  • Hello Matteo,

    According the datasheet here is the average current for NO2 O3 operation. As you can see it is also depended from the supply voltage provided to the sensor.

    What is the supply voltage you provide to the sensor?

    Also which SW are you using to test the NO2 O3 operation with the EVK?

    Can you please specify?

    Best Regards,

    IK