CONVERT A LIGHT POINT CONTROLLED FROM TWO LOCATIONS INTO A SMART CIRCUIT

CONVERT A LIGHT POINT CONTROLLED FROM TWO LOCATIONS INTO A SMART CIRCUIT

NPROnline:

Welcome to the NPR Online Technologies Home Automation course.  In this lesson we will analyze how to convert an ordinary circuit that controls a light point from two different positions into a smart system. For this purpose we will use the Sonoff Mini and in particular we will use the R2 version.

Let’s start this lesson by briefly summarizing the operating principle of a circuit capable of controlling the same light point from two different places. The typical circuit solution is based on the use of a pair of single-pole double-throw switches widely used in the electrical systems of residential buildings. In fact, we saw in the theoretical lesson of our course on electrical systems, that by flippling one of the two switches it is possible to change the status of the bulb. In the example in the figure, we note that the light bulb is off.

If at this point we flip the first switch, electrical continuity is established between the live conductor and the terminal of the bulb and therefore the bulb lights up.

If now, for example, we flip the second switch, then the electrical continuity of the live conductor will be interrupted and therefore the light will be turned off.

If we proceed by flipping for example the first switch then the electrical continuity of the live conductor will be restored and then the bulb will turn on again. Let’s take a final example by flipping the second switch the electrical continuity of the live conductor will be restored and then the bulb will turn on again.

Let’s take a final example by flipping the second switch and as we can see, this causes the interruption of the live conductor and therefore the switching off of the light bulb. Although not having considered all the possible combinations, it is easy to realize that with this circuit diagram it is possible to turn the bulb on and off from one of the two switches starting from any initial configuration. This type of circuit is often installed in corridors and in correspondence with two entrances to the same room or in general in all those situations where you want to control a light point from two different positions.

It is useful to remember that it is possible to refer to single-switch double-throw switches by using their acronym SPDT.

Apart from the acronym, there are also different names used across the world for this kind of switch. If you live in the USA, electricians are much more likely to talk about three-way switches, while if you live in Europe, you will hear electricians talking about two-way switches. In some countries electricians talk “diverters” thus indicating the capability of these switches of diverting the current path from one terminal to the other. Our opinion is: if you want to be precise and don’t want to be misunderstood then use the term single-pole double-throw switch, but keep in mind that the other names are frequently used in technical jargon.

As anticipated, the goal of this lesson is to transform the circuit illustrated in the previous figures into a smart circuit, where together with the manual functionality there is the possibility of controlling the switching on of the light bulb using a smartphone using a simple Wi-Fi connection.

For this purpose, we will use a Sonoff Mini device and in particular the R2 version.

We note that this device is equipped with a button that can be used for the Wi-Fi pairing of the device. As we will see later, this button can also be used to switch the status of the Sonoff.

The Sonoff Mini is also equipped with six screw terminals.

We have two screw terminals marked with the letter «N» which indicates the term “Neutral”.

Then we have two screw terminals marked with the letter «L» which indicates the term “Live”

And finally we have two screw terminals marked with the letter “S” which indicates the term “Switch”.

Now let’s see how to make the connections in a circuit based on SPDT switches already installed in an ordinary system.

First of all it is necessary to supply power to the Sonoff Mini and therefore we must derive a pair of neutral and live conductors from the electrical system to be connected to the “N In” and “L In” terminals. We note that we have two “N In” terminals and in this regard we observe that these two inputs are internally connected to each other, this means that we can connect the neutral of the electrical system indifferently to one of the two “N In” terminals. As for the live conductor, we note instead that the Sonoff Mini is equipped with only one “L In” terminal and therefore the phase of the electrical system must necessarily be connected to this terminal. Connecting the live conductor to another terminal can lead to temporary malfunctions or even irreversible damage to the Sonoff Mini.

Let’s now proceed by connecting the bulb to the Sonoff Mini. We know that the bulb must be powered with neutral and live conductors and therefore we make the connections to the terminals «N In» and «L Out». In this way the bulb will be permanently connected to the neutral conductor while the connection to the live conductor will take place only when the Sonoff Mini switches to the ON state.

Let us clarify this point by observing that in the ON state the terminal “L In” is connected internally to the terminal “L Out” and therefore the phase voltage will reach the bulb. The other terminal of the bulb is permanently connected to neutral and therefore the bulb will turn on.

When the Sonoff Mini switches to the OFF state, the neutral conductor will continue to be connected to the light bulb, while as regards the live conductor this will be interrupted inside the Sonoff and therefore there will be no electrical continuity between the “L In” and “L Out” terminals. It follows that the bulb will not be powered and therefore will be off. We have three ways to switch the Sonoff Mini between ON and OFF states.

The first is to press the button at the top right of the plastic box of the Sonoff Mini. We recommend that you use a plastic or wooden stick to easily push this button. It is evident that this mode is useful in the preliminary test phase of the circuit but it is certainly not the one that will be used by users once the circuit is operational in the electrical system also because the Sonoff Mini as we will see is typically inserted in a junction or switch box and therefore will not be accessible except for maintenance.

The second way to switch the Sonoff is to control it via a Wi-Fi connection using a smartphone on which we have pre-installed the eWeLink app. This mode is the main one for which smart switches are used, since it allows you to control them even at very long distances through the use of an Internet connection. Note that the use and configuration of the eWeLink app are not part of this lesson but we have prepared a lesson dedicated to this topic in order to deepen all its details and potential.

The third mode, which is the one we will focus on in this lesson, is to connect the pair of SPDT switches to the Sonoff Mini terminals marked with the labels “S1” and “S2”. Remember that the letter “S” indicates the English term “Switch” while the numbers 1 and 2 are used simply to number the two terminals. We can therefore connect the pair of switches already present in the electrical system to these terminals.

Note that the connection to terminals S1 and S2 must be made in such a way that the common terminal of one switch is connected to terminal S1 and the common terminal of the other switch is connected to terminal S2. We also point out that terminals S1 and S2 can be exchanged between them, i.e. there is no direction to respect when connecting the switches to these terminals. For this connection we can use wires of different colors in order to facilitate the identification of the connections when we find ourselves operating in real conditions. Specifically, we used the gray color.

NPROnline:

The connection between the two switches takes place instead with two black wires that connect the pair of terminals of one switches with the pair of terminals of the other switches according to the diagram shown in the figure.

By means of the circuit we have just created, we will therefore be able to switch the light bulb on and off by operating the two switches.

NPROnline:

We therefore observe that by means of the Sonoff Mini connected as shown in the figure, we are able to maintain the functionality of the ordinary electrical system unchanged,

but at the same time we have integrated the smart functionality that allows us to switch the light bulb on and off even from very long distances. As already mentioned, we will not go into the merits of configuring the Sonoff settings but we will remain focused on the connections to be made to make the circuit operational.

Before proceeding with the practical realization of the circuit just analyzed, we point out that it is possible to have a small variant of the connections in the previous diagrams

In this regard, we remind you that the two “N In” terminals of the Sonoff Mini are equipotential, i.e. they are permanently connected to each other.

This implies that the connection of the neutral to the bulb can take place through a direct derivation of the neutral, as shown in the following figure. This connection scheme is equally valid and in particular circumstances it may be preferred over the previous version.

We note two important aspects:

First of all, we observe that the second terminal of the Sonoff Mini is not used. It is even more important to note that the neutral conductor is still connected to the Sonoff Mini. In fact, in order to function correctly, the Sonoff Mini needs to be powered with both neutral and live conductors, otherwise the electronic board inside it would not be able to function.

Therefore a diagram where both “N In” terminals are disconnected is not a valid solution.

Let’s now proceed with a practical realization of the analyzed circuits. For this purpose, let’s analyze a typical installation. In particular, we have a room with two SPDT switches that allow us to control the state of the light bulb. In the room or in the immediate vicinity we also have a junction box that allows to derive the pair of live and neutral conductors to power the circuit in question.

The connections are made by means of electric wires that run along pipes generally buried within the walls and floors through special channels known as “chases”. In the figure we are representing a typical configuration of distribution of the chases that we will use in the course of this lesson, but as it is easy to imagine you can have several other completely equivalent configurations.

The goal of this lesson is to modify the existing circuit in the room by introducing smart functionality by means of a Sonoff Mini to be inserted in the junction box. We remind you that Sonoff installation is not allowed in metal junction boxes as its functionality is not guaranteed.

As a first step, let’s open the junction boxes and the switch boxes to realize the initial state of the connections in the electrical system. We observe that the neutral and live conductors are accessed from the junction box. The neutral conductor is connected directly to the bulb, while the live conductor reaches the common terminal of the switch on the left. The two remaining terminals of this switch are connected to the respective terminals of the switch on the right using a pair of black wires. It is not necessary to use different colors but it is good practice to do it in order to facilitate their identification. Finally, the common terminal of the right switch is connected to the free terminal of the bulb.

It is easy to see that the circuit just analyzed actually implements the circuit introduced at the beginning of this lesson.

At this point, we want to modify this circuit to make it smart by means of a Sonoff Mini. In this case we have seen that the circuit to be implemented is the one shown in the figure. We anticipate that the only difference from this diagram will consist in the color of the wires connected to terminals S1 and S2 which will not be gray,

but will be brown.

In fact, we will see that these brown wires are already present in the system and we will therefore avoid replacing them with gray wires of the same length and cross section.

We proceed by cutting the live and neutral conductors that are inside the junction box.

We thus obtain four conductors which have been numbered for greater clarity. These conductors will be used to make the connections with the Sonoff Mini.

In particular, the two neutral conductors (conductors 3 and 4) are connected to the “N In” terminals of the Sonoff Mini, conductor 1 is connected to the “L In” terminal of the Sonoff Mini while conductor 2 will be connected to terminal S1 (or S2) of the Sonoff Mini.

Once the connections described above have been made, the situation is that illustrated in this figure.

We proceed by cutting the brown conductor (live conductor) connected to the bulb.

In this way we obtain conductors 5 and 6. Conductor 5 must be connected to the “L Out” terminal of the Sonoff Mini, while conductor 6 must be connected to the S2 terminal of the Sonoff Mini.

With these last connections the realization of the circuit is completed. We recommend paying attention to the live conductor. Specifically, the live conductor coming from the main panel must be connected to the “L In” terminal of the Sonoff Mini, while the live conductor which goes towards the bulb must be connected to the “L Out” terminal. For the two neutral conductors there are no particular recommendations and they can be connected indifferently to the two “N In” terminals of the Sonoff Mini without having to respect a specific arrangement. The same applies to the two terminals S1 and S2 which must be connected to the common terminal of the two switches without any need to comply with a specific arrangement.

At this point, we can close the junction box and the switch boxes and we will notice that the final appearance of the circuit will therefore be identical to the ordinary one but now we will have made it smart thanks to the presence of the Sonoff Mini. Note that, in addition to the configuration just analyzed, several other configurations may occur.

However, it will be sufficient to have the circuit diagram at hand to make the desired connections without making mistakes.

For example, one of the most uncomfortable situations could arise when for some reason the Sonoff Mini has to be installed inside the switch box. This need could arise if, for example, the junction box does not have enough space to insert the Sonoff Mini. In such conditions, the installation of the Sonoff Mini inside the switch box is allowed, however this operation requires a few more steps.

In particular, the most important aspect concerns the need to have both the neutral wire and the wire connected to the common terminal of the other switch inside this box. Once these wires are made to arrive in the switch box, we can proceed with the connections to the Sonoff Mini according to the wiring diagram analyzed in this lesson.

Well, we’ve come to the end of this lesson. If you have followed our instructions carefully, you will end up with your pair of SPDT switches converted into a smart solution. For those who want to learn more about these issues, we suggest accessing our playlists and and our website npronline.tech/en. To help grow our initiatives, you can help us with a like, by subscribing to our channel or even by sending us comments and sharing this content with your friends. Thanks for your attention and … see you next time!

Read our book:

NPROnline:

GO TO MAIN PAGE OF THE COURSE…

NPROnline:
NPROnline:

Inviaci un tuo commento, grazie! Ti segnaliamo che il contest di matematica è terminato il 10 maggio