Results 1 to 8 of 8

Thread: Code to turn dosing unit off with high pH

  1. #1
    Regular Vistor
    Join Date
    Oct 2016
    Location
    Atlanta, GA
    Posts
    33

    Code to turn dosing unit off with high pH

    Hi all,

    I took the bait on one of those cheap Jebao dosing pumps on amazon. I’d like to self protect by killing power to the pump in the event that pH rises above 8.5. If the outlet turns off, I need it to maintain an off state until it is manually turned on at a later time.

    Can anyone please give me their thoughts on the following (very simple) code:

    Fallback OFF
    If pH > 8.50 Then OFF

    I have added an alarm statement telling me if the outlet gets turned off, so I’ll know if/when there’s an issue.

    Thanks for for any thoughts.

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    You want

    Fallback OFF
    Set ON
    If pH > 8.5 Then OFF
    Defer 000:10 Then ON
    Defer 000:10 Then OFF
    When On > 000:20 Then OFF

    You might be an engineer if...You have no life and can prove it mathematically.

  3. #3
    Frequent Visitor
    Join Date
    Sep 2013
    Location
    Rhode Island
    Posts
    146
    This is what I have in my DOS except mine is set for 8.4. I can't say I've had to use it though as my tank's PH stays around 8.1 anyway.

  4. #4
    Regular Vistor
    Join Date
    Oct 2016
    Location
    Atlanta, GA
    Posts
    33
    Quote Originally Posted by zombie View Post
    You want

    Fallback OFF
    Set ON
    If pH > 8.5 Then OFF
    Defer 000:10 Then ON
    Defer 000:10 Then OFF
    When On > 000:20 Then OFF

    You might be an engineer if...You have no life and can prove it mathematically.
    Thanks zombie,

    Seeing that the defer statements are perhaps the most confusing part of Neptune’s programming, is there any chance you could explain the logic behind your code please? Seems like the second Defer would prevent an immediate OFF state for the outlet in the event that pH exceeded the threshold.

    Also, wouldn’t that last line trigger a quick power cycle every 30 minutes (20 + deferred 10)?

    Thanks!

  5. #5
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    The defers filter out noise spikes. The when command sets it to manual off if the pH stays high for more than 20 seconds.

    You might be an engineer if...You have no life and can prove it mathematically.

  6. #6
    Regular Vistor
    Join Date
    Oct 2016
    Location
    Atlanta, GA
    Posts
    33
    Zombie,

    Thanks, but I think that last line is giving me some trouble. The outlet stays on for 20 seconds and then automatically turns off. Right now I’m running with:

    Fallback OFF
    If pH > 8.5 Then OFF
    Defer 00:15 Then OFF

    If you feel like elaborating on the missing two lines, I’d sure appreciate your explanation.

    Thanks

  7. #7
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Typo. Should have been

    When OFF > 000:20 Then OFF

    You might be an engineer if...You have no life and can prove it mathematically.

  8. #8
    Regular Vistor
    Join Date
    Oct 2016
    Location
    Atlanta, GA
    Posts
    33
    Got it thx

Similar Threads

  1. If temp is gets too high what would I put for code?
    By Nano Chris in forum SKY Reef Aquarium Light
    Replies: 1
    Last Post: 08-25-2021, 06:42
  2. How to turn radion off if heat high?
    By Playapixie in forum Apex Programming for Lighting
    Replies: 2
    Last Post: 08-09-2018, 20:07
  3. how to turn off radions when water temp to high
    By jgarcia in forum Apex Programming for Lighting
    Replies: 9
    Last Post: 04-03-2018, 17:35
  4. Need code to shut off my dosing unit if spike in pH
    By Phisher13 in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 1
    Last Post: 04-24-2015, 11:54
  5. Setting dosing pumps to turn off when PH is to high
    By rocsec1 in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 4
    Last Post: 08-15-2014, 05:04

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •