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

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
@Michael Lane i was wondering what if you start a dedicated thread on the HATs :) , if you have not already. They are getting popular and its worth consolidating these discussions.
Not a bad plan. Fwiw, he helped by pm and I'm now on the waitlist to get a lighting adapter from his tindie store.
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
200
Rating - 0%
0   0   0
After witnessing 2 snails "resting" on a float for a float switch - I agree with the optical recommendation.

I also use these, nice thing about these they do not have to sit in the water. You can adjust sensitivity, there is a little push button under the QC sticker. i have them glued on the outside of the sump

"12-24V Non-contact Tank Liquid Water Level Detect Sensor Switch "

1578076850208.png
 
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
What's the cheapest relay to grab these days? The docs show an SRP8, which seems to be either no longer available or pretty schpensy. This guy looks decent:

JBtek 8 Channel DC 5V Relay Module

I've got one of these coming already, it's what I use for my ATO pump right now:

uxcell IEC255 DC 12V Coil 8Pin DPDT Electromagnetic Power Relay w Socket Base

I think I can just connect it to IO21 and GND? Or do I need to supply 12v to the goby hat as well to pass it through?

I'll use that for the moment, but would like something with more outlets.

What's interesting is that building it myself, with a cheap 8-channel 5v relay, the jumper wires, a 4-gang junction box, 4 outlets, the 4-gang outlet cover and the romex wire to wire it all up comes to ~$55. It seems like there might be a pre-built option for around that price, or within $10-15. The Kasa HS300 is only $20 more, but of course it's only 6 outlets, not 8.
Kasa300 is also a surge protector, has current monitoring and provides 5V 2.5A usb output that you can use to power a pi directly.
 
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 also use these, nice thing about these they do not have to sit in the water. You can adjust sensitivity, there is a little push button under the QC sticker. i have them glued on the outside of the sump

"12-24V Non-contact Tank Liquid Water Level Detect Sensor Switch "

1578076850208.png
Interesting. Thank you for sharing. I'll check them out. I am thinking of working on leak detection in 4.0.
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
200
Rating - 0%
0   0   0
I'm going to go ahead and put a doser together using those controllers. Thanks for the idea.

Do you know if I'd need to use all 3 pins if I just wanted to control speed in one direction? I'd like to run my pumps forward at 50% or so, but I don't care about reverse.


One more note 50% will not work with DC motors especially under load when they have to rotate the rollers.
70% would be minimum. Play with time interval instead. I am able to dose with as low as 0.2 sec interval at 80%
 
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
Here is my wiring (GF was home and took a picture for me). The terminals go to the dosing pumps and the barrel connection in bottom left goes to the LED strip. 12V input on the right barrel to the bottom rails and the LM2596 which outputs 5.05V to the top rail. The L293D on the left is offset one space to the right. Everything seems to match from what I see...
Dosing Project.jpg


edit: may have hooked PCA to the wrong voltage input. Not sure why I was able to see the address and communicate with it if that power isn’t used for anything besides servo power
This looks fairly elaborate build :). Do you have a dedicated thread? If not, please create one. This thread moves so fast , i have hard time keeping context of different builds.
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
200
Rating - 0%
0   0   0
Interesting. Thank you for sharing. I'll check them out. I am thinking of working on leak detection in 4.0.


these are capacitive sensors so not sure if they will detect water on the floor. You would need conductive sensors for water leak detection. This is why we need more I/O lines :)
 
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
Basic questions..... - is there a specific reason why the build tutorials use that stereo jack for the temp sensors? Rather than risk me forgetting about not being able to connect/disconnect temp sensors I'm thinking of going with a 3 prong connector.

And - I'm going to assume I'm fine extending the wires of the temp sensors without too much trouble?
I'll give some context. 3.5 mm audio jacks are cheap, readily available, provides 3 cores and are easy to solder. Thats the only reason i prescribe them across the board. There are no other reasons. For temperature sensor in particular, they are not the best since they short when we plug/unplug the sensor. But other options are costlier (xlr, min DINs, you name it, i tried it), and often time harder to solder. And i dont plug/unplug temp sensor that often. Feel free to try out other connectors if your find them more suitable
 

NeonRabbit221B

2500 Club Member
View Badges
Joined
Jun 21, 2019
Messages
3,037
Reaction score
5,614
Location
Richmond, Va
Rating - 0%
0   0   0
This looks fairly elaborate build :). Do you have a dedicated thread? If not, please create one. This thread moves so fast , i have hard time keeping context of different builds.
It’s my third actually and I finally got it working last night! Flexible wire is not my friend, kept snapping wires. It’s purely dedicated to dosing and lighting. I will get around to doing a build thread but mainly used your instructions with a few minor changes.
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
It's a work in progress, but I've got the Github page for Leviathan mostly populated. Got the schematic & pcb layout on there, as well as the draft of my documentation. I'm 42 pages in on that, with plenty to go.

 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
200
Rating - 0%
0   0   0
I'll give some context. 3.5 mm audio jacks are cheap, readily available, provides 3 cores and are easy to solder. Thats the only reason i prescribe them across the board. There are no other reasons. For temperature sensor in particular, they are not the best since they short when we plug/unplug the sensor. But other options are costlier (xlr, min DINs, you name it, i tried it), and often time harder to solder. And i dont plug/unplug temp sensor that often. Feel free to try out other connectors if your find them more suitable


Agree with the intent behind it but chap is not allays a good way to go. You will save 5 cents on the connector and blow $15 device. BTW the 4 PIN example you can get it for $10 for set of 10. easier to solder as you are soldering to wires. Use heat shrink tubing to seal the connection and you are all set to go. Just more options to explore.
 
Last edited:
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've officially got my Reef-Pi board finalized- meet Leviathan!!

Front (Populated, Cropped).JPG


It's been a long time coming, but it's finally here! I've had a couple of people testing them, including myself, & they've worked great. I got tired of dealing with re-wiring my setup every time I wanted to add a new feature & when asked to build a Reef-Pi setup for a friend, I knew there was no way I was doing it all from scratch again.

I wasn't totally satisfied with any of the pre-existing Reef-Pi boards out there to buy, none I found had the ability to do both dosing & light control. Plus, I didn't need to use the ULN2803, as I wasn't going to be using the ADJ strip.

I'll be selling them soon- if you're interested in signing up for one, or finding out more about Leviathan, check out this link.
This is super duper cool @Schreiber . I am so happy to see this board coming into life. I hope this will help the community building reef-pi controller easily. Thank you for all your hard work and perseverance. I recall those initial bumpy days in the beginning. Very inspiring, and thank you for sharing
 
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've thought of wiring this into my tripp-lite. I've got these 8 manual switches that I basically don't use anymore since I got my reef-pi running. I was thinking I'd like to add some normally-on outlets (since the adj is normally off) to put a few mission-critical things on like heaters (I'm in the PNW and it's in the basement), the return and at least on powerhead. Anyways, I also figured, especially for a normally-on relay, I'd like to have a manual switch. Has anyone broke open something like mine and hacked a relay set into it?

existing switched outlets

Idea for relay set from @raketemensch (to run alongside the existing 12V ADJ relays)
Hacking existing powerstrip will be a lot of fabrication work (less of electrical/electronics). And my experience has been its not worth it. Your experience may differ, based on your skill set. I always ended up butchering those whole thing :), it was my common goto method pre-1.0 :) . Post 1.0 i have exclusively used ADJ power strip, and for past 3 months its a mix of ADJ power strip and HS300. I am extremely excited about @dmolavi 's work on the DLI power strip. I think its the beefiest option of all, and made in USA, so much better supply chain/QC etc. 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
Agree with the intent behind it but chap is not allays a good way to go. You will save 5 cents on the connector and blow $15 device. BTW the 4 PIN example you can get it for $10 for set of 10. easier to solder as you are soldering to wires. Use heat shrink tubing to seal the connection and you are all set to go. Just more options to explore.
Agree. Actually, in the beginning, I didnt even know there exist so many types of connectors (I did microbiology in school, and software in job). I definitely encourage experimenting with more options.
 
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
Had the same issue. My Reef-Pi is set to static but these are left at 0's otherwise it breaks.
I know the reason for this, and I know how to fix it, but it comes with its own quirks.
So, during bootup, we configure reef-pi to start without relying on any dependencies. Which means reef-pi starts way before network stack (because it starts fast and it has no dependency). As a result when reef-pi starts the network stack may not be ready yet, and the IP is not available, causing this failure. We can change this to make sure reef-pi only starts after networking is up by adding this in '/etc/systemd/system/reef-pi.service'
Code:
After=network-online.target
Wants=network-online.target
But then , it also means reef-pi will not be starting till network is up, and will not start if your dhcp or anything thats causes networking to fail. That was not a thing i wanted. In fact, reef-pi should work just fine if network is down, you wont see the UI, but the controller should be running just fine. Let me know what you all think about this. Its one of the thing we have to debate and decide as a community. My default position on this is to keep the happy path safer while making the more involved path possible.
 

lmm1967

Well-Known Member
View Badges
Joined
Sep 12, 2017
Messages
563
Reaction score
848
Location
North Georgia
Rating - 0%
0   0   0
Question - Temp feeding Adafruit - Adafruit tied to IFTTT to send out of temp alerts.

But - I get an email every single time the data is updated in Adafruit.io - anyway to control the rate of notifications in this scenario?
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
200
Rating - 0%
0   0   0
Fully Agree with Ranjib, went there too many times with no so good results. At the end of the day you do not have enough space to put in relays, you other option then would be to go with solid state. These are typically too low current i.e. 2A. Given that you could be switching heaters I typically do not go any thing less than 10A contact rating just to make sure I do not burn the house. I typically look for something that has enough space to add stuff but these are very rare to find. Another pointer make sure your power bar is fused so you do not exceed the overall rating.
 
Last edited:

lmm1967

Well-Known Member
View Badges
Joined
Sep 12, 2017
Messages
563
Reaction score
848
Location
North Georgia
Rating - 0%
0   0   0
I know the reason for this, and I know how to fix it, but it comes with its own quirks.
So, during bootup, we configure reef-pi to start without relying on any dependencies. Which means reef-pi starts way before network stack (because it starts fast and it has no dependency). As a result when reef-pi starts the network stack may not be ready yet, and the IP is not available, causing this failure. We can change this to make sure reef-pi only starts after networking is up by adding this in '/etc/systemd/system/reef-pi.service'
Code:
After=network-online.target
Wants=network-online.target
But then , it also means reef-pi will not be starting till network is up, and will not start if your dhcp or anything thats causes networking to fail. That was not a thing i wanted. In fact, reef-pi should work just fine if network is down, you wont see the UI, but the controller should be running just fine. Let me know what you all think about this. Its one of the thing we have to debate and decide as a community. My default position on this is to keep the happy path safer while making the more involved path possible.

How about a trigger to watch for that in a log and restart apache?
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
200
Rating - 0%
0   0   0
I know the reason for this, and I know how to fix it, but it comes with its own quirks.
So, during bootup, we configure reef-pi to start without relying on any dependencies. Which means reef-pi starts way before network stack (because it starts fast and it has no dependency). As a result when reef-pi starts the network stack may not be ready yet, and the IP is not available, causing this failure. We can change this to make sure reef-pi only starts after networking is up by adding this in '/etc/systemd/system/reef-pi.service'
Code:
After=network-online.target
Wants=network-online.target
But then , it also means reef-pi will not be starting till network is up, and will not start if your dhcp or anything thats causes networking to fail. That was not a thing i wanted. In fact, reef-pi should work just fine if network is down, you wont see the UI, but the controller should be running just fine. Let me know what you all think about this. Its one of the thing we have to debate and decide as a community. My default position on this is to keep the happy path safer while making the more involved path possible.


In my opinion, I would rely on the IP setting on the PI. I really do not think you need to worry about supporting bridging the WEB Server to another IP. But again this comes from a guy that has firewall on every of the 7 vlans running at home.

If you want to expose the PI to the external network map and redirect different ports for HTTP and HTTPS, etc on the router so there is no direct link to the PI's on anything that would be a standard port. You are NATing anyway so unless you are completely open then you would expose internal network
 
Back
Top