Open maciejgaleja opened 7 years ago
We've got mesurement every 1912 clock cycles (239 cycles measurement time * 8 prescaler). Running all the calculations on board would be the best way, but I don't think it would be possible with that big frequency. On the other hand with this frequency we've got about 1570 measurements per second, which is more than enough. We can calculate concentration values for smaller number of measurements, which I think will work correctly.
OK, we'll have to put some effort in configuration via UART (#11) and some math operations (it doesn't really matter if we implement it for MCU or PC).
ADC readings are filtered, then it can be processed, before sending to user. Generally, we have three possibilities:
convert readings to concentration values. This would require a lot of computations, because sensors may have non-linear characteristics and also temperature and humidity compensation is an issue. Sensor-related calibration parameters would have to be saved
convert readings to sensor-related output signal (electrical current or voltage). This would require less computations, and less parameters would have to be configureddo not convert readings, or simply calculate voltage