The Rube Goldberg Approach to Home Cooling

June 25, 2008 20:47 by Jim

Air conditioning remote in project casingI live in an old fashioned NYC railroad apartment – long, skinny, and impossible to cool down with air conditioning in any reasonable amount of time. After returning from work, lugging my bicycle up the stairs, and flipping on the AC, I get the very special treat of sitting around for 45 minutes in molten-hot swamp air while waiting for my living room to cool down.

The bottom line: I can now turn my air conditioning off and on from my phone before I head home.

I took the DIY approach - X10 or a similar solution would have been too expensive and impractical, plus the AC is controlled by remote or a power button, so simply plugging the unit in isn’t enough to turn it on. My solution was to trigger the remote control in order to turn the unit off and on.

The project cost under $10 along with a spare USB keyboard that I already had. Why a keyboard, you ask? Well, the tricky part was figuring out how to trigger a relay from the computer. I found this instructable which suggests using the LEDs on the keyboard (I ended up using only scroll lock, the most useless of all locks) to trigger the relay. When the relay is triggered it closes the circuit where the power button used to be. I used a 5VDC/1A SPST Reed Relay from Radio Shack (suggested by the fine folks over at the Make Forums) which conveniently triggers at 5V, which is the same voltage as the output on the LED. The relay was then soldered directly to the innards of the remote (we had to sand away the protective coating and very delicately apply the solder). Once this was put together it was pretty convenient to test as all we had to do was press the scroll lock button on the computer and we’d know if things were working.

USB kayboard being used to trigger relayFrankie and I accomplished this on a late Friday evening (we really intended to go out in the Lower East Side, but sometimes soldering just gets out of control). Once everything was working, the project was put in a casing. I drilled some holes for cables and LEDs. The whole thing looks pretty smart, although inside all of the components are kind of jammed in there.

The application to control the AC runs on my laptop. Running in the system tray I have an application which allows me to control the AC when I’m home (of course I could use the phone as well). This application also exposes a .NET Remoting service over TCP on port 6567 (yep, that’s decimal ASCII code for ‘AC’) – it seems like in order to use the win32 call that emulates a keyboard press (in this case toggling scroll lock for 200ms) the process needs to run in the desktop session, although there might be a more low level way to do this. Unfortunately the Compact Framework doesn’t support Remoting, so I needed to write an additional web service to expose this functionality to the CF client on the PocketPC. This web service exposes the same methods and proxies them over, via Remoting, to the WinForms app that’s hosting the Remoting service. If you'd like a copy of the source code just send me an email at jim<at>s57.com

So, this is the basic flow of how things go down (perhaps also illustrating how appropriate the title of this post is):

The system tray application is loaded on the host machine (my laptop, which has the USB remote contraption attached). The application instantiates an ACService remotable class and marshals the object on port 6567. This was the ony approach that allowed this object to interact with the desktop.

CF app is loaded on the Windows Mobile 6 PocketPC .

Status is retrieved from the server (on or off). 

When the button is pressed (‘Turn AC On’ or ‘Turn AC Off’, depending) the web service is invoked.

The web service invokes the Remoting service on the local machine.

The Remoting service makes a win32 call to activate the scroll lock key and then sleeps for 200ms before deactivating it.

Where once stood a scroll lock LED now stands two wires leading to the relay. When the scroll lock is pressed the relay closes and allows current to pass between the two nodes for the remote control’s former power button.

The AC turns on / off!

This diagram shows how the circuit works.  


Now I just need to add some security to ensure that some intrepid port sniffing hacker doesn’t end up turning on my AC in January.


Currently rated 5.0 by 6 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

December 3. 2008 23:00