Use Arduino to turn on my air conditioner?

Hi:

First let me make the boilerplate disclaimer that I am new to Arduino and electronics in general...

My issue is that I have a big Danby air-conditioner with a fancy electronic control panel that I want to run 24 hours per day. And run it does...until there is a power outage. When there is a power outage the a/c turns off (of course) but it doesn't turn back on when the power comes back on. At that point, I have to physically push the little power switch to turn the air conditioner back on.

While searching for a solution to my problem, I discovered and bought an Arduino Decimilia with the idea that I would write a simple sketch that does nothing more than wait 30 seconds after power is applied to it, and then it would simply set a pin HIGH - and I would connect a wire from that pin to the air-conditioner switch to ground...I threw in the extra code just because I liked to see the pin 13 LED flashing with increasing urgency:

// declare variables:
int ledPin = 13;
int switchPin = 8; // digital output pin to the A/C switch
int val = 0;

void setup()
{
pinMode(ledPin, OUTPUT);
pinMode(switchPin, OUTPUT); // set the switch pin to be an output

do //15 * 1000ms = 15 seconds
{
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
delay(500);
val = val + 1;
} while (val < 15);

val = 0;

do //15 * 500ms = 7.5 seconds
{
digitalWrite(ledPin, HIGH);
delay(250);
digitalWrite(ledPin, LOW);
delay(250);
val = val + 1;

} while (val < 15);

val = 0;

do //25 * 200ms = 5 seconds
{
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
delay(100);
val = val + 1;

} while (val < 25);

val = 0;

do //40 * 100ms = 4 seconds
{
digitalWrite(ledPin, HIGH);
delay(50);
digitalWrite(ledPin, LOW);
delay(50);
val = val + 1;

} while (val < 40);

val = 0;

//At this point 15 + 7.5 + 5 + 4 seconds have elapsed (31.5 seconds)

digitalWrite(ledPin, HIGH);

//Set the switch to flick here...
digitalWrite(switchPin, HIGH);
delay(500);
digitalWrite(switchPin, LOW);

delay(2500);
digitalWrite(ledPin, LOW);
}

Only now do I realize my mistake. As soon as I connect the wires up I'm completing the circuit required to switch on the air-conditioner - regardless of whether pin 8 is high or low - regardless of whether it's running 0V or 5V, the very act of joining the wires creates the cicrcuit that turns on the a/c. And the fact that the circuit remains open means the the fancy control panel locks up until I break the circuit...

I think I need a relay? What does one look like? From what device could I scavenge a relay? Am I able to perform a relay (switching) function using just the Arduino?

Thanks in advance.
Steph

A relay would do the trick.

you could probably do it with the Arduino, just make the pin an input (and therefore high impedance, which looks like an open circuit). When you want to switch on, make it an output with a 0 value.

You could probably do the same thing with a one-shot 555 timer and a transistor (or maybe even without a transistor; I don't use 555s all that much). A 555 would be a lot cheaper than an arduino (and free up your arduino for other cool projects, no pun intended).

There's a trick with a diode that a forum member shared for figuring out which lead you should connect to which, so that the current is flowing the right way and doesn't kill a pin on your arduino.

-j

Yes, not using an arduino would be simpler. You should even be able to create a simple time delay circuit with a resistor, capacitor and transistor/relay setup.

MartinFick: In my post, I ask what a relay looks like. So then what gives you the idea that using a "resistor, capacitor and transistor/relay setup" would be "easier" for me? Plus, all you are doing is repeating what the previous poster said.

Stop clogging up the internet with your dumbass comments.

MartinFick: In my post, I ask what a relay looks like. So then what gives you the idea that using a "resistor, capacitor and transistor/relay setup" would be "easier" for me? Plus, all you are doing is repeating what the previous poster said.

Stop clogging up the internet with your dumbass comments.

Wow! That was an inappropriate comment, especially considering you were being offered help. What gives you the idea that anyone is going to continue helping you with an attitude like that?

I agree completely. The poster seems to have forgotten that the forum is for the benefit for all. I appreciated Martin's observation, and leave it to the forum to decide what is most "clogging up the internet".

More clogging.
Read carefully. kg4wsv helped. Fick and you two knobs added nothing of any value to the conversation.

Yes, I guess you are correct about that since conversation to you is childish name calling and fist pounding. Why don't you find a new bridge to hide under? Let me put this in your language, you are a total noob and fail at electronics and life.

One of the great pleasures of this forum has been the good will of all posters, and complete lack of impolite response, even when there are misunderstandings of intentions. It would be a shame to have this thread undermine that.

I hope any future posts return to the discussion of technical issues.

MartinFick: In my post, I ask what a relay looks like. So then what gives you the idea that using a "resistor, capacitor and transistor/relay setup" would be "easier" for me? Plus, all you are doing is repeating what the previous poster said.

Stop clogging up the internet with your dumbass comments.

I humbly apologize for my overestimation of your abilities, I will try to be more helpful and think less of you. This is what a relay looks like, you probably have one around your house somewhere.

Be sure to use an all metal one. Simply cutoff the power cord from your air conditioner and wire it directly to any one of the legs of the relay. That should fix the problem. To test it: try sitting on the relay.

I truly hope that was more informative and helpful than my previous post, again, sorry for clogging up the internet. If you follow my advice, it may unclog things nicely.

That a Double Pole Single Throw relay?

That a Double Pole Single Throw relay?

Yes, a DPST, it's pronounced "D_i_P S_hi_T" relay.

A single "throw" from this relay is probably the simplest air conditioner adjustment that could fix the apparent "overheating" problem.

One of the great pleasures of this forum has been the good will of all posters, and complete lack of impolite response, even when there are misunderstandings of intentions. It would be a shame to have this thread undermine that.

Thank you for expressing that thought mem.

I would like to suggest all posters in this thread reconsider whether their post is a positive addition to the community and act accordingly.

But hey, I'm just the anti-spam guy. :slight_smile:

--Phil.