NXP Rapid IoT experiencing CO2 and TVOC sensors drift

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

NXP Rapid IoT experiencing CO2 and TVOC sensors drift

4,531 次查看
vlasov01
Contributor III

Hi,

I've connected my NXP Rapid IoT to the with Raspberry Pi 3B+ using bluetoothctl and Python bluepy library. I can connect and read sensor data. The code I'm using for the device is available at my-air/My Air.atmo at master · vlasov01/my-air · GitHub 

But I believe my NXP Rapid IoT experiencing CO2 and TVOC sensors drift. The CO2 and TVOC values are staying very high without any relation to real environment conditions. And these values are not going down. The only way to deal with it is to reset the device. It typically happens after significant temperature changes or after significant changes in CO2 or TVOC values.

Are there any way to deal with this condition?

Are there an option to reset the device remotely using BLE commands?

Regards,

Sergey

标记 (1)
10 回复数

4,235 次查看
frq05186
NXP Employee
NXP Employee

:smileyplain:

It is strange that you have to reset the complete kit for that - On our end we did not observe a major drift with time (and heating), but we will support you on triggering a reset over BLE.

0 项奖励
回复

4,236 次查看
vlasov01
Contributor III

Yes, I prefer not to reset the device and just reset the specific sensor CCS811 if possible. But so far I was not able to find how to do it.

0 项奖励
回复

4,236 次查看
frq05186
NXP Employee
NXP Employee

Hi Sergei,

Metrology is in itself a discipline - so making precise measurements is quite difficult. Even temperature measurement looks easy at first sight, but preceise temperature measure is quite difficult to achieve.

I advise you to carefully look at CCS811 datasheet and app notes - This is not a NXP component so you might find better support on AMS site:

https://ams.com/ccs811#tab/documents

Several remarks to help you:

- From the CCS811 datasheet:

pastedImage_1.png

- Also same datasheet:

pastedImage_2.png

- There are also comments on the time ON for measurement. In our demo project, we are turning the CCS811 off as much as possible as it is consuming quite some current (We run in mode 2)

pastedImage_3.png

- Do note that the Rapid Iot kit itself need some time for temperature stabilisation. The µcontrollers are heating air inside the casing - you can see that the temperature reported stabilizes after several minutes. This is why we added a temperature compensation variable in the temperature element in Rapid IoT Studio

"Are there an option to reset the device remotely using BLE commands?"

Sure it is feasible, but you will have to develop your code for that.

4,236 次查看
vlasov01
Contributor III

Hi Eric,

Thank you a lot for the reply!

Do you know if it is feasible to manage (compensation, conditioning) CCS811 from Rapid IoT Studio or I need to use a separate set of tools?

Are there a code examples for remote Rapid IoT management (reset)?

Regards,

Sergey Vlasov

0 项奖励
回复

4,236 次查看
frq05186
NXP Employee
NXP Employee

Hi Sergey,

You have a couple of options depending on your skills but the CCS811 element in the Studio does not offer the possibility to adjust readings.

- Option 1: you can add a function element and do mathematical processing. There is an example called Embedded Mathematical Operation Demo in the demo project

pastedImage_1.png

- Option 2: you can modify the code in RApid IoT Studio:

pastedImage_4.png

- Option 3: you can export your code into MCUXpresso and write C code there

About your second question:

Are there a code examples for remote Rapid IoT management (reset)?

I am not fully clear what you are looking for. You want to trigger a Rapid IoT Reset over BLE for example ?

We shall have this implemented already as you could flash a program over the air (OTA) via the mobile phone app, which requires a reset. 

I just need some time (today or next monday) to retrieve the associated code

0 项奖励
回复

4,236 次查看
vlasov01
Contributor III

Hi Eric,

Thank you for the reply!

I was looking to send temperature and humidity values to CCS811 as per CCS811 datasheet you've provided to compensate gas readings using Rapid IoT Studio.

My interest in remote resetting of the device over BLE connection is a workaround to deal with CCS811 sensor reading drift. Sometimes this drift is so big that the only way I found to deal with it is a manual reset of the devise. So its gas readings get stabilized after it.

Regards,

Sergey Vlasov

0 项奖励
回复

4,236 次查看
frq05186
NXP Employee
NXP Employee

Hi,

REtrieved where the SW reset is managed - Look for following code (reser_mcu) and pull the thread if you want to go down into details

pastedImage_1.png

0 项奖励
回复

4,236 次查看
vlasov01
Contributor III

Thank you! Is it possible to call NVIC_SystemReset() from the code in Rapid IoT Studio?

0 项奖励
回复

4,235 次查看
frq05186
NXP Employee
NXP Employee

Yes sure, see below:

pastedImage_1.png

Just call the function in the callback.

In my example, a reset will be triggered each time the down button is touched.

Eric

4,235 次查看
vlasov01
Contributor III

Thank you!

0 项奖励
回复