Raspberry Pi-based reef controller

sjstelmach

New Member
View Badges
Joined
Nov 12, 2017
Messages
9
Reaction score
19
Rating - 0%
0   0   0
All,

I’d like to introduce my Raspberry Pi-based reef controller. This controller has been inspired by a desire to automate a lot of the annoying monitoring tasks I’ve been accumulating over the years and is designed for quick and easy decision-making on most routine tank maintenance decisions.

It’s based on Raspberry Pi and Python (Flask) with a variety of external devices.

If anyone is interested in looking at the code, it's available at https://github.com/sjstelmach/aquarium/tree/master. If you're looking to build a similar set up, let me know, and I'll start thinking about getting a proper installation routine installed and a rough guide.

* EDIT: Updated with recent pictures *

Main screen:
Screen Shot 2019-04-07 at 8.12.15 AM.png

Parameter logging:
Screen Shot 2019-04-07 at 8.15.01 AM.png

Device Management:
Screen Shot 2019-04-07 at 8.13.50 AM.png

Admin Interface:
Screen Shot 2019-04-07 at 8.14.26 AM.png


Here are some of the features:

- Function as a reef tank-centric log: track parameters and dosing with warning levels and age
- Interface with devices to automate routines like feeding and to create an hourly schedule to target a certain daily dKh dose using 2-part
- Interface with sensors and external devices (KHGuardian for example) to track parameters and catch problems before they arise
- Switch devices on and off remotely for tank emergency management
- Send Slack push notifications if any parameters are out of whack

Looking forward to answering any questions and to hearing feedback and feature recommendations.
 
Last edited:

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
Thats awesome. Thank you for sharing. I would love to see the kh monitor integration. Let me know if you need any help with code stuff
 
OP
OP
sjstelmach

sjstelmach

New Member
View Badges
Joined
Nov 12, 2017
Messages
9
Reaction score
19
Rating - 0%
0   0   0
Is this similar to "Reef Pi" ?

It’s similar to Reef Pi but currently more focused on sensors (salinity, PH, alk) rather doing things like controlling overflows and working as an ATO directly.

I definitely got a lot of inspiration from that project, and I finally decided to dive head first into this when I saw APEX Trident and decided I could build the same thing myself without locking myself into that ecosystem.

It’s really been amazing to use in practice and I’ve already been shocked at how inaccurate my two part dosing regime was previously. I’ve also found a low PH problem which I was able to address.
 

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
It’s similar to Reef Pi but currently more focused on sensors (salinity, PH, alk) rather doing things like controlling overflows and working as an ATO directly.

I definitely got a lot of inspiration from that project, and I finally decided to dive head first into this when I saw APEX Trident and decided I could build the same thing myself without locking myself into that ecosystem.

It’s really been amazing to use in practice and I’ve already been shocked at how inaccurate my two part dosing regime was previously. I’ve also found a low PH problem which I was able to address.
My experience with pH has been same, but I still have not been able to fix why the low pH is. I did changed my two part to kalk, for the exact same reason
 
OP
OP
sjstelmach

sjstelmach

New Member
View Badges
Joined
Nov 12, 2017
Messages
9
Reaction score
19
Rating - 0%
0   0   0
My experience with pH has been same, but I still have not been able to fix why the low pH is. I did changed my two part to kalk, for the exact same reason

For me, it’s high CO2 in my apartment, and drawing my skimmer intake in from outside raised it from 7.8 to 8.25 over the course of a week or so.
 
OP
OP
sjstelmach

sjstelmach

New Member
View Badges
Joined
Nov 12, 2017
Messages
9
Reaction score
19
Rating - 0%
0   0   0
Just wanted to post an update on my progress. I've upgraded the interface using Bootstrap and added the ability to track multiple parameters. With the addition of the KHGuardian to my tank, my alkalinity is now stable and I've been able to keep SPS alive for the first time in my life (~a month and counting, fingers crossed). I also added a predictive alkalinity consumption using my dose log + KHGuardian data which has been invaluable in calibrating my daily 2-part dose.
Screen Shot 2018-07-26 at 7.36.34 PM.png


Screen Shot 2018-07-26 at 7.39.45 PM.png
 

BZOFIQ

2500 Club Member
View Badges
Joined
Jul 31, 2014
Messages
4,700
Reaction score
3,996
Location
NYC
Rating - 100%
9   0   0
Great to see that there are people who see past APEX! Subscribed!
 

OMGitsManBearPig

Active Member
View Badges
Joined
Jun 18, 2018
Messages
121
Reaction score
190
Location
Midland, TX
Rating - 0%
0   0   0
This is great!
I’m embarking on this starting Monday when my first Pi comes in the mail.

Ive gathered several supplies, just waiting on the brain!

Since you’ve done all the hard work already...

Subbed.
 

chipmunkofdoom2

Always Making Something
View Badges
Joined
Jun 6, 2017
Messages
2,417
Reaction score
4,498
Location
Baltimore, MD
Rating - 0%
0   0   0
For me, it’s high CO2 in my apartment, and drawing my skimmer intake in from outside raised it from 7.8 to 8.25 over the course of a week or so.

Your screenshots say that you're dosing sodium bicarbonate. If that's true, you might get a small pH increase from using sodium carbonate (soda ash). People say that sodium bicarbonate lowers pH, and while that's technically true, it's a bit misleading because the effect is so small. Increasing carbonate alkalinity by 1.4 dKh with bicarb only lowers pH by 0.04. You're not getting that much of a decrease in pH, but you're not getting much of an increase either. Sodium carbonate (soda ash), on the other hand, will increase pH by about 0.3 for every 1.4 dKh dosed. Again, the effect is not as huge as some reefers make it out to be. But if you're battling low pH, every little bit can help.

I personally dose sodium bicarbonate because I don't think the small increase in pH is worth the cost and work of sourcing sodium carbonate over the more readily-available sodium bicarbonate. It also sounds like you have your pH solved with the airline out the window. Just thought I'd mention for other reefers reading.
 
OP
OP
sjstelmach

sjstelmach

New Member
View Badges
Joined
Nov 12, 2017
Messages
9
Reaction score
19
Rating - 0%
0   0   0
Your screenshots say that you're dosing sodium bicarbonate. If that's true, you might get a small pH increase from using sodium carbonate (soda ash). People say that sodium bicarbonate lowers pH, and while that's technically true, it's a bit misleading because the effect is so small. Increasing carbonate alkalinity by 1.4 dKh with bicarb only lowers pH by 0.04. You're not getting that much of a decrease in pH, but you're not getting much of an increase either. Sodium carbonate (soda ash), on the other hand, will increase pH by about 0.3 for every 1.4 dKh dosed. Again, the effect is not as huge as some reefers make it out to be. But if you're battling low pH, every little bit can help.

I personally dose sodium bicarbonate because I don't think the small increase in pH is worth the cost and work of sourcing sodium carbonate over the more readily-available sodium bicarbonate. It also sounds like you have your pH solved with the airline out the window. Just thought I'd mention for other reefers reading.

Thanks for the response. I’ve actually got it around 8.35 now after a month with the intake tube out the window from 7.9 previously.

I actually used to use soda ash for my alkalinity dosing but I had a lot of issues with precipitation on pumps and my heater which I hear is because of the localized PH spike.
 
OP
OP
sjstelmach

sjstelmach

New Member
View Badges
Joined
Nov 12, 2017
Messages
9
Reaction score
19
Rating - 0%
0   0   0
It's been around four months since my last update, and I still haven't lost a single SPS frag or had to do any water changes. It's amazing how much my tank time has totally shifted gears from reacting to surprise test results to focusing on the health of my fish and corals.

I've enhanced my controller with:
  • Target ranges for parameters
  • A calculation engine to recommend dosages of additives based on parameters levels.
  • Charting (Chart.js)
  • a Slack-based warning system that has already saved me more than once. Last week my alkalinity reagent ran out and it pushed a warning to my phone after the KHGuardian detected a low reading.

Screen Shot 2018-11-03 at 11.53.12 AM.png
Screen Shot 2018-11-03 at 11.50.45 AM.png
slack.png
 

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
It's been around four months since my last update, and I still haven't lost a single SPS frag or had to do any water changes. It's amazing how much my tank time has totally shifted gears from reacting to surprise test results to focusing on the health of my fish and corals.

I've enhanced my controller with:
  • Target ranges for parameters
  • A calculation engine to recommend dosages of additives based on parameters levels.
  • Charting (Chart.js)
  • a Slack-based warning system that has already saved me more than once. Last week my alkalinity reagent ran out and it pushed a warning to my phone after the KHGuardian detected a low reading.

Screen Shot 2018-11-03 at 11.53.12 AM.png
Screen Shot 2018-11-03 at 11.50.45 AM.png
slack.png
Very cool :p
 

gregor

New Member
View Badges
Joined
Oct 30, 2014
Messages
13
Reaction score
12
Location
Russia
Rating - 0%
0   0   0
It's been around four months since my last update, and I still haven't lost a single SPS frag or had to do any water changes. It's amazing how much my tank time has totally shifted gears from reacting to surprise test results to focusing on the health of my fish and corals.

I've enhanced my controller with:
  • Target ranges for parameters
  • A calculation engine to recommend dosages of additives based on parameters levels.
  • Charting (Chart.js)
  • a Slack-based warning system that has already saved me more than once. Last week my alkalinity reagent ran out and it pushed a warning to my phone after the KHGuardian detected a low reading.

Screen Shot 2018-11-03 at 11.53.12 AM.png
Screen Shot 2018-11-03 at 11.50.45 AM.png
slack.png
Good evening.
You have a very interesting development.
I wanted to ask, can I try to install your code on automated-reef-controller?
Is there access to download your code?
Can you take a closer look at the photo, how is yours connected, what sensors do you use?
Sincerely, Gregory.
 
OP
OP
sjstelmach

sjstelmach

New Member
View Badges
Joined
Nov 12, 2017
Messages
9
Reaction score
19
Rating - 0%
0   0   0
Since my last update in November, I've implemented a device management system utilizing the MCP23017 chip (https://www.adafruit.com/product/732) and two SainSmart 8-channel relays that lets me control all of my devices, rather than utilizing my Red Sea Max's power bar. I've been able to use this API to automate routines such as feeding. Some more recent pictures of the interface are at the top of the thread.

If anyone is interested in taking a look at my code (@gregor @Ranjib), it's available at: https://github.com/sjstelmach/aquarium/tree/master. It's certainly not quite ready to be installed out of the box yet (I have to create some setup routines, etc.).

I'm also planning to create a build thread to include some pictures of the hardware, but I have to improve the mess of wires in my cabinet before I'm comfortable sharing...

Screen Shot 2019-04-07 at 8.34.48 AM.png
IMG_8544.jpeg
 

Looking back to your reefing roots: Did you start with Instant Ocean salt?

  • I started with Instant Ocean salt.

    Votes: 188 71.5%
  • I did not start with Instant Ocean salt, but I have used it at some point.

    Votes: 19 7.2%
  • I did not start with Instant Ocean salt and have not used it.

    Votes: 49 18.6%
  • Other.

    Votes: 7 2.7%
Back
Top