Happy New Year everyone!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
In case you have the Sensor extension, you can simply use one of the sensor ports with the right jumper setting.Ok thanks i had looked at the ato guide but as robo-tank has all outlet pins assigned to power bar plugs I was hoping there would be a different way, but not to worry I'll start with powerbar2 outlet 8 and work my way backwards.
One thing I have noticed it that my pH probe keeps toggling itself off?? Why would this be?
Can anyone explain why there's gain 1-4?Adding analog sensors with ADS1115
Michael Lane has been working on a new ADS1015/ADS1115 driver for reef-pi.
This brings new possibilities to Reef-Pi:
Any analog sensor can be used as long as the analog signal is in between 2.0V to 5.5V.
- PH/Orp probes
- Pressure sensors
- Flow sensors
- Etc.
ADS1115 16-Bit ADC - 4 Channel with Programmable Gain Amplifier
![]()
ADS1115 Features:
I had an ADS1115 board so I tried if my PH probe is working. So I made a “How to guide” maybe it will be of use for others. I used a Raspberry Pi 2 Model B with Reef-Pi version 3.5.
- Resolution: 16 Bits
- Programmable Sample Rate: 8 to 860 Samples/Second
- Power Supply/Logic Levels: 2.0V to 5.5V
- Low Current Consumption: Continuous Mode: Only 150µA Single-Shot Mode: Auto Shut-Down
- Internal Low-Drift Voltage Reference
- Internal Oscillator
- Internal PGA: up to x16
- I2C Interface: 4-Pin-Selectable Addresses
- Four Single-Ended or 2 Differential Inputs
- Programmable Comparator
Add driver under Configuration/Drivers
![]()
Configure the Driver:
![]()
Name: PH
Type: ads1115
Address: standard is 72
Gain: 2/3, 1, 2, 4, 8 or 16
An Adafruit tutorial has this guidance.
# Choose a gain of 1 for reading voltages from 0 to 4.09V.
# Or pick a different gain to change the range of voltages that are read:
# - 2/3 = +/-6.144V (High Gain, Sensitive to noise)
# - 1 = +/-4.096V
# - 2 = +/-2.048V
# - 4 = +/-1.024V
# - 8 = +/-0.512V
# - 16 = +/-0.256V (Low Gain, Not Sensitive to Noise)
# See table 3 in the ADS1015/ADS1115 datasheet for more info on gain.
Reboot (Configuration/Admin)
Add analog input under Configuration/Connectors
![]()
Configure the connector
![]()
Name: PHpin0
Pins: 0 (depends what pin you use on the ADS1115 board)
Driver: PH
Reload (Configuration/Admin)
Add the probe under pH
![]()
Configure the PH probe
![]()
Name: PH
Analog input: PHpin0
Check frequency: 10
Ph status: Enabled
The other settings are not mandatory.
Calibration
The first readings will be high:
![]()
Therefore you need to calibrate!
To be able to calibrate you first have to disable the Ph status
Enjoy!
- Edit ph.
- Disable probe.
- Save
- Calibrate
- Rinse probe in rodi
- Place in 7 calibration fluid
- Wait for readings to stabilize
- Set cal value to 7 (Midpoint)
- Push Run
- Rinse probe
- Put in 10 calibration fluid
- Set cal value to 10 (Second Point)
- Run
- Enable probe
- Rinse probe and check both 7 and 10 and make sure it’s close.
sorry againSet up that channel of the pca9685 as an equipment instead of a doser, then it will work. Only at 100% though.
You create the driver like normal, then you create an outlet that points to the particular channel of the pca9685 driver, then a piece of equipment that points to that outlet. So instead of driver->jack->doser for all your PWM channels, you go driver->outlet->equipment for the ato channels and Jack only for the other channels.sorry again
what is the best way to do it? tried it with no result or a plank in front of my head
The ADS1115 has a gain setting, that allows you to measure different voltage ranges and as far as I think to know, therefore either increase your measurement range up to the supply voltage (in the 2/3 setting) or improve resolution for very low voltages (in the 2 to 16 setting), as you can see in table 3 in the datasheet:Can anyone explain why there's gain 1-4?
Should I have different gains in the boxes or should I have same gain in all?
My brobe says -61 pH even if I do calibration
| PGA SETTING | 2/3 | 1 | 2 | 4 | 8 | 16 |
| Full Scale (V) | ±6.144V* | ±4.096V* | ±2.048V | ±1.024V | ±0.512V | ±0.256V |
| "Resolution" | ~0.19mV | ~0.13 mV | ~0.06 mV | ~0.03 mV | ~0.016 | ~0.008 mV |
It’s only easy if there is a publicly documented API or home assistant interface, as far as I know.Has anyone every used one of these Tuya PH and Salinity probes? I bet it would be easy to use the Tuya API to get the data.
![]()
YIERYI Smart pH Meter, Seawater Salinity Tester, pH/Salt/Temp Tester f
Shen Zhen Yage Technology Co., Ltd registered the brand "YIERYI" in 2016, The main products are: PH meter, Tds ec meter, Do meter, Orp meter, soil meter, refractometer. Our products are widely used in: aquariums, hydroponics , aquaculture, environmental protection, swimming pools, beauty salons...shop.yieryimeters.com
It’s only easy if there is a publicly documented API or home assistant interface, as far as I know.
I believe you have to configure the backup as an ATO (but inverted) as well and run a macro that disables the first ATO and shuts off the pump.I think I am missing something, probably some weird quirk of the macro system, but how do I set it up so when I have 2 level sensors for ato, the second, slightly higher one acts as a backup cutoff incase the first is stuck and shuts the pump off?
If I leave the working single ato as it is, add a second one, either with inverted or non inverted inlet, and have it control a reversible macro that either just enables or disables the other ato, then the pump either doesn't start or doesn't stop and the enable disable button for the safety ato and/or the other one locks up with no reaction when clicking it, other equipment switches still work at that point. In trying to fix that by trying to delete the safety ato configuration, my pi crashed.I believe you have to configure the backup as an ATO (but inverted) as well and run a macro that disables the first ATO and shuts off the pump.
Hm. My guess is that it "locks up" (maybe intentionally), because the safety ATO and the associated macro are constantly engaged (switching the first).If I leave the working single ato as it is, add a second one, either with inverted or non inverted inlet, and have it control a reversible macro that either just enables or disables the other ato, then the pump either doesn't start or doesn't stop and the enable disable button for the safety ato and/or the other one locks up with no reaction when clicking it, other equipment switches still work at that point. In trying to fix that by trying to delete the safety ato configuration, my pi crashed.
Another thing: if you make it a reversible macro turning off the pump, if the safety ATO is off, it might actually trigger the reverse of this, e.g. turn the pump on all the time, when the safety ATO is not triggered.If I leave the working single ato as it is, add a second one, either with inverted or non inverted inlet, and have it control a reversible macro that either just enables or disables the other ato, then the pump either doesn't start or doesn't stop and the enable disable button for the safety ato and/or the other one locks up with no reaction when clicking it, other equipment switches still work at that point. In trying to fix that by trying to delete the safety ato configuration, my pi crashed.
No the macro is turning on and off the other ato system, not the pump.Another thing: if you make it a reversible macro turning off the pump, if the safety ATO is off, it might actually trigger the reverse of this, e.g. turn the pump on all the time, when the safety ATO is not triggered.
Hmm, what is your ATOs’ respective check period ? E.g. if that’s 10s, it could happen, that the pump only turns off up to 10s after the sensor is triggered.No the macro is turning on and off the other ato system, not the pump.
But yeah, among various crashes that's what I have been getting: pump either stays on or stays off, it doesn't switch at the transitions of the sensors
Personally, I’m not quite sure if you’d want a safety ATO to be reversible. You want it to deactivate the faulty ATO and the pump so you can afterwards manually remove the fault and reset the system.No the macro is turning on and off the other ato system, not the pump.
But yeah, among various crashes that's what I have been getting: pump either stays on or stays off, it doesn't switch at the transitions of the sensors