Results 1 to 9 of 9

Thread: Help! Programming an audible temperature alarm

  1. #1
    New User
    Join Date
    Jun 2017
    Location
    GMT
    Posts
    9

    Help! Programming an audible temperature alarm

    Can someone please advise why my last post was deleted?
    Was it because someone jump to the conclusion that i used the aquabus to plug a buzzer into? Would you not be better finding out the facts before jumping to conclusions and deleting posts for no reason. I thought this forum was about helping others.

    I've wired an audible buzzer to a usb adapter plug (240v) (the type you charge a phone with from the mains) and connected to one of the 6 mains outlets on my EB6 Energy Bar.

    I basically want the alarm to come on over 26c or under 24c.
    When the alarm is active I want 5 second silence, 1 second buzzer, repeat, repeat, ...

    Would this code work?

    Fallback OFF
    If Tmp > 26.0 Then ON
    If Tmp < 24.0 Then ON
    OSC 000:05/000:01/000:05 Then ON

    Thanks

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Make a virtual outlet to list the alarm conditions. I'm calling that outlet BuzzStart below

    BuzzStart (VO)
    Set OFF
    If Tmp > 26.0 Then ON
    If Tmp < 24.0 Then ON

    Buzzer (physical outlet)
    Fallback OFF
    OSC 000:05/000:01/000:00 Then ON
    If Outlet BuzzStart = OFF Then OFF


    If you use fallback to ON it will also buzz continuously if the EB6 ever loses comms with the base unit. Useful alarm to have but might get annoying on testing and FW updates.

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

  3. #3
    New User
    Join Date
    Jun 2017
    Location
    GMT
    Posts
    9
    Thanks very much for your reply Zombie.
    I'll go work out how to create the VO and I assume the second part of the code just goes into my Output Configuration window.

    Is there an easy explanation as to why my code would not have proved successful?

    Once again, thank for your help.
    Billy

  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Correct. The VO part goes in the VO for the output config and the physical outlet goes into whatever outlet number your buzzer is in.

    The reason it won't work the way you originally had it is because the OSC command had definite ON and OFF states that overwrite anything above it in the code. You technically could have inverted the logic on the temp statements and placed them after the OSC statement too, but the VO is a lot more straightforward if you want to ever add other conditions later or to remember why it was coded a certain way.

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

  5. #5
    New User
    Join Date
    Jun 2017
    Location
    GMT
    Posts
    9
    Thanks very much Zombie, most helpful.

  6. #6
    New User
    Join Date
    Jun 2017
    Location
    GMT
    Posts
    9
    OK, hopefully thats me done. Created the VO -
    temp1.jpg

    Configured the physical output socket -
    temp2.jpg

    Put the two of them to Auto -
    temp3.JPG

    So just for my own understanding ...

    The VO monitors temp, when above 26 or less 24 it has a status of ON. When temp goes back between 26 and 24 it has a status of OFF
    The physical outlet contains the OSC routine and also turns off when the status of the VO is off.

    What turns the physical outlet on? I don't see any of the code doing that?
    After each iteration of the OSC does it check the status of the VO (so it knows when to switch off)?

    Cheers

  7. #7
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    The physical outlet checks the state of the VO every second. You can test if it worked by manually setting the VO to ON. If the buzzer comes 1 second on 5 seconds off that outlets programming is good to go. After that set the VO back to auto and pull the temp probe out of the tank and into a cup of ice water. You should get a buzz from that too. You could also stick it into some water warmed up in a microwave and that should kick it off too.

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

  8. #8
    New User
    Join Date
    Jun 2017
    Location
    GMT
    Posts
    9
    Cheers Zombie

  9. #9
    New User
    Join Date
    Jun 2017
    Location
    GMT
    Posts
    9
    All tested and working for both warm and cold, thanks for your help, much appreciated.
    Billy

Similar Threads

  1. Question: DIY audible alarm
    By MrT in forum DIY
    Replies: 14
    Last Post: 08-17-2018, 12:01
  2. Replies: 13
    Last Post: 07-12-2018, 19:08
  3. Audible Alarm - Leak Detection
    By Clownfishy in forum Pre-Sales Questions
    Replies: 2
    Last Post: 03-10-2018, 07:22
  4. Review My Program Audible Alarm
    By tmduncan in forum Misc Apex Usage & Programming
    Replies: 7
    Last Post: 02-26-2018, 06:23
  5. Audible Alarm Log
    By marksw in forum Apex Classic/Apex Lite/Apex Jr
    Replies: 6
    Last Post: 10-19-2017, 11:57

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
  •