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

Free Phyto Promo
Spend $39+ → free 16oz Phyto · Use code FREEPHYTO at checkout · $16.99 value · Densest 6-species blend · Free shipping on every order · 100% live arrival guaranteed Spend $39+ → free 16oz Phyto · Use code FREEPHYTO at checkout · $16.99 value · Densest 6-species blend · Free shipping on every order · 100% live arrival guaranteed
Shop Now Code: FREEPHYTO
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
Just create two different ato and control them separately ? Apologies I have not read all the details, just skim through the post
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,695
Reaction score
1,607
Rating - 0%
0   0   0
Just create two different ato and control them separately ? Apologies I have not read all the details, just skim through the post
The point was that if the first ATO malfunctions (snail stuck in flotor for example) the task of the second ato is to disable/veto the first one, or rather stops the pump.

Does reef pi do that if I just point two separate ATO entities to the same equipment entity?

I guess what I mean is with sensors A and B is:

Pump runs iff NOT A AND NOT B
 
Last edited:

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
The point was that if the first ATO malfunctions (snail stuck in flotor for example) the task of the second ato is to disable/veto the first one, or rather stops the pump.

Does reef pi do that if I just point two separate ATO entities to the same equipment entity?

I guess what I mean is with sensors A and B is:

Pump runs iff NOT A AND NOT B
It will probably not work, since the second sensor (B) will always trigger the pump if the water is below sensor B, but above sensor A, basically overriding sensor A.
You could also run into strange behavior, where ATO B turns on the pump, but ATO A afterwards turns it off, since sensor A is already triggered. Rinse and repeat with the pump turning on and off all the time.

The only way I currently see (which is most likely not the only one) is the following setting, altough you will find that it doesn't work and creates bugs.
  • create 3 inlets:
    • two regulars on your 2 ATO signals (with the correct polarity, which you should know if you simply test one of them with an ATO)
    • and one on the safety ATO, but with the opposite polarity
    • 1673641669390.png
  • Then create 2 ATOs that run off the 2 regular inlets that both trigger your top-off pump:
    • One on Signal A:
    • 1673641799207.png
    • One on Signal B, but deactivated:
    • 1673641916804.png
  • Create a macro that disables ATO A, activates ATO B and deactivates your top-off pump:
    • 1673642052208.png
  • Now create a third ATO on the reversed Signal B that runs that Macro as a One Shot:
    • 1673642584013.png
This should:
- run your standard ATO on Signal A
- as soon as Signal B triggers, your third ATO (in my example called "ATOSafety") runs the macro that should switch to the backup ATO on Signal B and deactivate your top-off pump to keep your tank from overflowing

Personally I set the ATO check frequency intentionally low (10s) so I can test this quickly, not sure what kind of value is best here. The Adafruit guide used 120s, but I guess this very much depends on the speed at which your pump can refill water.

ATO A worked fine. When I switched my ATO_Dummy A signal to low, my doser started running within the next 10s. When I set the signal back to high it stopped.

As soon as I also triggered SignalB something worked ... the doser doesn't get trigger by ATO A anymore. But the macro also doesn't switch the ATOs:
1673643007713.png


Strange. I tested the same with switching a light. That also doesn't seem to work. If I tell a macro to switch off a light, the light stays enabled. @Ranjib ? Is that supposed to happen ? Feels very strange to me that "Turn On" and "Turn Off" doesn't enable or disable the ATOs (or lights for that matter). I removed the "Turn off Doser 1" from the macro, but nothing happens, the doser doesn't turn on again. I also can't switch the ATOs manually, because that freezes my Pi Zero.

@Ranjib that's definitely not nice ^^
 
Last edited:

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
Wait, what ?
Now my Pi reacts again, and the ATOs are correctly set (I did click the buttons a few times during the freeze though with no immediate reaction):
1673643364313.png


Notice though, that the "OneShot" on the ATOSafety does strangely disable.

Also: I now can't edit ATO B, which has reset its check frequency to the standard 60. That's seriously not nice behavior.
I also can't create new ATOs. Is that a UI bug ? Even clearing the Cach and reloading ReefPi didn't help :(
 
Last edited:

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
The point was that if the first ATO malfunctions (snail stuck in flotor for example) the task of the second ato is to disable/veto the first one, or rather stops the pump.

Does reef pi do that if I just point two separate ATO entities to the same equipment entity?

I guess what I mean is with sensors A and B is:

Pump runs iff NOT A AND NOT B
Sry, seems that I have been too quick to advise you. I hope this gets resolved.
 
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
Wait, what ?
Now my Pi reacts again, and the ATOs are correctly set (I did click the buttons a few times during the freeze though with no immediate reaction):
1673643364313.png


Notice though, that the "OneShot" on the ATOSafety does strangely disable.

Also: I now can't edit ATO B, which has reset its check frequency to the standard 60. That's seriously not nice behavior.
I also can't create new ATOs. Is that a UI bug ? Even clearing the Cach and reloading ReefPi didn't help :(
I’m pretty sure there’s ui bug that’s not syncing the ui state with backend data (api response in JavaScript console under network section should reveal it ). I’ll have to read through this when I have some time to decode the macro synchronization issue . There’s likely bug, and some of it might be as expected (locking), and we have to do some validation to avoid those . I have to reproduce this and the. Use the profiler to track them (locks/freeze) down . It will be fun work(I knew macro will bring this type of stuff, since it’s uncontrolled concurrency , unlike the stock ato, temp etc). But I need some time ….bit busy with some other things.. bare with me till then.
the ui bug is so annoying it’s keeps popping up with version upgrades of different libraries... and min or changes in code, we need a better story there,, I want do some large scale refactoring .. react has changed a lot in past 6 years :-(
 
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
The point was that if the first ATO malfunctions (snail stuck in flotor for example) the task of the second ato is to disable/veto the first one, or rather stops the pump.

Does reef pi do that if I just point two separate ATO entities to the same equipment entity?

I guess what I mean is with sensors A and B is:

Pump runs iff NOT A AND NOT B
You should be able to use the same equipment, I think reef-pi won’t stop you from doing that, but then doing so can lead to locking things up inadvertently or by code bugs (I have track those down ). Hence it’s unsafe unless you know and tested what it’s supposed to do.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Need some more eyes and suggestion on controlling a nicrew led 50w version with reef-pi. I have taken a couple runs at this and think I just have a non working unit but trying to see how to debug their board to see if there is something I can correct or fix. I have wired up a 0-10v control section light whats in the lighting guide - https://learn.adafruit.com/reef-pi-lighting-controller/circuit-construction and have verified that its all working via a meter, pwm controls take it from 0-10v. Supposed to be able to control the nicrew 50w and up lights with a 0-10v input, when I try to do it the lights do nothing. Here is a posting that calls out the wiring - https://www.reef2reef.com/threads/reef-pi-control-lighting.811639/post-8787689

I have taken the unit apart and did some continuity on the 0-10v board and I see 24v coming form the main board to the unit (to go to the out port) but I do not see the 0-10v input coming into the board and not sure what I can do to figure out where on the board could be the issue. Here are a couple pics of the board:

PXL_20230116_043622492.jpg


Backside:

PXL_20230116_043658493.jpg


Just not smart enough on the back side to know how to troubleshoot with a meter and maybe figure out the issue. If anyone has some suggestions or ideas let me know. I wanted to use this light in a new build and purchase a couple more but if I am unable to control them I not sure what to do at that point.

Thanks :)
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
Need some more eyes and suggestion on controlling a nicrew led 50w version with reef-pi. I have taken a couple runs at this and think I just have a non working unit but trying to see how to debug their board to see if there is something I can correct or fix. I have wired up a 0-10v control section light whats in the lighting guide - https://learn.adafruit.com/reef-pi-lighting-controller/circuit-construction and have verified that its all working via a meter, pwm controls take it from 0-10v. Supposed to be able to control the nicrew 50w and up lights with a 0-10v input, when I try to do it the lights do nothing. Here is a posting that calls out the wiring - https://www.reef2reef.com/threads/reef-pi-control-lighting.811639/post-8787689

I have taken the unit apart and did some continuity on the 0-10v board and I see 24v coming form the main board to the unit (to go to the out port) but I do not see the 0-10v input coming into the board and not sure what I can do to figure out where on the board could be the issue. Here are a couple pics of the board:

PXL_20230116_043622492.jpg


Backside:

PXL_20230116_043658493.jpg


Just not smart enough on the back side to know how to troubleshoot with a meter and maybe figure out the issue. If anyone has some suggestions or ideas let me know. I wanted to use this light in a new build and purchase a couple more but if I am unable to control them I not sure what to do at that point.

Thanks :)
Looks like these two black round things at the front might be audio jacks, could that be ? Then you have one for input and probably the out just to chain the next light to the same signal.

My guess would be that the two ICs on the board simply take this 0-10V and turn it into a PWM. As you can see the white connector in the top corner has two lines called "PWMB" and "PWMC". I would not be surprised if those are the PWM signals for the two channels of blue and white.

Another thing: the Adafruit guide gives you a 10V PWM signal. If the light realy wants a smooth DC voltage, it might just not light up if you're unlucky. In that case only 0 and 100% should work, as they correspond to a smooth 0V or 10V signal.

Also: test with a multimeter if the polarity on the audio jack front are correct, e.g. that the sleeve is realy ground and that only the front two contacts carry the voltage and not the other way around.
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Looks like these two black round things at the front might be audio jacks, could that be ? Then you have one for input and probably the out just to chain the next light to the same signal.

My guess would be that the two ICs on the board simply take this 0-10V and turn it into a PWM. As you can see the white connector in the top corner has two lines called "PWMB" and "PWMC". I would not be surprised if those are the PWM signals for the two channels of blue and white.

Another thing: the Adafruit guide gives you a 10V PWM signal. If the light realy wants a smooth DC voltage, it might just not light up if you're unlucky. In that case only 0 and 100% should work, as they correspond to a smooth 0V or 10V signal.

Also: test with a multimeter if the polarity on the audio jack front are correct, e.g. that the sleeve is realy ground and that only the front two contacts carry the voltage and not the other way around.
I did some more playing around, it is using PWM to control the the lights, although its much less than the 0-10v range, looks like they are stepping it down somehow. Took some more pics but the front controls allow you to go from 5%, 20, 40, 60, 80, 100% increments and when I take measurements I can see the voltage so that is what they are doing is using PWM to control the lights. I can take measurements for the pins coming through and I get voltages from reef-pi but then when I take measurements from where the cable goes in and out I see no input, so something on the board is bad since I am getting no readings coming from the jacks.

Here are some pics of the light board:
PXL_20230116_184914343.jpg


PXL_20230116_184925459.jpg


PXL_20230116_184919474.jpg


Thats my only guess, reef-pi is putting out voltages but it just not making it through the circuit and I am not smart enough to know what to look for, wish I could get a replacement board from them but I know the answer to that one. The other interesting thing is if you disconnect that input board the light will not come on, so it is using it as input.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
I did some more playing around, it is using PWM to control the the lights, although its much less than the 0-10v range, looks like they are stepping it down somehow. Took some more pics but the front controls allow you to go from 5%, 20, 40, 60, 80, 100% increments and when I take measurements I can see the voltage so that is what they are doing is using PWM to control the lights. I can take measurements for the pins coming through and I get voltages from reef-pi but then when I take measurements from where the cable goes in and out I see no input, so something on the board is bad since I am getting no readings coming from the jacks.

Here are some pics of the light board:
PXL_20230116_184914343.jpg


PXL_20230116_184925459.jpg


PXL_20230116_184919474.jpg


Thats my only guess, reef-pi is putting out voltages but it just not making it through the circuit and I am not smart enough to know what to look for, wish I could get a replacement board from them but I know the answer to that one. The other interesting thing is if you disconnect that input board the light will not come on, so it is using it as input.
Maybe open a separate thread, I would love to go more into detail, but I think a dedicated thread for this tinkering might be better :grinning-face-with-sweat:
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Maybe open a separate thread, I would love to go more into detail, but I think a dedicated thread for this tinkering might be better :grinning-face-with-sweat:
Yeah thats fair, I'm just trying to figure out whats not right with that daughterboard, it's not taking 0-10v and thats a bummer...works through the front panel but not what I need, lol.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
Yeah thats fair, I'm just trying to figure out whats not right with that daughterboard, it's not taking 0-10v and thats a bummer...works through the front panel but not what I need, lol.
I'm currently writing a separate thread where I collect my thoughts and your info. Give me few minutes :grinning-face:
 

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
856
Reaction score
976
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0
ANyone know if @theatrus is lurking around these days, would like to get his thoughts on this board I am trying to debug.
yep...

 

That Crusso Kid

10K Club member
View Badges
Joined
Oct 21, 2018
Messages
14,893
Reaction score
76,036
Location
SW, FL, USA
Rating - 0%
0   0   0
ANyone know if @theatrus is lurking around these days, would like to get his thoughts on this board I am trying to debug.

Yep, he’s floating around and I am too again. Logged back in shortly ago and am happy to see many familiar people. Hope you have been well!
 

Lingwendil

Well-Known Member
View Badges
Joined
Jul 23, 2012
Messages
534
Reaction score
447
Location
Antioch, California
Rating - 0%
0   0   0
This thread is overwhelmingly long and a bit daunting to get through- Is there a link to a basic guide on how to set one of these up for PWM dimming? I have a few spare Raspberry Pi Model B's I can use for it with a PCA9685.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
This thread is overwhelmingly long and a bit daunting to get through- Is there a link to a basic guide on how to set one of these up for PWM dimming? I have a few spare Raspberry Pi Model B's I can use for it with a PCA9685.
The original lighting guide goes over all of that, you may have to start at one of the original for the basic setups but you can find them here - https://learn.adafruit.com/reef-pi-installation-and-configuration there are many guides though but that is the starting point, here is the lighting guide - https://learn.adafruit.com/reef-pi-lighting-controller

you may just want to pick up a pre-made unit like robotank, leviathon or other pre-built units, but those guides will will walk you through the basics for DIY, the rpi has 2 built in pwm channels so you do not have to do a pca9685, just depends on how many channels you need.
 

TOP 10 Trending Threads

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

  • 100% live rock + bagged sand

    Votes: 37 27.8%
  • 100% dry rock + 100% live sand

    Votes: 45 33.8%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 29 21.8%
  • 75% live rock, 25% live sand

    Votes: 12 9.0%
  • 25% live rock, 75% live sand

    Votes: 10 7.5%
Back
Top