Air Conditioning Power Control

Discussion in 'Pascal Logic Code Examples' started by Garfield, Nov 11, 2009.

  1. Garfield

    Garfield

    Joined:
    Dec 3, 2004
    Messages:
    24
    Likes Received:
    0
    Location:
    Adelaide
    I have had a Daikin ducted air conditioner installed and needed to interface it to C-Bus. I had heard that you can use an interface board to control the air conditioner from C-Bus but it was extraordinarily difficult to find any information about it, so I will share what I found.

    The board was a KRP4A series product. I can't remember exactly which one and it is buried in the roof now :(

    Anyway, the documentation provided with the board is rather confusing (and has errors). My air conditioning installer said he had tried to use it before and had given up because he couldn't make sense of the instructions.

    I found the attached PDF document on an air conditioning forum which explains the first three of the 11 modes of operation. I chose mode 1 which means C-Bus has exclusive control over the air conditioner power. All it needs is a single voltage-free relay:

    AC2.jpg

    When I work out how to do temperature control, I will let you know...
     

    Attached Files:

    Last edited by a moderator: Nov 15, 2009
    Garfield, Nov 11, 2009
    #1
  2. Garfield

    Automan

    Joined:
    Oct 30, 2009
    Messages:
    7
    Likes Received:
    0
    Location:
    NSW
    Aircon


    Hi Garfield

    I have used this type of aircon interface before and in order to control
    the temperature of the aircon, basically it requires a switched resistor network to allow you to set the temp.

    If you use an 8 channel relay and wire your resistors in parrallel the temperature will be determined by the value of resistance you select via your relay module.

    It will allow you to set say 8 different temperatures ( one per channel )
    Note the resistances values are relatively low so measure the resistance after it is connected to determine the correct value. Range is 0 to 135 ohms and will result 16 to 32 degree respectively.

    Its a bit of messy and costly because of the module to control the temperature but it does work.

    I hope this helps you.

    Cheers
    Automan
     
    Automan, Nov 13, 2009
    #2
  3. Garfield

    Garfield

    Joined:
    Dec 3, 2004
    Messages:
    24
    Likes Received:
    0
    Location:
    Adelaide
    Thanks Automan. I had just worked out how I was going to do this :)

    I used Excel to plot the min/max values of resistance from the KRP4A data sheet. I worked out a best fit curve which went through the middle which is:

    R = 8.46 (T - 16)

    Here it is from Excel:

    AC3.jpg

    I want to use the range from about 18C to about 28C which will be a resistance of around 17 ohms to 101 ohms.

    I decided to make a binary arrangement of resistors (in a 1:2:4:8 ratio) with them being shorted out by relays. Four relays will then give me 16 settings:

    AC4.jpg

    This circuit will give me about 17.8C to 27.5C.

    I paralleled up some resistors to get the values I needed, but I haven't tried it out yet.

    I am going to use a lighting group to control the temperature, but I don't want it to set the temperature from 0C to 255C (255C is too hot even for Adelaide).

    I put a percentage on a page to display a custom group level. On the value tab I clicked the calculate button and put in my end points of 18 and 27.5 and got the equation I need in my logic:

    Code:
    SetPoint := GetLightingLevel("AC Set Point") * 0.03725 + 18;
    Now I just need to work out the logic to control the relays.
     
    Garfield, Nov 15, 2009
    #3
  4. Garfield

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    You could use some logic like this to control the relays:

    Code:
    Resistance := 8.46 * (SetPoint - 16);
    BinaryValue := Round((Resistance - 15) / 5.5);
    if BinaryValue <> OldBinaryValue then
    begin
      SetLightingState("R1", BinaryValue and 1 = 0);
      SetLightingState("R2", BinaryValue and 2 = 0);
      SetLightingState("R4", BinaryValue and 4 = 0);
      SetLightingState("R8", BinaryValue and 8 = 0);
      OldBinaryValue := BinaryValue;
    end;
    The "and" operator in this case is doing a bitwise AND to check whether a particular bit in the BinaryValue is set, and then setting the corresponding relay accordingly. If a bit is set, the relay is off and vice versa.

    The OldBinaryValue is kept so that C-Bus commands are sent to the relays only when the set point changes. You could add a delay too, so that if the user is changing the set-point rapidly, you only get commands sent every second or so.
     
    Darren, Nov 15, 2009
    #4
  5. Garfield

    Automan

    Joined:
    Oct 30, 2009
    Messages:
    7
    Likes Received:
    0
    Location:
    NSW
    Air Conditioning Control

    Good work Garfield, logic is the best way!

    For better temperature range your resistor values should be
    Minimum base value 12 ohms =18 degrees
    and binary resistor value 8,16,32 & 64 this will give you temperature range
    upto 32degrees in closer steps of 1 degree.

    Cheers
    Automan
     
    Automan, Nov 15, 2009
    #5
  6. Garfield

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,392
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    Crikey - that aint half bleedin' obvious. Can you explain it for us mere mortals?
     
    ashleigh, Nov 15, 2009
    #6
  7. Garfield

    daky

    Joined:
    Oct 30, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    home
    Automan, How did you know what resistance range is? :)
     
    daky, Nov 15, 2009
    #7
  8. Garfield

    Automan

    Joined:
    Oct 30, 2009
    Messages:
    7
    Likes Received:
    0
    Location:
    NSW
    Air conditioning Control

    A friend of mine asked me if I could assist him with one of his automation jobs
    however he was not using C-bus, using brand x. Anyway he sent me the data sheet for the same board that Garfield in using. The input range is 0 to 135 ohms and will result 16 to 32 degree respectively.

    So it functions as Garfield has plotted using excel.

    Sayonara

    Automan
     
    Automan, Nov 15, 2009
    #8
  9. Garfield

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    I think you are being modest. Having a brain the size of a planet, you would have no problems understanding this ;)

    From Garfield's graph and equation:

    Code:
    Resistance := 8.46 * (SetPoint - 16);
    From Garfield's circuit, the four relays form a binary value where each relay represents one binary digit (bit):

    Binary value = Relay 1 + 2 * Relay 2 + 4 * Relay 4 + 8 * Relay 8

    Where
    Relay 1 = 5.5 ohm
    Relay 2 = 11 ohm
    Relay 4 = 22 ohm
    Relay 8 = 44 ohm

    From this we get:

    Resistance = 15 + BinaryValue * 5.5

    Rearranging this equation gives:

    Code:
    BinaryValue := Round((Resistance - 15) / 5.5);
    To find out if the least significant bit of the BinaryValue is set (corresponding to the 5.5 ohm resistor being in circuit), we AND with a binary value of 0001 (decimal 1). If this value is 0, then the bit is not set and the relay needs to be closed/on (shorting out the resistor). So we set relay R1 to the boolean value given by:

    (BinaryValue and 1) = 0

    which leads to:

    Code:
      SetLightingState("R1", BinaryValue and 1 = 0);
    This is the same as:

    Code:
    if (BinaryValue and 1) = 0 then
      SetLightingState("R1", ON)
    else
      SetLightingState("R1", OFF);
    Setting the other relays, using a binary weighting of 2, 4 and 8, is similar.
     
    Last edited by a moderator: Nov 15, 2009
    Darren, Nov 15, 2009
    #9
  10. Garfield

    Garfield

    Joined:
    Dec 3, 2004
    Messages:
    24
    Likes Received:
    0
    Location:
    Adelaide
    Thanks Darren. It looks like that will do what I want. When I get a chance I will wire it up and let you know how it goes.
     
    Garfield, Nov 16, 2009
    #10
  11. Garfield

    Garfield

    Joined:
    Dec 3, 2004
    Messages:
    24
    Likes Received:
    0
    Location:
    Adelaide
    I have just got the temperature control all working. That logic code worked nicely. I can set it from C-Bus and the Daikin controller shows the right temperature.

    The only potential issue is that even if you set the set-point temperature via C-Bus and the KPR4A interface board, you can still change it from the Daikin controller. Obviously, this change does not get fed back to C-Bus so you can see the actual set-point :(
     
    Garfield, Nov 19, 2009
    #11
  12. Garfield

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,392
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    No 2-way control.... a bit sucky. Its a shame they use a variable reistance thingy as input, I had heard of that form of control being used about 10 years ago (and it was old-fashioned even back then). Daikin... how about entering the moden age.... the 1990's will be good enough! How about an RS-232 serial interface?
     
    ashleigh, Nov 19, 2009
    #12
  13. Garfield

    Htnut

    Joined:
    Aug 4, 2004
    Messages:
    97
    Likes Received:
    0
    Location:
    Sydney
    There is a serial interface that works very well. It is not a Daikin product but nor does it have a Daikin pricetag :)

    Details are here

    www.xdimax.com/cool/cool.html
     
    Htnut, Nov 20, 2009
    #13
  14. Garfield

    Hadiesper

    Joined:
    Sep 21, 2012
    Messages:
    1
    Likes Received:
    0
    Location:
    Dubai
    Hi, sorry to revive an old thread but I have a question on the resistor temp setting using the krp4A

    what happens when you change the setpoint manually at the remote controller(thermostat)? Wouldn't that create a mismatch of settings?

    I would assume setting the setpoint would mean applying the X-ohm resistance for 1 second then opening the terminal(or disconnecting it). Is this how it should be? Or does the KRP4A only trigger a change in setpoint when you change the resistance (for example placing 6-ohm then 5-ohm will reset the temperature back to 17 after it was manually changed to another setpoint).

    Otherwise if the 5-ohm (17 degrees) is always connected and you try to change the setpoint manually in the thermostat to 25, then the system would immediately change it back to 17 and ignore the 25.

    Appreciate your help :)
     
    Hadiesper, Sep 21, 2012
    #14
  15. Garfield

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    If you change the temperature setting either at the thermostat or by changing the resistance at the krp4A, then the new value gets used and displayed on the thermostat. A problem arises when you change the temperature at the thermostat, because the setting on your touch screens will show the wrong value (as pointed out by Garfield). The solution is to only change the temperature via the touch screens.
     
    Darren, Sep 22, 2012
    #15
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.