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...
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:
(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 ?
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 ?