Dewd's Big Cube Reef-Pi build

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
Then to get the Macro triggered by a Timer in reef-pi.

Ran into a snag here. I could not get a Timer to trigger a Macro. But discovered that if I made the Macro "Reversible" it would trigger, but run in reverse.

My solution to this has been to write a new AWC Macro in reverse and get the Timer to trigger that. Works!

But I discovered that the Macro must not only have the steps written in reverse order, but the step must be reversed ie to turn equipment "on" the macro must say "Turn off".

I've reported these findings to @Ranjib , so if it's a bug, it should get attended to.

But for now, I'm a happy boy.
A reversible macro is intended to be executed in reverse order with reverse action in each step. I had initially concerived it in that fashion. I have shared an example of water change macro on the main reef-pi thread. This is just the beginning of the macro development, and i intend to take all feedback and see what improvements can be done next. Thank you for the detailed experience report, it will help us designing the next set of macro improvements
 
OP
OP
Des Westcott

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
A reversible macro is intended to be executed in reverse order with reverse action in each step. I had initially concerived it in that fashion. I have shared an example of water change macro on the main reef-pi thread. This is just the beginning of the macro development, and i intend to take all feedback and see what improvements can be done next. Thank you for the detailed experience report, it will help us designing the next set of macro improvements

I made the assumption that "reversible" just meant reversing the steps and not reversing all the actions. Probably me not reading / understanding the posts about it. But I do now, so all good.

Actually this cycle of me taking a while to understand things is pretty standard! ;Shamefullyembarrased:D
 
OP
OP
Des Westcott

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Update

Not much more has been done on the Reef-Pi, because it's pretty much where i want it for now. But the one thing I have done is to get a auto pellet feeder to work.

0105d5c46d23fb8ad093231506b7deb836b3d3a2fc.jpg


I was given two of these by a mate. After familiarising myself with their workings, I realised it wasn't going to be easy. When turned on, you have two options -
  • Feed once every 24 hours after original turn-on time, or
  • Feed Every 24 hours after turn-on AND 6 hours after that - so two feedings 6 hours apart repeating every 24 hours.
Not what I wanted. There is a Manual button, but that only works in addition to the auto mode. The feeder can't be on and only in Manual mode.

What I did discover though is that for the "once every 24 hours" mode to work, what the unit does is run a cycle immedaitely after turning on, and then every 24 hours after that. So I figured what I would do is turn the unit on, let it run it's first cycle, then turn it off. Tested manually and it achieved what I wanted.

So, I pulled the unit apart and got to work. First thing I did was get rid of the batteries. It runs on 2 x AA batteries (3V). I've decided to take a chance and run the unit on 5V from the same power supply that I use to power the Pi. So far it seems to run it fine. Time will tell if it holds up. If it does die, I have another one as spare and it will get connected to 3V.

Next was to bypass the momentary switch that turns the unit off and on. I did this by connecting the suitable terminals on the board to a spare relay I had on the reef-pi. I called this AF Switch and connected it Normally Open.

So now under normal conditions, the feeder site there getting 5V power just as if it had batteries in.

To get the unit to dispense a feed, I have a Macro that looks like this :
  1. Turn AF Switch ON
  2. Wait 2 seconds
  3. Turn AF Switch OFF
  4. Wait 10 seconds
  5. Turn AF Swithc ON
  6. Wait 2 seconds
  7. Turn AF Switch OFF
This has the effect of tricking the Auto Feeder into thinking the momentary switch has been pressed to turn it on, so it dumps it's first load of food. The unit then gets turned off so that it doesn't feed as per it's internal timer.

Works perfectly!!! I now have a timer that triggers this macro for my morning feed. And I can trigger the Macro manually any time I want to feed pellets.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Update

Not much more has been done on the Reef-Pi, because it's pretty much where i want it for now. But the one thing I have done is to get a auto pellet feeder to work.

0105d5c46d23fb8ad093231506b7deb836b3d3a2fc.jpg


I was given two of these by a mate. After familiarising myself with their workings, I realised it wasn't going to be easy. When turned on, you have two options -
  • Feed once every 24 hours after original turn-on time, or
  • Feed Every 24 hours after turn-on AND 6 hours after that - so two feedings 6 hours apart repeating every 24 hours.
Not what I wanted. There is a Manual button, but that only works in addition to the auto mode. The feeder can't be on and only in Manual mode.

What I did discover though is that for the "once every 24 hours" mode to work, what the unit does is run a cycle immedaitely after turning on, and then every 24 hours after that. So I figured what I would do is turn the unit on, let it run it's first cycle, then turn it off. Tested manually and it achieved what I wanted.

So, I pulled the unit apart and got to work. First thing I did was get rid of the batteries. It runs on 2 x AA batteries (3V). I've decided to take a chance and run the unit on 5V from the same power supply that I use to power the Pi. So far it seems to run it fine. Time will tell if it holds up. If it does die, I have another one as spare and it will get connected to 3V.

Next was to bypass the momentary switch that turns the unit off and on. I did this by connecting the suitable terminals on the board to a spare relay I had on the reef-pi. I called this AF Switch and connected it Normally Open.

So now under normal conditions, the feeder site there getting 5V power just as if it had batteries in.

To get the unit to dispense a feed, I have a Macro that looks like this :
  1. Turn AF Switch ON
  2. Wait 2 seconds
  3. Turn AF Switch OFF
  4. Wait 10 seconds
  5. Turn AF Swithc ON
  6. Wait 2 seconds
  7. Turn AF Switch OFF
This has the effect of tricking the Auto Feeder into thinking the momentary switch has been pressed to turn it on, so it dumps it's first load of food. The unit then gets turned off so that it doesn't feed as per it's internal timer.

Works perfectly!!! I now have a timer that triggers this macro for my morning feed. And I can trigger the Macro manually any time I want to feed pellets.
Very nice work!

I was thinking about tinkering with one of these myself.
 

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
Update

Not much more has been done on the Reef-Pi, because it's pretty much where i want it for now. But the one thing I have done is to get a auto pellet feeder to work.

0105d5c46d23fb8ad093231506b7deb836b3d3a2fc.jpg


I was given two of these by a mate. After familiarising myself with their workings, I realised it wasn't going to be easy. When turned on, you have two options -
  • Feed once every 24 hours after original turn-on time, or
  • Feed Every 24 hours after turn-on AND 6 hours after that - so two feedings 6 hours apart repeating every 24 hours.
Not what I wanted. There is a Manual button, but that only works in addition to the auto mode. The feeder can't be on and only in Manual mode.

What I did discover though is that for the "once every 24 hours" mode to work, what the unit does is run a cycle immedaitely after turning on, and then every 24 hours after that. So I figured what I would do is turn the unit on, let it run it's first cycle, then turn it off. Tested manually and it achieved what I wanted.

So, I pulled the unit apart and got to work. First thing I did was get rid of the batteries. It runs on 2 x AA batteries (3V). I've decided to take a chance and run the unit on 5V from the same power supply that I use to power the Pi. So far it seems to run it fine. Time will tell if it holds up. If it does die, I have another one as spare and it will get connected to 3V.

Next was to bypass the momentary switch that turns the unit off and on. I did this by connecting the suitable terminals on the board to a spare relay I had on the reef-pi. I called this AF Switch and connected it Normally Open.

So now under normal conditions, the feeder site there getting 5V power just as if it had batteries in.

To get the unit to dispense a feed, I have a Macro that looks like this :
  1. Turn AF Switch ON
  2. Wait 2 seconds
  3. Turn AF Switch OFF
  4. Wait 10 seconds
  5. Turn AF Swithc ON
  6. Wait 2 seconds
  7. Turn AF Switch OFF
This has the effect of tricking the Auto Feeder into thinking the momentary switch has been pressed to turn it on, so it dumps it's first load of food. The unit then gets turned off so that it doesn't feed as per it's internal timer.

Works perfectly!!! I now have a timer that triggers this macro for my morning feed. And I can trigger the Macro manually any time I want to feed pellets.
This is awesome. It deserves a dedicated post "DIY Auto feeder with reef-pi" :)
 
OP
OP
Des Westcott

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0

Done.
 

SALTYMOPAR

Community Member
View Badges
Joined
Apr 21, 2020
Messages
64
Reaction score
46
Rating - 0%
0   0   0
I like what you've done with everything. Im building a tank controller with a PLC. I saw in previous post you were looking for the best float switches. On my build Ive been using Keyence fiberoptic sensors for float switches it takes a little work but they work awsome solid state no moving parts and the sensing distance from on to off is 3/16"- 1/4"
20200425_161340.jpg

They use a standard 3mm fiber optic cable that you get for home theater stuff. The cable to the length you need.
20200425_161347.jpg
i use a 1/2" acrylic rod. That i machine a 45 degree point. I drill two holes on the other end of the rod to install the fiber cable down to the machined end. both holes are inline with each other it works on the principle of a prism. out of the water it can send the light signal through the prism but once the rod is in the water the light from the sensor is dispersed into the water and is not picked up from the sensor.

The nice thing about these sensors is it will work with 12vdc which is hard to find in a industrial sensor most require 24vdc also they have both NPN and PNP versions.
 

thaistalyn

Active Member
View Badges
Joined
Dec 9, 2019
Messages
131
Reaction score
294
Location
Navarre, FL
Rating - 0%
0   0   0
The nice thing about these sensors is it will work with 12vdc which is hard to find in a industrial sensor most require 24vdc also they have both NPN and PNP versions.

I'm pretty sure a $200 ATO level sensor and $1200 PLC are going to be cost prohibitive to most hobbiest that can't "borrow" them from the parts locker at work. Just wanted to inform those who wouldn't know what a Keyence sensor or PLC might cost.


If you can "borrow" a FH-H07 you can actually sense the exact level ultrasonically in the sump which will avoid issue of dirty glass, provide you exact ATO usage, warn you of high or low level,and even feed data to do auto water changes.
 
OP
OP
Des Westcott

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Des,

I saw you mention in another thread that you didn't do any relays to your lights. Did you just pull pwm straight from the pi to the driver and leave the factory power?

Hi. I'm currently not running my lights on reef-pi. They are on the Standard Zetlight setup completely separate.

But power to the light goes through a relay, so I can turn the whoel unit off if I want to. A little redundant as the Zetlight power supply has a switch built in. BUt gives me the option of doing it remotely.
 
OP
OP
Des Westcott

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
I like what you've done with everything. Im building a tank controller with a PLC. I saw in previous post you were looking for the best float switches. On my build Ive been using Keyence fiberoptic sensors for float switches it takes a little work but they work awsome solid state no moving parts and the sensing distance from on to off is 3/16"- 1/4"
20200425_161340.jpg

They use a standard 3mm fiber optic cable that you get for home theater stuff. The cable to the length you need.
20200425_161347.jpg
i use a 1/2" acrylic rod. That i machine a 45 degree point. I drill two holes on the other end of the rod to install the fiber cable down to the machined end. both holes are inline with each other it works on the principle of a prism. out of the water it can send the light signal through the prism but once the rod is in the water the light from the sensor is dispersed into the water and is not picked up from the sensor.

The nice thing about these sensors is it will work with 12vdc which is hard to find in a industrial sensor most require 24vdc also they have both NPN and PNP versions.


That looks very slick. And does fit the criteria of "best option out there". But if I'm honest, if it doesn't work with reef-pi direct out the box or with the simplest of mods, I'm in the weeds.
 

SALTYMOPAR

Community Member
View Badges
Joined
Apr 21, 2020
Messages
64
Reaction score
46
Rating - 0%
0   0   0
I'm pretty sure a $200 ATO level sensor and $1200 PLC are going to be cost prohibitive to most hobbiest that can't "borrow" them from the parts locker at work. Just wanted to inform those who wouldn't know what a Keyence sensor or PLC might cost.


If you can "borrow" a FH-H07 you can actually sense the exact level ultrasonically in the sump which will avoid issue of dirty glass, provide you exact ATO usage, warn you of high or low level,and even feed data to do auto water changes.

$1200 dollars for plc there's other options than allen bradley.
Screenshot_20200501-072746~2.png

$200 dollars for a sensor um here 5 of them for $35

Screenshot_20200430-134504~2.png

I haven't as you put it "Borrowed" anything i hunted and picked all my automation from ebay and other places with my own money and if i was to put pen to paper and calculate everything i would be at the same price range as neptune and apex. The pi option is cheaper depending on what you want to do.
 
Last edited:

Zippyfear

Community Member
View Badges
Joined
Apr 30, 2019
Messages
86
Reaction score
152
Rating - 0%
0   0   0
Update on the AWC situation.

I have been triggering the macro manually since I set it up in order to monitor usage and reliability and it has been rock solid.

So the next step is to automate it. Get the macro to trigger on a timer.

But I'm nervous. There are risks :-
  1. The 'Out" pump / ATO gets stuck on due to float switch malfunction. This I've largely mitigated by having the "Out" ATO only on for a fixed duration.
  2. Similarly for the "In" pump. The "In" ATO is also backed up by a fixed duration and there is the high level safeguard in the sump. So also safe.
  3. Finally, what if the Fresh Sea Water (FSW) runs out? I could find myself in the situation where water is pumped out of the sump and there isn't enough in reserve to replace it.
So item 1 and 2 are taken care of, just number 3. What I have decided to do is install an additional float switch in the FSW container and connect it inline with "Out" pump. The level of this float switch is such that there is sufficient FSW left in the container to do 1 full fill cycle of the AWC (plus a small percentage for safety)
01353e013e47ba754d3988536ebfc1f29a5e23f267.jpg


I made a quick and dirty acrylic bracket for a float switch and attached it to the "In" pump in the FSW drum and connected it in series to the "Out" pump.

Ran a few tests and it worked just as expected. No pumps ran dry and did not get into a situation where there wasn't enough water to fill after a AWC.

Happy Days.

This is pretty awesome.. I'll post what I did and have set up currently for thoughts and comments or any additional ideas..

Mine was a lot more simplistic.

I used a dosing adapter and picked up a DP4S slave doser.


Basically only dosing Kalk, so I have 3 extra pumps on it.

1 is my ATO from a 75 gal tank in my garage - it has been pretty good about just pushing 0-130 seconds per hour of water over the last week or two. When I'm not messing with the tank. Any deviation from that is usually because I'm messing with something.

Yesterday I decided to try out using the other 2 pumps for AWC.

Ran one line out to the drain, and one to a bucket of saltwater.

Activated both pumps at the same time..

Guess I should explain my config.. I have a 220 Gal main tank - 3 overflows that all run into a 40 Gal Refugium then 2 pipes that run to a 40 Gal sump. 2 return pumps that run at approx 75%, but I can push them up to 100 no problem with no issue. Basically I have them for redundancy reasons.

So, when I pull the water out, it's coming from the Refugium and when I put water in, it's going in the sump, which is getting pushed out to the main tank.

The doser pumps run REALLY slow. which.. I'm Automating the process.. so who cares?

It seems to be changing about 1 Gal per hour roughly. I kick off the water in on the macro, then wait approx 200 seconds, then the water out begins.. this helps ensure the ATO isn't running at the same time.

I ran it 4 hours the first day, and so far, the levels in the tank haven't changed at all.

I feel like any major issues either way would be noticeably impact the ATO before it could ever cause a flood or anything like that.. Because the change happens so slow over time, I don't think I need to worry about any temp fluctuations.

Figure maybe I'll get a 25-40 Gal tank for pre-mixing the saltwater.. have it run 3-4 hours a day and replenish the saltwater weekly..

My current concern with this is the ability of the doser pumps to run that long.. when they are designed for dosing much more limited units of time..
 
OP
OP
Des Westcott

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Hey. I like the use of the peristaltic pumps. I know a guy that experimented with something similar with a doser. He stopped using it, but I'm not exactly sure of the reason. I was looking very seriously at the dual peristaltic pumps run by a single motor at one stage. Even considered designing and 3D printing something. Gave that idea up when I started formulating this plan.

I want to buy some of those DP4S dosing pump adaptors to implement dosing. Seems Jebao is discontinuing the DP4S unit in favour of the units with built in wifi.

I settled on this approach because for me it was the most robust. I could implement the most failsafes and have the most control. Each water change takes less than 10 minutes and I'm not relying on the metering characteristics of the peristaltic pump for the volume. I have realised that for the "Out" cycle the float switch is unnesccary - could just be time based - but the low level float switch works well to prevent the return pump sucking air. Using the same float switch / ATO sensor for "In" control and ATO means that they should be pretty reliable at keeping the same level and there is less chance of having a failure there without realising it.

Your setup makes sense to me. With the Dosing oumos running so slowly and the water moving around the system so fast, they should balance each other. Maybe turn off your ATO when they are running? As I see it, your biggest risk is one of the pumps going out of calibration and you taking out more than you are putting in or vice versa.
 

Zippyfear

Community Member
View Badges
Joined
Apr 30, 2019
Messages
86
Reaction score
152
Rating - 0%
0   0   0
Hey. I like the use of the peristaltic pumps. I know a guy that experimented with something similar with a doser. He stopped using it, but I'm not exactly sure of the reason. I was looking very seriously at the dual peristaltic pumps run by a single motor at one stage. Even considered designing and 3D printing something. Gave that idea up when I started formulating this plan.

I want to buy some of those DP4S dosing pump adaptors to implement dosing. Seems Jebao is discontinuing the DP4S unit in favour of the units with built in wifi.

I settled on this approach because for me it was the most robust. I could implement the most failsafes and have the most control. Each water change takes less than 10 minutes and I'm not relying on the metering characteristics of the peristaltic pump for the volume. I have realised that for the "Out" cycle the float switch is unnesccary - could just be time based - but the low level float switch works well to prevent the return pump sucking air. Using the same float switch / ATO sensor for "In" control and ATO means that they should be pretty reliable at keeping the same level and there is less chance of having a failure there without realising it.

Your setup makes sense to me. With the Dosing oumos running so slowly and the water moving around the system so fast, they should balance each other. Maybe turn off your ATO when they are running? As I see it, your biggest risk is one of the pumps going out of calibration and you taking out more than you are putting in or vice versa.

I feel like on a daily schedule, if my supply line stops... the ATO kicks in for supply and I lose maybe .001 salinity.. if my exit pump fails and in line continues.. I end up with a few extra gallons. which doesn't move the needle much and it would take a few extra days of that to impact salinity to the positive side. either way.. it would be noticeable on the ATO graph..

DP4S being discontinued is a concern long term.. so maybe there's a better solution there..

Thanks for the feedback so far..

Also.. to date since yesterday... changed out about 15 Gal.. and it appears stable.
 

blackstallion

Active Member
View Badges
Joined
May 15, 2020
Messages
462
Reaction score
113
Rating - 0%
0   0   0
This is an intriguing solution. To give you a little background (don't want to waste to much or your time), I have purchased an established 220gallon reef tank (will be relocated this week) with an eshopps sump and some form of ATO (not sure which). I want to set up an AWC system and have looked into the Neptune Apex/DOS option which would ring in at about $900 minimum once it's all said and done. Although I KNOW the Neptune system is well established and will work to perform flawless AWC's with minimum tinkering on my part, if there is a solution that is substantially less costly (ie. reef-pi) and will be almost as or just as reliable and flexible, I'd like to explore the option.

It seems that any reef-pi route would require a lot of design and tinkering on my part (unless I can leverage someone's hard work and use as a blueprint for my system), however, I just don't have the time to tinker and worry about design iterations/etc. at this point ESPECIALLY if the established Neptune system is within the ballpark price wise to this DIY solution.

First question is, what would you estimate my total setup cost would be for your reef-pi setup assuming I have to purchase all the items ie. Raspberry pi, pumps, etc.? Would you be willing to provide a "Bill of Materials" or list of everything I would need to get a setup going (not sure if you've already provided this, if you have I apologize) with whatever your latest and greatest solution is?

Also, are there any major caveats to your system? ie. pumps are only capable of running short runs, Raspberry pi "bug" issues that you've seen, etc.?

Thank you!
 
OP
OP
Des Westcott

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
This is an intriguing solution. To give you a little background (don't want to waste to much or your time), I have purchased an established 220gallon reef tank (will be relocated this week) with an eshopps sump and some form of ATO (not sure which). I want to set up an AWC system and have looked into the Neptune Apex/DOS option which would ring in at about $900 minimum once it's all said and done. Although I KNOW the Neptune system is well established and will work to perform flawless AWC's with minimum tinkering on my part, if there is a solution that is substantially less costly (ie. reef-pi) and will be almost as or just as reliable and flexible, I'd like to explore the option.

It seems that any reef-pi route would require a lot of design and tinkering on my part (unless I can leverage someone's hard work and use as a blueprint for my system), however, I just don't have the time to tinker and worry about design iterations/etc. at this point ESPECIALLY if the established Neptune system is within the ballpark price wise to this DIY solution.

First question is, what would you estimate my total setup cost would be for your reef-pi setup assuming I have to purchase all the items ie. Raspberry pi, pumps, etc.? Would you be willing to provide a "Bill of Materials" or list of everything I would need to get a setup going (not sure if you've already provided this, if you have I apologize) with whatever your latest and greatest solution is?

Also, are there any major caveats to your system? ie. pumps are only capable of running short runs, Raspberry pi "bug" issues that you've seen, etc.?

Thank you!

Hey.

I'm in South Africa, so I can't really compare what I bought to what you may have available where you are. I can try put together a schematic and BOM, but they will only be descriptions of items. You will have to source local equivalents and spec them to your requirements.

I have to say this though. My AWC has been bulletproof. The only problem I have had is one I created myself by renaming something and not making changes accordingly.
 

blackstallion

Active Member
View Badges
Joined
May 15, 2020
Messages
462
Reaction score
113
Rating - 0%
0   0   0
If you are willing to put together a schemtic/block diagram of your system that would go a long way in determining what the BOM would look like and overall cost.
 

Creating a strong bulwark: Did you consider floor support for your reef tank?

  • I put a major focus on floor support.

    Votes: 20 43.5%
  • I put minimal focus on floor support.

    Votes: 11 23.9%
  • I put no focus on floor support.

    Votes: 14 30.4%
  • Other.

    Votes: 1 2.2%
Back
Top