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

living_tribunal

2500 Club Member
View Badges
Joined
Aug 14, 2019
Messages
4,198
Reaction score
12,164
Rating - 0%
0   0   0
There’s ezo i2c protocol support for atlas ph probes which should be easy starting point for salinity probe. I intentionally deprioritized salinity and do probes due to their poor cost /maintenance to impact factor. If your ato is dialed in , salinity should not change. It’s definitely a good thing to have , but they are expensive and mote prone to error with lesser longevity :-/

I found a few but they were expensive. I'm looking to implement a second layer of redundancy for my ato. Just something for me to continually measure salinity within my tank.
 
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 found a few but they were expensive. I'm looking to implement a second layer of redundancy for my ato. Just something for me to continually measure salinity within my tank.
In my experience, the ATO risks are not necessarily mitigated by redundancies and in some cases the added complexity makes it more risky.
You should be more than covered if you use a peristaltic pump + disable on alert and a judiciously chosen ato reservoir, that holds enough water capable of supporting your refill interval, while not able to flood the tank within an hour/alert threshold. The Smart ATO micro is leaps and bound better in reliability compared to its bulkier competitors that employs more probes/sensors.
 
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 my experience, the ATO risks are not necessarily mitigated by redundancies and in some cases the added complexity makes it more risky.
You should be more than covered if you use a peristaltic pump + disable on alert and a judiciously chosen ato reservoir, that holds enough water capable of supporting your refill interval, while not able to flood the tank within an hour/alert threshold. The Smart ATO micro is leaps and bound better in reliability compared to its bulkier competitors that employs more probes/sensors.
And that being said, you can use the high/low sensors (i think i read that in your build thread) to trigger a macro that disable /enable ATO, for extra safety. Macros our powerful in ways they can not only turn on/off individual equipment, but alos controllers (ato, ph, temperature) and a whole subsystem/module (all ato, all temperature controller etc). This also means they are risky, and their impact can be hard to assess as they get more and more complex
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
644
Location
United States
Rating - 0%
0   0   0
In my experience, the ATO risks are not necessarily mitigated by redundancies and in some cases the added complexity makes it more risky.
You should be more than covered if you use a peristaltic pump + disable on alert and a judiciously chosen ato reservoir, that holds enough water capable of supporting your refill interval, while not able to flood the tank within an hour/alert threshold. The Smart ATO micro is leaps and bound better in reliability compared to its bulkier competitors that employs more probes/sensors.

I've used the Osmolator for years, and the redundant optical/mechanical switch has never failed. What's nice is that the failure mechanism for one most likely won't be the same as for the other. The only issue I ever had was once with their pump, and Tunze replaced it at no cost. Just my US$0.02.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
So, theory question here... The kessils are designed to be controlled by a 0-10V analog signal. Why does using PWM work?
A quick and dirty answer is...take a pwm channel on your pca9685. Mine are 3.3v , so i have a 3.3v square wave with a relative time peeiod of 0 to 100 percent. So at 50 percent the 3.3v wave is equal to the 0.0v trough. If you use an analog multimeter and read voltage of the 50 percent square wave you get 1.65 volts because the multimeter averages the 3.3 and the 0v. Its not able to read fast enough to catch the 3.3 and 0v waves because the needle can not swing that fast so the reading is an average reading.
If the driver on the kessil isnt fast enough to catch the pwm or isnt really meant for the pwm signal it may just "see" the average like a multimeter would.
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
My report on 3.0 beta

I run a pi zero. After backing up my database file I gave 3.0 beta a try and ran into 2 issues. Lighting pwm messed up on only one light for some reason and out of my 3 temperature sensors, 2 "disappeared" which is similar to other reports.

Switching back to 3.0 alpha everything went back to normal with the exception of having to re enter my Adafruit IO key to get the feeds running again.

I did not have time to test 3.0 beta with an all new from scratch configuration however. Thought id have much more time this fall and winter to help with stuff, but work keeps getting in the way. Now they want to send me to Japan for a week of training 2 weeks before Xmas. The Mrs. is not amused.
 
Last edited:

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
@Ranjib I am having issues on the new version it will not let me set up my lights.

The old light settings are not working as well. I need to have my lights work. How do I downgrade to the alpha.

1572469288929.png
1572469381920.png
I'm still working on lighting UI updates to support the new features. There were some breaking changes to the Light API, but I expect to have the first round of UI fixes for the light done this weekend. The next beta release should have that sorted.

If you are comfortable with curl or other web api tools, you could manually configure the lights directly via API. I believe it may also be possible to directly push data into the database with the new db command via command line.
 
Last edited:

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Dev here, and new reefer, going to give this a shot. I've never typed go before, and haven't touched C in years so this will be a fun project. Checked your repo and it looks like y'all have done a great job with this.

I found this thread as I was looking for open-source salinity probes. I'm mapping things out and was potentially going to utilize a reefangel/arduino setup.

Has there been much progress made on the salinity probe front?
Salinity/Conductivity sensing can be pretty complicated. If you already have a module, then it could be a relatively easy driver implementation. Ranjib and Theatrus have done some great work modularizing the drivers.
I don't have a personal incentive to implement salinity sensing for much the same reasons Ranjib mentioned, but I'd welcome the functionality if you'd like to get it going. My experience with reef-pi has been extremely positive. It's a supportive dev environment - in fact, I hadn't used go nor react when I started helping out. I've felt comfortable asking questions on Slack and have learned tons from the other devs.
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
100
Reaction score
152
Rating - 0%
0   0   0
Salinity/Conductivity sensing can be pretty complicated. If you already have a module, then it could be a relatively easy driver implementation. Ranjib and Theatrus have done some great work modularizing the drivers.
I don't have a personal incentive to implement salinity sensing for much the same reasons Ranjib mentioned, but I'd welcome the functionality if you'd like to get it going. My experience with reef-pi has been extremely positive. It's a supportive dev environment - in fact, I hadn't used go nor react when I started helping out. I've felt comfortable asking questions on Slack and have learned tons from the other devs.

EC testing is useful for knowing the conditions of the water:

Once the most suitable conductivity range for your marine life has been determined, the best use of the conductivity meter in your filter is to monitor the changes in water conditions. Unwanted inorganic and organic pollutants, as well as fertilizers and other chemicals, added to the water by the aquarium keeper, directly affect the EC value, generally by increasing it.

In fact, every chemical, additive, piece of food, medication or conditioner you put into your tank affects the conductivity in your aquarium and the above mentioned "link" becomes less. Therefore, measuring conductivity is a way to continuously monitor the conditions of water, since a change in conductivity also indicates a change in water conditions. Any of these changes should be checked using a chemical analysis (test kit). Sometimes the easiest way to correct the EC value is to change the water, thereby reducing the concentration of pollutants.


When EC testing will be added to Reef-Pi I would be very interested!
 
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 3.0 we are shipping a `reef-pi db` command, which you can use to investigate & change the databased directly, bypassing the controller. Its meant to be used for troubleshooting. With this commmand you can selectively clear/reset those values. Here is an example partinent to your use case. I remembered this as I just did it recently :)

Stop reef-pi

Code:
sudo systemctl stop reef-pi.service



Get the current list of ato, you need the id of the ato that you want to change

Code:
sudo reef-pi db list ato

Get the usage data of that ato (assuming id is 1) , and save it in a file

Code:
sudo reef-pi db show ato_usage 1  > usage.json



Edit the file, you'll notice the abnormal usage values by searching for those values (for me ato usage 3000), edit them whatever value you prefer, or delete. the update it,



Code:
sudo reef-pi db update  -input usage.json ato_usage 1

restart reef-pi



Code:
sudo systemctl stop reef-pi.service





The `reef-pi db` command works across all the things including setting, and has the following pattern:

Code:
reef-pi db list <module>

reef-pi db show <module> <id>

reef-pi db create <module> -input foo.json

reef-pi db update -input foo.json  <module> <id>

reef-pi db delete <module> <id>
Example of modules: ato, temperature .. etc . All the bucket names specified here: https://github.com/reef-pi/reef-pi/blob/master/controller/storage/store.go#L4.

I hope this will help us diagnose & fix issues where reef-pi is not able to start due to inconsistent configuration or the controller is working but UI is broken due to front end code or API related issues.
 
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
Here is an example of me using reef-pi db command to get rid of some bogus ATO usage values. This happened due to wifi outlet not working (network issue). The problem chart:
ato-bad.png


Notice the anomolous readings (above 300) in ato usage chart. Normal values are not noticeable (in the range of 40)
Here is the graph after fixing it, with reef-pi db command
ato-fixed.png
 

Mike Kearns

Active Member
View Badges
Joined
Apr 4, 2019
Messages
252
Reaction score
370
Rating - 0%
0   0   0
I have started my reef-pi journey! Thank you to everyone contributing to making this work so well
9D1F18F2-480C-4533-B5B6-2EDB0B3BF446.jpeg

Got the relay up and running for my power strip. Only mistakes I made were ordering a male/female db9 cable and 2 male panel mounts, plus ordering only male/female jumpers (thus the temporary twisted together cables in the pic. Can’t wait to get this and other equipment and sensors up and running! Thanks again!
 
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 have started my reef-pi journey! Thank you to everyone contributing to making this work so well
9D1F18F2-480C-4533-B5B6-2EDB0B3BF446.jpeg

Got the relay up and running for my power strip. Only mistakes I made were ordering a male/female db9 cable and 2 male panel mounts, plus ordering only male/female jumpers (thus the temporary twisted together cables in the pic. Can’t wait to get this and other equipment and sensors up and running! Thanks again!
Awesome. 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
One of the features in 3.0 is hysteresis. With this feature, users will be able to specify a tolerance threshold for their sensor based control system. This helps avoiding flapping (repeated equipment on/off) thus improving equipment longevity. In lack of this featur, reef-pi was not suitable for chiller and similar equipment.

Here is how it impact in real life,. First , the temperature graph of my pico tank (5.5G) powered by a 50W hydor heater. In absence of any control mechanism, the temperature swings almost 1.5-2.5 degrees.
temp-no-control.png


And then if reef-pi is enabled, with a fixed threshold then the temperature is rapidly stabililized and less than 0.1 degree fluctuation happens (at 15s check frequency). This also cause repeated heater on/off .

Screen Shot 2019-11-02 at 4.29.08 PM.png



Next is with 0.1 degree hysteresis,
Screen Shot 2019-11-02 at 4.29.22 PM.png
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
I have started my reef-pi journey! Thank you to everyone contributing to making this work so well
9D1F18F2-480C-4533-B5B6-2EDB0B3BF446.jpeg

Got the relay up and running for my power strip. Only mistakes I made were ordering a male/female db9 cable and 2 male panel mounts, plus ordering only male/female jumpers (thus the temporary twisted together cables in the pic. Can’t wait to get this and other equipment and sensors up and running! Thanks again!

I'm curious, what are you using the db9 connector for anyway? It looks like you're making your build run off the relays & typical outlets like I did, rather than using the expensive American DJ SR P8.
 

Mike Kearns

Active Member
View Badges
Joined
Apr 4, 2019
Messages
252
Reaction score
370
Rating - 0%
0   0   0
I'm curious, what are you using the db9 connector for anyway? It looks like you're making your build run off the relays & typical outlets like I did, rather than using the expensive American DJ SR P8.
It is for the control of the outlets, just like the DJ power strip but i did do the diy power strip. Now that I have built it, I will probably do something different on the next one. How did you do the control for yours?
 
Last edited:

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
It is for the control of the outlets, just like the DJ power strip but i did do the diy power strip. Now that I have built it, I will probably do something different on the next one.

Hmmm, I can't tell from your picture exactly how you have this wired or what relays you're using. But in my build, I don't use the db9 at all. Are you using a ULN2803A in your build? How are you triggering the relays & what are they rated to trigger on? (Most relay boards like that are either 5V or 12V.)
 

Mike Kearns

Active Member
View Badges
Joined
Apr 4, 2019
Messages
252
Reaction score
370
Rating - 0%
0   0   0
Hmmm, I can't tell from your picture exactly how you have this wired or what relays you're using. But in my build, I don't use the db9 at all. Are you using a ULN2803A in your build? How are you triggering the relays & what are they rated to trigger on? (Most relay boards like that are either 5V or 12V.)
I am not using a uln2803a. Based on a few other builds I found, i have the relays powered by a 5v wall wart. I have been reading and researching and learning, but sometimes things don't click until I actually do it lol. The pic I posted was just my cobbled together pieces to test the relays and learn setting up the pi as I had no experience with micro computing/programming before this. I am also learning how to use my 3D printer at the same time, I'm surprised my brain hasn't exploded.

If I may ask, how do you control your power strip?

Thanks!
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
I am not using a uln2803a. Based on a few other builds I found, i have the relays powered by a 5v wall wart. I have been reading and researching and learning, but sometimes things don't click until I actually do it lol. The pic I posted was just my cobbled together pieces to test the relays and learn setting up the pi as I had no experience with micro computing/programming before this. I am also learning how to use my 3D printer at the same time, I'm surprised my brain hasn't exploded.

If I may ask, how do you control your power strip?

Thanks!

You're using a separate wall wart to power the relays themselves, or the same one you're using to power the Pi?

On mine, I have a 5V power supply providing power to the Pi through Pin 2 & also to the 5V input of the relay boards. The channels on the relays are directly connected to GPIO pins & triggered that way.

What features do you plan on adding to your build down the road?
 

Form or function: Do you consider your rock work to be art or the platform for your coral?

  • Primarily art focused.

    Votes: 20 7.8%
  • Primarily a platform for coral.

    Votes: 45 17.4%
  • A bit of each - both art and a platform.

    Votes: 175 67.8%
  • Neither.

    Votes: 12 4.7%
  • Other.

    Votes: 6 2.3%
Back
Top