Thursday, April 30, 2009

Hacking the AC

So with the 2 days of record heat that we had recently I decided to 'upgrade' our AC unit temperature sensor due to a 3rd day of record heat. After the first few days of high heat the AC worked great except it cycled on and off like crazy and could barely keep up. The problem is that the sensor is a bit sensitive and gets too cold if any of the cold air gets back into the intake faster than it should (i.e. walking by it).

The driver:
I felt confident that the 12,000 BTU/h AC could handle the large area but it never could under a full sun because of this cycling on and off. I also didn't want to spend $$$ on getting another unit that this one should be able to handle.

So what to do about this issue? Replace that sensor with a digital thermostat of course! With this upgrade not only would I be able to use the time triggered events (cooler when home, warmer when away) I would also be able to see *exactly* what the sensor temperature is reporting and adjust the position as needed.

Since the thermostat isn't made for high-current I cant simply use it inline with the compressor. Instead I took apart the face panel for the control unit and disconnected the thermal sensor. (If you follow this and do it your self be careful! you're playing around with enough voltage to hurt) The sensor that came with the AC is a thermistor which varies resistance with temperature (less with high heat, more with low). Using an multi-meeter I measured that a 4kohm resistor would work just fine (room temp was around 7kohm and resistande between fingers [~85F]). I didnt want to simply short it out and potentially damage the unit (though in theory it could work), hence the resistor.

So what to do now? Connect the resistor between 'Rh' and 'Rc', bring one terminal from the control unit to the Rh and connect the other terminal to the 'Y'. The thermostat, when on cool, uses a relay to connect Rc to Y, I ignored all ~6 of the other pins ;) (Though these are 'standard' read the manual and look for two cooling pins, one for power in and one for compressor)

I mounted the thermostat on the inlit grill of the AC, taped up a few of the vents on the thermostat that could have cool air blown into it. I turned it on and set the temp to 72 on the AC just to make sure it turns on and set the thermostat to 79. After a few hours in 93F full sun the rooms went from 85 to 79 with no cycling :) Last year it seemed to barely keep up with the demand under the same conditions and cost me $$$ in electricity usage! I also saved quite a bit of money by not thinking I need another unit.

Monday, April 6, 2009

Router project update

Extension on http://davidgrundmann.blogspot.com/2009/03/router-project.html

So I got the router up an running but not without flaws. Apparently there is a serious worm going around targeting openwrt project based routers. While the security risk is limited to bad passwords and open ports I decided not to take the chance so it's not going to be a gateway.
My main server is now off and sitting quietly while I have 2 routers up an running for our network. One is a wireless router that hosts the gateway (generic wifi router) and the other is the print server (WGT6534u).
The print server portion of this is a bit tricky, I'm lucky that my other printer has a network port on it (HPCL3600N)... If it didn't then I would potentially get a confusing mixture of devices if the router reboots. The mapping to /dev/lp[0-9] is dymaic and the print server (p910nd) points to each dev directly. I could make a dynamic script to scope the device ID and bind it accordingly but I didn't really need to since only 1 port is used.
The p910nd driver for the print server is interesting... typically I would use cups but the wiki for openwrt used p910nd which is a non buffering version of a server (basically it just pushes the raw data directly to the printer where cups spools it locally then prints). The bad side to this is that if the printer is off the job will be lost right away where cups could store it till the printer is back on.
Since my requirements became less by not using as a direct gateway I removed the usb key and loaded the small set of utils on ROM (ssh/p910nd/usb-drivers). Now I have an extra key :) The router now boots slightly faster than before (maybe 1-2 seconds) because it doesn't need to change the root system to the usb key and that the usb port is somewhat slow (despite being usb2)

Since my goal was to reduce power, the 2 routers (gateway + print) consume 12w combined without many compromises. This is 10x less and with $/kwH around $0.17 I will save quite a bit!

Now the real test: will they last? The reason why I used a server (PC/linux) was that I had 3 routers crash constantly or be flaky and burn up (not flames, though that would be cool)! I got tired of rebooting them every day so I built one. I guess if these routers dont work I'll buy an n270 atom chip + mobo and build my system that way :)

So what to do with the 2nd WGT634u? Hmm, maybe a security cam to take place of a $200+ one?