8.1 Analog Self-Tests

At run-time, the system prints the current ammonia concentration detected to the serial terminal. However, this computed value is unused as part of the actual alarm. The alarm is implemented using the AC and the DACREF associated with it.

The advantage of this is that the hardware module runs continuously and does not depend on the ADC and CPU to implement after calibration. Furthermore, the sensor displayed exhibits non-linear behavior and may deviate from the ideal fit functions. Instead, if the setpoints are in known conditions, the system will still function correctly, even if the sensor response does not match the expected behavior. However, now the system must validate that the AC and DACREF are functioning. A multi-step process was developed using DAC0 (shown in the below) for doing this.

Figure 8-1. DAC Calibration Flowchart