Is this a good circuit to use as a air condition switch with a help of microcontrollers 5V? What relay to use in this situation?


What parameters should I take into consideration when choosing relay?

  • 1
    \$\begingroup\$ You need a relay that can drive the load and is rate for safe use at 240VAC / 350VDC. With an AC unit there's a motor, if it's designed well the relay could be 1.5times the maximum current drawn by the unit. If it's a crappy one the inductive or over-capacitive features of the badly balanced motor circuit can "simulate" a factor 4 higher load to a switch, which would mean a huge relay. \$\endgroup\$ – Asmyldof Jul 20 '15 at 7:38
  • \$\begingroup\$ To control an air conditioner, I'd look at breadking into the existing control system, rather than controlling the main power input. You may find lower voltages and currents in the control system that won't require such large relays as switching the mains AC would. \$\endgroup\$ – Peter Bennett Jul 20 '15 at 16:16
  • \$\begingroup\$ @PeterBennett Please explain your advice in an answer. \$\endgroup\$ – Junior Jul 21 '15 at 6:32
  • 1
    \$\begingroup\$ @ParadoxECE You should use a mosfet instead of bipolar for Q1 \$\endgroup\$ – MathieuL Jul 28 '15 at 15:40

What parameters should I take into consideration when choosing relay?

There are three main categories to look at, coil specification, contact specification and general technical data. I will discuss some common parameters below.

Contact specification

  • Contact configuration - Do you need a contact that closes (NC / normally closed), opens (NO / normally open) or switches over (CO / change over)?

  • Rated current - The maximum rated DC current. You should stay well below this value for some safety margin.

  • Rated voltage - Maximum switching voltage.

  • Rated load according to Utilization categories - Some manufacturers specify a maximum load for specific conditions. For example AC-1 (Non-inductive or slightly inductive loads) or AC-15 (Control of A.C. electromagnetic loads).

  • Breaking capacity - Specifies the maximum current the relay can switch off without being destroyed or causing an electric arc with unacceptable duration.

  • Minimum switching load - A minimum voltage/current may be necessary to overcome the contact resistance.

  • Contact material - There are lots of different contact materials used. Gold plating is useful for switching light load due to low contact resistance. Some silver alloys are more resistant to arcing than others.

Coil specification

  • Nominal voltage - Normally the rated DC voltage. Most relays are available with several coil types like 5V, 9V 12V and so on. This is a trade off between what voltage you have available and the maximum current you want/can switch (may be limited by transistor for example).

  • Operating range - Specifies the minimum (relay won't switch on below that) and maximum coil voltage (above could cause excessive current and/or maybe mechanical damage).

  • Holding voltage - Once the coil is magnetized and the contact closed, the voltage to hold the contact is often even lower than the minimum specified operating voltage.

  • Drop-out voltage - The voltage where the relay is guaranteed to switch off.

Other technical data

  • Mechanical life - Number of switching cycles (without load)
  • Electrical life - Number of switching cycles at specified load
  • Operate/release time - Self explanatory
  • Insulation between coil and contacts - This is important if you have to design according to safety regulations. You may require 4 or even 8kV for example.
  • Dielectric strength between open contacts - This may be of interest if you have to make sure that there is no arcing while the contact is open.
  • Ambient temperature range - Self explanatory
  • Environmental protection - If there the relay/device is going to be used in a harsh environment, this is worth looking at.

When switching large inductive loads like an air conditioner, it is important to use the right kind of relay. Inductive loads like motors are more damaging to relay contacts than resistive loads. Damage come from arcing during opening and closing. I would not trust those little relay boards you find for a few dollars on ebay. I would question their ability to handle multiple on-off cycles of a motor load.

With that in mind, if you choose to use a standard electromechanical relay, select one that is rated for a higher current than your air conditioner. My advice is to select one that handles 20+ amps and 250 volts AC. Your next problem is switching them on with a microcontroller. Coil currents for smaller 5V relays can be quite high, in many cases 100mA or more. An arduino and similar micros can't source that much current from a gpio pin. The solution is to drive the relay with a transistor. Check out this schematic:


simulate this circuit – Schematic created using CircuitLab The diode dissipates the spike from the relay coil when it is powered off. That spike can damage the transistor and is shorted by the diode. The 1N4004 is a slower diode but should be enough to protect the relay. A fast rectifier diode might be a better alternative. And FYI, +V can be 5V or, if you want to use a higher voltage relay, say 12 or 24V, you can use the same circuit. Just be sure that the ground of the power supply for the relay is tied to the ground of the micro. Another tip is you can also use a 3.3V micro with this circuit.

Another route to go is to buy a motor contactor. They are nothing more than relays with a dual contact setup. Dual contact meaning that instead of a moving contact connecting to a stationary contact you have two stationary contacts that have a moving contact that connects the two together. This dual contact arrangement helps extinguish arcs from an inductive load by creating two air gaps. The only issue is most contactors are designed for industrial systems and typically have AC coils that accept line voltages like 120 or 230VAC. Though, there are contactors with 12 and 24V DC coils. 24VDC is a standard voltage used in industrial control systems. You could use the above transistor circuit to switch a 12 or 24V contactor. To switch an AC contactor you can use a smaller relay to switch mains AC to the contactor. PROS: -Robust design and long life. -Middle of the road cost (Check out Automationdirect if in the USA) CONS: -They are loud when they switch on and off. They make a loud snap or bang sound when actuating. -No coil voltages below 12V.

SSR's are another alternative, though you have to be careful when selecting them and they cost a lot of money. Check out Crydom, their CWD2425 can handle a 1HP motor or 25 amps resistive load and up to 280VAC. They also have a relay selector tool to help select the right SSR. PROS: -Silent switching -Can be directly driven by microcontroller gpio pin. CONS -Costly: you are looking to spend about $45+ USD for an SSR. -They will dissipate power. Depending on the load, you may need to mount it on a metal plate or heatsink.

  • \$\begingroup\$ Clear and good answer! \$\endgroup\$ – Junior Jul 29 '15 at 6:27

when choosing a relay, you should check the voltage and current rating, and you may also consider the voltage in which the coil of the relay operates.

to use a 5 voltage microcontroller you could use this less than 2$ relay, you don't need the 12 volt voltage source, it has a control pin that can control your device

make sure the rating of the Relay is > 230V(in your case ) and the current of the relay is greater than the current rating of the air conditioner

enter image description here


  • 3
    \$\begingroup\$ I would very, very strongly advise against using cheap eBay pre-made relay boards for anything more than 24V. Those are notoriously badly designed and are more than likely not going to meet the IPC specs for 230VAC (or even 115VAC) by a large margin. While there are exceptions, it's not a good idea to offer them as a good solution to people not aware of clearance and creepage rules. \$\endgroup\$ – Asmyldof Jul 20 '15 at 7:40
  • \$\begingroup\$ @Paradox - What Asmyldof says is very sensible alas. The COM terminal on these relays is (stupidly) often on the coil side so the AC clearance to DC is minimal. Also, the current rating is usually lower than claimed. These are great for low voltage experimenting but bad for AC mains use. \$\endgroup\$ – Russell McMahon Jul 20 '15 at 15:13
  • \$\begingroup\$ A@Asmyldof Agree. Very bad for serious use. I've destroyed a number - which is OK for experimental use. Having com terminal on coil side as all I have seen do is a lethal stupidity. \$\endgroup\$ – Russell McMahon Jul 20 '15 at 15:14
  • \$\begingroup\$ oh, I didn't know that. I used them with a 12V motor and they performed well. thanks for the info, that might save someone's life @Asmyldof \$\endgroup\$ – Sabir Moglad Jul 21 '15 at 1:46

The SSR switches main feature is isolation that they provide in the circuits,but they are more prone to surge currents if used above the rating.
Best would be to use bridge SCR type SSR relay they provide compensation that provide them tolerance,So just see the datasheet for the structure of the relay most organization do give these details.
Nowadays they use FET switches they are more faster then these SSR and use CMOS to implement switching.


Having the correct voltage is a must.

Number of operations (expected life): How many switches the relay can do before it wears out. Important if you want something to last a lifetime.

Also, hold current/dropout voltage might be a consideration if the relay is to be held energized for long periods of time. ( see Article )

As of the relay to choose, I think you should see what relays you can easily get in your location before deciding on a final one.


Is this a good circuit to use as a air condition switch with a help of microcontrollers 5V?

That is fine, and typical of most electronic thermostats.

What relay to use in this situation?

It is impossible to specify, only that you need something with a 12 VDC coil. What are you actually going to energize with the power contacts? If you are going to just feed the control circuit of a typical split AC unit, any small PCB relay would work. If you are actually trying to energize a compressor, you will probably have to use a small 5VDC PCB relay to switch a larger control voltage to pull in a contactor.

You can think of a contactor as a special type of high power relay. There are small, single phase (two pole) ones used in typical air conditioners, and they go up in size to over 23,000 V three pole monsters for huge motors.

What parameters should I take into consideration when choosing relay?

There really aren't many: Your desired coil voltage. The load you are switching. (AC / DC / Volts / Amps) How many poles you are switching (1, 2, 3, more?)

** Edited to change coil voltage.

  • \$\begingroup\$ No, the relay needs to have a 12 V coil, not 5 V. \$\endgroup\$ – Olin Lathrop Jul 29 '15 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.