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

drbogger

Active Member
View Badges
Joined
Apr 24, 2019
Messages
165
Reaction score
126
Location
Ballston Spa, New York
Rating - 0%
0   0   0
Okay, so I did some further testing, and this is what I figured out.

When ATO Triggers a Macro, it will work if I use it to turn on/off equipment.
However, if I add to the macro, to turn on/off another ATO, it will not work.

@Ranjib
Any ideas why it's doing this?
 

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
916
Rating - 0%
0   0   0
Okay, so I did some further testing, and this is what I figured out.

When ATO Triggers a Macro, it will work if I use it to turn on/off equipment.
However, if I add to the macro, to turn on/off another ATO, it will not work.

@Ranjib
Any ideas why it's doing this?
A less sophisticated method would be to use timers to turn on and off an ato watching the high sensor. You could have it turn on every other day to fill the container or at whatever frequency makes sense.

I haven’t tried to have a macro triggered from an ato change a different ato. But it would be your solution if it did work. What about a macro triggering another macro that triggers to the ato? I don’t know. I’m spit balling ideas now.
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
65
Location
Dover, NH
Rating - 0%
0   0   0
A less sophisticated method would be to use timers to turn on and off an ato watching the high sensor. You could have it turn on every other day to fill the container or at whatever frequency makes sense.

I haven’t tried to have a macro triggered from an ato change a different ato. But it would be your solution if it did work. What about a macro triggering another macro that triggers to the ato? I don’t know. I’m spit balling ideas now.

I use a RO/DI Flood Guardian with an HS300 smart plug to fill my 30 Gallon ATO trash can in the basement. When the flood guardian powers up it starts filling from my RO/DI system until the water level reaches it's sensor and then it shuts off the water supply and goes into standby mode. Pretty cool gizmo although not inexpensive. I created a timer on mi RPI to switch it off and and back on after 4 seconds it then starts filling the can again. The timer is set for Friday's at 9am and it just fills the trash can. The Flood Guardian uses an electronic valve which is in a normally closed state so if the power goes out it will not flood the basement.
 

drbogger

Active Member
View Badges
Joined
Apr 24, 2019
Messages
165
Reaction score
126
Location
Ballston Spa, New York
Rating - 0%
0   0   0
I use a RO/DI Flood Guardian with an HS300 smart plug to fill my 30 Gallon ATO trash can in the basement. When the flood guardian powers up it starts filling from my RO/DI system until the water level reaches it's sensor and then it shuts off the water supply and goes into standby mode. Pretty cool gizmo although not inexpensive. I created a timer on mi RPI to switch it off and and back on after 4 seconds it then starts filling the can again. The timer is set for Friday's at 9am and it just fills the trash can. The Flood Guardian uses an electronic valve which is in a normally closed state so if the power goes out it will not flood the basement.

It doesn't look like it automatically turns on when the level is low?
 

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
916
Rating - 0%
0   0   0
I'll try that now and report back.

*EDIT*
Nope, doesn't work either.

@Mikeneedsahobby
I tried to use an ato to trigger a macro and that macro to trigger a different ato. I got a bad result. Reef pi seemed to go into a a bad loop and response time become very bad. I ended up having to pull power to reboot.
So I got the same result as you.
 

Boostable

Active Member
View Badges
Joined
May 17, 2011
Messages
227
Reaction score
136
Location
Lake Mary, FL
Rating - 0%
0   0   0
I'll try that now and report back.

*EDIT*
Nope, doesn't work either.

@Mikeneedsahobby
For ATO, I run a simple float valve, backed up up by an inline electric solenoid valve driven off a timer. Stays open long enough to top off the water, and fails closed during power outage. Two means of shutoff, but the float has always shut the water off before the valve ever had to kick in. Simple and effective... A little each day keeps the salt creep away...
 
Last edited:

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
I was able to get an ato to trigger a macro today.

the ato is set to trigger the macro. Check frequency is 10 seconds. One shot is disabled.

the macro is set to reverse and written backwards. It is a single step stated to turn off dosing pump. This action actually turns on the dosing pump.

the dosing pump is set to run for 30seconds at 50% speed. I have all schedule parameters set to “*”.

The result is it functions in the manner I desire. When the float sensor is low the dosing pump turns on. It shuts off when the float sensor is high.
That is awesome - I'm going to test some more myself then - I have never tried with a Doser - Always used simple equipment.
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
I got my issue above resolved. I needed to add pulldown resistors.

---------------------
-- New Issue --
---------------------

Okay, I am trying to automatically refill my ATO Reservoir using 2 float switches.
Lets call them "Float-Low" and "Float-High", for low level and high level sensors.

- In ATO Menu, Float-High is set to OneShot, controls a Solenoid Valve, and is disabled by default.
- Float-Low is set to Enable, and is set to trigger a macro called "Refill Reservoir".
- The Macro called "Refill Reservoir" has only 1 action in it, which is "ATO > Float-High > Turn On"

The idea is when "Float-Low" is triggered, it will turn on a Solenoid Valve to refill the Reservoir until it reaches the "Float-High" sensor.

However, when I try to do this, it does not work, and it causes the entire system to hang.

What am I doing wrong?

I have not been able to get an ATO to trigger a Macro. I think this is what you are seeing and thinking the system is hanging

This is the question I probably get the most so I made this up, here's a copy and paste. You can ignore the controller and any sensor type will work if you have it confirmed working with ATO.

Here's an example of a low level sensor starting a pump and a high level sensor stopping the pump.

This is how the jumpers should be set, sensor 1 is the low level float. Notice I have one float on GND and other float on +5v and the P-U / P-D jumper is opposite. I did it that way so connectors in reef-pi don't need to be "reversed". If both were wired like sensor 2, sensor 1 connector would need to be "reversed". For float switches the P-U / P-D jumper should always be opposite of 2nd wire on float. If a wire from float goes to GND jumper must be set to P-U, if the float wire goes to +5v then jumper needs to be P-D.

[Image: controller.jpg]


Based on the floats connected like above this is how connectors should look. (RevB has a 6th sensor port).

[Image: sensor_connectors.jpg]



Now setup two macros like image below. The "Start Fill" is the low level float and "Stop Fill" is high level.

Once both are added you can press "Run" button for "Start Fill" and the pump should turn on. I have DC 1 set for equipment but anything on that tab will be available.

Then press run for "Stop Fill" and it should turn off.

When this is working you can move on.

[Image: reservior_fill_macros.jpg]


Now add the two sensors to ATO tab. I have them both disabled so I could get both on single image so do keep them both enabled (on).

Now the low float will start the pump and top float will turn it off. Note both floats always need to be in the position they would be otherwise it will flip flop. During testing this can throw you off. If you are testing out of water make sure you keep adjusting both floats in order they would be in reality.

[Image: reservior_fill_sensors.jpg]


Here's some images of the floats. the lower one is low level and other high level. Of course space between floats is unlimited, this is just what I was using.

This image represents a full tank of water, both floats would be up and pump (light in image) would be off. At this point if you went to equipment tab and turned on the pump manually it would flip flop once because the high level sensor is still running the macro which is turning off the pump.

[Image: sensors1.jpg]


This image would be a partially filled tank, bottom float is still high but top dropped. Pump remains off. Now at this point if you went to equipment tab and turned on that pump it would turn on and stay on until the high level float went back up. This can be useful to manually start a refill at any time.

[Image: sensors2.jpg]


This picture is when the tank gets empty, both floats are down and the pump will turn on. This time if you manually tried to turn off the pump at this point it would immediately come back on because low level float is forcing it on. If you manually moved the high level float up while low level is down it would flip flop as well but in reality this should never happen.

[Image: sensors3.jpg]


This image is during the fill but tank not full yet, low float is up and high float is still down. Once water raises high level the pump will stop and it can go back to the down position when water is used.

[Image: sensors4.jpg]



And this the end of the cycle and tank is full again. Pump is off and waiting for both floats to drop to start the pump.

[Image: sensors5.jpg]



+100, this is an awesome topic. I’m taking notes, whatever comes out of it, I’ll translate into software features. As of now , default equipment state on startup is something I’m thinking of.

Here's my 2 cents, on my old controller I created a function called smartStartup, it was one of the best features. When the controller started up it went through all the schedules and figured out based on the current day time what state each output should be in. After this is went through all the sensors and what they control and decided which should run or not. It wasn't easy to do but it was slick and worked well.


Hey everyone, looking for a little help with the ph setup. When I add it I get an error that an input is missing and the ability to calibrate it is grayed out.

here’s how I’ve been setting it up:
1. Add ezo ph driver with the default 68
2. Add analog ph connector with pin 0
3. Go to ph and add the ph connector

I added my circuit below if you feel that may be the source of the issue. After buying everything I realized I’m not following best practices for noise isolation but I’d still expect it to show up.

Thanks in advance!



A0479318-FF35-4FD0-8B91-61979C1724E7.jpeg

The default address is 99 in reef-pi, with i2cdetect you should see 63. Also don't forgot to go to "admin" tab and press "reboot" button after changing the address.

I think it's crazy Atlas doesn't have those circuits isolated, it should work but how well is the question. If I put an isolated probe in my tank it goes off the charts.
 
Last edited:

Sarlindescent

Active Member
View Badges
Joined
Dec 26, 2015
Messages
145
Reaction score
140
Rating - 0%
0   0   0
Some updates. Just completed case #3.... got a rpi ups with a 10k mah battery. Turned out the battery was bigger than I thought by 1/4" and case 2 was scraped. Case 3 has an easy open/close lid. Latch needed modified to work with bnc connectors. Also switched from 1/4 trs to mini xlr. Also did a mini cable sleeving job. Lastly, Saturday the atlas ezo toggler arrived and I was able to switch the ph chips from uart to i2c.

What's left:
1. Finish ups/power supply case.
2. Mount both the ups and rpi. They will be on opposite sides of the stand to prevent interference.
3. Calibrate ph probes.
20210118_233908.jpg
20210118_233710.jpg

Mini xlr connectors look oem on the ds18b20.
20210116_145610.jpg


Also lessons learned, crimp connectors do not work with the temp board screw terminals.
20210117_202815.jpg
 
Last edited:

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
So I've been monitoring my pH probe quite closely and fiddling with Calibration to try and get repeatable readings. And I've made good progress in that regard, but this morning the reef-pi has thrown me a serious curveball. Firstly at midnight exactly it lost all 3 x temp probes. Values just dropped to zero. Re-load and Re-boot from UI did nothing to fis that. Eventually unplugged at the wall and got the temps back.

While this was happening and I was going through sorting it out, I was curious why I was getting exactly the same pH value down to the 13th decimal place on the UI. A look in Adafruit and I could see the actual values coming in were changing, but not corresponding to the UI. After a short while I noticed the Graph in the UI developed a "bump" roughly 2 hours previous to current time and that the current time at the end of the graph was not up to date. AIO graph and feed were still showing as normal. pH graph looks like this now. The large swings are me testing in buffer solutions without running Calibration.

Closer inspection has shown similar is happening on the Temperature graphs.

I'm sure deleting and re-installing will fix this, but I really don't want to do that with teh pH if I can avoid it after getting the Calibration dialed in.
2021-01-19 (2).png
2021-01-19 (1).png
2021-01-19.png
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Some updates. Just completed case #3.... got a rpi ups with a 10k mah battery. Turned out the battery was bigger than I thought by 1/4" and case 2 was scraped. Case 3 has an easy open/close lid. Latch needed modified to work with bnc connectors. Also switched from 1/4 trs to mini xlr. Also did a mini cable sleeving job. Lastly, Saturday the atlas ezo toggler arrived and I was able to switch the ph chips from uart to i2c.

What's left:
1. Finish ups/power supply case.
2. Mount both the ups and rpi. They will be on opposite sides of the stand to prevent interference.
3. Calibrate ph probes.
20210118_233908.jpg
20210118_233710.jpg

Mini xlr connectors look oem on the ds18b20.
20210116_145610.jpg


Also lessons learned, crimp connectors do not work with the temp board screw terminals.
20210117_202815.jpg
Looking good :-)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
So I've been monitoring my pH probe quite closely and fiddling with Calibration to try and get repeatable readings. And I've made good progress in that regard, but this morning the reef-pi has thrown me a serious curveball. Firstly at midnight exactly it lost all 3 x temp probes. Values just dropped to zero. Re-load and Re-boot from UI did nothing to fis that. Eventually unplugged at the wall and got the temps back.

While this was happening and I was going through sorting it out, I was curious why I was getting exactly the same pH value down to the 13th decimal place on the UI. A look in Adafruit and I could see the actual values coming in were changing, but not corresponding to the UI. After a short while I noticed the Graph in the UI developed a "bump" roughly 2 hours previous to current time and that the current time at the end of the graph was not up to date. AIO graph and feed were still showing as normal. pH graph looks like this now. The large swings are me testing in buffer solutions without running Calibration.

Closer inspection has shown similar is happening on the Temperature graphs.

I'm sure deleting and re-installing will fix this, but I really don't want to do that with teh pH if I can avoid it after getting the Calibration dialed in.
2021-01-19 (2).png
2021-01-19 (1).png
2021-01-19.png
I’m thinking what will be a good way to solve this. The sensor readings are beyond reef-pi, we can only apply some calibration, bound checks on them. We can definitely make it easy to copy over calibration to a new probe, or/and updating existing readings to a fixed value based on some criteria (min/max values )

There’s a separate issue of ph having more than two decimal precision, I’ll fix that .
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
That is awesome - I'm going to test some more myself then - I have never tried with a Doser - Always used simple equipment.
All right - been testing this and I now have a better understanding of how this is working.

As a test, I have set up the following :
  • a momentary switch to imitate a float switch - set up as an input.
  • a light set up on an outlet
  • Created a macro that has one step - turn on light
  • Create an ATO with one second check frequency
  • Set the ATO to control the Macro described above
Working findings
  • If I press and hold the button (simulating the float switch opening) the light comes on and stays on.
  • When I release the button (simulating the float switch closing), the light goes off
  • If I press the button for 1 second and release, the light comes on for one second and then goes off again.
  • If I enable One Shot and press and release the button, the light comes on and stays on, but then the ATO is disabled afterwards
Now, I altered the Macro to add the steps to turn on, wait 1sec, turn off, wait 1 sec and turn on. Then activate the ATO on and the light turns on and off repeatedly (1 sec frequency) regardless of the state of the button / switch until I de-activate the ATO. When de-activating the ATO, the light finishes the Macro cycle. If the ATO is left on longer, it takes longer to "normalise" ie reef-pi is counting the activation cycles of the ATO and is trying to run the Macro that number of times.

Next I tried to create a Macro that first de-activated ATO, then did the light steps and then re-activated the ATO. This just confused it completely and made the ATO uncontrollable. I had to delete the ATO because I couldn't change it's state to off despite a re-start on Reef-Pi.

But I can see how using the doser as described has worked.

I'm going to keep testing a few things, but as far as getting the status of an ATO to trigger a multi-step Macro - that's still a no.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
I’m thinking what will be a good way to solve this. The sensor readings are beyond reef-pi, we can only apply some calibration, bound checks on them. We can definitely make it easy to copy over calibration to a new probe, or/and updating existing readings to a fixed value based on some criteria (min/max values )

There’s a separate issue of ph having more than two decimal precision, I’ll fix that .
I was thinking in the UI maybe you could have a "purge graph data" or "reset graph" - maybe in the Dashboard Configuration. I know sometimes when I'm testing ATO or similar I get one big spike in the histogram that visually gives me a twitch until it drops off the end after time.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
So I've been monitoring my pH probe quite closely and fiddling with Calibration to try and get repeatable readings. And I've made good progress in that regard, but this morning the reef-pi has thrown me a serious curveball. Firstly at midnight exactly it lost all 3 x temp probes. Values just dropped to zero. Re-load and Re-boot from UI did nothing to fis that. Eventually unplugged at the wall and got the temps back.

While this was happening and I was going through sorting it out, I was curious why I was getting exactly the same pH value down to the 13th decimal place on the UI. A look in Adafruit and I could see the actual values coming in were changing, but not corresponding to the UI. After a short while I noticed the Graph in the UI developed a "bump" roughly 2 hours previous to current time and that the current time at the end of the graph was not up to date. AIO graph and feed were still showing as normal. pH graph looks like this now. The large swings are me testing in buffer solutions without running Calibration.

Closer inspection has shown similar is happening on the Temperature graphs.

I'm sure deleting and re-installing will fix this, but I really don't want to do that with teh pH if I can avoid it after getting the Calibration dialed in.
2021-01-19 (2).png
2021-01-19 (1).png
2021-01-19.png
So far I have not gotten any PH probes to be consistent, about to send another one back, its like they all start to lose the calibrations settings and drift. I may try one more but starting to think about not having PH monitored which with dosing kalk I kind of wanted.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
I was thinking in the UI maybe you could have a "purge graph data" or "reset graph" - maybe in the Dashboard Configuration. I know sometimes when I'm testing ATO or similar I get one big spike in the histogram that visually gives me a twitch until it drops off the end after time.
+1 I would like to be able to reset graphs, I know I learned the hard way about re-arranging the dashboard, messed up several charts and not sure how to correct them.

charts.png


Note the dates on the bottom, I went from a single dashboard since I couldnt add more rows and when I moved things around the bottom scale is messed up.

:)
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 26.6%
  • 100% dry rock + 100% live sand

    Votes: 48 33.6%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 32 22.4%
  • 75% live rock, 25% live sand

    Votes: 15 10.5%
  • 25% live rock, 75% live sand

    Votes: 10 7.0%
Back
Top