NSW mixing and apex programming

spacedcowboy

Community Member
View Badges
Joined
Mar 18, 2021
Messages
96
Reaction score
121
Location
San Jose
Rating - 0%
0   0   0
Having not seen any response to my post on Neptune's own forums I thought I'd post here and ask :)

I'm thinking about buying another Apex to control my NSW supply, now that I'm thinking of mixing it myself again. My setup has two 300G NSW tanks, unfortunately at the other end of the house to the fishtanks, and it turns out that the cost to get an entirely new Apex ($895) is about the same as extending the current one ($835) when all the sensors and what-not are added on. Since the screen on my current on is getting a little crowded, I might just buy a new one. Having said that, before I spend that sweet bonus-time money, I want to make sure there's a reasonable chance of doing what I want...

So as I said, there's 2 tanks, which both have ball-valves between them and a stand-pipe into the "fish-room". I can use one of the tanks to supply NSW while another is being prepared. The goal is that there's always one 'ready to go' and one that is 'currently in use'.

Here's the general layout of how I'm imagining things will be. the RODI tank will keep making RODI water until a float-valve in the RODI tank is hit - so all I have to do there is drain water out, and the NSW tanks are lower than the RODI, so that's not really a problem assuming the solenoids work...

Code:
                ┌───────────────┐                
                │   RODI Tank   │                
                │               │                
                └───────────────┘                
                        ║                        
                        ║                        
                ╔═══════╩════════╗              
                ║                ║              
                ▼                ▼              
          ┌──────────┐     ┌──────────┐          
          │          │     │          │          
     ╔════│ Solenoid │     │ Solenoid │═════╗    
     ║    │          │     │          │     ║    
     ║    └──────────┘     └──────────┘     ║    
     ║          ▲                ▲          ║    
     ║          └───────┬────────┘          ║    
     ▼                  │                   ▼    
┌─────────┐      ┌─────────────┐       ┌─────────┐
│         │      │             │       │         │
│NSW Tank │      │    Apex     │       │NSW Tank │
│    1    │◀──── │             │──────▶│    2    │
│         │      │             │       │         │
└─────────┘      └─────────────┘       └─────────┘
                        ▲                        
                        │                        
                        │                        
┌─────────┐      ┌─────────────┐       ┌─────────┐
│Switch 1 │─────▶│  Breakout   │◀──────│Switch 2 │
└─────────┘      └─────────────┘       └─────────┘

The idea is that I can hit a push-to-make / push-to-break switch, which will allow the solenoid to open, and water flows through into the 'use-next' tank, until the level sensor inside it indicates it's full. At which point the solenoid shuts off.

Then the Apex will start a pump inside the tank to mix the salt that I dumped into it when I hit the switch. I'll want that to run for a few hours

I'm also planning on putting a salinity probe in there so I can graph the current salinity and check my salty calculations were correct, but that shouldn't need any programming.

In terms of that programming, I'm thinking something like:
Code:
Create virtual outlet ‘solenoid1_done’

solenoid1:
    fallback OFF
    set OFF
    if switch_tank1 CLOSED then ON
    if level_tank1 CLOSED then OFF

solenoid1_done:
    fallback OFF
    set OFF
    if outlet solenoid1 = OFF then ON
    if switch_tank1 OPEN then OFF
    when ON > 240:00 then OFF

MixPump1:
    fallback OFF
    set OFF
    if outlet solenoid1_done = ON then ON

(I know the names are probably too long, just for clarity - 12 chars is pretty limiting)

The first block only enables the solenoid if the (latching) switch is currently closed and disables it when the level-sensor kicks in

The second block is an attempt to get a 'falling edge' condition detection - we start off by inverting whether the solenoid is active, then disable that if the switch is currently not depressed. That ought to rule out the normal case (when the switch isn't pressed). Then we set a time limit on this output of 4 hours, after which it ought to turn off again.

The third block is a control to the mixing pump to follow the signal 'solenoid1_done'. So once it's done filling the tank with RODI, the pump will mix for four hours.

I can do a similar set of controls for NSW tank 2, and probably add an error output if both switches are concurrently depressed - the error processing is the reason I made the virtual outlets, it seemed to be easier to grok that way, but it may be possible to forgo the virtual output and put the code in 'solenoid1_done' into 'Mixpump1' instead...


Does this make sense ?
 

n2585722

2500 Club Member
View Badges
Joined
Jun 17, 2013
Messages
3,957
Reaction score
2,267
Location
Cedar Park, Tx
Rating - 0%
0   0   0
I don't have an Apex but I do this on my Hydros and was doing it on my Archon before I got the Hydros. Mine is not as large though. i use 2 20 gallon brute cans one for mixing and one for dispensing during auto water changes. With the mix tank once it is filled all I have to do is add the salt mix. Once it is ready I press a button to alert the controller it is ready to use. Once the dispense tank goes low the Hydros transfers the contents of the mix tank to the dispense tank if the mix tank is ready to use. The mix tank is then refilled from the RODI system. I am not sure if the setup for the inputs and outputs used for this would do you much good but they are on my build thread.
 
Back
Top