Remote Controlling of Light Intensity Using Phone Devices

In this study, we investigate the design and simulation of an electronic system for remote controlling the level of light intensity of an electrical lighting system used for a certain desired application. The remote controlling is done using the keypad of any Dual Tone Multi Frequency (DTMF) based telephone handset. A DTMF tone command sent from a transmitting fixed or mobile phone terminal will be used to activate a system of relays that control the required level of light intensity. An appropriate active bandpass filters are designed for recognition of the DTMF tones of the transmitted digit. The bandpass filters and the additional subsequent stages of the overall electronic system are simulated and tested using MULTISM. Light intensity controlling is useful to avoid unnecessary electrical power wastage and the remote controlling eliminates the physical presence of a person for adjusting the required level of lighting at the desired location.


INTRODUCTION
In recent days, there is a strong interest to remotely control different applications and systems without the need to physically touch and operate the controlled devices.Among others, the use of telephone signalling such as Dual Tone Multi-Frequency (DTMF) technique is becoming predominant in various remote controlling applications (Ismail and Hamid, 1998;Rohit et al., 2006;Ladwa et al., 2009).The work in Getu et al. (2015) and Attia et al. (2015) investigated how to use this technique for remotely controlling an agricultural pumps used for irrigation.In the designed system a remotely located person, which could be a farmer will have the ability to press the keypad of the telephone handset (fixed or mobile) and can switch on or off water pumps located at the different locations of the site based on the DTMF tone signals decoded at the receiver terminal.In this study, we extend the use of the DTMF technique and show how we can be able to remotely control the level of light intensity provided by an electrical lighting system.This is achieved through controlling the available supply voltage for the lighting devices that can be ordinary lamps, spot lights, florescent lamps, chandeliers or any other lighting devices.It is advantageous to control the available AC supply voltage or power for lights used in our houses, offices, supermarkets, business areas, streets or in other interest places.Among others, controlling level of light helps to avoid unnecessary wastage of electrical power and hence save the energy, eliminates human physical presence for operating the lighting system at the site and moreover provides the ability to have any level of light intensity required for any state of locations and state of time.
Controlling of power can be achieved through special semiconductor devices called TRIACs that belong to the Thyristor family (Alexander and Sadiku, 2012;Rashid, 2013;Boylestad and Nashelsky, 2012;Mohan et al., 2003).This devices act as special switches that become low-impedance current paths when they get the rated trigger current through their gates and become open circuits capable of withstanding the rated voltage when the gate current either stops or drops below a minimum value called the holding level.The TRIAC based electronic power control circuits are designed to control the distribution or levels of AC or DC power sources.Such power control circuits can be used to either manually switch power to electrical devices or to switch power automatically working with sensor devices such as temperature or light intensity sensors.These power control devices have been useful in ac-dc inverter designs, dimmer circuits, speed control of motors and other related applications.
In this study, we are combining the remote controlling and power controlling applications, where a telephone device is used to control a remote electrical lighting system.We used the capability of the DTMF based signalling, where a DTMF decoder at the receiving side is used to control the level of brightness of the lighting devices according to the transmitted digit at the transmitter.An active Filter is the main element of the receiving DTMF decoder where the filter is capable of selecting the appropriate transmitted frequency or a range of frequencies among the possible DMTF frequencies.Traditionally, active filters are electronic circuits that contain resistors, capacitors and Operational Amplifiers (OPAMPS) in contrast to passive filters consisting only passive elements (resistors, capacitors and inductors).Active filters provide better frequency selectivity than simple RLC circuits and they can have passband gains greater than unity (Mancini, 2002;Aremu et al., 2013;Schaumann et al., 1990).Since these filters have OP AMP outputs, the chain rule applies in the cascade design, where higher order filters can be simply obtained by series connection of low order filters (most often second order systems).They also do not require inductors which can be large, lossy and expensive, especially in low frequency applications.Among the types, we consider, the Butterworth implementation of the filters that often gives a maximally flat gain in the passband, desired attenuation of -3 dB at the cut off frequency and above the cut-off frequency the attenuation is-20 dB/decade/order.A fourth order Butterworth bandpass filter is designed as cascade connection of two second order filters and based on the required specifications.Therefore, the fourth order bandpass Butterworth filter will have an attenuation factor of -40 dB/decade above the lower and higher cut-off frequencies.The filter has s strong capability of selecting and recognizing the transmitted DTMF based phone digit corresponding to a desired level of light intensity.This technique of remote controlling can be used for any private, public and/or industrial applications.The proposed system offers a new way for saving electric power, eliminates human physical presence at the site for switching and controlling operation.The system is capable of selecting any desired level of light intensity depending on the lighting requirement of the location.

MATERIALS AND METHODS
System model: The proposed system comprises a transmitter phone (fixed or mobile), a receiver phone (fixed or mobile), DTMF decoder based on active bandpass filters and a Digital Logic Control unit and a TRIAC based dimmer circuit controlled by a system of relays used for adjusting the required level of light intensity.Figure 1 shows the general block diagram of the receiving end system showing the different parts of the system.
At the transmitter, the user will send the DTMF control signal by first dialling the receiver mobile or fixed phone.After the auto-answering mode is completed, the transmitted DTMF tone command will be decoded and used to activate a specific relay that selects a certain resistor value corresponding to the required level of light brightness.The received DTMF tone command will be decoded by a DTMF decoder circuit based on active filters, which are made of easily available passive and active electronic components.After the decoding of the tones, a logic controller unit is designed to identify the exact transmitted phone digit corresponding to the DTMF tone as each digit of the telephone keypad is represented by two simultaneous tones selected from a set of frequencies.A relay corresponding to the transmitted digit will be enabled and the relay is used to select appropriate resistor values that control the amount of power delivered to the lighting devices.The lighting devices can be single or multiple incandescent lamps, several connected Light Emitting Diodes (LEDs), florescent lamps, chandeliers or any other lighting loads.
Each digit of the telephone keypad is represented by two simultaneous tones selected from a set of frequencies.One set of frequencies consists of the low frequencies (697, 770, 852 and 941 Hz, respectively) and the second set consists of the high frequencies (1209( , 1336( , 1477( and 1633 Hz, respectively) Hz, respectively).Each time when we press a digit or symbol on the phone keypad, a sinusoid signal, which is a sum of the lower frequency (f L ) and the higher frequency (f H ) is generated.Therefore, the DTMF tone signal generated corresponding to a certain pressed digit on the keypad is given by: where, A and B are amplitudes of the low and high frequency sinusoid tone signals respectively.For instance, the corresponding pair of low and high frequencies for digit 0 are (f L , f H ) = (941 and 1336 Hz), for digit 1 are (f L , f H ) = (697 and 1209 Hz), for digit 2 are (f L , f H ) = (697 and 1336 Hz), for digit 3 are (f L , f H ) = (697 and 1477 Hz) and fro digit 4 are (f L , f H ) = (770 and 1209 Hz).For simulation of the proposed designed system in MULTSIM, an op-amp voltage adder circuit is designed to produce the sum of the two sinusoid signals at the output of the op-amp (Getu et al., 2015).The output of the op-amap will produce the DTMF tone signal corresponding to the pressed digit at the transmitting phone device.

DTMF decoder circuit:
Once we achieved in generating the DTMF tone signal, the next step is to design a DTMF decoder circuit that is able to identify the individual DTMF tone signals.A four-pole active band pass filter based on the multiple feedback topology has been selected for this purpose as it is among the class of effective bandpass filters (Mancini, 2002).The four pole active bandpass filter is designed as a cascade connection of two second-order bandpass filters as presented in the general design procedures in Mancini (2002).The overall transfer function of the filter is given by: where, A mi , = The gain at the mid frequency of each partial filter Q i , = The pole quality factor of each filter α and 1/α = The factors by which the mid frequencies of individual filters f m1 and f m2 = Derive from the mid frequency f m , of the overall bandpass filter Equation ( 2) can be re-arranged and after some calculations, the four pole-transfer function can be written in compact form as: The factor α needs to be determined through the successive approximation of the equation: With a 1 and b 1 being the second order low pass coefficients of the desired filter type, which in this case is a filter of Butterworth type.For Butterworth type filter, a 1 = 1.4142 and b 1 = 1 and ∆Ω is the reciprocal of the quality factor defined as: where, Q bp is the quality factor of the overall four-pole active banddpass filter, f mu and f ml are the upper and the lower -3 dB cutoff frequencies of the overall bandpass filter.The bandwidth of the overall bandpass filter is the difference between the upper and the lower frequencies: The factor α is related to the upper, f m2 and the lower, f m1 mid frequencies of the individual second-order bandpass filters as follows: The individual pole quality factors, Q i , of the second order bandpass filters are the same and they are related to the overall quality factor Q bp as: The individual gain factors, A mi (at their corresponding mid frequencies f m1 and f m2 ) of the second order bandpass filters are also the same and they are related to the overall gain factor A m at the mid frequency f m as: We can get a polynomial equation that depends on α by multiplying both sides of (4) by 2 2 2 ) 1 ( + α α and further re-arranging.In the first step after multiplication, we have: After some computations and re-arranging similar terms, we reach to a final polynomial function of degree eight for the variable α and given as: (9) From ( 9), the roots of α can be easily determined using MATLAB polynomial function solver for a given a 1 , b 1 and ∆Ω parameters.There will be eight roots and a real root greater one is selected among the other roots to satisfy the frequency relations as given in (6).
For the purpose of filtering the DTMF frequencies, we used BW = 100 Hz for the higher DTMF frequencies (and a bandwidth of BW = 60 Hz for the low frequencies as selection of a higher bandwidth for the higher frequencies will provide a stable result compared with using the same bandwidth specifications for all DTMF frequencies.A four-pole active bandpass is designed based on the second order Multiple Feedback topology (MFB) bandpass filter circuit as shown in Fig. 2. For this topology, the required filter design parameters are given by: Mid frequency: The fourth order active bandpass filter for the center frequency f m = 697 Hz is constructed from the two second-order bandpass filters as shown in Fig. 3.The component parameters of each second order section can be calculated using the specifications and the design procedures as mentioned above.Using α = 1.0309, f m = 697 Hz and ( 6), the mid frequencies of the partial filters are f m1 = 676.10Hz MHz and f m2 = 718.55Hz.The Q i and A mi of the two second order bandpass filters can be calculated from ( 7) and ( 8) and the results are Q i = 16.4362 and A mi = -1.4149for i = 1, 2. Note that Q 1 = Q 2 and A m1 = A m2 .Afterwards, for a given capacitance value C, the rest of the resistance values of the overall filter are determined from the following relations: Assuming a capacitance value of C = 10 nF, the calculated resistance values are shown in Fig. 3.
The Bode plot of the transfer function given in (10) can be seen in Fig. 4. The plot is given as a function of the normalized frequency with respect to the center frequency f m = 697 Hz of the filter.As shown in the magnitude response, the -3dB points (f/f m = 0.958 and f/f m = 1.04) are approximately equal to the design  specifications: f ml = 667 Hz and f mu = 727 Hz as given above.
Table 1 shows the values of the resistances and α that are used for designing the four pole active bandpass filters used to decode the different DTMF frequencies.The resistance values are calculated for the overall gain of A m = 1 and the capacitance C = 10 nF as described above.Table 2 shows the transfer function numerator and denominator polynomial functions for the four-pole active bandpass filters used for the DTMF frequencies: where, N (s) and D (s) denote the numerator and denominator polynomial functions.
From MUTLISIM simulations, it was found that the active bandpass filter designed for a specific DTMF frequency is capable of satisfactorily passing (recognizing) a signal with this frequency and rejecting or passing with high attenuation the other frequencies.For example, if the DTMF signal for digit "0" is passed through all filters, the bandpass filters designed for center frequencies f m = 941 Hz and f m = 1336 Hz produce a sinusoid signal of frequency f m = 941 Hz and f m = 1336 Hz, respectively at their outputs.
Relay controlled dimmer circuit: Once the transmitted phone digits are recognized successfully from the DTMF decoder, the transmitted digit command will be used to activate a system of relays that in turn control the intensity level of the lighting system by connecting and disconnecting different resistance values.The relay switching contacts are connected to a TRIAC based light dimmer circuit and the relays are used to control the resistances that will be connected to the dimmer circuit, where the level of the light intensity of the dimmer circuit is controlled by varying the charging time Constant (RC) of a capacitor connected to the gate terminal of a dimmer circuit.In this design, we consider three relay switches to test and check the working of the overall system, Fig. 5 shows the TRIAC based dimmer circuit with the three relay switch contacts.
For the dimmer circuit shown in Fig. 5, V in is the input source voltage, R L is the load resistance, which simulates the lighting device (incandescent lamp, florescent lamp, LED, chandelier, etc.).The switches Relay 1, 2 and 3 are the three relay switch contacts that are controlled by the control command from the DTMF decoder circuit that recognizes the transmitted phone digits as discussed in the above section.The control command from the DTMF decoder circuit can be "logic 1" (HIGH Voltage).That closes on the relay switch contacts or "logic 0" (LOW or ideally zero voltage) that deactivates the relays and makes the relay contacts open.In this way, the resistances R 1 , R 2 and R 3 can be either connected or disconnected from the dimmer circuit according to the transmitted phone digits.We consider five cases: transmission of phone digit 0, 1, 2, 3 and digit 4, respectively.Let the open and closed states of relay contacts are logic 0 and 1, respectively and let the total resistance controlled by the relays at a given state is R, which can for example R 1 +R 2 +R 3 = 503.3kΩ when the relay 1 is closed (logic 1 state) and the two other relays are open (logic 0 state).Table 3 shows the relay states and the total resistance values for the different phone digit transmission cases.
When digit 0 is transmitted, we have a switched OFF lighting condition for the dimmer circuit.During the switched ON condition of the TRIAC, we have four different cases of lighting conditions.When digit 1 is transmitted, we have high total resistance (high RC time constant) and thus it takes more charging time for the capacitor to reach the level of TRIAC fully conducting state, which in this case the load gets minimum power or the lighting device gives the lowest level of light intensity or illumination.When digit 2 is transmitted, we have the contacts for Relay1 (Ry1) and Relay2 (Ry2) in the closed state and Relay 3 (Ry3) in the open state,  -------------------------------------------------Relay 2 (Ry2) --------------------------------------------------Relay 3 (Ry3) - -------------------------------------- 4 shows the truth table for the output condition of the three flip flops for the different cases of digit transmission.Q 1 , Q 2 and Q 3 are the outputs of the JK flip-flops used for relays 1, relay 2 and 3, respectively.As an example, when digit 0 is transmitted, all the relays are in switched OFF condition and hence (Q 1 = Q 2 = Q 3 = 0) and dark lighting condition for the dimmer circuit.When digit 1 is transmitted, only relay 1 (Q 1 = 1) is in switched ON and relay 2 and 3 are OFF (Q 2 = Q 3 = 0), which is the minimum lighting condition.Considering transmitted digit conditions for digits 0, 1, 2, 3 and 4 are represented by a logical symbol X 0 , X 1 , X 2 , X 3 and X 4 , respectively and using Table 4, the inputs to the three JK-flips are given as: Figure 6 shows the JK flip flop and the switching transistor circuit diagram that drives relay 1 and used in our MULTISIM simulation The transistor, T1, will be switched ON when the output of the JK flip flop, Q 1 = 1 (+15 V) and in this case, relay 1 will get activated and its switching contact in the dimmer circuit be in a CLOSED condition.When Q 1 = 0, the transistor T1 will be in a switched OFF state and the relay1 will be deactivated and the relay switching contact in the dimmer circuit be in an OPEN condition.Therefore, the relay 1 (EDR201A12) shown in Fig. 6 represents the relay switch that controls the dimmer circuit in Fig. 4. LED1 is used for the purpose of indicating the ON and OFF status of the relay.We have a similar circuit like Fig. 6 for relay 2 and 3 based on the inputs as given in ( 14) and ( 15).

RESULTS AND DISCUSSION
The working of the dimmer circuit is tested using MULTISIM for various digit transmission cases.The rms voltage of the input voltage is kept V in = 220 V. Figure 7 shows the load voltage (Channel B-blue color) and input voltage (channel A-red color) when digit 0 is transmitted and hence all the relays are OFF.As expected the load voltage is 0V as the TRIAC is in the OFF state.Note that for better visualization and comparison of the two channels simultaneously, channel A is shifted up by 500V and channel B is shifted down by the same amount in the display of the oscilloscope.Figure 8 to 11 show the cases of digit 1, 2, 3 and 4 transmissions respectively.The load voltage increases as expected in our theory and we get maximum light intensity in the case of digit 4 transmission.
Table 5 shows the summary of the load voltage, the firing angle, firing time for the five different cases that are found from MULTISIM simulations.The firing time is the time at which the capacitor gets charged to the  where, V in = The rms value of the input voltage (in the simulation V in = 220 V) t F = The firing time (firing angle, θ F = 2πt F /T) T = The period of the input signal (T = 20 msec for the simulations) Figure 12 shows the rms value of the load voltage variations as a function of the five cases of DMTF digit transmission.The load voltage (or the load power) increases as per our expectations in Table 3.The results of the simulation showed that an electronic system can be designed to provide different levels of light intensity and this system can be remotely controlled using DTMF based phone devices.

CONCLUSION
In this study, an electronic system is designed to control a remotely located electrical lighting system using DTM based phone devices.The different stages of the proposed system are designed based on discrete components, gates, flip flops and op-amps.The functionality of the overall electronic design is tested using MULTSIM simulation software and a desired level of light intensity can be achieved by sending an appropriate DTMF phone digit from a transmitting station.The system achieves proper electric power management, saves time and human power, resources and related costs required for not using a remote control system.The system and the overall design methodology can be adopted and used for remotely controlling of any home, industrial or commercial applications.

Fig. 1 :
Fig. 1: System block diagram for DTMF based lighting system controller

Fig. 2 :
Fig. 2: General architecture of a second order MFB filter Filter quality:C R f Q mi i 2 π =

Fig. 3 :
Fig. 3: The fourth order butterworth active bandpass filter based on the MFB toplogy for center frequency f m = 697 Hz

Table 4 :
Relay switching states corresponding to transmitted phone digits using and different inputs conditions of the JK flip flops Transmitted digit Relay 1 (Ry1) -

Fig. 6 :
Fig.6: Relay 1 driving circuit R = R 1 + R 3 = 336.3kΩ and the circuit provides a medium level of lighting.When digit 3 is transmitted; Ry1 and Ry3 are in the ON state and Ry2 in the OFF state, R = R 1 + R 2 = 170.3kΩ, the circuit provides the third level of lighting (over medium and lastly when digit 4 is transmitted; all relays are in the ON state, which means R = R 1 = 3.3 kΩ (lowest time constant) and the circuit provides the maximum lighting conditions.The firing angle (the time the TRIAC starts to be in a conduction state expressed in radians or degrees over one period) is highest when digit 1 is transmitted and lowest when digit 4 is transmitted.The switched ON and switched OFF state of the relays shown in Fig.5is achieved by a JK-flip flop and a transistor relay switching circuit that is a follow up of the DTMF decoder circuit.There are three flip flops corresponding to the three relays.Table4shows the truth table for the output condition of the three flip flops for the different cases of digit transmission.Q 1 , Q 2 and Q 3 are the outputs of the JK flip-flops used for relays 1, relay 2 and 3, respectively.As an example, when digit 0 is transmitted, all the relays are in switched OFF condition and hence (Q 1 = Q 2 = Q 3 = 0) and dark lighting condition for the dimmer circuit.When digit 1 is transmitted, only relay 1 (Q 1 = 1) is in switched ON and relay 2 and 3 are OFF (Q 2 = Q 3 = 0), which is the minimum lighting condition.Considering transmitted digit conditions for digits 0, 1, 2, 3 and 4 are represented by a logical symbol X 0 , X 1 , X 2 , X 3 and X 4 , respectively and using Table4, the inputs to the three JK-flips are given as: 4

Fig. 7 :
Fig. 7: Load voltage when all the relays are OFF (digit 0 transmission)

Table 5 :
Load voltage, current and firing angle for different digit transmission cases voltage required to make the TRIAC fully conducting when we look within the first half cycle of the input sinusoidal voltage.It is called the firing angle when this time is expressed in radians or degrees.These numerical results are approximately equal to the theoretical analysis of the dimmer circuit shown in Fig.5.That confirms the simulations.From theoretical analysis of the dimmer circuit, it can be shown that the rms value of load voltage (V L ) is given by: threshold