Dewd's Big Cube Reef-Pi build

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I've been wondering how I get the Reef-Pi to send me a notification if the power goes off.

My thinking goes along these lines
  • Reef-Pi MUST be on a UPS of sorts - can be a very small one
  • I think I could use a normally closed relay held in the open position by a power supply that isn't on the UPS. This would probably have to be declared as an inlet
  • When the power goes off, the relay loses power and the contacts close and Reef-Pi senses that and sends an alert.
Now, how would I accomplish that? My first thoughts were by setting it up as an ATO with alerts set to 5 seconds or something like that.

Any ideas?

The next phase would be to have Reef-Pi detect that power has gone down and turn non-essential outlets off until the power has come back. I guess I could accomplish the same thing with a UPS running the Pi and only certain outlets. That way when power goes, only the equipment on the UPS keeps running.

Thoughts would be appreciated.

Des
My solution to this is...a backup generator!
 
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
My solution to this is...a backup generator!

Naaaaah. Too Easy. I've already got a big UPS that runs the home office and all the house lights for about 24 hours.

It would be easy to hook the whole tank up to that, but I want a smarter, more elegant solution.

And of course I want to say "Look what I made." ;Hilarious
 

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
BTW @Des Westcott I have added a reverse button on macros UI recently. From 3.1 onward you will be able to run a macro in reverse order, which I think may make things little easier for 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
Thanks to @Michael Lane I received his PH board and probes the other day. Installed and working great!! Thanks for your help with that Michael!

While doing my first calibration, my ATO kicked in. It is running temporarily with a very cheap and nasty peristaltic pump pushing RODI through the Kalk reactor. When my supplier opens in the new year, I will be removing the pump and connecting the reactor directly to my RODI unit. That's why I built the independent failsafe into the Reef-Pi. Any way, the ATO kicked in and I saw the pH reading climb stupidly. When the ATO kicked off, the readings stabilised.

Then I've noticed unexplained HEAVY spikes in my pH, which can only be explained by the ATO. So I'm getting interference of some sort from the peristaltic pump when it runs.

My question is this :- Does anyone know what the sensitive element is? In my mind, it has to be one of three elements in the system.
1) The wires from the Reef-Pi to the pH board
2) The pH board
3) The sensor wires

If 2), I could easily move the board away from all the other electrics in it's own waterproof box on the opposite end of the cabinet. Same for 3). If it's 1), that is a lot more tricky.

The above could all be moot when I do away with the peristaltic pump, but in my mind the exercise is worth investigating and either understanding or solving for the future.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Thanks to @Michael Lane I received his PH board and probes the other day. Installed and working great!! Thanks for your help with that Michael!

While doing my first calibration, my ATO kicked in. It is running temporarily with a very cheap and nasty peristaltic pump pushing RODI through the Kalk reactor. When my supplier opens in the new year, I will be removing the pump and connecting the reactor directly to my RODI unit. That's why I built the independent failsafe into the Reef-Pi. Any way, the ATO kicked in and I saw the pH reading climb stupidly. When the ATO kicked off, the readings stabilised.

Then I've noticed unexplained HEAVY spikes in my pH, which can only be explained by the ATO. So I'm getting interference of some sort from the peristaltic pump when it runs.

My question is this :- Does anyone know what the sensitive element is? In my mind, it has to be one of three elements in the system.
1) The wires from the Reef-Pi to the pH board
2) The pH board
3) The sensor wires

If 2), I could easily move the board away from all the other electrics in it's own waterproof box on the opposite end of the cabinet. Same for 3). If it's 1), that is a lot more tricky.

The above could all be moot when I do away with the peristaltic pump, but in my mind the exercise is worth investigating and either understanding or solving for the future.
What powers the pump?
Its own supply?
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Ok. Interference issues stink. I had the same thing happening when my led lights came on...tracked it down to one of the lighting power supplies.

We know that its the pump. What we dont know is if the interference is inductive or is it putting bad signals back thru the meanwell.

To answer your question about whats the most sensitive. Its the analog side of the ph board heading to the probe. The ph probe is reading millivolts so its very sensitive to stray signals.
The ph board converts that to counts and that number is sent thru the I2c bus to the pi. That part of the signal is more robust because of i2c protocol.

Things to try:
Make sure the ph probe wiring doesnt go near the pump wiring. If it must be close always cross the two at right angles. Wires parallel to each other pick up interference the easiest.

Mount the ph board in a shielded box. I simply used metal altoids box with a ground wire tail screwed to the box shell and running to a good ground. The box was a perfect fit for the board. This helped when I did it although it didnt get rid of the interference entirely.

Put the pump on a different 12v power supply from all the rest of your setup temporarily and see if its somehow backfeeding emf into the meanwell.
This is what i suspect may be happening.

Unfortunately this may take a bit of trial and error to track down.
 
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
Ok. Interference issues stink. I had the same thing happening when my led lights came on...tracked it down to one of the lighting power supplies.

We know that its the pump. What we dont know is if the interference is inductive or is it putting bad signals back thru the meanwell.

To answer your question about whats the most sensitive. Its the analog side of the ph board heading to the probe. The ph probe is reading millivolts so its very sensitive to stray signals.
The ph board converts that to counts and that number is sent thru the I2c bus to the pi. That part of the signal is more robust because of i2c protocol.

Things to try:
Make sure the ph probe wiring doesnt go near the pump wiring. If it must be close always cross the two at right angles. Wires parallel to each other pick up interference the easiest.

Mount the ph board in a shielded box. I simply used metal altoids box with a ground wire tail screwed to the box shell and running to a good ground. The box was a perfect fit for the board. This helped when I did it although it didnt get rid of the interference entirely.

Put the pump on a different 12v power supply from all the rest of your setup temporarily and see if its somehow backfeeding emf into the meanwell.


Thanks. I'll try all of those. But the first thing I'm going to do is extend the distance between the pH board and the Pi by about 1m. Because in my setup, that's probably the easiest thing to do. ie put the probe as far away from the electrics as it can be and have the board right there next to it.
 
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.

I extended the cable between the Pi and the pH board. I moved the board to the other side of the sump area in a waterproof box. Planned to wrap it in tinfoil (but didn't get to that).......

And decided on another plan of attack. I moved the pesky Peristaltic pump outside so that it's right next to my kalk stirrer. Means a much shorter piping run for the ATO too.

Working like it should now. So technically I haven't solved the problem, but I have created a workable solution.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Update.

I extended the cable between the Pi and the pH board. I moved the board to the other side of the sump area in a waterproof box. Planned to wrap it in tinfoil (but didn't get to that).......

And decided on another plan of attack. I moved the pesky Peristaltic pump outside so that it's right next to my kalk stirrer. Means a much shorter piping run for the ATO too.

Working like it should now. So technically I haven't solved the problem, but I have created a workable solution.
That sounds like a pretty good way to fix the issue. In general, you don't want long wires with I2C (which is how the pH modules usually communicate).
 

thaistalyn

Active Member
View Badges
Joined
Dec 9, 2019
Messages
131
Reaction score
294
Location
Navarre, FL
Rating - 0%
0   0   0
Update.

I extended the cable between the Pi and the pH board. I moved the board to the other side of the sump area in a waterproof box. Planned to wrap it in tinfoil (but didn't get to that).......

And decided on another plan of attack. I moved the pesky Peristaltic pump outside so that it's right next to my kalk stirrer. Means a much shorter piping run for the ATO too.

Working like it should now. So technically I haven't solved the problem, but I have created a workable solution.

After building some Christmas props (servos) and LED lighting, I noticed an increase in EMI. After putting some ferrite cores/beads on my servo lines and some of the power supplies I don't get interference on the data line for LED light control. May want to look into putting a ferrite bead/core on the pump supply.

Cedmon 20 Pieces Clip-on Ferrite Core
1578529514536.png
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Say 2m OK? I do plan to shorten it back up now the issue is "hidden"
The recommended maximum is 1 meter, but it's fine if it's working for you.

The problem with longer wires is the added capacitance, and therefore longer transition times. If you do end up experiencing problems, you could try lowering the I2C speed to 50KHz or so. The lower frequency lets you work around the longer rise and fall times.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
The recommended maximum is 1 meter, but it's fine if it's working for you.

The problem with longer wires is the added capacitance, and therefore longer transition times. If you do end up experiencing problems, you could try lowering the I2C speed to 50KHz or so. The lower frequency lets you work around the longer rise and fall times.
I use a 2m cord without problems...just be careful of routing near interference sources.
 
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
After building some Christmas props (servos) and LED lighting, I noticed an increase in EMI. After putting some ferrite cores/beads on my servo lines and some of the power supplies I don't get interference on the data line for LED light control. May want to look into putting a ferrite bead/core on the pump supply.

Cedmon 20 Pieces Clip-on Ferrite Core
1578529514536.png
AWesome. I like that idea. Will look into it.
 
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
The recommended maximum is 1 meter, but it's fine if it's working for you.

The problem with longer wires is the added capacitance, and therefore longer transition times. If you do end up experiencing problems, you could try lowering the I2C speed to 50KHz or so. The lower frequency lets you work around the longer rise and fall times.
I made it 2m in case i had to experiment with where i placed the pH board. However, now with moving the problem pump outside, I could actually probably put the pH board in the main enclosure again. I will experiment.
 
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'm also trying to get AIO integration working to try get better resolution graphing. Feed shows up, but no data. Suggestions welcome.
 
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 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.
 
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
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.
 

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

  • I put a major focus on floor support.

    Votes: 56 40.3%
  • I put minimal focus on floor support.

    Votes: 29 20.9%
  • I put no focus on floor support.

    Votes: 49 35.3%
  • Other.

    Votes: 5 3.6%
Back
Top