Calibration issues with AtlasScientific pH probe

Hey,

Long story short:
I am struggling with the calibration of the pH probe of AtlasScientific. I am not sure whether there is a problem related to hardware or a software. i hope some of you had a similar issue and found a solution that also may fit in my case.

System information:

Click to view

Mycodo Version: 8.12.9
Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110]
Database Version: 0187ea22dc4b

Linux raspberrypi 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l GNU/Linux

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – 63 64 – 66 – – – – – – – – –
70: – – – – – – – –

[ 8.089005] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[ 8.089522] bcmgenet fd580000.ethernet eth0: Link is Down
[ 13.638173] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 14.081206] Bluetooth: Core ver 2.22
[ 14.081280] NET: Registered protocol family 31
[ 14.081287] Bluetooth: HCI device and connection manager initialized
[ 14.081303] Bluetooth: HCI socket layer initialized
[ 14.081313] Bluetooth: L2CAP socket layer initialized
[ 14.081329] Bluetooth: SCO socket layer initialized
[ 14.088121] Bluetooth: HCI UART driver ver 2.3
[ 14.088133] Bluetooth: HCI UART protocol H4 registered
[ 14.088200] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 14.088379] Bluetooth: HCI UART protocol Broadcom registered
[ 14.327514] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 14.327523] Bluetooth: BNEP filters: protocol multicast
[ 14.327537] Bluetooth: BNEP socket layer initialized
[ 14.343182] NET: Registered protocol family 38
[ 14.361931] cryptd: max_cpu_qlen set to 1000
[ 15.283760] ICMPv6: process `dhcpcd’ is using deprecated sysctl (syscall) net.ipv6.neigh.wlan0.retrans_time - use net.ipv6.neigh.wlan0.retrans_time_ms instead
[ 31.834848] vcc-sd: disabling

I am using the Whitebox Tentacle Shield T3 with a RaspberryPi4 in combination with the ezo circuits for pH, EC and temperature. Everything seems to run fine, I set up mycodo without problems and I am able to get signals from every sensor. The temperature readings are fine, as well as the calibration and readings for the EC sensor.

Long story:
I followed the instructions for the calibration procedure as described on the input screen. I used multiple brand new calibration kits from atlas scientific for this. I cleaned the probe with water between the different solutions. I let the probe in the solutions for about 2 minutes so that the measurement signal is stable before doing the calibration.

What did I do:

  1. Clearing the calibration
  2. Setting the temperature compensation manually (from the second attempt)
  3. Put the probe in the pH7 solution and doing the calibration
  4. Put the probe in the pH4 solution and doing the calibration
  5. Put the probe in the pH10 solution and doing the calibration
  6. Cross check if the measurement is still correct when putting back in the pH 4 solution

Below you can find multiple log files from the daemon and pictures of the measurment. I hope it is comprehensible for you.

What really makes me curious are these lines in the log files:

2022-02-18 19:06:00,317 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,mid,7.00
2022-02-18 19:06:00,319 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 19:06:00,320 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None

This appeares after every calibration and tells me that the device is never calibrated completely?

Attempt 1: temperature compensation with sensor
2022-02-18 16:13:58,809 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.806
2022-02-18 16:13:59,824 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:14:01,345 - 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.993, 'timestamp_utc': None}}
2022-02-18 16:14:13,742 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.809
2022-02-18 16:14:14,757 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:14:16,268 - 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.991, 'timestamp_utc': None}}
2022-02-18 16:14:23,700 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,low,4.00
2022-02-18 16:14:23,701 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 16:14:23,703 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 16:14:28,766 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.81
2022-02-18 16:14:29,774 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:14:31,295 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 4.668, 'timestamp_utc': None}}
2022-02-18 16:14:43,798 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.813
2022-02-18 16:14:44,813 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:14:46,326 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 4.668, 'timestamp_utc': None}}
2022-02-18 16:14:58,830 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.814
2022-02-18 16:14:59,839 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:15:01,359 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 3.82, 'timestamp_utc': None}}
2022-02-18 16:15:13,754 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.815
2022-02-18 16:15:14,769 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:15:16,288 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 4.329, 'timestamp_utc': None}}
2022-02-18 16:15:28,793 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.815
2022-02-18 16:15:29,808 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:15:31,319 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 4.16, 'timestamp_utc': None}}
2022-02-18 16:21:43,824 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.829
2022-02-18 16:21:44,838 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:21:46,349 - 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.004, 'timestamp_utc': None}}
2022-02-18 16:21:58,743 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.83
2022-02-18 16:21:59,757 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:22:01,267 - 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-18 16:22:13,792 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.83
2022-02-18 16:22:14,799 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:22:16,318 - 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-18 16:22:21,156 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,high,10.00
2022-02-18 16:22:21,160 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 16:22:21,161 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 16:22:28,827 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.832
2022-02-18 16:22:29,842 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:22:31,363 - 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.946, 'timestamp_utc': None}}
2022-02-18 16:22:43,767 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.832
2022-02-18 16:22:44,775 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:22:46,296 - 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.0, 'timestamp_utc': None}}
2022-02-18 16:22:58,821 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.833
2022-02-18 16:22:59,828 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:23:01,349 - 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.925, 'timestamp_utc': None}}
2022-02-18 16:23:13,755 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.836
2022-02-18 16:23:14,770 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:23:16,291 - 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.0, 'timestamp_utc': None}}
Attempt 2: With manual temp compensation
2022-02-18 16:35:49,176 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,clear
2022-02-18 16:35:49,177 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 16:35:49,178 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 16:35:56,267 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - pH sensor set to calibrate temperature
2022-02-18 16:35:56,360 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.952
2022-02-18 16:35:57,367 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:35:58,888 - 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}}
2022-02-18 16:36:11,222 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - pH sensor set to calibrate temperature
2022-02-18 16:36:11,287 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Latest temperature used to calibrate: 23.958
2022-02-18 16:36:12,302 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration returned: 0, 
2022-02-18 16:36:13,823 - 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}}
2022-02-18 16:36:51,850 - INFO - mycodo.controllers.controller_input_d046f8ee - Deactivated in 13.8 ms
2022-02-18 16:37:35,838 - INFO - mycodo.devices.atlas_scientific_i2c_99_1 - Atlas Scientific Board: pH, Rev: 2, Firmware: 2.14
2022-02-18 16:37:37,346 - INFO - mycodo.controllers.controller_input_d046f8ee - Activated in 2187.2 ms
2022-02-18 16:37:38,893 - 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}}
2022-02-18 16:37:49,968 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,mid,7.00
2022-02-18 16:37:49,970 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 16:37:49,971 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 16:37:51,832 - ERROR - mycodo.inputs.atlas_ph_d046f8ee - Could not determine pH from returned string: ''
2022-02-18 16:37:51,833 - ERROR - mycodo.inputs.atlas_ph_d046f8ee - Cannot set a value of None. Must be a float or string representing a float. Check the sensor and Input module is working correctly.
2022-02-18 16:37:51,837 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {}
2022-02-18 16:38:06,876 - 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.0, 'timestamp_utc': None}}
2022-02-18 16:38:21,825 - 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.003, 'timestamp_utc': None}}
2022-02-18 16:38:36,862 - 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.003, 'timestamp_utc': None}}
2022-02-18 16:38:51,912 - 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.998, 'timestamp_utc': None}}
2022-02-18 16:39:06,853 - 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.995, 'timestamp_utc': None}}
2022-02-18 16:39:21,905 - 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.994, 'timestamp_utc': None}}
2022-02-18 16:39:36,850 - 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.993, 'timestamp_utc': None}}
2022-02-18 16:39:51,896 - 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.995, 'timestamp_utc': None}}
2022-02-18 16:40:06,839 - 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.995, 'timestamp_utc': None}}
2022-02-18 16:40:21,887 - 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.993, 'timestamp_utc': None}}
2022-02-18 16:40:24,382 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,low,4.00
2022-02-18 16:40:24,384 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 16:40:24,385 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 16:40:36,826 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 3.518, 'timestamp_utc': None}}
2022-02-18 16:40:51,880 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 3.518, 'timestamp_utc': None}}
2022-02-18 16:41:06,823 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 4.698, 'timestamp_utc': None}}
2022-02-18 16:41:21,882 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 3.046, 'timestamp_utc': None}}

2022-02-18 16:45:51,873 - 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.056, 'timestamp_utc': None}}
2022-02-18 16:46:06,816 - 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.292, 'timestamp_utc': None}}
2022-02-18 16:46:21,865 - 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.764, 'timestamp_utc': None}}
2022-02-18 16:46:32,620 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,high,10.00
2022-02-18 16:46:32,622 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 16:46:32,623 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 16:46:36,902 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 5.82, 'timestamp_utc': None}}
2022-02-18 16:46:51,856 - 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.973, 'timestamp_utc': None}}
2022-02-18 16:47:06,894 - 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.927, 'timestamp_utc': None}}


Attempt 3: Changed position of EZO circuit on tentacle shield
2022-02-18 16:57:33,073 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,clear
2022-02-18 16:57:33,075 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 16:57:33,076 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 16:57:36,788 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Compensation command: T,24.00
2022-02-18 16:57:36,789 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 16:57:42,768 - 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}}
2022-02-18 16:57:47,365 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,mid,7.00
2022-02-18 16:57:47,367 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 16:57:47,368 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 16:57:57,726 - 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.0, 'timestamp_utc': None}}
2022-02-18 16:58:12,774 - 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.002, 'timestamp_utc': None}}
2022-02-18 17:03:42,739 - 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.004, 'timestamp_utc': None}}
2022-02-18 17:03:48,588 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,low,4.00
2022-02-18 17:03:48,589 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 17:03:48,590 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 17:03:57,691 - 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.005, 'timestamp_utc': None}}
2022-02-18 17:09:12,787 - 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.016, 'timestamp_utc': None}}
2022-02-18 17:09:13,598 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,high,10.00
2022-02-18 17:09:13,600 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 17:09:13,601 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 17:09:27,737 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 9.718, 'timestamp_utc': None}}
2022-02-18 17:11:42,783 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 9.99, 'timestamp_utc': None}}
2022-02-18 17:11:57,731 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 10.081, 'timestamp_utc': None}}
2022-02-18 17:12:57,722 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 8.404, 'timestamp_utc': None}}
2022-02-18 17:17:27,706 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 9.197, 'timestamp_utc': None}}
2022-02-18 17:18:57,714 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 10.239, 'timestamp_utc': None}}
2022-02-18 17:19:12,751 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 10.171, 'timestamp_utc': None}}
2022-02-18 17:19:27,705 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 9.537, 'timestamp_utc': None}}
2022-02-18 17:21:12,730 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 8.767, 'timestamp_utc': None}}
Attempt 4: Without extension cable
2022-02-18 19:04:31,962 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,clear
2022-02-18 19:04:31,963 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 19:04:31,964 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 19:04:33,905 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Compensation command: T,24.00
2022-02-18 19:04:33,906 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 19:04:42,767 - 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}}
2022-02-18 19:05:42,712 - 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}}
2022-02-18 19:05:57,746 - 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}}
2022-02-18 19:06:00,317 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,mid,7.00
2022-02-18 19:06:00,319 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 19:06:00,320 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 19:06:12,781 - 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.0, 'timestamp_utc': None}}
2022-02-18 19:06:27,727 - 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-18 19:06:42,768 - 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-18 19:10:27,780 - 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.985, 'timestamp_utc': None}}
2022-02-18 19:10:42,718 - 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.987, 'timestamp_utc': None}}
2022-02-18 19:10:45,192 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,low,4.00
2022-02-18 19:10:45,194 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 19:10:45,195 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 19:10:57,751 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 3.99, 'timestamp_utc': None}}
2022-02-18 19:11:12,684 - DEBUG - mycodo.controllers.controller_input_d046f8ee - Adding measurements to InfluxDB with ID d046f8ee-403b-4608-953c-8623627e8a6f: {0: {'measurement': 'ion_concentration', 'unit': 'pH', 'value': 4.273, 'timestamp_utc': None}}
2022-02-18 19:15:42,713 - 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-18 19:15:57,757 - 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.752, 'timestamp_utc': None}}
2022-02-18 19:16:12,698 - 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.894, 'timestamp_utc': None}}
2022-02-18 19:16:22,612 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,high,10.00
2022-02-18 19:16:22,614 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 19:16:22,615 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None
2022-02-18 19:16:27,741 - 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.752, 'timestamp_utc': None}}
2022-02-18 19:16:42,694 - 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.61, 'timestamp_utc': None}}
2022-02-18 19:16:57,735 - 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.966, 'timestamp_utc': None}}
2022-02-18 19:17:12,692 - 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.752, 'timestamp_utc': None}}

That am I doing wrong here? At first I thought it is a hardware problem, but the lines in the log files about the device to be not calibrated makes me think that it could also be a software problem?

I hope you have an idea on how to test or what may be the reason for this.

Thanks in advance.

1 Like

Logs were removed due to too many lines. Please be concise. Remove all extraneous info.

Well I shortened the log files and removed some lines. I also removed the pictures as they were unnecessary when having log files…

What really makes me curious are these lines in the log files:

2022-02-18 19:06:00,317 - DEBUG - mycodo.inputs.atlas_ph_d046f8ee - Calibration command: Cal,mid,7.00
2022-02-18 19:06:00,319 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Command returned: None
2022-02-18 19:06:00,320 - INFO - mycodo.inputs.atlas_ph_d046f8ee - Device Calibrated?: None

This appeares after every calibration and tells me that the device is never calibrated completely?

After taking a look into the python files I realized that β€œNone” is the implicit return value from the atlas_write / write_cmd function.

    def calibrate(self, level, ph):/
        try:
            if level == "clear":
                write_cmd = "Cal,clear"
            else:
                write_cmd = "Cal,{},{:.2f}".format(level, ph)
            self.logger.debug("Calibration command: {}".format(write_cmd))
            ret_val = self.atlas_device.atlas_write(write_cmd)
            self.logger.info("Command returned: {}".format(ret_val))
            # Verify calibration saved
            write_cmd = "Cal,?"
            self.logger.info("Device Calibrated?: {}".format(
                self.atlas_device.atlas_write(write_cmd)))
        except:
            self.logger.exception("Exception calibrating")
    def atlas_write(self, cmd):
        self.write(cmd)

    def write(self, cmd):
        """ Append the null character and send the command over I2C"""
        cmd += "\00"
        # self.logger.error("Atlas Scientific command being sent: '{}'".format(cmd))
        self.file_write.write(cmd.encode('latin-1'))

I am not a using python a lot, so please correct me if I am wrong here, but atlas_write as well as write return None because no explicit return value is given in the function.
Is this intended in the varification of the calibration? You are sending the command β€œCal,?” to check if the device is calibrated as far as I read in the manual of the EZO circuit.

Calibration was recently moved from being baked in to the system to being a part of each input module. As a result, there wasn’t extensive testing done to verify everything was working as intended. atlas_write() does not return a value, which is not necessarily an issue, if the commands are successfully sent. However, this does pose an issue from a logging standpoint, since the user isn’t able to see the actual response. I’ll make some fixes and test with my atlas devices, then push the changes for you to test.

1 Like

I just committed a fix for showing return values during calibration for all atlas scientific inputs. You will need to upgrade to master in order to acquire the new code to test.

I also added locking to all Atlas Inputs to prevent collisions with measurements and Actions:

Actually, there seems to be an issue with the locking working properly.

Edit: I found the issue. I should have fixes committed soon.

Locking has been fixed Mycodo-wide. It should be safe to test the changes. I’ve also added an Atlas pH Input feature: Calibration Export/Import.

Thanks for your effort.
I upgraded to master and did a calibration after that. The result still doesn’t make sense to me. Especially the second step with ph4.0 after that the measured pH was 0.000
Mycodo_20220219_attempt1.txt (27,9 KB)

I did the calibration a second time: This time it looks a little bit better at the beginning but after the third calibration point it messes up again.
Mycodo_20220219_attempt2.txt (14,9 KB)

Looks like I need to figure out if the probe itself causes the issue…

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:

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.

The sensor circuit should be ok as I just got a new one. The first circuit had an issue with the LED which was not working properly, so the vendor sent me a new one after verifying the function.

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?

Yes I am placing the probe in a 4 pH solution and wait for at least 2 minutes before continuing. I recognized that there is no change in the measurement but I still did the next calibration to show the result in the log.

It seems like I missed that page in the manual… my bad, sorry. You’re right, the slope is totally off - looks like a hardware issue.
I will contact the vendor and try to get a new one.

Hi Riffelblech
I too am building a water quality sensor unit based on Tentacle 3, I have 2 units stacked on top of each other. I liked the layout of your box and wondered whether you would share a few pictures of how you built your unit?
cheers Maurice

I used a small electrical cabin for the whole electronic stuff. A small power supply for 12V and 5V. From there I used some terminals for 230V (L, N, PE), 12V, 5V, GND. Usually I would have used different colors and local separation between the voltages, but I only got the blue terminals and I wanted to save some space in the cabinet. So not a recommended setup, but works for me…
I have four 12V relay modules for the peristaltic pumps and two 230V relay modules for the water pump and one as reserve. As you can see I already drilled the holes for further relays.
The raspberry has an SSD and the tentacle shield with mounted pH, EC and temperature circuits.
All cables for the sensors and the pumps are made with connectors, so that I can easily swap cables and move everything more easily (yes, that might be overkill). I could upgrade with a second tentacle and 3 more sensors, but that is not planned at the moment. I should get this thing running properly at this state first…

Question @maurice: Are the pins on top of your tentacle shield very short too?


1 Like

Looks very well built. I too am building something similar but using plastic, and also using internal connectors so things can be removed as needed. I have 2 tentacle 3 boards stacked on top of each other and will be adding a lorawan module. I am toying about adding an ssd card.

I did find the pins very small on the tentacle 3 board and had to have extender pins to stack them.

I also found the software from atlas scientificvery useful for testing the tentacle 3 cards and the probes as this just works out of the box, no config (except for mqtt) and it was great for proving things work.

cheers Maurice

A short update on the sensors:
I got a new one from the vendor. The calibration was successful this time and I was able to reproduce the measurements after the calibration. The slope is not as small as I would like it to be, but it should be fine now :slight_smile:

1 Like