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

SDchris

Active Member
View Badges
Joined
Mar 3, 2015
Messages
123
Reaction score
164
Location
Sydney
Rating - 0%
0   0   0
Pin 4 by default is assigned the 1-Wire communication protocol, that's what the ds18b20 temp sensors use. You can change that to any other usable pin through a config. file. But I'm not sure on the consequences of doing so in reef-pi.

Chris
 
Last edited:

Jonathan Troutt

Well-Known Member
View Badges
Joined
Apr 1, 2018
Messages
970
Reaction score
1,173
Location
Indianapolis, IN
Rating - 0%
0   0   0
@Ranjib

Well now i am having issues applying my calibration.
Code:
 curl -X POST -d @calibration.json -b cookie.txt http://10.0.0.132:56789/api/phprobes/1/calibrate
{"error":"invalid character '/' looking for beginning of value"}

I get an error when I try and apply the calibration.

here is contents of my calibration.json
Code:
[/LIST]
[
 {"expected":7.0, "observed": -310},
 {"expected":10.0, "observed": -21685},
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
@Ranjib

Well now i am having issues applying my calibration.
Code:
 curl -X POST -d @calibration.json -b cookie.txt http://10.0.0.132:56789/api/phprobes/1/calibrate
{"error":"invalid character '/' looking for beginning of value"}

I get an error when I try and apply the calibration.

here is contents of my calibration.json
Code:
[/LIST]
[
 {"expected":7.0, "observed": -310},
 {"expected":10.0, "observed": -21685},
I don't think you should need the [/LIST]. The following should be sufficient. (Your snippet was also missing the closing square brace.)

Code:
[
 {"expected":7.0, "observed": -310},
 {"expected":10.0, "observed": -21685}
]
 

Jonathan Troutt

Well-Known Member
View Badges
Joined
Apr 1, 2018
Messages
970
Reaction score
1,173
Location
Indianapolis, IN
Rating - 0%
0   0   0
I don't think you should need the [/LIST]. The following should be sufficient. (Your snippet was also missing the closing square brace.)

Code:
[
 {"expected":7.0, "observed": -310},
 {"expected":10.0, "observed": -21685}
]
You know I noticed it was missing the closing brace. So i redid it and made sure it was there but when i ctrl-c and then went to look at it again it was gone. Not sure why that is doing that let me try eliminating the list line.
 

Jonathan Troutt

Well-Known Member
View Badges
Joined
Apr 1, 2018
Messages
970
Reaction score
1,173
Location
Indianapolis, IN
Rating - 0%
0   0   0
@Michael Lane

Well that did it working like a charm now!

5BD837FF-9578-411B-910C-8DF81B0B883A.jpeg
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Im going to experiment when i calibrate. My 4,7, and 10 calibration packets arrive today. Since reef pi is 2 point calibration, I should use 4 and 7 to calibrate, but im curious if i calibrate at 4 and 10 how close the 7.0 reading will be in the 7.0 solution..if its dang close, I may just use a 4 and 10 calibration.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
@Ranjib

So can you use 3 calibration samples if you wanted to? 10, 7 and 4?
For ph meters that may be measuring the whole range from 0 to 14, and have temperature compensation, ph meters usually use a 3 point calibration. The cal at 7 and 10 gives the alkaline slope, the 4 and 7 gives the acidic range slope. The calibration at 7 also gives the offset from 0, which is used to offset the whole range and figured in when compensating for temperature.
Since most of out tanks are within a few degrees of 25C or 77F where the standard is measured for ph, the temp conpensation is so small that it doesnt matter for our purposes. So a 2 point calibration is accurate enough. It would make a difference if you were running a special coldwater tank for trout at 50F, or using your ph probe for measuring during brewing beer at high temps.
 

Jonathan Troutt

Well-Known Member
View Badges
Joined
Apr 1, 2018
Messages
970
Reaction score
1,173
Location
Indianapolis, IN
Rating - 0%
0   0   0
For ph meters that may be measuring the whole range from 0 to 14, and have temperature compensation, ph meters usually use a 3 point calibration. The cal at 7 and 10 gives the alkaline slope, the 4 and 7 gives the acidic range slope. The calibration at 7 also gives the offset from 0, which is used to offset the whole range and figured in when compensating for temperature.
Since most of out tanks are within a few degrees of 25C or 77F where the standard is measured for ph, the temp conpensation is so small that it doesnt matter for our purposes. So a 2 point calibration is accurate enough. It would make a difference if you were running a special coldwater tank for trout at 50F, or using your ph probe for measuring during brewing beer at high temps.


you ever seen that documentary about corals below the ice sheet in antartica? I've always thought it would be cool to keep a tank that like. Be almost impossible to get stuff to put in it but it would still be neat if you could.

The trout tank comment jogged that thought. A trout tank would be amazing to!
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
you ever seen that documentary about corals below the ice sheet in antartica? I've always thought it would be cool to keep a tank that like. Be almost impossible to get stuff to put in it but it would still be neat if you could.

The trout tank comment jogged that thought. A trout tank would be amazing to!
I had a coldwater minnow/brook trout tank 15 years ago...back then they didnt have the chillers and powerheads they do now...it did well all winter in the basement, until summer hit...trout need cold water and lots of oxygen, and pristine water.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Thank you very much, knowing the lenght of the message (you said 31) i managed to send a "fake" constant value of pH 9.310 in ASCII code. Now i have only to implement the analogic pH reading and combining them.
Keep us posted.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
If I build the circuit above do I also need to make the dimming circuit on the Reef Pi Guide 5: lighting controller, or would the one above connect straight to the reef pi controller?
Im sorry I lost track of what you were upto :) . do you have thread or can you remind me what us the target light /setup etc?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I did not do any upgrades
Did i clean install of version 3

I think i might have accidentally tried to delete the raspberry driver as it was working before i started playing with my ph setup
you can always reset reef-pi by deleting the database and restarting it. checkout the troubleshooting guide for details
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
In timers does anyone know of a way to get equipment to turn on for example every Wednesday?
This is not supported yet in reef-pi. you can say things like 3rd day of the month (3) or every 7 th day (*/7) etc. I am planning to change the timer API/UI to accommodate things like this.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
When enable pca9685 and a physically connected pca9685 it works great!
I found that you can connect multiple temp sensors to only one gpio04 pin. Before, I had a relayboard connected to gpio04 and it did not work, i thought the gpiopin was dead, probably I had temp selected in settings,.
Is only gpio04 for temp sensors? Or can i use other pins to? I tried gpio17 but no temp sensors showed up.


20190629_093757.jpg
reef-pi , the software itself is not aware of specific GPIO pin that is used for one wire communication (temperature sensor), this is configured at linux/kernel level (/boot/config.txt). you can update that file to use any other pin. By default its 4, and I tend to stick with that. Check out this page: https://reef-pi.github.io/guides/electronics/ , at the end of this i have shared a recommended pin layout. You dont have to stick to it, this is just what I use and it calls out other known use cases
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
When enable pca9685 and a physically connected pca9685 it works great!
I found that you can connect multiple temp sensors to only one gpio04 pin. Before, I had a relayboard connected to gpio04 and it did not work, i thought the gpiopin was dead, probably I had temp selected in settings,.
Is only gpio04 for temp sensors? Or can i use other pins to? I tried gpio17 but no temp sensors showed up.


20190629_093757.jpg
https://pinout.xyz/pinout/1_wire this page details how to use other than GPIO 4 for one wire. Note, in any case you need only one gpio pin
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Pin 4 by default is assigned the 1-Wire communication protocol, that's what the ds18b20 temp sensors use. You can change that to any other usable pin through a config. file. But I'm not sure on the consequences of doing so in reef-pi.

Chris
Nothing. reef-pi should work fine as long as the right settings are there and the sensors are detected
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib

So can you use 3 calibration samples if you wanted to? 10, 7 and 4?
Nope. As of now we only support two point calibration. I am looking for references on three point calibration algorithms. I am not sure though its very useful (compared to the algorithmic complexity involved) for our cases. From my primitive understanding most freshwater or saltwater aquarium use case should be fine at two point calibrated readings,.
 

Keeping it clean: Have you used a filter roller?

  • I currently use a filter roller.

    Votes: 20 31.7%
  • I don’t currently use a filter roller, but I have in the past.

    Votes: 2 3.2%
  • I have never used a filter roller, but I plan to in the future.

    Votes: 13 20.6%
  • I have never used a filter roller and have no plans to in the future.

    Votes: 24 38.1%
  • Other.

    Votes: 4 6.3%

New Posts

Back
Top