<p>Mains electric specialist here.  When working in mains power, mechanical execution of work is <em>everything</em>.</p>

<p>The first rule is do not casually mess around with mains power -- it will kill you! If you've done a lot of low-voltage tinkering with jury-rigged wires splayed all over the place -- <strong>do not do that with mains wiring. Ever</strong>.  Break that habit with mains! </p>

<p>The second rule is hard separation.  It is absolutely forbidden, for instance, to have low voltage wires intermingled with mains in a jumble, even inside a metal box.</p>

<h2>A "Chinese wall" between mains and low-voltage</h2>

<p>By which I <em>don't</em> mean low quality.  Generally all wires associated with mains should be inside a grounded metal enclosure, and all low-voltage wires should be outside that enclosure, or separated by a physical divider. </p>

<p>Here is an ideal setup that will pass muster.  </p>

<ul>
<li>A standard square drawn steel junction box, with knockout holes, \$1</li>
<li>a #10-32 ground screw for that hole on the bump</li>
<li>A cover plate, \$1, made to take ....</li>
<li>... two common receptacles, but get the higher quality <a href="https://www.handymanhowto.com/electrical-outlets-side-wire-versus-back-wire/" rel="nofollow noreferrer">screw-and-clamp type</a> - $2.50 each so we can use stranded wire.  I'm assuming you have more than 2 lights.  If not, you can wire this thing so half the sockets are always-on.  </li>
<li>a couple feet of #12 stranded THHN wire, each red, black and white  (20 cents/foot)</li>
<li>A <a href="https://rads.stackoverflow.com/amzn/click/com/B00D5YLY2G" rel="nofollow noreferrer" rel="nofollow noreferrer">relay-transformer</a> that mounts to a knockout hole.  </li>
</ul>

<p><a href="https://i.sstatic.net/hf7tS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hf7tS.png" alt="enter image description here"></a>
<a href="https://i.sstatic.net/bDm9j.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bDm9j.png" alt="enter image description here"></a>
<a href="https://i.sstatic.net/BNSTY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BNSTY.png" alt="enter image description here"></a></p>

<p>For now just imagine 3 mains wires coming in: black hot, white neutral and green earth. Earth goes to that #10-32 screw hole on the bump, and the metal case grounds everything else. </p>

<p>I <a href="https://www.jlconline.com/how-to/electrical/q-a-to-pigtail-or-not-to-pigtail_o" rel="nofollow noreferrer">pigtail</a> wires on receptacles because it's easier, but it's also clearer for a novice (than using a receptacle as a splice block). On the receptacles, pigtail neutral with <strong>white</strong>.  Hot gets a <strong>red</strong> pigtail if switched, and <strong>black</strong> if always-on. </p>

<p>Fit the relay into a knockout hole, mains wires inward.  </p>

<p>Now you have a bunch of black, red, and white wires.  Join them by color! Easy peasy!  This is why I made such a fuss about getting 3 colors of THHN wire. </p>

<p>Button it all up, and the mains work is done.  </p>

<h2>Getting power into our box</h2>

<p>I glossed over bringing mains supply into this box.  Let's review that further. </p>

<p>That junction box is made to mount on a wall.  It's a code violation to use it as a portable box (but lots of people do). However you must use <strong>cordage</strong> (SJOW, SJOOW etc.) not in-wall wiring (NM, THHN, UF).  I just buy a 14 AWG extension cord and lop the socket off. Visit the electrical supply house (Greybar, not Mouser) and get a strain relief that'll fit that cord and a knockout hole. </p>

<p>If you want to mount it on the wall over another box, they make special 4" square boxes for that. If the existing box is a similar box, they make "extension boxes" with open backs.  They also make ones designed to go over top of a 1-gang box that is metal or plastic.  </p>

<p><a href="https://i.sstatic.net/UDuin.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UDuin.png" alt="enter image description here"></a></p>

<p>If you need the existing outlet space on the wall, you can use surface conduit systems like Legrand Wiremold (not to be confused with cable organizers intended for low-voltage cables only). You extend off an existing outlet, leaving that with its original function, then run surface conduit to another box, where you mount these items.  </p>

<h2>Make the system talk to it</h2>

<p>That was a lot of heavy lifting, but the rest is downhill. </p>

<p>On the above relay, you simply attach 2 wires to W and R.  (in fact, common thermostat cable is "W"hite and "R"ed, coincidence: not). If you short those wires to each other, the relay operates and the lights turn on. Use an appropriate relay if needed.  There is low voltage AC on these wires (24VAC between them, 34V peak, isolated from earth and mains) which means you can route these wires without mains-level protection. </p>

<p>They make other relay-transformers, but I really like how this one puts the low-voltage on opposite sides of the knockout from the mains.   They also make cheaper relays that accept 24VDC or even 12VDC, but then you have to supply that. </p>

CC BY-SA 4.0
2019-11-01T16:59:01.403Z
Note that most 3D printers are connected to Mains wire using C13 connectors into a fused C14 plug, which then connects to the inlet of the Power supply.
Trish
CC BY-SA 4.0
2019-11-01T17:41:14.757Z
I would plug this into a separate mains socket @Trish . If an unswitched socket is needed to plug in the 3-D printer, I would add it (as discussed). It could be done more elegantly with C13/14 connectors, but I am avoiding this to stay within equipment readily available at any hardware store or electrical supply.  Good point that it either needs to be fused or large enough wire to be protected by the distribution panel's circuit breaker.
Harper - Reinstate Monica
CC BY-SA 4.0
2019-11-01T16:01:35.113Z
2019-11-01T17:42:44.557Z
2019-11-01T17:42:44.557Z
Harper - Reinstate Monica
<p>You need to take a step back and think about what you are doing. From what I read there you are connecting the neutral to the low voltage. You should definitely not mix connections between your high and low voltage side. I think you are lucky to not have broken more things than the logic board.</p>

<p>I quickly drafted this to show the idea.
<a href="https://i.sstatic.net/0UIZT.png" rel="noreferrer"><img src="https://i.sstatic.net/0UIZT.png" alt="enter image description here"></a></p>

<p>The relay provides isolation so you do not want any connections crossing over that electrically connects the sides. So you keep the 120V mains stuff on one side and the other side you connect to your logic board and printer supply.</p>

<p>The grounds you can join to a common point or printer frame. I would never join L or N from different cables because at least here in Northern Europe our outlets are not keyed and can be rotated 180-degrees swapping L &amp; N which would create a dead short.</p>

CC BY-SA 4.0
2019-11-01T08:55:28.263Z
2019-11-01T09:07:34.723Z
2019-11-01T09:07:34.723Z
r_ahlskog
<p>Let's look at the notes on the relay first, as these tell us what to connect the terminals to.</p>

<h2>Powered side</h2>

<ul>
<li><code>NO</code>/<code>NC</code> - Normally Open/Normally Closed lead. Which you use determines the switching behavior: open line on signal (NC) or closed line on signal (NO). Connect this to the powered component.

<ul>
<li>For heater components <strong>it is best to use NO</strong>, as a failure of a signal automatically stops heating, making this a safety means! If any of the supply wires are ripped or pulled from the terminals or the board is fried, the power of the heater doesn't come through.</li>
</ul></li>
<li><code>COM</code> - Common. This is the other lead of the switch part of the component, the line that transports the power to the switch. Connect this to the power supply.</li>
</ul>

<h2>Low Voltage signal side</h2>

<ul>
<li><code>IN</code> - Input. Here the switch signal goes in

<ul>
<li>This is a 5 V Signal</li>
</ul></li>
<li><code>DC+</code>/<code>DC-</code> - This is the power supply for the switch and should be the same as the power supply for the Board. Check your Rating! 

<ul>
<li>Red "High" on DC+ </li>
<li>Black "Low" on DC-</li>
</ul></li>
</ul>

<p><a href="https://i.sstatic.net/lzuv9.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lzuv9.png" alt="Wiring Diagram"></a></p>

<p>Note I used European colors to differentiate the 5 V side from the mains-power side better. You have your Neutral in white, Phase in black, Ground in green on your Power Supply picture. This <a href="https://paladintech.files.wordpress.com/2014/10/2014-10-11-18.png" rel="nofollow noreferrer">color conversion</a> can be handy.</p>

<p>If the heater lamp has a connection for the ground wire, use it! This should be the same ground wire the power supply is connected to, to ensure safety.</p>

CC BY-SA 4.0
2019-11-01T14:02:48.343Z
2019-11-01T16:16:58.723Z
2019-11-01T16:16:58.723Z
Trish
<p>In effect, the ground (from mains) does not need to be connected to the relay, the relay interrupts the "hot" or "neutral" (preferably the "hot", but that is not possible for all plugs, e.g. some European plugs can be inserted 180&deg; turned into the sockets). You connect one of the interrupted wires to the <code>COM</code>, the other interrupted wire (that goes to the lamps) to the <code>NO</code> (or the <code>NC</code>, depending on safety, the logic and/or preference). The ground wire from the mains power socket is not necessary at all (some lamp amratures require this to be connected though). See a schematic below, it uses an Arduino Uno, but you can think of it being the printer board. Note to never connect the ground from mains to the printer board directly!</p>

<p><a href="https://i.sstatic.net/oKLoi.png" rel="nofollow noreferrer" title="Connecting lamp to relay"><img src="https://i.sstatic.net/oKLoi.png" alt="Connecting lamp to relay" title="Connecting lamp to relay"></a></p>

<p><sub><a href="http://osoyoo.com/2017/08/28/arduino-lesson-1-channel-relay-module" rel="nofollow noreferrer">Image based on source: osoyoo.com</a></sub></p>

<p>The logic (low voltage side of the relay) needs to be wired as follows:</p>

<ul>
<li><code>DC+</code> is the voltage power supply of the relay module, this is frequently +5&nbsp;V, but some modules use +3.3&nbsp;V (sometimes there is a jumper cap to select the voltage)</li>
<li><code>DC-</code> is the ground from the printer board</li>
<li><code>IN</code> is the trigger that needs to be connected to the port on the printer board that electronically switches the relay</li>
</ul>

CC BY-SA 4.0
2019-11-01T09:13:36.277Z
Nice picture, like it a lot.
r_ahlskog
CC BY-SA 4.0
2019-11-01T16:05:18.513Z
That's how you do it *electrically*.  Mechanical execution of it, however, is serious business, and decides whether the setup is safe or dangerous.
Harper - Reinstate Monica
CC BY-SA 4.0
2019-11-01T17:48:27.207Z
Note that OP uses a 12V module
Trish
CC BY-SA 4.0
2019-11-01T22:58:29.643Z
^ was mistake, meant to link to 5V relay
K Mmmm
CC BY-SA 4.0
2019-11-01T09:11:37.037Z
2019-11-01T15:35:48.977Z
2019-11-01T15:35:48.977Z
0scar
<p>I know this will be a really obvious question to some people, but I have bricked about 3 boards doing this so I want to be certain before I brick a fourth. I don't have a lot of experience working with AC voltage, especially crimping / hacking it like what's going on here. Trust me it was my last resort to ask this.</p>

<p>Basically, as a chamber heater I'm using some 120V heat lamps (here in the U.S.). The problem seems to be that when I connect my laptop to the board (if the laptop is plugged in, which it has to be for long-term serial control), sometimes I:</p>

<ol>
<li>Hear an electric shock sound -- the board is fried</li>
<li>Don't hear an electric shock sound -- the board is fried, though</li>
</ol>

<p>What I interpret from this is that I'm stupidly wiring the 120V heat lamps incorrectly relative to my 3D printer board, such that when I connect it to my charging laptop via USB, the AC voltages are out of phase, causing my board to be fried. Alternatively, it's the 12V/24V power supply that's wired wrong relative to everything else, which also needs to be wired to the same polarity.
<a href="https://i.sstatic.net/hPD8v.png" rel="noreferrer"><img src="https://i.sstatic.net/hPD8v.png" alt="enter image description here"></a></p>

<p>I was on the understanding that when crimping a three-wire male electrical cord:</p>

<ol>
<li>White = Neutral</li>
<li>Black = Hot (or Load)</li>
<li>Green = Ground</li>
</ol>

<p>... reinforced on the left side of the below image as well: </p>

<p><a href="https://i.sstatic.net/HgeRE.png" rel="noreferrer"><img src="https://i.sstatic.net/HgeRE.png" alt="enter image description here"></a></p>

<p>So, I know that much already. <strong>The question is</strong>, when I connect this AC outlet to a <a href="https://rads.stackoverflow.com/amzn/click/com/B00LW15D1M" rel="noreferrer" rel="nofollow noreferrer">relay</a> like this, I got <code>NO</code>, <code>COM</code>, <code>NC</code> on one side and <code>IN</code>, <code>DC+</code>, <code>DC-</code> on the other. Which wire goes to <code>COM</code>, and which goes to <code>D-</code>? The board uses <code>COM</code> to denote the voltage that is switched 'on' by the relay, and <code>D-</code> to denote whatever the shared ground is among, the 3D printer, heat lamp, printer board, etc... (For more info, see link to relay)
<a href="https://i.sstatic.net/nuc81.png" rel="noreferrer"><img src="https://i.sstatic.net/nuc81.png" alt="enter image description here"></a></p>

<p>This 5V relay says it supports AC loads being managed by an arduino / 3D printer, so I was under the impression that I could connect the white wire to its <code>D-</code> pin (which also should receive the "GND" for my 3D printer board) and the black wire to its <code>COM</code> pin. However, what do I do about the green wire? Nothing? Also, was it wrong for me to assume it would support this function when the Arduino is connected to a charging laptop via USB?</p>

<p>Basically, I just need to be sure that my laptop (3-prong), power supply (3-prong), heat lamps (2 or 3 prong) and relay (only 2-prong) all have matching polarities and don't cause an electric shock or fry my board. But I am getting really conflicting results and frying a lot of boards, probably by overthinking this. </p>

CC BY-SA 4.0
2019-11-01T15:17:42.830Z
Please add a diagram showing how it is all connected up. Also, do the mains outlets which are being used have a ground connection, and are they on the same circuit from the circuit breaker panel?
Andrew Morton
CC BY-SA 4.0
2019-11-01T15:45:37.637Z
You mention a 5 V relay but the link shows a 12 V relay - is it just that the link ended up showing the wrong one?
Andrew Morton
CC BY-SA 4.0
2019-11-01T18:50:49.413Z
Be aware that those relays may not be labeled correctly, I have a pack of those exact relays from Amazon and the NC and NO are inverted. Use a multimeter to see if COM and NO are connected when nothing is connected.
zzarzzur
CC BY-SA 4.0
2019-11-01T22:58:09.717Z
I linked the 12V relay accidentally - but the 5V relay looks exactly the same visibly
K Mmmm
<wiring><chamber>
How to wire for AC mains voltage relay, when printer board is connected to AC-charging laptop computer?
K Mmmm
# How to wire for AC mains voltage relay, when printer board is connected to AC-charging laptop computer?

(Asked by: username_0 on 2019-11-01)

I know this will be a really obvious question to some people, but I have bricked about 3 boards doing this so I want to be certain before I brick a fourth. I don't have a lot of experience working with AC voltage, especially crimping / hacking it like what's going on here. Trust me it was my last resort to ask this.

Basically, as a chamber heater I'm using some 120V heat lamps (here in the U.S.). The problem seems to be that when I connect my laptop to the board (if the laptop is plugged in, which it has to be for long-term serial control), sometimes I:

1. Hear an electric shock sound -- the board is fried
2. Don't hear an electric shock sound -- the board is fried, though

What I interpret from this is that I'm stupidly wiring the 120V heat lamps incorrectly relative to my 3D printer board, such that when I connect it to my charging laptop via USB, the AC voltages are out of phase, causing my board to be fried. Alternatively, it's the 12V/24V power supply that's wired wrong relative to everything else, which also needs to be wired to the same polarity.
[![enter image description here](https://i.sstatic.net/hPD8v.png)](https://i.sstatic.net/hPD8v.png)

I was on the understanding that when crimping a three-wire male electrical cord:

1. White = Neutral
2. Black = Hot (or Load)
3. Green = Ground

... reinforced on the left side of the below image as well:

[![enter image description here](https://i.sstatic.net/HgeRE.png)](https://i.sstatic.net/HgeRE.png)

So, I know that much already. **The question is**, when I connect this AC outlet to a [relay](https://rads.stackoverflow.com/amzn/click/com/B00LW15D1M) like this, I got `NO`, `COM`, `NC` on one side and `IN`, `DC+`, `DC-` on the other. Which wire goes to `COM`, and which goes to `D-`? The board uses `COM` to denote the voltage that is switched 'on' by the relay, and `D-` to denote whatever the shared ground is among, the 3D printer, heat lamp, printer board, etc... (For more info, see link to relay)
[![enter image description here](https://i.sstatic.net/nuc81.png)](https://i.sstatic.net/nuc81.png)

This 5V relay says it supports AC loads being managed by an arduino / 3D printer, so I was under the impression that I could connect the white wire to its `D-` pin (which also should receive the "GND" for my 3D printer board) and the black wire to its `COM` pin. However, what do I do about the green wire? Nothing? Also, was it wrong for me to assume it would support this function when the Arduino is connected to a charging laptop via USB?

Basically, I just need to be sure that my laptop (3-prong), power supply (3-prong), heat lamps (2 or 3 prong) and relay (only 2-prong) all have matching polarities and don't cause an electric shock or fry my board. But I am getting really conflicting results and frying a lot of boards, probably by overthinking this.

**Tags:** wiring, chamber
> **Comments:**
> **username_1**: Please add a diagram showing how it is all connected up. Also, do the mains outlets which are being used have a ground connection, and are they on the same circuit from the circuit breaker panel?  
> **username_1**: You mention a 5 V relay but the link shows a 12 V relay - is it just that the link ended up showing the wrong one?  
> **username_2**: Be aware that those relays may not be labeled correctly, I have a pack of those exact relays from Amazon and the NC and NO are inverted. Use a multimeter to see if COM and NO are connected when nothing is connected.  
> **username_0**: I linked the 12V relay accidentally - but the 5V relay looks exactly the same visibly  

---

## 4 answers

### Answer by username_6 on 2019-11-01. Score: 9 | Accepted answer

In effect, the ground (from mains) does not need to be connected to the relay, the relay interrupts the "hot" or "neutral" (preferably the "hot", but that is not possible for all plugs, e.g. some European plugs can be inserted 180° turned into the sockets). You connect one of the interrupted wires to the `COM`, the other interrupted wire (that goes to the lamps) to the `NO` (or the `NC`, depending on safety, the logic and/or preference). The ground wire from the mains power socket is not necessary at all (some lamp amratures require this to be connected though). See a schematic below, it uses an Arduino Uno, but you can think of it being the printer board. Note to never connect the ground from mains to the printer board directly!

[![Connecting lamp to relay](https://i.sstatic.net/oKLoi.png "Connecting lamp to relay")](https://i.sstatic.net/oKLoi.png "Connecting lamp to relay")

[Image based on source: osoyoo.com](http://osoyoo.com/2017/08/28/arduino-lesson-1-channel-relay-module)

The logic (low voltage side of the relay) needs to be wired as follows:

* `DC+` is the voltage power supply of the relay module, this is frequently +5 V, but some modules use +3.3 V (sometimes there is a jumper cap to select the voltage)
* `DC-` is the ground from the printer board
* `IN` is the trigger that needs to be connected to the port on the printer board that electronically switches the relay

> **Comments:**
> **username_5**: Nice picture, like it a lot.  
> **username_3**: That's how you do it *electrically*.  Mechanical execution of it, however, is serious business, and decides whether the setup is safe or dangerous.  
> **username_4**: Note that OP uses a 12V module  
> **username_0**: ^ was mistake, meant to link to 5V relay  

---

### Answer by username_5 on 2019-11-01. Score: 6

You need to take a step back and think about what you are doing. From what I read there you are connecting the neutral to the low voltage. You should definitely not mix connections between your high and low voltage side. I think you are lucky to not have broken more things than the logic board.

I quickly drafted this to show the idea.
[![enter image description here](https://i.sstatic.net/0UIZT.png)](https://i.sstatic.net/0UIZT.png)

The relay provides isolation so you do not want any connections crossing over that electrically connects the sides. So you keep the 120V mains stuff on one side and the other side you connect to your logic board and printer supply.

The grounds you can join to a common point or printer frame. I would never join L or N from different cables because at least here in Northern Europe our outlets are not keyed and can be rotated 180-degrees swapping L & N which would create a dead short.


---

### Answer by username_3 on 2019-11-01. Score: 3

Mains electric specialist here. When working in mains power, mechanical execution of work is *everything*.

The first rule is do not casually mess around with mains power -- it will kill you! If you've done a lot of low-voltage tinkering with jury-rigged wires splayed all over the place -- **do not do that with mains wiring. Ever**. Break that habit with mains!

The second rule is hard separation. It is absolutely forbidden, for instance, to have low voltage wires intermingled with mains in a jumble, even inside a metal box.

## A "Chinese wall" between mains and low-voltage

By which I *don't* mean low quality. Generally all wires associated with mains should be inside a grounded metal enclosure, and all low-voltage wires should be outside that enclosure, or separated by a physical divider.

Here is an ideal setup that will pass muster.

* A standard square drawn steel junction box, with knockout holes, \$1
* a #10-32 ground screw for that hole on the bump
* A cover plate, \$1, made to take ....
* ... two common receptacles, but get the higher quality [screw-and-clamp type](https://www.handymanhowto.com/electrical-outlets-side-wire-versus-back-wire/) - $2.50 each so we can use stranded wire. I'm assuming you have more than 2 lights. If not, you can wire this thing so half the sockets are always-on.
* a couple feet of #12 stranded THHN wire, each red, black and white (20 cents/foot)
* A [relay-transformer](https://rads.stackoverflow.com/amzn/click/com/B00D5YLY2G) that mounts to a knockout hole.

[![enter image description here](https://i.sstatic.net/hf7tS.png)](https://i.sstatic.net/hf7tS.png)
[![enter image description here](https://i.sstatic.net/bDm9j.png)](https://i.sstatic.net/bDm9j.png)
[![enter image description here](https://i.sstatic.net/BNSTY.png)](https://i.sstatic.net/BNSTY.png)

For now just imagine 3 mains wires coming in: black hot, white neutral and green earth. Earth goes to that #10-32 screw hole on the bump, and the metal case grounds everything else.

I [pigtail](https://www.jlconline.com/how-to/electrical/q-a-to-pigtail-or-not-to-pigtail_o) wires on receptacles because it's easier, but it's also clearer for a novice (than using a receptacle as a splice block). On the receptacles, pigtail neutral with **white**. Hot gets a **red** pigtail if switched, and **black** if always-on.

Fit the relay into a knockout hole, mains wires inward.

Now you have a bunch of black, red, and white wires. Join them by color! Easy peasy! This is why I made such a fuss about getting 3 colors of THHN wire.

Button it all up, and the mains work is done.

## Getting power into our box

I glossed over bringing mains supply into this box. Let's review that further.

That junction box is made to mount on a wall. It's a code violation to use it as a portable box (but lots of people do). However you must use **cordage** (SJOW, SJOOW etc.) not in-wall wiring (NM, THHN, UF). I just buy a 14 AWG extension cord and lop the socket off. Visit the electrical supply house (Greybar, not Mouser) and get a strain relief that'll fit that cord and a knockout hole.

If you want to mount it on the wall over another box, they make special 4" square boxes for that. If the existing box is a similar box, they make "extension boxes" with open backs. They also make ones designed to go over top of a 1-gang box that is metal or plastic.

[![enter image description here](https://i.sstatic.net/UDuin.png)](https://i.sstatic.net/UDuin.png)

If you need the existing outlet space on the wall, you can use surface conduit systems like Legrand Wiremold (not to be confused with cable organizers intended for low-voltage cables only). You extend off an existing outlet, leaving that with its original function, then run surface conduit to another box, where you mount these items.

## Make the system talk to it

That was a lot of heavy lifting, but the rest is downhill.

On the above relay, you simply attach 2 wires to W and R. (in fact, common thermostat cable is "W"hite and "R"ed, coincidence: not). If you short those wires to each other, the relay operates and the lights turn on. Use an appropriate relay if needed. There is low voltage AC on these wires (24VAC between them, 34V peak, isolated from earth and mains) which means you can route these wires without mains-level protection.

They make other relay-transformers, but I really like how this one puts the low-voltage on opposite sides of the knockout from the mains. They also make cheaper relays that accept 24VDC or even 12VDC, but then you have to supply that.

> **Comments:**
> **username_4**: Note that most 3D printers are connected to Mains wire using C13 connectors into a fused C14 plug, which then connects to the inlet of the Power supply.  
> **username_3**: I would plug this into a separate mains socket @Trish . If an unswitched socket is needed to plug in the 3-D printer, I would add it (as discussed). It could be done more elegantly with C13/14 connectors, but I am avoiding this to stay within equipment readily available at any hardware store or electrical supply.  Good point that it either needs to be fused or large enough wire to be protected by the distribution panel's circuit breaker.  

---

### Answer by username_4 on 2019-11-01. Score: 2

Let's look at the notes on the relay first, as these tell us what to connect the terminals to.

## Powered side

* `NO`/`NC` - Normally Open/Normally Closed lead. Which you use determines the switching behavior: open line on signal (NC) or closed line on signal (NO). Connect this to the powered component.
  + For heater components **it is best to use NO**, as a failure of a signal automatically stops heating, making this a safety means! If any of the supply wires are ripped or pulled from the terminals or the board is fried, the power of the heater doesn't come through.
* `COM` - Common. This is the other lead of the switch part of the component, the line that transports the power to the switch. Connect this to the power supply.

## Low Voltage signal side

* `IN` - Input. Here the switch signal goes in
  + This is a 5 V Signal
* `DC+`/`DC-` - This is the power supply for the switch and should be the same as the power supply for the Board. Check your Rating!
  + Red "High" on DC+
  + Black "Low" on DC-

[![Wiring Diagram](https://i.sstatic.net/lzuv9.png)](https://i.sstatic.net/lzuv9.png)

Note I used European colors to differentiate the 5 V side from the mains-power side better. You have your Neutral in white, Phase in black, Ground in green on your Power Supply picture. This [color conversion](https://paladintech.files.wordpress.com/2014/10/2014-10-11-18.png) can be handy.

If the heater lamp has a connection for the ground wire, use it! This should be the same ground wire the power supply is connected to, to ensure safety.


---

