Introduction: Pluggable Two Channel Digital Timer Switch

About: digital and sound artist

As a digital artist working with installation art, I often need to set-up a piece to automatically run (power up and down) at certain times of the day. For this you can use a digital timer, and there are various ready-made products. A timer is programmed with turn-on and turn-off times, and controls a power relay to which you attach the devices of your installation, e.g. a Raspberry Pi computer, amplifiers, lights, etc.

I have been using the Brennenstuhl Primera Line DT IP44 digital timer multiple times, but found the relatively cheap device (17 EUR at the time of writing, January 2023) to die rather quickly. The relay becomes unreliable after only few hundreds of switches, the soldered in battery's life time is also quite short.

One could just trash these devices from time to time and buy new ones, but after a while I wondered if I shouldn't get a better device instead of producing so much electronic waste. The next more professional step is to get an industrial timer (price point: 70 EUR). Alas, this was not just a matter of plugging it into a Schuko (Schutzkontakt connector)…

Supplies

In the final version, I used the following components, ordered from Reichelt Elektronik Germany, but you may find these or similar items at other distributors:

  • HM SC 18.20 - Hugo Müller SC 18.20 EASY - a two channels programmable timer switch - 69 EUR
  • 2x RCIP 230VAC 2CO - Weidmüller RCIKITP230VAC 2CO LD/PB - two-point coupling relay module - 17 EUR each
  • 5U230810 - Box4U industrial enclosure, 160 x 120 x 90 mm, polycarbonate - 16 EUR
  • 2x Schutzkontakt Socket - e.g. one blue one red - 3 EUR each
  • Fitted plug IEC 60320 C14 - e.g. MPE Garry 42R014122 - 2 EUR
  • DIN rail 10cm or longer - e.g. Phoenix 1207650 - 5 EUR
  • 3x control wire H07V-K, 1.5mm mm², 1 meter - e.g. blue, brown, green/yellow - 1 EUR each
  • M3 and M4 mounting screws, shims
  • Power plug to IEC socket (C13)

So this sets you back by around 140 EUR, or eight times the throw away Brennenstuhl. On the upside, this will be much more reliable, and we chose a two channel timer, so actually the price factor is more like four times.

You also need the following tools

  • metal saw
  • drill, milling machine
  • screw drivers
  • cutter (Stanley knife), side cutter
  • triangle ruler
  • (multi-meter: useful for checking connections)

Step 1: Problem With Polarity

While the centre piece is the digital timer SC 18.20 EASY, it needs to be wired and housed appropriately. Most importantly, industrial devices such as this are meant to be mounted with known L (live) and N (neutral) power wires. Since we want to put this into a box that can be attached to a wall socket, a problem arises: The Schuko plug we're going to use doesn't guarantee the right orientation. Of its main two pins, we don't know which is L and which is N. Ideally we should use the timer to switch the live wire, but we may end up accidentally switching the neutral wire instead, if we do not take further precaution! This would be dangerous, as an open live wire could end up in an appliance, possibly causing a shock when one touches that appliance.

Step 2: The Improved Circuit

I asked around, and more competent folks told me I should “use a second relay which breaks both live and neutral wires”. After a bit of head scratching, this is actually quite simple conceptually. The power input of the timer shouldn't mind which is the N and which is the L wire. We still use it to switch the “assumed” live wire, but this time, the switch output goes into one of the control inputs of a two-contact coupling relay. The relay's second control input goes to the “assumed” neutral wire. We then connect both wires from the power input (N? and L?) to the common pins of the two contacts of the coupling relay, and the outputs of the coupling relay to the output socket of our box.

It's easy to see that now the timer will connect and disconnect both wires of the power output. It's still possible, depending on the rotation of the input Schuko, that an “open live” wire is attached to the coupling relay’s control, but that’s safely placed in the box with no danger of hazard.

We repeat this with a second two-contact coupling relay to have both of the independent channels of the timer working.

Step 3: Put Modules on a Rail

With the schematic from the previous section in mind, we can now assemble the box. In the first step, we put the timer and the two coupling relays on a DIN rail. If you bought a longer piece, use the metal saw to cut off a 10 cm piece from the rail. The photo shows the rail from bottom with the three modules lined up. (I took this photo after wiring, so ignore the wires for now). When looking from the top, I call the relay to the left of the timer relay A (as it will be controlled from channel A of the timer), and I call the relay to the right of the timer relay B (controlled from channel B of the timer).

Step 4: Wire the Modules

I used blue and brown wires to distinguish the two AC lines, but remember that it ultimately depends on the orientation of the input power plug which one will be N and which one will be L. In the photo, you can see that I decided to have only two wires left to connect to the power input, and I'm chaining the connecting points. With the coupling relays I chose, two wires can go into each contact, so it's straight forward to move the two AC lines around.

The only tricky bit are the screw terminals of the timer, as shoving two wires into them requires a bit of squeezing, but it was possible to safely fasten them together.

The coupling relay model uses a ‘push in’ mechanism, which is super-convenient. The specs say you should strip the wires c. 12 mm. For the timer's screw terminals, you have to strip them shorter. If you use a multi-strand wire, like I did, you need to twist the strands and carefully push from a straight angle down, to avoid that individual strands bend back and stand out. You can easily correct that by releasing the push-in mechanism, pushing a ø 3.5 mm screw driver into the release hatch, and try again.

If you use the exact components as listed, the connecting points on the timer are labelled as following:

  • 4 / L and 5 / N: AC inputs
  • 2 and 9: the “common” relay inputs of channels A and B, respectively
  • 1 and 10: the “open” relay outputs of channels A and B, respectively. These are the contacts that will be closed (connected to the common input) when the timer is turned ON.
  • 3 and 8: the “closed” relay outputs, i.e. in the opposite connection state to 1 and 10; we don't use them

With the chosen coupling relay, the connecting points are labelled as following:

  • A1 and A2: AC inputs
  • 11 and 21: the “common” relay inputs of contact 1 and 2, respectively
  • 14 and 24: the “open” relay outputs of contact 1 and 2, respectively. These are our outputs.
  • 12 and 22: the “closed” relay outputs; we don't use them

In the photo of this section, I have wired everything but the coupling relay outputs (pins 14 and 24 on each of the relays), as we will connect them in the next step. I chose to go around as follows, with the cable lengths chosen according to the enclosure’s size and the dimensions of the modules. Blue wires, assumed to be N:

  • 19 cm from timer, point N, to be connected later to the IEC socket
  • 9 cm from timer, point N (i.e. shove in a second cable), to relay B, point A1
  • 14 cm from relay B, point A1, to relay B, point 11
  • 11 cm from relay B, point 11, to relay A, point 11
  • 14 cm from relay A, point 11, to relay A, point A1

Brown wires, assumed to be L:

  • 19 cm from timer, point L, to be connected later to the IEC socket
  • 9 cm from timer, point L (i.e. shove in a second cable), to timer, point 2
  • 9 cm from timer, point 1, to relay A, point A2
  • 14 cm from relay A, point A2, to relay A, point 21
  • 23 cm from timer, point 2 (i.e. shove in a second cable), to timer, point 9
  • 9 cm from timer, point 10, to relay B, point 21
  • 14 cm from relay B, point 21, to relay B, point A2

Step 5: Prepare the Enclosure

Now it's time to put the Schuko sockets and the IEC C14 socket in the enclosure. The enclosure on the part list is not cheap, but it pays off here; the walls are 4 or 5 mm thick and made of polycarbonate, which means, it's easy to drill without danger of breaking the box. I don't own a CNC yet, so I created the holes for the sockets by using regular wood drill bits and a manual drill. The Schukos require a circular hole with c. 40mm diameter. I found a 35mm circular drill bit, made initial holes, and then used a manual milling machine (Dremel with a polishing / sanding blurr) to approach the target cutout.

As you can see on the photo, I placed the IEC socket on the short side (top), and the two Schukos on the long side (right). I used M3 screws to fasten the IEC to the enclosure, and I used M4 screws to fasten the Schukos to the enclosure.

The DIN rail with the modules will be placed towards the short side (bottom) opposed to the IEC; you can slide it in to find a good position, and make markings for two holes, where we will put screws to secure the rail from the enclosure's bottom. If those screws bother you, you can add rubber pads to the enclosure's bottom.

Connect the ground points of the IEC to the ground pins of the Schukos, e.g. using a yellow/green wire. The ground points are the middle screw terminals of each socket. Then add blue and brown wires for the Schuko's AC lines. I use 18 cm for the Schuko with the blue cap that will be channel A, and I use 14 cm for the Schuko with the red cap that will be channel B.

Step 6: Install Modules in Enclosure

Finally, slide the rails with the modules into the enclosure, carefully squeezing the cables. Secure the rails with two M3 screws from the enclosure's bottom. Use suitable shims before securing the screws from the inside with nuts from the inside. Yes, everything is a bit crowded in there, you need some plier to hold them, and some patience.

Then connect the blue and brown wires coming from the timer, points N and L, to the IEC socket's outer screw terminals. Remember that there is no guarantee about the polarity, but German Wikipedia says that if you attach the socket so that the ground pin is towards the bottom, then when looking at the socket from the outside, the N connector should be on the right, and the L connector should be on the left. You can see this orientation on the photo.

Then connect the blue and brown wires coming from the Schuko with the blue cap to relay A, points 14 and 24; and connect the blue and brown wires coming from the Schuko with the red cap to relay B, points 14 and 24.

Before you attach the transparent lid of the enclosure, it's time to program the timer! Do not connect the electricity yet! The model I picked is particularly nice, because it has a backup battery, that means it can be programmed without being connected to mains. So there is no danger if accidentally touching a wire while you program it. Check the model's manual for instructions on how to program the timer, there is also a handy YouTube video (in German) explaining how to program power-on and power-off times.

The simplest way to test that everything works fine, is to program a few minutes of power-on for channel A, followed by a few minutes of power-on for channel B, and to connect two lamps to the Schuko sockets.

Step 7: Disclaimer

While I tried to describe the procedure correctly and precisely, and I have learned some electrical engineering, I am not a professional electrician! The usual safety measures apply: never work on the open box and the wiring with anything connected to mains. Check the maximum power rating of the relays, sockets and cables used. When in doubt, consult the legal requirements for operating such device in your country and in a given context.

The entire risk as to the quality and performance of the procedure is with you. Should the results prove defective, I am not liable. In no event will I be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the device presented here.