element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Controlling A/C (Air Conditioner) IR with Arduino Uno
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 6 replies
  • Subscribers 393 subscribers
  • Views 2700 views
  • Users 0 members are here
  • infrared
  • led
  • uno
  • air-conditioning
  • arduino
Related

Controlling A/C (Air Conditioner) IR with Arduino Uno

baget
baget over 12 years ago

Hi

I would like to control my A/C (Air Conditioner) using Arduino Uno

so first I hooked to Pin 11 IR Receiver (TSOP4838) and using IRremote Lib I got the ON and OFF Command

 

ON Command:

Decoded NEC: B335A162 (32 bits)
Raw (68): -22790 8350 -3450 550 -1600 600 -500 550 -1550 600 -1600 600 -500 550 -500 550 -1600 600 -1550 600 -500 550 -500 600 -1550 600 -1550 600 -500 600 -1550 600 -500 600 -1550 550 -1600 600 -500 550 -1600 550 -500 600 -500 550 -500 600 -500 550 -1550 600 -500 550 -1600 600 -1550 600 -500 600 -450 600 -500 550 -1600 550 -500 550

 

OFF Command:

Decoded NEC: B335D162 (32 bits)
Raw (68): 4730 8400 -3400 600 -1550 600 -500 600 -1550 600 -1550 600 -500 600 -450 600 -1550 600 -1600 550 -500 600 -450 600 -1600 550 -1600 600 -450 600 -1550 600 -500 600 -1550 600 -1550 600 -1600 600 -450 600 -1550 600 -500 550 -500 600 -450 600 -1600 600 -450 600 -1550 600 -1600 550 -500 600 -450 600 -500 600 -1550 600 -400 600

 

In addition I hook to PIN3 IR Led (TOIR-30A94)

using SendNEC of IRremote lib I tried to send the commands without luck (I even tried to send the raw data using sendRaw)

the A/C just not performing the commands.

 

I verify using cellphone camera that the IR led does light when I send the commands.

also I tried with my DVR commands and it works, but with the A/C it does not.

 

I attach an image of my system layout.

 

Can someone help? point to what can be wrong? 

Attachments:
image
  • Sign in to reply
  • Cancel

Top Replies

  • mcb1
    mcb1 over 12 years ago +1
    Oren The page for the library states It supports NEC, Sony SIRC, Philips RC5, Philips RC6, and raw protocols It will be referring to TV, DVDs and other consumer products. Your airconditioner is unlikely…
  • mcb1
    0 mcb1 over 12 years ago

    Oren

    The page for the library states

    It supports NEC, Sony SIRC, Philips RC5, Philips RC6, and raw protocols

    It will be referring to TV, DVDs and other consumer products.

    Your airconditioner is unlikely to be in that category.

     

    You will need to do some detective work to discover the protocol used.

    there is some info on AirCon decoding in the blog

    http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html

    and a note at 9 March 2010 regarding buffer length.

     

     

    The other option is to hack the remote.

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • baget
    0 baget over 11 years ago in reply to mcb1

    I got a logic and I capture the IR Recevier Data from the Remote:

    image

    it seem like the remote Transmit 3 Times.

    let say it transmit code A, then the flow is:

    1) Transmit A

    2) Transmit Invert A (NOT A)

    1) Transmit A

     

    I tried to replicate it with my IR LED Still, NO lack....

    I even compare it using the IR Receiver... and it looks the same.

    I still don't know why, it is not working.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 11 years ago in reply to baget

    To my eyes 1 and 3 aren't the same.

    I'd be doing some digging using google, and looking at the various forums.

    You may find someone has already done the necessary.

     

    mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • baget
    0 baget over 11 years ago in reply to mcb1

    I don't see any diff between 1 and 3

    but thanks, I will continue digging with in other forums

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 11 years ago in reply to baget

    Apologies I hadn't blown it up ....ooops.

     

    Presumably the bottom of the trace is when data is received.

    To me it seems there is a 'wakeup' of approx 8mS then a long space of three pulse widths, followed by a single pulse then a space.

     

    If this is right then you have mark, space, mark, mark, space, mark, space etc. OR

    1011010111010111010110110101101101110110101111011 which in hex is 16BAEB6B6ED7B

    Yet the second data is wakeup, long space, mark, mark, space, mark, mark, mark, space, mark, space mark, mark, mark OR

    1101110101110101110110111011011010110111010101101   which in hex is 1BAEBB76D6EAD

     

    Both are 49 bits of data, which may equate to 1 start bit and then 6 x 8bit words or 6 bytes

    This could be

    1 01101011 10101110 10110110 10110110 11101101 01111011 (6B AE B6 B6 ED 7B)

     

    1 10111010 11101011 10110111 01101101 01101110 10101101 (BA EB B7 6D 6E AD)

     

    1 01101011 10101110 10110110 10110110 11101101 01111011 (6B AE B6 B6 ED 7B)

     

    It could also be that there is x bits for command and then x bits for a data payload

    I suggest a few other samples may help to see some form of pattern.

     

     

    mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to mcb1

    Hi

    In case you didn't resolve this, here is some output from our AnalysIR product.

     


    image

     

    Also, it is not a standard NEC signal as the headers are slightly different.

     

    So you have 2 options

    1. change the values in IRremote for the NEC headers to match yours
    2. just send from IRremote using the send RAW method


    I have included some code snippets below, which was automatically generated from AnalysIR.

    (Should work with IRremote on Arduino)

     

    /*
    Automatically Generated by AnalysIR - Batch Export Utility
    Registered to: xxxxxxxxx
    Session History
    Type : Key : Value : Bits
    0 : RAW :  :  : 0
    1 : RAW :  :  : 0
    */
    // NB: Not all protocols are supported by IRremote or IRLib. You may need to edit the code below manually
    // RAW signals are not supported & are included as dummy commands for reference, only
    // Automatically Generated by AnalysIR for xxxxxxxxxxx, visit http://www.AnalysIR.com or email info@....... for further details
    
    unsigned int Signal_0_0[] = {8400,3400,600,1550,600,500,600,1550,600,1550,600,500,600,450,600,1550,600,1600,550,500,600,450,600,1600,550,1600,600,450,600,1550,600,500,600,1550,600,1550,600,1600,600,450,600,1550,600,500,550,500,600,450,600,1600,600,450,600,1550,600,1600,550,500,600,450,600,500,600,1550,600,400,600,1000}; //AnalysIR Batch Export - RAW
    irsend.sendRaw(Signal_0_0, sizeof(Signal_0_0)/sizeof(int), khz); //AnalysIR Batch Export - RAW
     // AnalysIR IR Protocol: RAW, Key:  
    
    unsigned int Signal_1_1[] = {8350,3450,550,1600,600,500,550,1550,600,1600,600,500,550,500,550,1600,600,1550,600,500,550,500,600,1550,600,1550,600,500,600,1550,600,500,600,1550,550,1600,600,500,550,1600,550,500,600,500,550,500,600,500,550,1550,600,500,550,1600,600,1550,600,500,600,450,600,500,550,1600,550,500,550,1000}; //AnalysIR Batch Export - RAW
    irsend.sendRaw(Signal_1_1, sizeof(Signal_1_1)/sizeof(int), khz); //AnalysIR Batch Export - RAW
     // AnalysIR IR Protocol: RAW, Key: 

     

     

    You can find out about AnalysIR here

     

    Let me know if it works for you & what model AC this is...tnx

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube