I just completed my first PLC project and it was a success. Now I have to think about the safety of the equipment and the people using the equipment.

My PLC application is to control the temperature and the humidity in an enclosure. For this purpose, I am using a heater (120 VAC/1500 W /12.5 A), dehumidifier (115 VAC, 15 A), humidifier (110 VAC, 22 W) and inline fan.

To power ON/OFF I am using 4 relays (Omron G2R-2-SN DC24(S)). I feel like I am using the wrong relays, especially for the heater and the dehumidifier. Here is the relay specification:

  • Coil voltage 24 VDC
  • Contact rating (current) 5 A
  • Switching voltage 380 VAC, 125 VDC - max.
  • Coil current 21.6 mA

I think I need to use this Omron LY1-DC24 relay; I would appreciate it if anyone could confirm that I am going in the right direction.

  • 1
    \$\begingroup\$ Don't try to pass 15A through a relay that can only pass 5A. \$\endgroup\$
    – DKNguyen
    Nov 17, 2022 at 4:26
  • \$\begingroup\$ Thank you for the advice. \$\endgroup\$
    – Sanjeewa
    Nov 17, 2022 at 15:41

1 Answer 1


Yes, you are using the incorrect relay types and doing the AC power wiring in a way which violates electrical codes and UL White Book standards. If you have a fire or shock here, your insurer will not pay, and the responsible parties would be subject to litigation or even criminal prosecution. Spaghetti-wire "science projects", while common and harmless in the low-voltage regime, should never be done with AC mains.

Bringing wiring into Code.

Since I don't want to build ten specimens and send them to UL with a $10,000 check, I would rather simply use standard NEC Chapter 3 wiring methods. My "go-to" for setups like yours is 4x4 steel electrical junction boxes interconnected with EMT or Rigid conduit and nipples. THHN individual wires are then used inside. Nobody doing commercial work ever got fired for using that stuff.

enter image description here

I would start by finding a convenient point on the enclosure and mount two steel 4x4 boxes back to back, aligned. Drill out a hole to that knockout size (7/8") and run an appropriate sized nipple through it. I'd If the enclosure is steel, add some #10 bolts through the normal mounting holes to ground the enclosure to the steel box.

I would take an appropriate-sized 3-prong line cord (or extension cord; lop off the socket end) and use a listed strain relief designed for that cord size to bring it into the outside junction box. That's how power gets into the thing. The junction box has a little nub designed to take a #10-32 "ground screw". Run the power cord's green Safety Earth/shield wire to that grounding screw. (not to be confused with electronics Vss/GND).

Then I would cover the box with a domed cover with a GFCI deadfront mounted in this box to provide GFCI protection to the entire works. Feel free to use a "normal" GFCI receptacle if you want convenience outlets there. Have 1 receptacle only here - two won't fit if one is a GFCI.

All wires going to everything else will come off the "LOAD" terminals on this GFCI. All these metal bits handle Safety Earth/shield for you, there'll be no need to wire that.

On the inner box (or even on another outer box, that would be fine)... I would mount four appropriate UL-Listed relays. This will inevitably involve having two 4x4 boxes right next to each other; link them with a Box Spacer or offset nipple, or simply an appropriate length of EMT conduit with connectors.

From there, inside the box, I would mount a 4-socket domed cover, mounting two common receptacles inside them. Break off the "tab" on the receptacle hot/live (brass screw) side for independent control.

Selecting relays

The #1 feature of the relays is they are UL Listed -- UR Recognized is not good enough, sorry. And they must be general purpose relays - some relays are specific purpose e.g. for controlling A/C motors; you can only use them for that purpose.

The #2 feature is they are designed to separate AC mains power from low voltage power. Under NEC rules, low-voltage wires cannot commingle in the same compartment with AC wires. Honeywell Aube does a nice job of making relays that mount in a box knockout - the AC wires go through the knockout and the low voltage terminals remain outside on the relay. Further, they provide relay power via an onboard transformer - just short 2 terminals and the relay engages.

Next, you need to look at the rating of the relay. Most will state a plain rating, then optionally a

  • Tungsten rating - this is for loads with very high inrush current. Measure the resistance of an incandescent bulb and you'll see why.
  • Ballast rating - for loads with a high "inductive kick" on interruption, such as an old school buzzy fluorescent or HID ballast.
  • Motor rating - deals with both at once.

These other ratings will be much lower than the nominal rating. For your motor loads you will need to use the motor rating. For resistive heater loads, the plain rating is fine.

Wiring-wise, you know what to do. Wire each relay to one of the sockets. Take hot and neutral for everything off the Load wires of the GFCI. Relays switch the hot never the neutral. Use 12 AWG THHN wire for your interconnects, not random hobby electronics wire you happen to have lying around, which isn't rated for AC mains.

Safety earth gets handled by the metal bits. The only exception is if you used a "close nipple" to connect outside and inside junction boxes through a material that is not made of metal. In that case you will need to run a bare wire linking the grounding screws between the inner and outer boxes.

  • \$\begingroup\$ Thank you for your advice. I will definitely follow the electrical CODE before I put this into the production. \$\endgroup\$
    – Sanjeewa
    Nov 17, 2022 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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