Pumps don't operate in Regulate pH and Electrical Conductivity Function

캡처


If you set only the acid, base, liquid a, and liquid b, and do not set Nutrient C Output Amount, Nutrient Output Amount, you will be asked to set it forcibly.
If you write the Nutrient C Output Amount, Nutrient Output Amount value, saves it.

But I get a text message in the mail asking me to add water.
The peristaltic pump is not working.
EC: 1411.54. Should be < 150.00. Add water to dilute.

Output: EC Dose Nutrient C, Output: Is EC Dose Nutrient D
required to be set?

1 Like

Your EC Setpoint is 150. You can’t get from 1411 to 150 without adding water.

1 Like

Output: EC Dose Nutrient C, Output: Is EC Dose Nutrient D
required to be set?

All outputs are optional.

I must manually add water?

Doesn’t the peristaltic pump automatically adjust the nutrient a and b for ec ?

You have set your EC set point to 150 and EC of your water is more than 150. So if you add more nutrients it will increase your EC. Nutrients are added by peristaltic pumps to increase the EC. To decrease EC you need to add manually. Hope you understood

1 Like


2

If the current ec is 1093, and the ec setting is EC:1200.00 -1800.
If you want to raise the ec value, you need to inject a Nutrient solution.

The pump needs to be operated, **

but it doesn’t work and I don’t get e-mails.

**

I don’t see all the available settings in the screenshot. What is the set Period? Have you waited beyond the Start Offset and Period for the pumps to dose?

1 Like

Also, to add an output that would add water automatically to your reservoir would require some way of sensing when the reservoir is full, or incorporating some sort of overflow drain, otherwise the reservoir could flood if too much water is added. This Function is meant to be a basic pH and EC regulation Function, not a comprehensive solution. The use of a Conditional Function can be used in conjunction with this Function to add water if triggered to do so from a low float sensor. Or this Function can be updated to include water filling functionality.

Reservoir water level sense function can be handled by TOF sensor. Is not it?

Hey Guys,
first of all: thanks for the new version, Kyle!

However I experience some troubles with the function for setting the pH and the EC. It worked previously but now none of the pumps are working due to the function. Also when they should because the value of pH or EC is out of range. The peristaltic pumps are also working on their own.

The Log shows different errors:

self._bus.write_byte_data(self._address, register, value)
  File "/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_PureIO/smbus.py", line 322, in write_byte_data
    self._device.write(data)
OSError: [Errno 121] Remote I/O error
2023-01-26 16:08:23,774 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:08:38,818 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:08:53,857 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:09:08,845 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:09:23,818 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:09:38,852 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:09:53,776 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:10:08,818 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:10:23,850 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:10:38,779 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:10:53,834 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:11:08,772 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:11:23,849 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:11:38,798 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:11:44,493 - ERROR - mycodo.controllers.controller_function_562dc666 - Exception while running loop()
Traceback (most recent call last):
  File "/var/mycodo-root/mycodo/controllers/controller_function.py", line 76, in loop
    self.run_function.loop()
  File "/home/pi/Mycodo/mycodo/functions/regulate_ph_ec.py", line 832, in loop
    f"Dosing {':'.join(self.ratio_numbers)} ({':'.join(map(str, self.ratio_letters))}): {', '.join(self.list_doses)})")
TypeError: sequence item 0: expected str instance, float found
2023-01-26 16:11:53,858 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:12:08,811 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:12:23,856 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:12:38,802 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:12:53,849 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:13:08,867 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:13:23,814 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:13:24,270 - ERROR - mycodo.inputs.tsl2561_cc83a255 - get_measurement() Error
Traceback (most recent call last):
  File "/home/pi/Mycodo/mycodo/inputs/tsl2561.py", line 109, in get_measurement
    self.get_lux()
  File "/home/pi/Mycodo/mycodo/inputs/tsl2561.py", line 73, in get_lux
    full, ir = self.sensor._get_luminosity()
  File "/var/mycodo-root/env/lib/python3.9/site-packages/tsl2561/tsl2561.py", line 177, in _get_luminosity
    return self._get_data()
  File "/var/mycodo-root/env/lib/python3.9/site-packages/tsl2561/tsl2561.py", line 124, in _get_data
    ir = self.i2c.readU16(TSL2561_COMMAND_BIT | TSL2561_WORD_BIT |
  File "/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_GPIO/I2C.py", line 164, in readU16
    result = self._bus.read_word_data(self._address,register) & 0xFFFF
  File "/var/mycodo-root/env/lib/python3.9/site-packages/Adafruit_PureIO/smbus.py", line 224, in read_word_data
    ioctl(self._device.fileno(), I2C_RDWR, request)
OSError: [Errno 121] Remote I/O error
2023-01-26 16:13:36,235 - INFO - mycodo.controllers.controller_function_562dc666 - Deactivated in 208.3 ms
2023-01-26 16:13:38,823 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:13:53,809 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:13:57,012 - INFO - mycodo.controllers.controller_function_562dc666 - Activated in 338.8 ms
2023-01-26 16:14:07,290 - ERROR - mycodo.controllers.controller_function_562dc666 - Exception while running loop()
Traceback (most recent call last):
  File "/var/mycodo-root/mycodo/controllers/controller_function.py", line 76, in loop
    self.run_function.loop()
  File "/home/pi/Mycodo/mycodo/functions/regulate_ph_ec.py", line 832, in loop
    f"Dosing {':'.join(self.ratio_numbers)} ({':'.join(map(str, self.ratio_letters))}): {', '.join(self.list_doses)})")
TypeError: sequence item 0: expected str instance, float found
2023-01-26 16:14:08,825 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again
2023-01-26 16:14:23,774 - ERROR - mycodo.inputs.tsl2561_cc83a255 - Could not obtain measurement: Sensor is saturated. Setting integration time to 101 ms and trying again

I also can not understand the error of the tsl2561… then the sensor delivers values.
Here is also a screenshot from my function settings:

I’m thankful for every help.

Kind regards

A fix has been committed in the yet-to-be released version 8.15.5. If someone would like to upgrade to master prior to the release, please let me know if the fix works.

2 Likes

Hi Kyle,
the fix works!
Thank you.

1 Like

In Regulate pH and Electrical Conductivity, when ec is below low, the Peristaltic pump is not operated and the conditional controller operates the Peristaltic pump.
Currently, ec is 1400 and the setting is 1700~1900 and wait for more than 10 minutes.
20230202102500
Current ph,ec value

20230202102148


pH and electrical conductivity adjustment settings ->Peristaltic pump not working


20230202102528
Peristaltic pump working.
Red and blue are the nutrient liquid ab Peristaltic pump

Hi Guys,

sadly the ph&EC function stopped working after a few days. I didn’t get the reason of this.
Is anyone experiencing the same?

> 2023-02-06 12:52:17,257 - DEBUG - mycodo.function.regulate_ph_ec_ad156712 - Most recent timestamp and measurement for pH: 1675684327.206571, 6.392
> 2023-02-06 12:52:17,366 - DEBUG - mycodo.function.regulate_ph_ec_ad156712 - Most recent timestamp and measurement for EC: 1675684335.221213, 1435.0
> 2023-02-06 12:52:17,366 - DEBUG - mycodo.function.regulate_ph_ec_ad156712 - EC: 1435.00. Should be < 1200.00. Add water to dilute.
> 2023-02-06 12:57:17,289 - DEBUG - mycodo.function.regulate_ph_ec_ad156712 - Most recent timestamp and measurement for pH: 1675684625.21076, 6.393
> 2023-02-06 12:57:17,416 - DEBUG - mycodo.function.regulate_ph_ec_ad156712 - Most recent timestamp and measurement for EC: 1675684635.287222, 1434.0
> 2023-02-06 12:57:17,416 - DEBUG - mycodo.function.regulate_ph_ec_ad156712 - EC: 1434.00. Should be < 1200.00. Add water to dilute.
> 2023-02-06 13:02:17,356 - DEBUG - mycodo.function.regulate_ph_ec_ad156712 - Most recent timestamp and measurement for pH: 1675684925.217851, 6.388
> 2023-02-06 13:02:17,458 - DEBUG - mycodo.function.regulate_ph_ec_ad156712 - Most recent timestamp and measurement for EC: 1675684935.161957, 1434.0
> 2023-02-06 13:02:17,458 - DEBUG - mycodo.function.regulate_ph_ec_ad156712 - EC: 1434.00. Should be < 1200.00. Add water to dilute

Cheers

Please explain. Your log looks like it’s functioning as expected.

Hi Kyle,

the EC value is too high and the function recognizes it. The EC regulation is okay.
The pH value of the nutrient solution is too high as well. However the controller/function for regulating the pH is not working.

Current pH Value: 6.38
Setpoint: 8.85
Hysteresis: 0.35

The Sensor and the Pump itself are both working.

1 Like

Thanks for the feedback. I just committed a fix. You can upgrade to master to test the new code.