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

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Tonight is just full of surprises. Hooked up one of @Michael Lane 's pH boards & I cannot get any readings from my probe. It's just stuck at 0.

pH Probe 0.PNG

I have both jumpers on the board & i2cdetect sees the board at 0x45. I'm using the PINPOINT Marine probe, brand new. Just unboxed it. Is there a way to verify the probe itself isn't the problem?

I calibrated it using 6.86 solution for the midpoint value & 9.18 as the high point. One bit of weirdness I noted was that when I typed those values in, it asked me to select a valid value. For example, for the midpoint, I typed 6.86, it highlighted the box red & said the closest valid values were 6.86 & another number, can't remember. The only way I could get it to proceed was if I used the arrows to increase to 7.86, then decrease back to 6.86.
I don't have anything to add to the calibration comment, but reef-pi uses decimal for the address instead of hex. Instead of 0x45, try using 69 instead.
 

hotdrop

Well-Known Member
View Badges
Joined
Jan 29, 2019
Messages
608
Reaction score
568
Rating - 0%
0   0   0
is anyone selling custom reef Pi boards that are already setup for temperature and ph monitoring? I remember some pictures floating around this thread earlier.
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
Okay, starting to get mine together, my adj strip is running!

Two questions: with multiple temperature sensors, can you have it alert when they differ by more than, say 1 degree c? If not, I may just set up one to control 77-80 and the other alert and control 76-81?

Second: mechanical relays are more prone to failure than solid state, right? Solid state struggle with low loads. So maybe I could add a solid state relay in addition to the adj strip to control my heaters? Low likelihood of failure and not a low load..seem good?
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
Tonight is just full of surprises. Hooked up one of @Michael Lane 's pH boards & I cannot get any readings from my probe. It's just stuck at 0.

pH Probe 0.PNG

I have both jumpers on the board & i2cdetect sees the board at 0x45. I'm using the PINPOINT Marine probe, brand new. Just unboxed it. Is there a way to verify the probe itself isn't the problem?

I calibrated it using 6.86 solution for the midpoint value & 9.18 as the high point. One bit of weirdness I noted was that when I typed those values in, it asked me to select a valid value. For example, for the midpoint, I typed 6.86, it highlighted the box red & said the closest valid values were 6.86 & another number, can't remember. The only way I could get it to proceed was if I used the arrows to increase to 7.86, then decrease back to 6.86.
Ok, so you are using the opensource ph board. This will not work on 2.4 and it requires 3.0 onwards. Support for this driver was done recently and its scheduled to be available for public release later this year. You can use the 3.0 testing builds to use the ph board but calibration is still not supported via the UI yet. @Michael Lane is working on this (calibration support via UI), but its not ready yet

It looks like you need reef pi 3.0 for @Michael Lane's pH boards.
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
I don't have anything to add to the calibration comment, but reef-pi uses decimal for the address instead of hex. Instead of 0x45, try using 69 instead.

Just tried that... No luck. I'm getting this error every time I try to calibrate.

Write Error.PNG



Here's the journal
1572296911437.png

Still getting the please select a valid value error as well.
I've reset the database a few time now. Once I get back in about 30 minutes, I'll be downgrading to 2.4 & if that doesn't work, I'll try 3.0.0 v2.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Yes, there was a calibration bug fixed in August. I don't believe it is packaged into a release yet, but I think a new alpha release it's coming soon.

In the meantime, calibration would have to be done via the command line.
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
Yes, there was a calibration bug fixed in August. I don't believe it is packaged into a release yet, but I think a new alpha release it's coming soon.

In the meantime, calibration would have to be done via the command line.

Ahhhh, after digging through tons of posts, I finally pieced together how to do this, lol. I'll post the consolidated, & corrected instructions here for future pioneers with a few additions that could help. I'll replace any mentions of IP with a generic IP of 192.168.x.x, use your raspberry pi's IP instead. If you don't know it, go to the terminal & type ifconfig, then press enter.

  • Wire up your ph board and power up your raspberry pi. Once up,you should see the ph board regisetered as i2c addres 0x40 (64 in decimal). Type i2cdetect -y 1 into terminal & press enter. The default address for your board may be different (the @Michael Lane one is 45 with both jumpers attached). It will appear in this list.

    Screen Shot 2019-05-26 at 9.37.13 AM.png
  • Next download and install the 3.0 pre-alpha release. Make sure to delete the old database. In terminal, use the following commands:
  • sudo systemctl stop reef-pi.service
  • sudo rm -rf /var/lib/reef-pi/reef-pi.db
  • sudo systemctl start reef-pi.service
  • Once running , go ahead and create a new driver from the Configuration -> Drivers section, select phboard as type (pico board for pico base board users).
  • Make sure to click on the drop down and select the type, even if the one shown in the UI by default is the one you are using (i.e. do an explicit selection).
  • My UI gave an error if i had a space in the Name, may just be me though.
  • Your address is in decimal format. Look up a "Hex to decimal convertor" & type in your address from the i2cdetect command (e.g. 0x40) & convert it. 0x45 = 69.
  • Specify a name, keep it unique across different drivers.

    Screen Shot 2019-05-26 at 9.32.44 AM.png
  • Next, create a connector under analog input section and associate it with the new driver, specify channel as "0" and give it a name.

    Screen Shot 2019-05-26 at 9.36.13 AM.png
  • Next, create a pH monitor (if you dont see ph tab, then probably its not enabled, enable this module under Configuration -> Settings, and reload reef-pi).
  • Associate the ph monitor with the newly created analog input. And that's it, you should see your ph sensors reading. Note, without calibration it will emit sensor values in raw millivolts, which for me is around -8K.

    Screen Shot 2019-05-26 at 9.36.45 AM.png
  • Time to perform calibration (don't use the button, we've got to use a work around).
  • If you are using reference solution (like ph 7 and 10), keep them in tank temperature and immerse probe in them and note down the reading from the dashboard. It will take a few minute to stabilize the reading. For example, if you put it in 8.21 pH solution, you may get a reading fluctuating around -8768.
  • We'll be applying the calibration via API (due to UI still being worked on).
  • Go to your pi's file manager, right click, create a new file, name it calibration.json containing the calibration data in this format.
[
{"expected":8.21, "observed": -8768},
{"expected":8.12, "observed": -8189}
]
  • The example shows my two point calibration again my own tank water with reference reading taken from hanna ph checker.
  • DISABLE the pH monitor before continuing.
  • In terminal, type the following 2 commands (pressing enter after each)

    curl -c cookie.txt -X POST -d '{"user":"reef-pi", "password":"reef-pi"}' http://127.0.0.1/auth/signin
  • you will get a return of "null"- this is good.
    curl -X POST -d @calibration.json -b cookie.txt http://192.168.x.x/api/phprobes/1/calibrate
  • If you've had multiple attempts at creating a pH monitor, your pH monitor ID may not be 1. If you want to check, use the following command in terminal:
You can now go back to your UI, enable the pH probe, then watch the output to see if it's an actual pH value now!
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
So I tried to set up a timer to run the ATO for 5 minutes every hour (it runs so often now and is kinda loud as it splashes in), but can't quite figure out the configuration. Any advice?
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
So I tried to set up a timer to run the ATO for 5 minutes every hour (it runs so often now and is kinda loud as it splashes in), but can't quite figure out the configuration. Any advice?
I should note the ATO is just a relay outlet, not a reef-pi ATO
 

brandon clow

Active Member
View Badges
Joined
Oct 22, 2017
Messages
121
Reaction score
155
Rating - 0%
0   0   0
Have you tried a 0 in the minutes field for on a 5 in the minutes field in the off timer? I believe all others should remain as a *
 

brandon clow

Active Member
View Badges
Joined
Oct 22, 2017
Messages
121
Reaction score
155
Rating - 0%
0   0   0
Have you tried a 0 in the minutes field for on a 5 in the minutes field in the off timer? I believe all others should remain as a *

I should mention that this could also be done by doing a turn on and then a turn off after so many seconds of runtime (all within the same timer)
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Is there a good way to obtain the raw mV value from a pH probe without having to delete the calibration file? Or is that the best way to go about it?
It may depend on the pH module, but I doubt the raw mV reading will be available. Usually, the mV will be processed through an analog to digital converter which will scale the voltage to a number (based on the ADC resolution).

On the other hand, if you are interested in obtaining the raw values, it will still available via the api at /api/phprobes/{id}/read once the next alpha release is cut. You may be able to see it on the calibrate modal (despite the current bug).
 
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
Okay, starting to get mine together, my adj strip is running!

Two questions: with multiple temperature sensors, can you have it alert when they differ by more than, say 1 degree c? If not, I may just set up one to control 77-80 and the other alert and control 76-81?

Second: mechanical relays are more prone to failure than solid state, right? Solid state struggle with low loads. So maybe I could add a solid state relay in addition to the adj strip to control my heaters? Low likelihood of failure and not a low load..seem good?
Well f
Ahhhh, after digging through tons of posts, I finally pieced together how to do this, lol. I'll post the consolidated, & corrected instructions here for future pioneers with a few additions that could help. I'll replace any mentions of IP with a generic IP of 192.168.x.x, use your raspberry pi's IP instead. If you don't know it, go to the terminal & type ifconfig, then press enter.

  • Wire up your ph board and power up your raspberry pi. Once up,you should see the ph board regisetered as i2c addres 0x40 (64 in decimal). Type i2cdetect -y 1 into terminal & press enter. The default address for your board may be different (the @Michael Lane one is 45 with both jumpers attached). It will appear in this list.

    Screen Shot 2019-05-26 at 9.37.13 AM.png
  • Next download and install the 3.0 pre-alpha release. Make sure to delete the old database. In terminal, use the following commands:
  • sudo systemctl stop reef-pi.service
  • sudo rm -rf /var/lib/reef-pi/reef-pi.db
  • sudo systemctl start reef-pi.service
  • Once running , go ahead and create a new driver from the Configuration -> Drivers section, select phboard as type (pico board for pico base board users).
  • Make sure to click on the drop down and select the type, even if the one shown in the UI by default is the one you are using (i.e. do an explicit selection).
  • My UI gave an error if i had a space in the Name, may just be me though.
  • Your address is in decimal format. Look up a "Hex to decimal convertor" & type in your address from the i2cdetect command (e.g. 0x40) & convert it. 0x45 = 69.
  • Specify a name, keep it unique across different drivers.

    Screen Shot 2019-05-26 at 9.32.44 AM.png
  • Next, create a connector under analog input section and associate it with the new driver, specify channel as "0" and give it a name.

    Screen Shot 2019-05-26 at 9.36.13 AM.png
  • Next, create a pH monitor (if you dont see ph tab, then probably its not enabled, enable this module under Configuration -> Settings, and reload reef-pi).
  • Associate the ph monitor with the newly created analog input. And that's it, you should see your ph sensors reading. Note, without calibration it will emit sensor values in raw millivolts, which for me is around -8K.

    Screen Shot 2019-05-26 at 9.36.45 AM.png
  • Time to perform calibration (don't use the button, we've got to use a work around).
  • If you are using reference solution (like ph 7 and 10), keep them in tank temperature and immerse probe in them and note down the reading from the dashboard. It will take a few minute to stabilize the reading. For example, if you put it in 8.21 pH solution, you may get a reading fluctuating around -8768.
  • We'll be applying the calibration via API (due to UI still being worked on).
  • Go to your pi's file manager, right click, create a new file, name it calibration.json containing the calibration data in this format.
[
{"expected":8.21, "observed": -8768},
{"expected":8.12, "observed": -8189}
]
  • The example shows my two point calibration again my own tank water with reference reading taken from hanna ph checker.
  • DISABLE the pH monitor before continuing.
  • In terminal, type the following 2 commands (pressing enter after each)

    curl -c cookie.txt -X POST -d '{"user":"reef-pi", "password":"reef-pi"}' http://127.0.0.1/auth/signin
  • you will get a return of "null"- this is good.
    curl -X POST -d @calibration.json -b cookie.txt http://192.168.x.x/api/phprobes/1/calibrate
  • If you've had multiple attempts at creating a pH monitor, your pH monitor ID may not be 1. If you want to check, use the following command in terminal:
You can now go back to your UI, enable the pH probe, then watch the output to see if it's an actual pH value now!
thank you so much for writing this up. i'll refer this for 3.0 docs
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
Ok, so I deleted my calibration to confirm a suspicion I had. The readings are pretty unstable from the probe. This is the output from my probe sitting undisturbed in 9.18 solution for roughly an hour.

Have other people seen this as well?

594040311.jpg
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top