Concerning Sensors for this system and “too many readings”:
We need to decide how this is done, becase they are a lot of sensors and we need to decide which ones are to be sent and not, so anything from these lines will be ignored in the platform unless the sensors are there. I suggest going with Wind Speed, direction, one or two of rain and that’s it. The reason for this is the json package size.
OK: I have gone through the [sensors] block in the Blueprint file.
Firstly I have no idea what target I am chasing. How much is too much ? How many are OK ?
I can (now I have done so) reduce the number by a few, but in fact I actually need to see the data for some of the sensors to make a decision.
For example: CS811 measures eCO2 and tVOC; but the sensor appears to be dysfunctional; slow, and others have complained about it on this forum.
ENS160 represents one of the may alternatives. I found it when enquiring with ScoSense about which Gases are measured by CCS811. They cannot tell me (they bought the product from someone else, but they offered me the ENS160/EBS210 to try out as an alternative. And thats what I intend to do. Basically put the readings from CCS811 and ENS160 alongside one another; see if they correlate. If they do, then ditch the CCS811 because its unreliable to start up. ENS160 I have already discovered was easy to implement and worked the first time I tried it. That means its more likely CCS811 will go than the ENS160. If you press me then I will eliminate CCS811, not ENS160.
Concerning Rain: Yes: the device puts out several Rain Interval Readings; of which I think that only rain interval (immediate time window) and Rain Per Interval (rain rate over the last hour) are useful. So, I have eliminated the 3 other measures for now. They will still be collected, just not sent to the platform.
Concerning INA: The reason for including it in this system is because the system will run on battery (it is now); and the amount of current drawn determines battery life, its an easy calculation. Its easier for me to display on the platform; but I can get the amount of current drain by checking using the UI.
Concerning PM readings. There are two devices generating 3 readings each that are sent to the host and there I am not certain what happens. What I think should happen is that the two sets should be averaged. What I think is happening is that the ‘min’ value is being picked:
"EXT_PM_1_CLEAN": {
"desc": "PM1 calculated based on both PMS5003 PM1 inputs",
"kwargs": {
"factor": 0.3,
"limits": [
0,
1000
],
"names": [
"EXT_PM_A_1",
"EXT_PM_B_1"
],
"pick": "min",
"window_size": 5,
"window_type": null
},
"process": "merge_ts",
"units": "ug/m3",
"post": true,
"id": 89
},
If so then I think it needs to change. Not sure how to accomplish it; but it is possible to do this on the device itself fairly easily; then send only one set of readings through; eliminating a further 3 readings. If done on the device; then only ‘clean’ post processing is needed.
Concerning Gas Sensor Readings:
I have made some changes to the blueprint file and included a linkage from the [metrics] section to the [sensors section] like this:
"CO_WE": {
"desc": "CO working electrode raw value",
"id": "X001",
"kwargs": {
"channel": "ADC_4A_0"
},
"post": false,
"process": "channel_names",
"units": "V"
},
(I added the ‘channel’ reference’)
I am uncertain what other parameters need to change; as I do not know how this is used in code (the logic).
Thereis another related piece of this puzzle:
"O3": {
"desc": "Calculation of O3 based on AAN 803-04",
"id": 157,
"kwargs": {
"ae": null,
"alphasense_id": null,
"from_date": null,
"timezone": null,
"t": "EC_SENSOR_TEMP",
"to_date": null,
"we": null
},
"post": true,
"process": "alphasense_803_04",
"units": "ppb"
},
It refers to EC_SENSOR_TEMP; which is a back reference to Alphasense PT1000 device; not fitted to this system. Instead we intend to use PM_DALLAS_TEMP. Since this device reads temperature directly, I am uncertain if it can be entered directly to replace the EC_SENSOR_TEMP reference or whether there is another step.
Note: If some issue arises from using the Dallas Probe then there is in fact a temperature sensor on each Spec Sensors ASB, it would need to be wired via a separate ADC channel and indeed, voltage readings would need conversion to deg C in that case. That wiring would be messy. But lets not get ahead of ourselves, we are going with Dallas unless it proves problematic. It should be more accurate than any thermistor.
Finally, concerning calibrations file; having looked at it; as aforesaid; I would not dream of entering parameters into this file without understanding where they plug into the formulae; how they are used. Send me the formulae and I can look at it; otherwise its your job.
As it stands; we have the following data:
(a) Sensitivity Code n nA/ppm
(b) TIA Gain in Kv/A
(c) Calibration Factor in V/ppm
(c) Vgas
(d) Vref
(e) Temperature.
(f) Its also possible to compute Cross sensitivity. It is provided by Spec Sensors in their data sheets. Examples;
SO2 Sensor is also sensitive to H2S (equally sensitive). Luckily we measure both, and can compensate.
Ozone sensor is equally sensitive to Nitrogen Dioxide, but Hydrogen Sulphide reduces O3 Reading.
NO2 sensor has no cross sensitivity
H2S sensor has 1 in 25% (slight) cross sensitivity to each of SO2 and CO
CO sensor has no cross sensitivity
Effects if not x-sensitivity is not compensated.
If H2S is present; then I would expect that SO2 sensor would also light up; but O3 sensor would darken.
If NO2 is present then O3 sensor will light up too.
So, cross sensitivity is going to need a kind of matrix calculation.
{ I have not included mention of gases we do not measure therefore unable to compensate for}
I found a couple of mistakes in the ‘specification’ document I assembled for Spec Sesnors; so I will correct those and add in the Cross Sensitivity data too.
To help things along; I will also assemble a lookup table for temperature compensation for each sensor; which involves taking data off the graphs. For Taiwan; we need only to cover temperature range from -5 degC to 45 degC.