A relay or Power tail for an air conditioner?

So I have an Uno with a TMP36 temperature sensor. I also have an airconditioner with only an on/off switch (its an old model).

What I want to do is simple, basically plug the A/C into either a powertail or a relay and have the arduino switch on the a/c when the room gets too hot.

The thing is, I rent the apt and a/c unit, so I can't just cut the negative end of the power and stick it in a relay. Also, I'm concerned because it's a high power unit that uses a special power plug (I believe it to be a 250V, 20AMP "6-20P" plug).

Can you recommend a pre-wired power tail that I can just operate with the arduino? I can't seem to find anything in this plug config.

Otherwise, I suppose I could make one myself. Can you recommend and approriate relay? I've used a couple of the regular household 120V ones to control lamps, so I have an idea how they work, but I need something beefy and don't know what to choose.

Otherwise, I suppose I could make one myself. Can you recommend and approriate relay?

I'd suggest [u]this style[/u] solid state relay. They are commonly used for industrial control, and they are easy to wire-up with screw terminals.

You can get these solid state relays that can be driven directly off the Arduino's 5V I/O pin. Mechanical relays are cheaper, but you'd need a transistor or MOSFET to drive the coil.

Since you are switching a compressor, I'd get a relay with a higher current rating than the A/C unit, maybe twice the current if it's not too expensive (to handle the power-on/inrush current).

I've made a "power tail" built into an electrical box with a socket mounted (like an electrical box in the wall) and a cable with a plug attached to plug-into the power outlet. Another attached cable has a Molex plug for the control connection.

cdwilliams1:
The thing is, I rent the apt and a/c unit, so I can't just cut the negative end of the power and stick it in a relay.

What is "the negative end"?

make sure you add a 5 minute down time delay. if you try to start the compresor with too much head pressure it will fail.

it is hard to imagine an AC that is old enough to not have a thermostat, especially the larger units.

as for a pre-wired unit, I know there is one company that makes a 22v power tail,
Information.com People Search | Free People Finder & White Pages - Locate Anyone offers a kit
you have to supply the ends.

I also have an air conditioner with only an on/off switch (its an old model).

Does the unit have an adjustable thermostat? What kind of on/off switch does the unit have?

zoomkat:
Does the unit have an adjustable thermostat? What kind of on/off switch does the unit have?

It's an older General Electric model with a rotating switch on the front. The settings are "off, fan, lo, hi". If you pick lo or hi, the a/c will just run until you switch it off.

dave-in-nj:
make sure you add a 5 minute down time delay. if you try to start the compresor with too much head pressure it will fail.

it is hard to imagine an AC that is old enough to not have a thermostat, especially the larger units.

as for a pre-wired unit, I know there is one company that makes a 22v power tail,
http://www.powerswitchtail.com/Pages/PowerSwitchTail240vackit.aspx offers a kit
you have to supply the ends.

So my code should be something along the lines of:
When temp rises above desired level
Start a/c
Record start time

Shut off when desired temp reached AND at least 5 minutes have passed

Along those lines?

You need to look to see if the switch actually has compressor current thru it, or if the switch controls a relay which has the compressor current thru it. You might consider using a servo to operate/rotate the control switch. If the unit has a thermostat, that could be operated high/ low or on/off to start/stop the compressor (but the fan might still run).

cdwilliams1:
So my code should be something along the lines of:
When temp rises above desired level
Start a/c
Record start time

Shut off when desired temp reached AND at least 5 minutes have passed

Along those lines?

yes.

if the temp is above 78 start
if temp is below 72
note time
stop

if time < 5 minutes
do nothing.

this is one of those cases that you could use delay() as you really do not want to do anything else.

if the temp is above 78 start
if temp is below 72
stop
delay(50000)

cdwilliams1:
So my code should be something along the lines of:
When temp rises above desired level
Start a/c
Record start time
Shut off when desired temp reached AND at least 5 minutes have passed
Along those lines?

No, it is the other way around.

The five minutes is how long it must stay off whenever it is stopped (including if the power cuts off for any reason) so that the pressure across the compressor can bleed.

It is for this reason that most air conditioning systems annoyingly will not start (except the fan) for this time when you first turn them on, just in case they had been turned off immediately beforehand and the controller has no non-volatile "memory" for when it was last running.

Paul__B:
No, it is the other way around.

The five minutes is how long it must stay off whenever it is stopped (including if the power cuts off for any reason) so that the pressure across the compressor can bleed.

It is for this reason that most air conditioning systems annoyingly will not start (except the fan) for this time when you first turn them on, just in case they had been turned off immediately beforehand and the controller has no non-volatile "memory" for when it was last running.

int  failDelay = 1 ;
void setup()
void loop()
if(failDelay==1){
delay(50000);
failDelay=0:

maybe put this in voidsetup() ?

Thanks all for the help!

The thing is, I rent the apt and a/c unit, so I can't just cut the negative end of the power and stick it in a relay.

Are you aware that there is no such thing as a "negative" with an AC device ?