CONVERT A LIGHT POINT CONTROLLED BY PUSH BUTTONS INTO A SMART CIRCUIT

CONVERT A LIGHT POINT CONTROLLED BY PUSH BUTTONS INTO A SMART CIRCUIT

NPROnline:

Welcome to the NPR Online Technologies Home Automation course.  

Read our book:

In this lesson we will deal with the concepts that allow us to convert an ordinary circuit that controls a light point from one or more different positions into a smart system. For this purpose we will use the Sonoff Mini and in particular we will use the R2 version and we will also assume that the system is based on the use of push buttons.

For this purpose, we refer to the following figure, where we propose a typical relay circuit to control a light bulb from three distinct control points by means of three push buttons.

If we press one of these buttons we cause the closing of the relay coil supply circuit.

In such conditions, the coil is able to operate the relay switch and change its state. In the example in the figure, this switch will then go from open to closed.

Once the switching has taken place, even if we no longer hold the button down, the switch inside the relay will remain in its state, that is, it will remain closed, and the light bulb will remain on.

By pressing one of the three buttons a second time, we will power the relay coil again, causing the switch inside the relay to reopen,

which will remain open even if we no longer hold the button down. It is evident that this cycle is repeated every time we go to press one of the three buttons. More details are available in our playlist dedicated to electrical systems and therefore we will not repeat them in this lesson.

As anticipated, the goal of this lesson is to transform the circuit just analyzed into a smart system, that is, a circuit that while preserving its ordinary functionality also allows lighting control via smartphone using a Wi-Fi connection.

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

We remind you that 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 the connections must be made inside an existing ordinary electrical circuit.

Read our book:

NPROnline:

The very interesting aspect is that the existing relay must be removed and the Sonoff Mini R2 connected in its place. This should not surprise us since there is already a relay inside the Sonoff Mini R2.

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 illustrated connections.

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 wire to the bulb can be done through a direct connection,

as shown in this 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 wire is still connected to the Sonoff Mini. In fact, in order to operate correctly, the Sonoff Mini needs to be powered with both neutral and live wires, otherwise the electronic board inside it would not be able to function.

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

Let’s now move to a practical realization of the analyzed circuits. For this purpose, let’s analyze a typical installation. In particular, we have a room with two push-buttons that allow us to control the switching on of a light bulb. In the previous circuit, we had considered three buttons but for greater graphic clarity, here we will consider a version with two buttons. We have already seen in the lesson dedicated to the relay how the addition or removal of buttons is a simple operation that does not alter the electrical circuit and the connections already present in the system. Now suppose that in the room or in the immediate vicinity there is a junction box that allows to extract a pair of live and neutral wires to power the circuit in analysis.

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 correct operation is not guaranteed. In many countries this is not a problem since the junction boxes used in residential electrical systems are made of plastic.

As a first step, let’s open the junction box and the switch boxes to realize the initial state of the connections. We observe that the neutral and live wires are accessed from the junction box.

Let’s highlight these two wires, hiding (for the moment) all the other wires in the system. Let’s now proceed step by step following the various connections present in the system.

The neutral conductor is directly connected to the bulb

and to the relay coil.

We then observe that the live conductor is connected to the two buttons

and to one of the two terminals of the relay’s internal switch.

The second terminal of the relay’s internal switch is connected to the free terminal of the light bulb.

The free terminal of each button is connected to the free terminal of the relay coil.

In this way, the tangle of cables inside the junction box is reached!

Read our book:

NPROnline:

This explains why it is good practice to use different colors in order to make it easier to identify the various wires, i.e. their origin and their function.

Let’s now proceed with the changes to be made to convert the circuit just analyzed into a smart circuit.

Before we begin, let’s quickly review the circuit we need to implement. We note in particular that the relay has been replaced with the Sonoff Mini R2.

We can therefore start from this observation, thus removing the relay from the electrical system we are analyzing.

In this way, 5 wires will be available which for the sake of convenience we have numbered as indicated in the figure.

We can now move on to making the connections with the Sonoff Mini R2. Let’s start with feeding the Sonoff

and then we will connect the live wire (wire #1) to the “L In” terminal and the neutral wire (wire #4) to one of the two “N In” terminals of the Sonoff Mini.

The wires coming from the two buttons, i.e. wires #2 and #3, must be connected to the terminals S1 (or S2) of the Sonoff. In particular, in the example in the figure we have connected the two wires to terminal S2.

Let’s then connect wire #5 to the “L Out” terminal.

Finally, we disconnect the wires (indicated by the yellow arrows) that go from the buttons to the line screw terminal and connect them to the S1 terminal of the Sonoff.

At this point, there are no other connections to make. We note that the configuration with the neutral wire connected directly to the bulb without passing through the “N In” terminal of the Sonoff was used in particular.

We have already seen that this type of configuration is allowed. What you need to pay close attention to is the live wire. Specifically, the live wire coming from the main panel must be connected to the “L In” terminal of the Sonoff Mini, while the live wire which goes towards the bulb must be connected to the “L Out” terminal.

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 that of the initial electrical system but now we will have made it smart thanks to the presence of the Sonoff Mini. 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 these 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 inside this box both the neutral wire and the wire connected to the other button as indicated by the red arrows. 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 carefully followed our instructions, you will be able to convert an ordinary control circuit of a light point controlled by push buttons into a smart solution. For those wishing to learn more about these issues, we suggest accessing our playlists 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