One of the basic actions, or better let’s say controls, that an PLC (Programmable Logic Controller) is capable for is to switch his output port ON and OFF, based on the value of the signal on its input port(s). To demonstrate this fact, let us assume that we need to design one PLC based project, which has the purpose to control street lighting.

This project maybe seems to be too simple, but actually it is not, or at least doesn’t have to be. It depends on our requirements. So, let us specify our requirements for this PLC project:

  1. 1.      It is needed to design Street Lighting Controller, which switches one of its output ports ON when one of his input ports is ON; consequently, it switches the same output OFF when mentioned input goes OFF.
  2. 2.      Input signal has to be ON for at least 30 sec without interrupt, and it also has to be OFF for at least 30 sec without interrupt, before output value toggles ON/OFF.
  3. 3.      In the case that sensor connected to the input port of the PLC becomes broken, street lighting must be switched ON and OFF independently of the input state of PLC.

More detailed explanation of the requirement number1 is the following- we have one photo sensor (photo cell) and its task is to monitor the level of lighting from Sun. If this level goes too low, street lighting should be ON and vice versa.

The complexity of this project is hidden in the requirements 2 and 3. Requirement number 2 is present because it is possible that during the night some light temporally shows up (e.g. because of the firework, or maybe some vehicle with its lighting), but in this situation street lighting shouldn’t switch OFF, but to remain ON. In reality, very short power cutoff produces longer loss of light on the street, because usually street luminaries need some time to be energized before they start shining. Analogously, there are situations during the day that can cause temporal darkness of photo cell, causing switching ON of street lighting. Although today there is a lot of photo detectors on the market with embedded possibility to adjust the value of necessary ‘’accumulation’’ of some value, it should be foreseen in our PLC project that regular photo detector will be used. Both of these unusual situations are potential problem, and both of them can be solved by the use of timers.

Requirement number 3 says that designer has to foresee the situation in which photo cell is broken. Why this is important? Well, the obvious answer is that this situation can happen. Since regular maintenance of this system is not needed, after the startup of the system technician will come again when the problem is detected.  There are two possibilities of malfunction. First, the less tragic case- photo cell is staying asserted, meaning that our PLC is getting information that it is dark outside. What will happen? Street light will be ON all the time. In this case, damage is made only in the sense of power efficiency.

The other case, which is more dangerous, is that photo cell is remaining OFF, even during the evening. This scenario is more tragic, since it affects safety of human lives, as well as property. It is crucial that light is ON in the evening!

These two possible scenarios are solved in this case by timers. If light is too long OFF, timer will switch it ON for safety reasons; if the light is too long ON, timer will switch it OFF, in order to save energy. Of course, in this case it is important that control based on timers has ‘’narrower’’ range of work, meaning that light will be switched ON earlier and will be switched OFF later (system will waste some energy), but since the safety has always to be a top priority- this way of working is more than acceptable in this situation.

The only situation in which our system cannot work properly in the case of malfunction of photo cell is that maybe there was a solar eclipse or maybe it was very, very cloudy during the day.

No matter how small your PLC is, even if it doesn’t have real time clock, it is possible to answer to requirements of the project by using regular timers. One of the possible solutions is going to be available for download for free from download page on this website.