Generating "sawtooth" waveform with UPKEY/DOWNKEY

Discussion in 'C-Bus Toolkit and C-Gate Software' started by greig, Feb 18, 2006.

  1. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Hi All,


    I recently thought I'd invented a real clever way of running my bathroom's exhaust fan on a dual delay - a delay before it comes on, and then once it's on, a delayed off time as well. Sadly it was not to be.

    The issue is that the fan is large and noisy, and in our open-plan warehouse it's noticeable when it's on, so I don't want it to run if it's not needed.

    If I go to the bathroom and the light's only on for say 60 seconds, no need for fan. If the light remains on for >60s I want the fan to come on, then stay on for say 3 minutes after the light is turned off.

    Now the smartest piece of kit here are 2 x NEO's, and the bathroom uses a 5032, so I think I'm limited for smarts.

    My clever piece of design was to use my back:back 5102RVF and 5104AUX to give me access to a second set of key functions that follow the light's status.

    The FAN'S programing is below:

    [​IMG]

    The intent was that when the light is turned on, we issue an UPKEY (ramp1 time 300 seconds), and when the light's turned off, we DNKEY. The fan is set to turn on at 14%, which gives me the right ratios of delay on and delay off.

    Now if you're already ahead of me, you've realised that I can't end an UPKEY with a DNKEY, so if the ramp command hasn't run its course and reached 100%, the DNKEY command is lost. The end result is that if I've had a wee and left the bathroom promptly, a minute or two later the fan comes on and stays on. (huh?)

    It all works fine if I'm having a shower, but it's a brief toiley visit that brings my clever design undone.

    Given my lack of fancies here, can anyone think of a way I can implement this, or what new piece of kit I need to add to give me the logic that I'm seeking. (BTW, I researched scenes, but I need the timer and scenes only appear to offer me preset levels).

    Thanks,



    Greig.
     
    greig, Feb 18, 2006
    #1
  2. greig

    PSC

    Joined:
    Aug 3, 2004
    Messages:
    626
    Likes Received:
    0
    Location:
    Brisbane, Australia
  3. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Hi Peter,


    Thanks for that link but it's not what I'm trying to achieve.

    I am trying to get two timers operating here - a delay before on, then a "run on" timer. And I want the light to respond to the keypress, rather than a (say) 1s delay. (Guests don't take natively to some of the inherent yet small delays between keypress and action).

    In DC logic terms my simple delay is just a resistor linking the two groups and the 'downstream' one has a capacitor to ground.

    When the light turns on the cap charges up through R. When it reaches a threshold the fan turns on. When the first group is turned off, the cap discharges through R and eventually the second group turns off.

    It's "half working" with the UPKEY/DOWNKEY combo I described earlier, but alas I still aspire to a 100% solution.

    If we can't do this with basic C-Bus, I'm not averse to spending a few bucks on a magic box of tricks to do what I need. Can someone point me in the right direction?



    Greig.
     
    greig, Feb 20, 2006
    #3
  4. greig

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Hi Grieg,

    I have been doing exactly what you are describing for years with a Jeeves/Minder/Thinkboxx.

    I never tried it with just C-Bus, because it is too easy in the Jeeves/Minder/Thinkboxx.

    Perhaps the only solution now is a PAC.

    Cheers
     
    rhamer, Feb 20, 2006
    #4
  5. greig

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Of course all this can be achieved easily with a 5500PACA and some Pascal programming.....

    Otherwise what about replacing the Down Key function with a Ramp Off function? Whilst it will only work once the Up Key is finished it will at least start once the Up Key completes. Unlike the Down Key function simply gets thrown away the Ramp Off is held over and is initiated once the Up Key ramp completes.
     
    Newman, Feb 20, 2006
    #5
  6. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Hi Newman,


    Thanks for that.

    Changing my DownKey to a Rampoff will at least stop the fan 'lockups' I'm experiencing, and I think I'll need to add a 5500PACA to the shopping list.
    (I'll go do some research now.)



    Greig.
     
    greig, Feb 20, 2006
    #6
  7. greig

    Don

    Joined:
    Aug 4, 2004
    Messages:
    429
    Likes Received:
    0
    Location:
    Townsville, Australia
    I am surprised that the downkey function isn't eventally timing out. The firmware of the NEO and of the current KEYAUX (but not the multisensor!!!) will terminate a ramp with OFFKEY or with ENDRAMP, but any other command will remain pending until the completion of the ramp. I suspect what is happening in the case of the quick wee, is that the upkey never reaches the 14% point before you leave, but it keeps on ramping after the downkey command is received (hence the fan turns on), and keeps on until it reaches 100% (hence the fan stays on), then DOWNKEY executes, and takes a long time to get to the 14% (hence the fan still stays on). Using RAMPOFF won't fix this situation.

    RAMPOFF will help in another way, however. RAMPOFF ramp rate is determined by Ramp2, whereas UPKEY / DOWNKEY uses Ramp1, so you can define the time intervals more easily.

    Another way to do this if your KEYAUX firmware is V 1.2.67 or later, is to set up your KEYAUX functions as OFFKEY, START, IDLE, RAMPOFF. You can set the fan threshold to 1%, and the timer expiry command to RECALL1 with a level of 100%. When the spare relay activates the KEYAUX, it will issue a START and a timer will run with the fan off. When the timer expires, the fan will turn on. Any time the circuit is turned off, the RAMPOFF command will ramp the group level to OFF.

    Don
     
    Last edited by a moderator: Feb 23, 2006
    Don, Feb 22, 2006
    #7
  8. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Hi Don,


    I raced home full of hope to try your suggestion but alas, no luck.

    I tried your OFFKEY, START, IDLE, ENDRAMP suggestion but that didn't work for me. (I also tried RAMPOFF because I thought ENDRAMP seemed a typo?)

    I then tried RECALL2 (1%), OFFKEY, START, ENDRAMP with a 10s timer and an expiry of RECALL1 (100%) but no luck.

    My KEYAUX4 is f/w version 1.00 and some of the notes I've gleaned from the forums (contributed by you I now realise!) suggest that my obstacle is with the way timers worked in the initial C-Bus. Viz:

    "In early C-Bus units, 'START' did the following:

    Group in OFF state: If EEPROM timer interval is zero, do nothing, otherwise initiate a timer with a predetermined interval stored in EEPROM and
    issue a RAMP_TO_LEVEL command over the network with a level of $FF.

    Group in ON state: do nothing."


    I think if my KEYAUX4 was C-Bus 2 I'd be home and hosed, because:

    "in OFF or ON state: If timer interval is zero, do nothing, otherwise:
    a) If the timer is not active, issue a RAMP_TO_LEVEL command over the network with the internal level of the unit (this level will be 0 if the Group is 'OFF').
    b) initiate the timer with a predetermined interval."


    Am I on the money with my interpretation here?? Am I shopping for a PACA (or a replacement KeyAUX on eBay)?

    Thanks for your suggestions though.


    Greig.
     
    greig, Feb 22, 2006
    #8
  9. greig

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Greig

    The C-Bus2 version of the auxiliary input is the L5504AUX which is a 4-channel DIN unit.

    If you're going to spend money on new hardware then I'd go with a PAC because of the vastly superior flexibility and you can throw it on your network anywhere. After getting one you may well be able to use it to add a few extra funtions to your system overall.
     
    Newman, Feb 22, 2006
    #9
  10. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Hi Newman,


    If you're going to spend money on new hardware then I'd go with a PAC because of the vastly superior flexibility and you can throw it on your network anywhere. After getting one you may well be able to use it to add a few extra funtions to your system overall.

    Agreed. And I don't think I'm going to need much more convincing. :)

    A friend of mine bought the-product-that-dare-not-speak-its-name at about the same time as I first installed C-Bus, and whilst I envied his ability to program his house and make it automatically adapt (time of day awareness, etc) I wasn't able to justify the extra grand or so it cost.

    But times have changed. :D


    Greig.
     
    greig, Feb 22, 2006
    #10
  11. greig

    Don

    Joined:
    Aug 4, 2004
    Messages:
    429
    Likes Received:
    0
    Location:
    Townsville, Australia
    Sorry about the fact that the suggestion won't work in your case, and thanks for spotting the typos (now fixed).

    I thought I would be pretty safe as V 1.00 units have not been sold for quite a while.

    The PAC sounds like a more versatile solution in the long run though, as Newman suggests.

    Don
     
    Don, Feb 23, 2006
    #11
  12. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Hi Don, Newman,


    The PAC sounds like a more versatile solution in the long run though, as Newman suggests.

    Ordered one this morning through LEW, the best little C-Bus shop in Sydney.:D



    Greig.
     
    greig, Feb 23, 2006
    #12
  13. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Backorder. *sigh*

    Hi Don, Newman,


    > Ordered one this morning through LEW, the best little
    > C-Bus shop in Sydney.

    ... and in another fortnight they might be in stock. :mad:
     
    greig, Mar 3, 2006
    #13
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.