Quick question: what combination of multiplying/dividing values returned by these functions:
EggBus::getSensorIndependentVariableMeasure
EggBus::getIndependentScaler
EggBus::getSensorR0
... gives values in units of Rs/Ro? (For the built-in CO and NO2 sensors, that is.)
Thanks!
David
David,
IndependentVariableMeasure * IndependentScaler is Rs / R0.
Vic
--
Need to flash both the hex and eeprom files... Might be your problem.
Vic
--
Also try running the poll egg bus sketch?
Vic
--
--
===========================
Egg Bus Address: 0x3
Firmware Version: 3
Sensor Address: 00:04:A3:9F:C0:8C
---------------------------
Sensor Index: 0
Sensor Type: NO2
Indep. Scaler: 0.00010000
Table X Scaler: 0.40000000
Table Y Scaler: 1.70000004
Measured Value: 0 => 0.00000000
R0: 4294967295
Implied Resistance: 0.00000000
Table Row 1: [62, 117] => [24.80000114, 198.90000915]
Table Row 2: [75, 131] => [30.00000000, 222.70001220]
Table Row 3: [101, 152] => [40.40000152, 258.39999389]
Table Row 4: [149, 188] => [59.60000228, 319.60000610]
Table Row 5: [174, 204] => [69.59999847, 346.80001831]
Table Row 6: [199, 219] => [79.59999847, 372.30001831]
Table Row 7: [223, 233] => [89.20000457, 396.10000610]
Table Row 8: [247, 246] => [98.80000305, 418.20001220]
Sensor Value: 85.3922653198
Sensor Units: ppb
---------------------------
Sensor Index: 1
Sensor Type: CO
Indep. Scaler: 0.00040000
Table X Scaler: 0.00300000
Table Y Scaler: 165.00000000
Measured Value: 0 => 0.00000000
R0: 4294967295
Implied Resistance: 0.00000000
Table Row 1: [134, 250] => [0.40199999, 41250.00000000]
Table Row 2: [168, 125] => [0.50399999, 20625.00000000]
Table Row 3: [202, 49] => [0.60599999, 8085.00000000]
Table Row 4: [232, 12] => [0.69600000, 1980.00000000]
Table Row 5: [241, 6] => [0.72300000, 990.00000000]
Sensor Value: 122536.7734375000
Sensor Units: ppb
When I unplug either sensor, it's correctly detected as "OPEN CIRCUIT". I swapped both sensors with another pair I had lying around. No change, measured value still reported as 0. I suppose all 4 could be bad.
I hope I'm not doing something really boneheaded like using the wrong version of some library. Should "Firmware Version" be 3? Here's the version info for the shield firmware I just flashed:
aqe_sensor_interface_shield holstius$ git log | head
commit 0b98d79419481681b519024ae03e9fba0a163bbc
Author: vicatcu <victor...@wickeddevice.com>
Date: Sun Oct 28 20:33:43 2012 -0400
added r0 calibration capability (write)
David
uint32_t r0_values[2] = {1234567, 7654321};
uint32_t r0_values[2] = {2200, 750000};
Have you tried the PollEggBus_WriteTest sketch pet my previous suggestion?
Vic
--
David,
Awesome! Yea that would be a good idea. I don't think there would be any need to write the value back until convergence was determined.
You want to avoid writing to the EEPROM too frequently. It can only endure 100,000 writes (guaranteed).
I think a "sensor zero sketch" is not terribly difficult to write. I would propose this would be a command/response serial terminal application that could show you what sensors are present so that you could identify the one you are targeting for zeroing.
You would type something like "scan" to list the sensors with handles to them.
Then you would type something like "choose 23" to select sensor with handle 23 for zeroing.
Then you would type something like "stat" periodically to read running statistics for the chosen sensor (moving average, standard deviation, current value) of (independent measure * independent scaler * R0) = Rs.
When you are satisfied it has converged, you would type something like "commit 2200" to write 2200 as R0 for that sensor.
You could envision an automation layer built on to of this basic concept with something like a Processing application running on a PC.
I still have a bunch of other of software to write and test for add on modules, but this seems within reach.
Thoughts?
Regards,
Vic
--
Let me know if something is unclear or needs more details.