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

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
It's not pretty yet, but my Temp probes and power controller are tested and 100% functional! Thanks again for the awesomeness! Looking forward to the next steps in the project. - Putting it into a pretty case is next on my list.. then we'll see where things go.

The first pic, 2 DB9's run to the temp probes btw. 2 up top, and 2 underneath - Just figured DB9's for everything as a standard connector as they're cheap.

reef-pi1.jpg
reef-pi2.jpg
reef-pi3.jpg
W00t :) . Keep us posted
 
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
The light I have if you don’t give it a signal it is at full power. So when the Raspberry Pi is booting the light is on full blast. I’m worried that if the Raspberry Pi ever crashed that the light would be on. Is there a way to circumvent this?
I think you can control the power of such lights with a normally open relay (like the one configured in adj powerstrip)
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
So, I've been moving along & ran into an...interesting issue. I've got 12 relays in my setup & they all work just fine. I can turn them on or off with no problem. But when I have 10 on at once, a barely perceptible high-pitch whine comes out of the 5V buck converter. 11 on results in a loud whine. 12 on results in a sound I can only describe as "distressed", where it jumps between the high pitched whine & a low pitch one quickly.

These converters are rated for 3a & the relays should only pull 20 ma max. The RPi Zero takes ~250 ma max. The only other thing on the 5V converter is the PWM driver, which doesn't have anything hooked up to it yet. But either way, I'm sure it couldn't suck up the remaining ~2a the converter is rated for.

I think I'll just re-wire a couple of the relays to be normally open, so to have all the equipment on or off, I'll never have more than 10 relays triggered. But that's more of a work-around than a real solution. Just wondering if anyone has experienced anything similar.

~`~

On a different note, so everything I post here isn't just issues, here's the state of my desk right now. I'm getting close to being complete & having my desk back!

Desk.jpg
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
Its the buck convertor quality...some use better matched passives than others...

Is there a known supplies that has better quality converters? In the mean time, would it hurt anything to run these, or will it just be annoying until I get new ones?
 
Last edited:

ChrisNH

Active Member
View Badges
Joined
Mar 21, 2019
Messages
305
Reaction score
254
Rating - 0%
0   0   0
yes. Be careful with your power requirement, and remember you may need extra passives when combining these circuits
I am using a 12v 2amp ps. I will consider powering the pi separately if I run into trouble. I probably should add up the current requirements of what I plan to add. I am not sure what I would do as far as adding passives (I assume for filtering?) but will cross that bridge later if I need to.
 
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
Is there a known supplies that has better quality converters? In the mean time, would it hurt anything to run these, or will it just be annoying until I get new ones?
Do you have to power all of your electronics from a single lm2596 board? I would recommend using multiple lm2596 units powering different parts of the build
 
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 am using a 12v 2amp ps. I will consider powering the pi separately if I run into trouble. I probably should add up the current requirements of what I plan to add. I am not sure what I would do as far as adding passives (I assume for filtering?) but will cross that bridge later if I need to.
I have always had issues with pwm annd all in one circuits. My learning was I need to add capacitors to smooth out my power signals at individual junction. This may be due to the fact that my light/pwm controllers involve 10v signal in addition to regular 12 and 5v
 
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
Hey all,

Can anyone help with how the dinural setting works - how long between each % does it ramp up? e.g. I have set Lights to come on at 10:30am to 21:30pm - With a min of 0 and a max of 80 - How long does it take to get to 80 and what are the increments.

Sorry if its already been published.
Diurnal cycle works by exponential ramp up and ramp down. It employs a mathematical formula that is codified here. Expect your lights to reach peak intensity (80% in your case) within the first couple of ours,, but not exactly linearly little smooth ..more like elongated "S", the same applies for ramp down. The intensity stays at peak for most part (3/4th) of the entire period. Here is an example of the intensity curve. You should be able to observe this in adafruit io or promethus dashboard, if you setup.
Screen Shot 2019-05-25 at 6.46.22 PM.png
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Is there a known supplies that has better quality converters? In the mean time, would it hurt anything to run these, or will it just be annoying until I get new ones?

I have purchased some buck converters based on a XL4015 chipset for another project, they are rated for 5amps and look a little better than the lm2596. They probably will not support 5amp but should be better than the lm2596. I posted pictures of them earlier in the thread, if I can find my posting with the picture I will link it so you can see the difference. :)

Found the link - https://www.reef2reef.com/threads/r...-on-raspberry-pi.289256/page-548#post-6021768
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
Do you have to power all of your electronics from a single lm2596 board? I would recommend using multiple lm2596 units powering different parts of the build

I guess I don't necessarily. Just tested it out & I actually have enough room in my enclosure to fit 3 more if needed. Tomorrow, I'll install a second in there solely to power the relays & go from there!
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
I have purchased some buck converters based on a XL4015 chipset for another project, they are rated for 5amps and look a little better than the lm2596. They probably will not support 5amp but should be better than the lm2596. I posted pictures of them earlier in the thread, if I can find my posting with the picture I will link it so you can see the difference. :)

Found the link - https://www.reef2reef.com/threads/r...-on-raspberry-pi.289256/page-548#post-6021768

Thanks for that, just found some to order. I'll go ahead & get those. In the mean time, I'll just make sure to not run too many amps through the ones I've got now for testing.
 
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
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
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,077
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
Probe should be in by Wednesday, and I have Thursday off so I'll hook it up to the pico board on that day. I'll be reaching out if there are any issues. I do wonder if the USB ports on my pi3 can be used for anything reef related.
 
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
Probe should be in by Wednesday, and I have Thursday off so I'll hook it up to the pico board on that day. I'll be reaching out if there are any issues. I do wonder if the USB ports on my pi3 can be used for anything reef related.
There are usb based cameras , but I don’t used them since image processing is pretty computing intensive for pi. I am not aware of any usb based sensor ..
 

SDchris

Active Member
View Badges
Joined
Mar 3, 2015
Messages
191
Reaction score
224
Location
Sydney
Rating - 0%
0   0   0
Awesome. Keep us posted on your finding.

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
 
Back
Top