Change default DR on Cubecell Capsule and problem with Air Quality Sensor

Dear heltec,
we have bought 100 of your CubeCell Capsule Solar Sensor with Air Quality sensor CCS811B

I have two questions:

  1. How can I change the default datarate used to TX Join request and uplinks from boot-up? I’ve tried to change it on LoRaWan_APP.cpp but device always use SF7

  2. The data sent by the sensor CCS811B are always the same: CO2 400 ppm and TVOC = 0 ppb. Where can I find a working arduino sketch?

Thank you

if the ccs811 is loosing power it will reset its calibration so it will allways start with the default values for clean air.
you can have a look at the multisensor example from us.
here we write the calibration data of the ccs811 to flash before power safe mode and read them back after wakeup

The sensor ccs811 is a treasure trove for co2. In my opinion, it is not useful for halfway solid measurements.

E_T

hi,

We encountered this problem in our previous test.

ccs811b is mainly used to detect air quality.

In normal air environment, CO2 < 400ppm, TVOC< 0 ppb.This sensor starts measuring with CO2>= 400ppm, TVOC>= 0 ppb. So you can’t see the data changes.

We recommend that you keep blowing on the sensor(Human breath contains a lot of CO2 and volatile organic matter). Then you can see the data changed.

Please refer the pciture.

He don’t want to use ADR!

Set a fix SF withot ADR!

E_T

RE: data rate part of this
I do not believe you can change the data rate used for the initial join request. For US915 the runtime cycles between DR0 and DR3 ( I believe its DR3), between highest vs lowest power to try to get that initial connection.
I believe from there it uses the default data rate as set in

libraries/LoRa/src/LoRaWan_App.cpp, 
int8_t defaultDrForNoAdr = 

You can set the subsequent data rate in your device app via:

void LoRaWanClass::setDataRateForNoADR(int8_t dataRate)

I do not recall if this can be done before the join accept or if it must be done after the join accept.

If you want to use this setDataRate API you must pull from the github repo. The default images pulled via the Arduino or Platformio installs do not contain this change.

Dear all,
regarding my first question I’ve solved by changing the …\Arduino15\packages\CubeCell\hardware\CubeCell\0.0.5\cores\asr650x\loramac\mac\region\RegionEU868.c like this:

int8_t RegionEU868AlternateDr( AlternateDrParams_t* alternateDr )
{
  int8_t datarate = 0;

  if( ( alternateDr->NbTrials % 48 ) == 0 )
  {
    datarate = DR_0;
  }
else if( ( alternateDr->NbTrials % 32 ) == 0 )
  {
    datarate = DR_1;
  }
else if( ( alternateDr->NbTrials % 24 ) == 0 )
  {
    datarate = DR_2;
  }
else if( ( alternateDr->NbTrials % 16 ) == 0 )
  {
    datarate = DR_3;
  }
else if( ( alternateDr->NbTrials % 8 ) == 0 )
  {
    datarate = DR_4;
  }
  else
    {
      datarate = DR_0;
    }
  return datarate;
}

Regarding the second question unfortunately the CO2 changes only when the sensor is very near to the CO2 source and it isn’t the scenario of a typical indoor air quality sensor, what a pity…

Thank you to all

Maybe someone have tried to do an average of multiple values or have add a FAN to achieve more CO2 as possible?

Thank you

hi,

you can try mode4:
%E5%9B%BE%E7%89%87