After you clear the calibration (and the calibration falls back to the factory set calibration), the pH jumps to 14. This is not normal, and indicates you either have a bad probe, you are using a non-standard probe and need to adjust your probe setting with the sensor circuit, or there’s something wrong with your sensor circuit.
2022-02-20 07:59:31,495 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,clear
2022-02-20 07:59:33,011 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: ('success', '')
2022-02-20 07:59:34,527 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Calibrated: ('success', '?CAL,0')
2022-02-20 07:59:35,036 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Slope: ('success', '?SLOPE,100.0,100.0,0.00')
2022-02-20 07:59:36,553 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Returned: 14.000
2022-02-20 07:59:36,560 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 14.0, 'timestamp_utc': None}}
After the first calibration point (pH 7), it looks normal (except for the starting at 14 pH):
2022-02-20 08:00:27,314 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,mid,7.00
2022-02-20 08:00:28,830 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: ('success', '')
2022-02-20 08:00:30,347 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Calibrated: ('success', '?CAL,1')
2022-02-20 08:00:30,865 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Slope: ('success', '?SLOPE,100.0,100.0,-453.33')
2022-02-20 08:00:34,446 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Returned: 7.001
2022-02-20 08:00:34,450 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 7.001, 'timestamp_utc': None}}
2022-02-20 08:00:49,393 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Returned: 6.999
The next (pH 4) does not look correct. For one, it doesn’t appear that your pH sensor is decreasing pH (the measurement before calibration is 6.996). Are you indeed placing the pH probe in a 4 pH solution and allowing it to acclimate before pressing Calibrate to 4 pH? This should be your first indication something is wrong, that if you are placing your probe in a 4 pH solution, the measurement doesn’t change at all.
Subsequently, it appears the calibration doesn’t function correctly because you’re trying to calibrate the second point (4 pH) when the pH is still at 7. Can you imagine the kind of calibration slope you would have if the math did work?
2022-02-20 08:04:04,475 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 6.996, 'timestamp_utc': None}}
2022-02-20 08:04:18,919 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,low,4.00
2022-02-20 08:04:19,411 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Returned: 6.998
2022-02-20 08:04:20,940 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: ('success', '')
2022-02-20 08:04:22,457 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Calibrated: ('success', '?CAL,2')
2022-02-20 08:04:22,972 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Slope: ('success', '?SLOPE,0.0,100.0,-453.33')
2022-02-20 08:04:34,456 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Returned: 0.000
So it looks like a hardware issue, since your measurements are not returning as they should (even when uncalibrated) when being placed into the appropriate pH solutions.
You can also see the calibration slope is not changing at all after the second and third calibration point, indicating the calibrations for those points are not taking. And looking at the slope, it is wildly off:
?SLOPE, 0.0, 100.0, -453.33
From the manual: