EVAL-CN0429-EBZ resetting sensor values settings after reboot

Hi everyone,

I'm currently using the EVAL.CN0429-EBZ board togheter with EVAL-M355-ARDZ for gas mesurements. I'm using Alphasense SO2-A4, NO2-A43F and NO-A4 sensors and I need to set the correct parameters in order to use them correctly. The problem is that after a power down, shutdown or restart all the sensor values that I set are gone.

When I plug the board, the " DETAILES.TXT " file is showing this info: 

# DAPLink Firmware - see https://mbed.com/daplink
Unique ID: 0600000053454e4500268004006e0046aa21000197969900
HIC ID: 97969900
Auto Reset: 0
Automation allowed: 0
Daplink Mode: Interface
Interface Version: 0242
Bootloader Version: 0242

USB Interfaces: MSD, CDC, HID
Bootloader CRC: 0xb3954be4
Interface CRC: 0x8e62b75b

Is the " Auto Reset " entry the problem in my case? how can I change it?

After that, related to the parameter setting, there is the Alphasense NO2 sensor that has negative sensibility ranges but I cannot insert any negative value in the command line, what can I do? 

Is it there a way to connect the EVAL-CN0429-EBZ connected to the EVAL-M355-ARDZ directly to an arduino and read the data with the I2C? 

Thanks everyone, I really need help as I have strict deadline coming up.



added relevant product number tags
[edited by: elizabeth.uva at 2:40 PM (GMT -4) on 16 Jun 2021]
  • 0
    •  Analog Employees 
    on Jun 16, 2021 5:59 PM

    Hi G-move,

    I'd like to get someone more familiar to the CN0429 to comment exactly on what you are doing, but I'm thinking that in order to have your values setup as default values when you reset/powerdown, you are going to need to modify the firmware.

    There are 2 MCU's used in this system, one on the EVAL-CN0429-EBZ and the second on the EVAL-ADICUP3029.  Each MCU is running different code and they do talk to each other.  I think the EVAL-ADICUP3029 works as the host, to set and read back the registers, so if your configuration setup is via using the serial terminal, than I think you likely need to build and compile a new hex file for the EVAL-ADICUP3029.

    The code you need to look at can be found here (EVAL-ADICUP3029/projects/ADuCM3029_demo_cn0428_cn0429/src at master · analogdevicesinc/EVAL-ADICUP3029 · GitHub) I'm not sure exactly which file is going to contain the values you need to set, but it would be good to start digging in there.

    That project can be directly imported into ADI's CrossCore Embedded Studio, which is free for the ARM devices, and modified, built, and flashed onto the ADICUP3029.

    Cheers,

    Brandon

  • 0
    •  Analog Employees 
    on Jun 16, 2021 8:31 PM

    Hello,

    You would need some non-volatile memory in order for settings to persist after a reset. The CN0429 demo project doesn't use the flash to store configurations. One way to do this would be as Brandon said, to modify the firmware on either the host EVAL-ADICUP3029 or the sensor boards so they will load the correct configurations from the flash after start-up. But if these can be static configurations, I think the easiest way would probably be to program each of the configs into the sensor boards. If you look into the M355_Sensor_Meas.c, you will see that there is a DefaultSensor() near the top. If you program that default for a sensor board to match the values you need for a particular sensor and you connect them together, then the sensor board will have the right configuration every time it powers on. If you haven't programmed the sensor boards before, please see the instructions on the programming with custom firmware wiki: https://wiki.analog.com/resources/eval/user-guides/circuits-from-the-lab/cn0428-cn0429-programming-with-custom-firmware 

    The + or - on the sensor sensitivity just indicates the direction of the current, which depends whether it's an oxidizing gas or a reducing gas. The CN0429 can measure current in either direction so it can accommodate either type, but the sensitivity value is unsigned, so just put the absolute value of the sensitivity in the settings.

    The sensor boards work on an I2C bus, but the command-line interface is implemented on the EVAL-ADICUP3029 which shows up as a Virtual COM port when you plug in the USB. I don't think there's an easy place to insert an Arduino here without needing to write a bunch of extra code. However, it does seem like a Raspberry Pi would be a good option to replace the PC if the requirement is to get something smaller/embedded. There are lots of tutorials online about how to read serial communication over USB with a Raspberry Pi, usually from an Arduino in the examples but in our case it would be the CN0428 instead.

    I hope this helps.

    Best regards,
    Scott

  •  Good morning, thanks a lot for your very precise info, we will try to modifiy the example and program each one of the configs into the sensor boards as we will use for this project the same 3 sensors with the same parameters, i'll keep you updated! 

    M355_Sensor_Meas.c,

    I'm having some trouble finding this code, is it there a link that I can look directly at?

    for the comunication between arduino and the EVAL-ADICUP3029, I was able through the I2C bus into the PMODE connectors all the addresses of the CN0429 boards and the data coming from them not even needing to give them some inputs, so I'll use that! 

    For the + or - I guess that where the gas is oxidizing or reducing it will also change the direction of the values that I will read. So the negative ones will increment becaming bigger negative values (so actually smaller numbers) and the positive ones will go normally higher, right?

    Thanks for all the very usefull info!

    Have a wonderful weekend,

    Gabriele

  • Thank you Il try this with the suggestions made by scott too!

  • 0
    •  Analog Employees 
    on Jun 23, 2021 8:23 PM in reply to G-move

    Hi Gabriele,

    I'm glad the info was helpful to you!

    The sensor board source code link is at the bottom of the wiki page, but also here is a direct link: ftp://ftp.analog.com/pub/MicroConverter/ADuCM355
    It is an FTP link so you may have to open it in a file explorer or from command line now that most browsers stopped supporting opening FTP links in-browser.

    So as I understand it, your solution was to connect the Arduino to the EVAL-ADICUP3029 PMOD connector so that it could read the I2C bus communication like a bus sniffer. That is very interesting. I guess that means you still need to use the EVAL-ADICUP3029 connected to a pc so that you can send commands though. As long as that's okay, it seems like a good solution to get quick results without rewriting code.

    I believe we just reported the ppm as an unsigned value in the software. Although I don't have an NO2 sensor to check. If I am mistaken and it does report a negative value, then you would be correct.

    Cheers,
    Scott