How to control a 3 speed fan with a single C-Bus button?

Discussion in 'General Discussion' started by Adam McLeod, Sep 16, 2009.

  1. Adam McLeod

    Adam McLeod

    Joined:
    Sep 16, 2009
    Messages:
    9
    Likes Received:
    0
    Location:
    Adelaide
    HI there, i was wondering if anyone has had success before in controlling a 3 speed ceiling fan with a single C-Bus Button. I would like to have the fan connected to 3 channels of a relay unit. The way i need it to work is like this:

    1st press turns the fan onto slow using relay channel 1 (Button light is on)
    2nd press turns the fan onto medium using relay channel 2 (Button light is on)
    3rd press turns the fan onto fast using relay channel 3 (Button light is on)
    4th press turns the fan off (Button light is off)

    Also when the fan is in the "on" state i need the c-bus switch to stay active, eg i cannot use the bell press option because the light of the switch turns off after each press.

    Can anyone help me with this. I have tried a few different Logic codes with limited success.
     
    Adam McLeod, Sep 16, 2009
    #1
  2. Adam McLeod

    Colin Moderator

    Joined:
    Aug 3, 2004
    Messages:
    125
    Likes Received:
    24
    Location:
    Australia
    What are you using to drive the Fan, I am guessing 3 channels of a Relay but can you confirm.

    Also would a Ramping operation Suffice in place of multiple buttons pressing.

    You Can have

    From the Off Position
    Long Press = Ramp through Low Medium High
    Short Press = High and Off.

    Or

    Long Press = Ramp through Low Medium High
    Short Press = Last Setting (low Medium High), or if On will turn Off.

    But first we need to know how you are controlling the Fan.
     
    Colin, Sep 17, 2009
    #2
  3. Adam McLeod

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    As he states in his post, relay channels 1, 2 & 3

    Do a search, this has been covered before.

    If I remember correctly, solutions included the PAC.

    Mick
     
    znelbok, Sep 17, 2009
    #3
  4. Adam McLeod

    froop

    Joined:
    Dec 23, 2007
    Messages:
    124
    Likes Received:
    0
    Location:
    Melbourne, Australia
    Yep,
    Best results are gained from logic programming in a PAC (or C-touch).

    What hasn't generally been mentioned in previous discussions is maintaining the LED indicator along with the 3 speeds.

    General idea is three groups:
    1 - Fan Low
    2 - Fan Med
    3 - Fan High

    Use a bell-press to trigger logic somewhat like:
    if low, med and high are all off, turn low on
    if fan low is on, turn fan low off, turn med on
    if med is on, turn med off, turn high on
    if high is on, turn high off

    For the indicator light, add another group for FanLED, and link that group to the LED in block setup.
    Then if low, med and high are all off, turn low and LED on.
    If high is on, turn high and LED off.
     
    froop, Sep 17, 2009
    #4
  5. Adam McLeod

    Colin Moderator

    Joined:
    Aug 3, 2004
    Messages:
    125
    Likes Received:
    24
    Location:
    Australia
    If you have spare channels on the 12 channel relay you can free up the first 3 channels and use the interlock feature and a single group address, set the Turn On Threshold Levels at 1% 50% and 100% for Ch 1 2 and 3 of the relay Respectively.

    You can then Use the Dimmer Button on a single key to control Fan speed by setting the key up as a dimmer function, if you set it up as a memory dimmer then short press will return the fan to the last set speed long press will work as a normal dimmer action so if the fan is on high it will dim down towards medium then low over 4 seconds by default, if the fan is on low it will dim up through medium then high, if the fan is on medium it will dim in the opposite direction to the last dim or down depending on how long ago the dim action was last send.

    This does not require logic engine just a 12 channel relay and any key input unit, but it is expensive if you have many fans to do because as far as i am aware only the 12 channel relay supports the interlock feature. So one fan per Relay.

    cheers
     
    Colin, Sep 17, 2009
    #5
  6. Adam McLeod

    Adam McLeod

    Joined:
    Sep 16, 2009
    Messages:
    9
    Likes Received:
    0
    Location:
    Adelaide
    Getting there but still a few questions

    Howdy everyone,

    Thanks for you useful input it greatly appreciated but here's where i'm at:

    It works but i am currently having 2 issues!

    1. Froop you mentioned about adding the group for FanLED, and linking that group to the LED in block setup. Could you explain that a little better because i can't seem to get that part to work.

    2. The button pressing seems a little clunky and sometimes you have to press it two or three times to get it to change state. Is there a reason for this and how can it be resolved? I noticed at the bottom of the logic page it mentions that the code is being executed repeatedly, is that the problem?

    This is the logic i have programmed:

    The button i am using to change the fan speed is called "fan control"

    The logic looks like this:

    Global Variables
    CounterFan : integer;

    Initialisation
    CounterFan1 :=0;

    once (GetLightingState("fan control") = ON then
    begin
    CounterFan1 := CounterFan1 + 1;
    SetLightingState(fan control", ON);
    case CounterFan1of
    0 : ;
    1 : SetScene("Scene Fan 1 Low");
    2 : SetScene("Scene Fan 1 Med");
    3 : SetScene("Scene Fan 1 Hi");
    4 : SetScene("Scene Fan 1 Off");
    5 : CounterFan := 0;
    end
    end;

    Now obviously i have created four scenes for each different state, here is an example of 1:

    Scene Fan 1 Low

    fan 1 Level 100%
    fan 2 Level 0%
    fan 3 Level 0%
    fan control Level 100%
    Key 1 LED Level 100%

    Thankyou everyone for your help in getting this issue resolved.
     
    Adam McLeod, Oct 21, 2009
    #6
  7. Adam McLeod

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,427
    Likes Received:
    64
    Location:
    Adelaide
    The "once" statement executes that code once when the condition becomes true, and then waits for it to become false.

    What you have looks close, but I think you want to turn the fan control group OFF in your once statement (and take it out of the scene).

    The reason you probably have to press the button multiple times is if you've configured it as a toggle... it's the second press that turns the group OFF that enables the once statement to execute again.

    Re the LED... go into the blocks tab for the key unit in Toolkit, and assign the "Key 1 LED" group to an unused block (assuming there is one). Assign LED1 to this block, and make sure no keys are linked to this block. This will make the "Key 1 LED" group control the LED.

    Nick
     
    NickD, Oct 23, 2009
    #7
  8. Adam McLeod

    Adam McLeod

    Joined:
    Sep 16, 2009
    Messages:
    9
    Likes Received:
    0
    Location:
    Adelaide
    DLT Dynamic Labelling

    Hi all,

    thanks for your helpful information, it has been fantastic.

    One last question i have is using this 3 speed fan control with a DLT switch.

    Because you have no LED control with a DLT i thought it would be nice to be able to get the labels to change as to what speed setting the fan was currently on.

    Here is my logic attempt but i don't seem to be able to get it to work, can anyone help me out with this, cheers

    My C-Bus switch is labelled "Bed 1 sweep fan control"

    Constants:
    net = 254;
    app = 56;

    Global Variables:
    CounterFanBed1 : integer;

    Initialisation:
    CounterFanBed1 := 0;
    SetIntIBSystemIO("Label Language",2);

    once (GetLightingState("Bed 1 sweep fan control") = OFF) then
    begin
    CounterFanBed1 := CounterFanBed1 + 1;
    SetLightingState("Bed 1 sweep fan control", ON);
    case CounterFanBed1 of
    0 : ;
    1 : SetScene("Bedroom 1 Sweep Fan Low");
    2 : SetScene("Bedroom 1 Sweep Fan Med");
    3 : SetScene("Bedroom 1 Sweep Fan High");
    4 : SetScene("Bedroom 1 Sweep Fan Off");
    end
    end;

    if CounterFanBed1 >= 4 then
    begin
    CounterFanBed1 := 0;
    end;

    once CounterFanBed1 = 1 then
    begin
    SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan Low');
    end;

    once CounterFanBed1 = 2 then
    begin
    SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan Med');
    end;

    once CounterFanBed1 = 3 then
    begin
    SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan High');
    end;

    once CounterFanBed1 = 4 then
    begin
    SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan Off');
    end;
     
    Adam McLeod, Nov 18, 2009
    #8
  9. Adam McLeod

    mmd

    Joined:
    Jan 30, 2006
    Messages:
    42
    Likes Received:
    0
    Location:
    Melbourne
    Hi,

    There is an alternative, you can use a dimmer if you get an appropriate capacitive device in between the fan and the dimmer.

    This flattens the ac signal so that fan will maintain a variable speed without the horrible emf buzzing you normally get if you just connect it straight in.

    I forget the name of the device, any sparkies out there know what I'm referring to?

    I've seen it used in several jobs with no problems

    Michael

    P.S. Obviously this means you don't use the 3 speed controller that comes with the fan
     
    mmd, Nov 19, 2009
    #9
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.