reef-pi :: An opensource reef tank controller based on Raspberry Pi.

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
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
Push run
Rinse probe
Put in 10 calibration fluid
Set cal value to 10
Run
Enable probe
Rinse probe and check both 7 and 10 and make sure it’s close.

Thanks. That's basically what I was doing.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I think i asked about something similar a really long while ago with the overall stance being that reef-pi wouldn't get a programming language type feature, which i undestand. But with the HAL driver system standardizing everything, and the macro system being expanded, is that maybe something that could be looked into again? I agree that AND/OR statements, and also IF...THEN...ELSE rather than just IF...THEN would vastly increase possibilties here in regards to tinkering with stuff and layers of safety features.
Support for else (as in if - else ) and combining multiple sensor values are two things I’m thinking as something we need as part of next evolution of macro.
 

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
209
Reaction score
163
Rating - 0%
0   0   0
Ranjib I managed to upload db file from 6 months ago, now it works. Well all I did when all data was gone is that I added 6 led drivers and lights. After reboot nothing left in pi. Now all works again exept adafruit gets only 7 data feeeds in minute, I will play with that later.
 

sellereef

New Member
View Badges
Joined
Sep 28, 2020
Messages
4
Reaction score
2
Location
Grand Rapids
Rating - 0%
0   0   0
Has anyone setup reef-pi light controller for Mars Aqua? I am reading some things now that looks like I may need an additional converter to be able to use PWM?

Thank you!
Anyone have any thoughts with this one? I may end up with other "Standard black boxes" but I just want to be prepared
 

Carlo Rios

New Member
View Badges
Joined
Aug 14, 2020
Messages
13
Reaction score
8
Location
US
Rating - 0%
0   0   0

waynel

Active Member
View Badges
Joined
May 22, 2020
Messages
264
Reaction score
269
Location
Kentucky
Rating - 0%
0   0   0

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
Very small annoyance with a current behaviour: When i manually dose extra to correct some value, i use the calibration menu of the dosing pumps. There isn't another option, is there? Anyway, when i do that, the amount i manually dosed doesn't show up in the usage statistics in the dashboard. Which makes sense if it's for calibration, doesn't make sense for manual dosing to keep track of how much of a chemical is actually going into the tank.
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
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:
  • PH/Orp probes
  • Pressure sensors
  • Flow sensors
  • Etc.
Any analog sensor can be used as long as the analog signal is in between 2.0V to 5.5V.

ADS1115 16-Bit ADC - 4 Channel with Programmable Gain Amplifier

ADS1115.png


ADS1115 Features:
  • 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
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.

Add driver under Configuration/Drivers
1.png


Configure the Driver:
2.png

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
3.png


Configure the connector
4.png

Name: PHpin0
Pins: 0 (depends what pin you use on the ADS1115 board)
Driver: PH
Reload (Configuration/Admin)

Add the probe under pH
5.png


Configure the PH probe
6.png

Name: PH
Analog input: PHpin0
Check frequency: 10
Ph status: Enabled
The other settings are not mandatory.

Calibration
The first readings will be high:
7.png

Therefore you need to calibrate!

To be able to calibrate you first have to disable the Ph status
  • 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.
Enjoy!
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
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:
  • PH/Orp probes
  • Pressure sensors
  • Flow sensors
  • Etc.
Any analog sensor can be used as long as the analog signal is in between 2.0V to 5.5V.

ADS1115 16-Bit ADC - 4 Channel with Programmable Gain Amplifier

ADS1115.png


ADS1115 Features:
  • 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
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.

Add driver under Configuration/Drivers
1.png


Configure the Driver:
2.png

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
3.png


Configure the connector
4.png

Name: PHpin0
Pins: 0 (depends what pin you use on the ADS1115 board)
Driver: PH
Reload (Configuration/Admin)

Add the probe under pH
5.png


Configure the PH probe
6.png

Name: PH
Analog input: PHpin0
Check frequency: 10
Ph status: Enabled
The other settings are not mandatory.

Calibration
The first readings will be high:
7.png

Therefore you need to calibrate!

To be able to calibrate you first have to disable the Ph status
  • 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.
Enjoy!
I forgot to at a picture of the setup:
.
20201008_201240.jpg
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
I've always shied away from including a ph sensor due to the high cost for little perceived value, but with the ADC i could use cheap chinesium sensor+board kits for 20€ and maybe upgrade to a better probe later, how practicable is that?

Or would that be so useless that i shouldn't even bother?
 
Last edited:

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
209
Reaction score
163
Rating - 0%
0   0   0
Anyone have any thoughts with this one? I may end up with other "Standard black boxes" but I just want to be prepared
I bought 3 amazon lights philzone, they have pwm led drivers, so all you need it to wire pwm and ground to pi..
I have one question about pwm. In the morning my blue channel is on 15% and it works, but in the evening I have them on 20%but they start to flicker.. helps if I increase percentage, but its too bright for moonlight.. Driver is set to 1000hz any ideas why this happens?

5716A30B-3844-468C-A90F-D40A4897AC17.jpeg
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,530
Reaction score
1,811
Location
RVA
Rating - 100%
1   0   0
I bought 3 amazon lights philzone, they have pwm led drivers, so all you need it to wire pwm and ground to pi..
I have one question about pwm. In the morning my blue channel is on 15% and it works, but in the evening I have them on 20%but they start to flicker.. helps if I increase percentage, but its too bright for moonlight.. Driver is set to 1000hz any ideas why this happens?

5716A30B-3844-468C-A90F-D40A4897AC17.jpeg

Flicker is due to drivers not delivering enough power at the set %; the power delivery/pwm on these lights is pretty janky. The fact that it works on 15 but not at 20 is interesting. If you manually set to 20 does it still flicker? Or does it only flicker when it ramps down to 20% or 0%?

My viparspectra will flicker but only when ramping down from 1% to 0; the last 10-15 sec prior to lights cutting off (0) they'll flicker.
 

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
209
Reaction score
163
Rating - 0%
0   0   0
They turn on at9%, but when percentage goes down by the hour or so from 35 to 20 they flicker, if I turn them on 25 its ok.. strange..in the morning its ok..
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I've always shied away from including a ph sensor due to the high cost for little perceived value, but with the ADC i could use cheap chinesium sensor+board kits for 20€ and maybe upgrade to a better probe later, how practicable is that?

Or would that be so useless that i shouldn't even bother?
I am concerned about the quality of readings from such setup, but don’t have data to back this up. If you end up setting this up, It will be awesome if you share your findings.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
I've always shied away from including a ph sensor due to the high cost for little perceived value, but with the ADC i could use cheap chinesium sensor+board kits for 20€ and maybe upgrade to a better probe later, how practicable is that?

Or would that be so useless that i shouldn't even bother?

From experience, the super cheap import sensors have terrible stability - you will probably need to figure in recalibration every week or so. I wouldn't use it as an active control element (CO2 dosing, calcium reactor), or make any changes based on the readings it gives you without some other test (which you shouldn't be doing anyway - don't chase pH directly). For some trends and basic monitoring with frequent calibration they'll work fine.
 

pais

New Member
View Badges
Joined
Jun 27, 2019
Messages
15
Reaction score
12
Rating - 0%
0   0   0
Hello, i've seen you implemented ADS1115 support in your project and that is a great thing. Only thing i want to ask is how many bits of data does the ADS1115 sends to the rpi via i2c ? Which is the format of that bits ? I've seen the reading from the pi is the bare fraction of voltage. I wanted also to point out that i tried the economic kind of analog ph-meter with very very poor results, i think for interference but im not sure.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hello, i've seen you implemented ADS1115 support in your project and that is a great thing. Only thing i want to ask is how many bits of data does the ADS1115 sends to the rpi via i2c ? Which is the format of that bits ? I've seen the reading from the pi is the bare fraction of voltage. I wanted also to point out that i tried the economic kind of analog ph-meter with very very poor results, i think for interference but im not sure.
2 bytes. Here is the code: https://github.com/reef-pi/drivers/blob/master/ads1x15/channel.go#L105
 
Back
Top