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

Jean-Pierre Renaud

Community Member
View Badges
Joined
Feb 7, 2018
Messages
49
Reaction score
39
Location
Blainville
Rating - 0%
0   0   0
So i got my new 75g up and running but i was on version 2.0,

i see version 2.3 now available, can i update this from a simple commande line in SSH ?

or should i wait to be home to do it ?
do i keep my current connectors and jack setting when upgrading or do i need to redo all the setup ?

Thanks again for that awesome program !
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Got around to doing some tests. Here is the test setup.
2 x stepper pumps for fill and reagent, 1 x std dosing pump for drain. pH probe with atlas pH circuit, diy stirrer.
alk_test.jpg


Set it to do 7 test over 5 hours. Testing natural seawater. Results in dKH:
6.991
6.949
6.894
6.910
6.891
6.883
6.889
Not to bad.
There is trend that when the test isn't run for 12 hours or more the first couple tests seem to read a little higher. Need to look into that a little further.
Very small sample size but looks promising.

Chris
Looking good :)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
So i got my new 75g up and running but i was on version 2.0,

i see version 2.3 now available, can i update this from a simple commande line in SSH ?

or should i wait to be home to do it ?
do i keep my current connectors and jack setting when upgrading or do i need to redo all the setup ?

Thanks again for that awesome program !
I’d recommend upgrading it when you are at home and test the features you use after the upgrade. I won’t recommend upgrading unless you are looking for something specific from the new version. You don’t need to recreate any of your configuration if it’s 2 to 2.3
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
.....Should I be seeing connectivity across Out + & Out - on the buck converters? I've been having issues trying to get the doser pump running, so I started doing tests & realized all of the converters I got have 120 Ohms of resistance between them. I know these are cheap converters, but surely every single one of them having the same issue is a little odd?
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Good morning from California,
I just release an early release of reef-pi 3.0.0. This release aimed to onboard ph sensors for ph board and pico board users. This is a very early beta release, and not as rigorously field tested as the other public releases, but I have been running it for a week at least without any issues across light, power, temperature and ph modules. Its in 3.x series and wont be compatible to 2.x database, users have to recreate their setup. This release brings a host of new things, notably HAL (hardware abstraction layer) , internationalization, ph/pico board drivers, calibration support etc. The newly introduced HAL layer means users have to create a driver first (under Configuration -> Drivers) which is then associated with connectors. On the plus side, this mean users can now add multiple pca9685 , ph sensor board etc. The new HAL layer also allows using pca9685 as standard outlet control, this enables user to overcome the Pi GPIO limits in terms of outlet control :0-). Release builds can be found in usual place: https://github.com/reef-pi/reef-pi/releases/tag/3.0.0-pre-alpha-1

I am jotting down the ph board setup, to give you a glimpse of how this works. The calibration part is not yet supported via UI, we'll have to do it using the API.

  1. 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)
    Screen Shot 2019-05-26 at 9.37.13 AM.png
  2. Next download and install the 3.0 pre-alpha release. Make sure to delete the old database. Details can be found in the troubleshooting guide
  3. 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). Set 64 as the driver address (for pico base board users, it will be 72, @theatrus can you verify this is uniform across all pico base board users?). Specify a name, keep it unique across different drivers.
    Screen Shot 2019-05-26 at 9.32.44 AM.png
  4. 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
  5. 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 thats it, you should see your ph sensors reading. Note, without calibration it will emit sensor values in raw milivolts, which for me is around -8K.
    Screen Shot 2019-05-26 at 9.36.45 AM.png
  6. Next, perform calibration. reef-pi allows one or two point calibration. Each calibration point is indicated by an expected and an observed value. 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. We'll be applying the calibration via API (due to UI still being worked on). Create a json file (calibration.json) containing the calibration data in this format. The example shows my two point calibration again my own tank water with reference reading taken from hanna ph checker.
    Code:
    [/LIST]
    [
     {"expected":8.21, "observed": -8768},
     {"expected":8.12, "observed": -8189}
    ]

    reef-pi requires authentication for api, we'll use one curl command to get the authentication token, and another to use the token to apply our calibration data. Remember to disable the ph monitor before applying calibration.
    Code:
    curl -d @creds.json -X POST http://<IP>/auth/signin -c cookie.txt
    curl -X POST -d @calibration.json -b cookie.txt  http://<IP>/api/phprobes/1/calibrate


    Note, the last command assumes the ph monitor id is 1, which will be the case if you create a ph monitor first. If you delete and create another one it will be 2 and so on.. so if you are making a re-attempt then update the command accrodingly. Calibration details are specific to individual probes/ph monitors. You can always checkout your existing ph probes and their ids using this command

    Code:
    curl  -b cookie.txt  http://<IP>/api/phprobes/
    And it will return all the ph probe and their id, name etc. You can use the id returned by this command to calibrate,

    let me know how it goes,
    thank you for testing out this early build, we are very excited to ship this :) . Thanks to @Roberto_b @theatrus @Michael Lane @Zekth for all the awesome work they did.

    p.s. we are still looking for help with translations, so if you want to see your favorite language supported in reef-pi or improve the existing translations, please get in touch with us
@Ranjib
With the ph board added to reef pi and NO probe hooked to the bnc connector, what reading does your setup give?

I loaded reef pi 3.0 and added the board, without a probe hooked up i get a reading of -32768...just wondering if that is correct(board is working)
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,943
Reaction score
3,337
Location
Sacramento, CA area
Rating - 0%
0   0   0
@Ranjib
With the ph board added to reef pi and NO probe hooked to the bnc connector, what reading does your setup give?

I loaded reef pi 3.0 and added the board, without a probe hooked up i get a reading of -32768...just wondering if that is correct(board is working)

Probably about right - the just shows its railed to the negative voltage. If you short the center pin of the BNC to the outer shell you should approximately 0 (+/- some number)
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,943
Reaction score
3,337
Location
Sacramento, CA area
Rating - 0%
0   0   0
.....Should I be seeing connectivity across Out + & Out - on the buck converters? I've been having issues trying to get the doser pump running, so I started doing tests & realized all of the converters I got have 120 Ohms of resistance between them. I know these are cheap converters, but surely every single one of them having the same issue is a little odd?

You'll see some conductivity if you're measuring with a resistance mode - in one direction, you'll read through the diode, and in the other direction may read through a floating FET internal to the switcher.

The more interesting question is voltage when loaded by the motor.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Found a bug in 3.0 that makes it unusable for me for the time being.

With the pca9685...setting the lights 'active high' a setting of 0 turns the lights fully on, and setting at 100 turns them fully off, which is backwards.

Settings from 1 to 99 work as they should.

@Ranjib
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib
With the ph board added to reef pi and NO probe hooked to the bnc connector, what reading does your setup give?

I loaded reef pi 3.0 and added the board, without a probe hooked up i get a reading of -32768...just wondering if that is correct(board is working)
Yup, this is what i observed with no probe attached.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Found a bug in 3.0 that makes it unusable for me for the time being.

With the pca9685...setting the lights 'active high' a setting of 0 turns the lights fully on, and setting at 100 turns them fully off, which is backwards.

Settings from 1 to 99 work as they should.

@Ranjib
I'll look into this, its been hurting others as well. Theres a min/max threshold and a start value in light module which should help your situation, ideally (e.g. light with start 1 and max 99 should fix your light issue). But this customizability is not available across doser and any other pwm consumers. None of it justify the bug though, I'll fix it asap
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I'll look into this, its been hurting others as well. Theres a min/max threshold and a start value in light module which should help your situation, ideally (e.g. light with start 1 and max 99 should fix your light issue). But this customizability is not available across doser and any other pwm consumers. None of it justify the bug though, I'll fix it asap
Yes it works at 1 to 99 but I cant turn the light fully off unless I run it thru my relay to do on/off, and im controlling 4 channels.
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
You'll see some conductivity if you're measuring with a resistance mode - in one direction, you'll read through the diode, and in the other direction may read through a floating FET internal to the switcher.

The more interesting question is voltage when loaded by the motor.

Huh, I guess this is above my knowledge level as far as electronics go. When I saw I had connectivity across the 5V power & ground lines, I thought I had a short somewhere so I started taking things off to find the root of the issue. Ended up tracing it all the way back to the converter.

So that being said, I *should* be seeing connectivity between my power & ground rails? How does that not short it out?
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
So that being said, I *should* be seeing connectivity between my power & ground rails? How does that not

Every time you use electric to do work, you complete a circuit...in effect shorting it out. A simple light bulb operated by a battery is an example. The light bulb completes the citcuit and you would read a resistance thru the bulb.

The key is the resistance and voltage being used. If you had 12 volts and the lamp was 120 ohms, .1 amps of current flows thru the circuit, which is a manageable current. If the lamp was 12 ohms, 1 amp flows which is still manageable. Replace the lamp with a short section of wire with a resistance of .12 ohms and now 100 amps can flow, which is not manageable unless the circuit was built with very heavy cable. If the wire section was .012 ohms 1000 amps could flow which would surely cause a bang!

Do some reading on basic electronics and Ohms law, it may clear this up a bit foe you.
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,075
Location
Gambrills
Rating - 0%
0   0   0
Good morning from California,
I just release an early release of reef-pi 3.0.0. This release aimed to onboard ph sensors for ph board and pico board users. This is a very early beta release, and not as rigorously field tested as the other public releases, but I have been running it for a week at least without any issues across light, power, temperature and ph modules. Its in 3.x series and wont be compatible to 2.x database, users have to recreate their setup. This release brings a host of new things, notably HAL (hardware abstraction layer) , internationalization, ph/pico board drivers, calibration support etc. The newly introduced HAL layer means users have to create a driver first (under Configuration -> Drivers) which is then associated with connectors. On the plus side, this mean users can now add multiple pca9685 , ph sensor board etc. The new HAL layer also allows using pca9685 as standard outlet control, this enables user to overcome the Pi GPIO limits in terms of outlet control :0-). Release builds can be found in usual place: https://github.com/reef-pi/reef-pi/releases/tag/3.0.0-pre-alpha-1

I am jotting down the ph board setup, to give you a glimpse of how this works. The calibration part is not yet supported via UI, we'll have to do it using the API.

  1. 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)
    Screen Shot 2019-05-26 at 9.37.13 AM.png
  2. Next download and install the 3.0 pre-alpha release. Make sure to delete the old database. Details can be found in the troubleshooting guide
  3. 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). Set 64 as the driver address (for pico base board users, it will be 72, @theatrus can you verify this is uniform across all pico base board users?). Specify a name, keep it unique across different drivers.
    Screen Shot 2019-05-26 at 9.32.44 AM.png
  4. 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
  5. 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 thats it, you should see your ph sensors reading. Note, without calibration it will emit sensor values in raw milivolts, which for me is around -8K.
    Screen Shot 2019-05-26 at 9.36.45 AM.png
  6. Next, perform calibration. reef-pi allows one or two point calibration. Each calibration point is indicated by an expected and an observed value. 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. We'll be applying the calibration via API (due to UI still being worked on). Create a json file (calibration.json) containing the calibration data in this format. The example shows my two point calibration again my own tank water with reference reading taken from hanna ph checker.
    Code:
    [/LIST]
    [
     {"expected":8.21, "observed": -8768},
     {"expected":8.12, "observed": -8189}
    ]

    reef-pi requires authentication for api, we'll use one curl command to get the authentication token, and another to use the token to apply our calibration data. Remember to disable the ph monitor before applying calibration.
    Code:
    curl -d @creds.json -X POST http://<IP>/auth/signin -c cookie.txt
    curl -X POST -d @calibration.json -b cookie.txt  http://<IP>/api/phprobes/1/calibrate


    Note, the last command assumes the ph monitor id is 1, which will be the case if you create a ph monitor first. If you delete and create another one it will be 2 and so on.. so if you are making a re-attempt then update the command accrodingly. Calibration details are specific to individual probes/ph monitors. You can always checkout your existing ph probes and their ids using this command

    Code:
    curl  -b cookie.txt  http://<IP>/api/phprobes/
    And it will return all the ph probe and their id, name etc. You can use the id returned by this command to calibrate,

    let me know how it goes,
    thank you for testing out this early build, we are very excited to ship this :) . Thanks to @Roberto_b @theatrus @Michael Lane @Zekth for all the awesome work they did.

    p.s. we are still looking for help with translations, so if you want to see your favorite language supported in reef-pi or improve the existing translations, please get in touch with us

Can't add the connector for the pH probe using a pico board. I've used 72 and 75 as the address, and when I went to add the connector, it fails and says I can't use port 0



pH probe fail.JPG
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
What address is your ph board on the i2c bus?
ssh into the pi and issue this command which lists all devices on the i2c bus:

sudo i2cdetect -y 1

Something @Ranjib forgot to mention in the mini tutorial he gave is:
If your ph board or pca9865 address is 40 on i2c-detect, that address is in hex and is really 0x40, so converting hex 40 to decimal it is 64, which is the address reef pi uses when setting up.
So if ph board or pca9685 address is:

I2c address 40=reef pi address 64
I2c address 41=reef pi address 65
I2c address 42=reef pi address 66
I2c address 43=reef pi address 67
I2c address 44=reef pi address 68
I2c address 45=reef pi address 69
I2c address 46=reef pi address 70

And so on...convert the hex addy to the decimal. I am not sure what the pico board defaults to, @theatrus can chime in here.
 
Last edited:

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,075
Location
Gambrills
Rating - 0%
0   0   0
@theatrus
Can't add the connector for the pH probe using a pico board. I've used 72 and 75 as the address, and when I went to add the connector, it fails and says I can't use port 0



pH probe fail.JPG

Nevermind, I was able to get it working......:oops:
 

Mastering the art of locking and unlocking water pathways: What type of valves do you have on your aquarium plumbing?

  • Ball valves.

    Votes: 71 53.0%
  • Gate valves.

    Votes: 68 50.7%
  • Check valves.

    Votes: 34 25.4%
  • None.

    Votes: 30 22.4%
  • Other.

    Votes: 9 6.7%

New Posts

Back
Top