Solar4Living

Daikin + Arduino

Other > Daikin Web Remote Control - WiFi & Arduino

Introduction
As part of the ongoing process of adding automation to various items around the home, I came across an interesting project for controlling a Daikin air conditioner via a network-connected Arduino. The details are here:
http://harizanov.com/2012/02/control-daikin-air-conditioner-over-the-internet/

Here in Australia, a local electronics company called Freetronics sells Arduino clones. There is a model called EtherTen, which is the equivalent of an Arduino Uno with the ethernet shield fitted.

Porting from EtherCard to WizNet. Harizanov's design is based on a Nanode (another Arduino variant). These are not as widespread as other stock standard Arduino and clones. The nanode uses an ENC28J60 network chip and requires the EtherCard library, whereas most other 'standard' Arduinos use the WizNet chip and the stock Ethernet library.

His code could not be directly compiled and uploaded to a Wiznet-based Arduino. Much of the original code had a very high dependency on the EtherCard library, and he stated that he had "no intention to move it to Wiznet". So this project was born. As such, lot of the features have been stripped out (such as Authentication, NTP and DDNS), and others re-written to work with the Wiznet Library. The JQuery interface was also removed.

The omission of JQuery and authentication were not a concern in my case, as the device will primarily be integrated with a home automation web server for centralised control. This central web server handles the security and authentication, leaving the Arduino to only do the IR control. Therefore, the Arduino would not be directly exposed to the internet, so the built-in authentication system was left out. An important feature that was carried over in the new project was the ability to read the status via JSON, and also to be able to change the air conditioner settings via a URL. The IP address is hardcoded, although it would not be too difficult to change, as long as the Arduino can be connected to a computer to re-upload the compiled code. Using DHCP causes the WizNet library to consume more memory.

Unfortunately, he did not go into much detail about the specifics of how it was assembled. For instance, the IR LED needs to be driven via a transistor, as the MCU provides a very limited output on its PWM pins. The LED needs to be driven much harder in order to obtain its maximum output. In the introduction, a transistor was briefly mentioned in the parts list, but wasn't immediately obvious that its purpose was to drive the IR LED. The only mention of the transistor drive requirement is in the comments section, where somebody asked about why their attained IR transmission range was so short.

This project

In this example, we use a Freetronics EtherTen. This is the equivalent to an Arduino Uno with the ethernet shield installed.

A DHT22 temperature/humidity sensor can be added. This is optional, and allows the room temperature to be monitored remotely. If it is used, it should be kept at least 20cm from the EtherTen, so as not to pick up the heat from the Arduino.

A prototyping shield was used. The protoshield is made by Freetronics specifically for its EtherTen product. This shield is sized to clear the ethernet jack. If you use a standard Arduino with an Ethernet shield, you will need to stack the protoshield on top. The transistor and resistors are mounted on the protoshield.

Once the project was completed, it can be connected to the home network. An existing WiFi access point elsewhere on the network allows smartphones to access and control the air conditioner.

External access is also possible, so that prior to coming home, the room temperature can be checked, and the air conditioner can be turned on if one feels it is necessary.

Network Connection
I decided to make the IR controller wireless, so I added a TP-Link WR703N pocket router, flashed with OpenWRT. I used the Relayd package to turn the device into a WiFi client bridge.

The WR703N was chosen because it was the smallest WiFi router available that could be powered by a Micro-USB cable. Both the EtherTen and the WR703N were powered by a 5v switching regulator fed with a 12v plugpack.

What's Missing
Modes such as Econo, Comfort/Sensor were not implemented in his project.

Construction details

Everything is housed in a small jiffy box. The only visible components are the IR LED at one end, and a DC power socket at the other.

Power: The DC socket is fitted to a drilled hole on one end of the jiffy box. This feeds a DC-DC step down converter. The one I used is sold by various sellers on the internet, and is designed to be a drop-in replacement for the LM7805 series three-pin linear regulators. Filter capacitors are added to the input and output stages. The 5v output from the DC converter is connected to a pair of micro USB connectors. I bought two cheap micro USB cables online, and cut the cable, leaving about 10cm on the micro USB side. The wires are stripped and soldered to the 5v output. These two micro USB pigtails are used to power the EtherTen and WR703N.

I used a spare 12v switchmode 'plug-pack' or 'wall wart'. These are commonly used by things such as external hard drives and ADSL/broadband routers.

Network connection: I made a very short 7cm ethernet patch lead to go between the WR703N and EtherTen. Straight-through is fine because the WR703N's ethernet interface is auto-crossover.

Arduino wiring: The "ProtoShield Short" was used, as it was designed by freetronics to fit the EtherTen. The transistor, resistors and LED are soldered here.

[SHIELD_DIAGRAM]

IR LED: A 5mm hole is drilled into the front side of the jiffy box. The IR LED is pushed through. In my case, the hole is small enough to hold the LED in place by friction. You may need to apply hot glue to hold it in place if your LED is smaller than the hole.

Arduino Sketch

Screenshots


Comments

sarbjeet, Tue, 06 Oct 2015 09:23 am: Reply
hiiiiii

Jonathan Oxer, Sat, 02 Jan 2016 07:34 am: Reply
Nice project! It's cool to see the EtherTen used for its original intended purpose: DIY home automation. This post seems to have a couple of things missing with placeholder text for the shield diagram, the sketch, and screenshots. Will you be adding those?

  Add a comment


Your name:

Comment:

Verification code:
Verification Code Type the letters and numbers that you see.