Abstract:
A power on/off control system includes a microcontroller, a setting module connected to the microcontroller, a photoelectric coupler connected to the microcontroller, and a relay connected to the microcontroller. The setting module is used to set parameters, and the parameters include a power-on time and a power-off time. The relay is used to receive alternating current and connected to an electronic device. When the power-on time is ended, the microcontroller is used to send a power-off signal to the photoelectric coupler for turning on the relay, and the relay stops supplying power to the electronic device. When the power-off time is ended, the microcontroller is further configured to send a power-on signal to the photoelectric coupler for turning off the relay, to supply power for the electronic device. The disclosure further offers a power on/off control method.

Description:
BACKGROUND 
       [0001]    1. Technical Field 
         [0002]    The present disclosure relates to power on/off control systems, and particularly to a power on/off control system and a power on/off control method for an electronic device. 
         [0003]    2. Description of Related Art 
         [0004]    Nowadays, electronic devices, such as computers, mobile phones, are used in daily life. Sometimes, the electronic devices need to be powered on or powered off in turn, and it laborious and tired in manual work. Therefore, there is room for improvement within the art. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0005]    Many aspects of the embodiments can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the embodiments. Moreover, in the drawings, like-reference numerals designate corresponding parts throughout the several views. 
           [0006]      FIG. 1  is a block diagram of a power on/off control system in accordance with an embodiment. 
           [0007]      FIG. 2  is a detailed circuit diagram of a power supply module of the power on/off control system of  FIG. 1 . 
           [0008]      FIG. 3  is a detailed circuit diagram of a control module of the power on/off control system of  FIG. 1 . 
           [0009]      FIG. 4  is a detailed circuit diagram of a displaying module of the power on/off control system of  FIG. 1 . 
       
    
    
     DETAILED DESCRIPTION 
       [0010]    The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.” 
         [0011]      FIG. 1  illustrates a power on/off control system in accordance with an embodiment. The power on/off control system comprises a power supply module  10 , a control module  20  connected to the power supply module  10 , and a displaying module  30  connected to the control module  20 . 
         [0012]      FIG. 2  illustrates the power supply module  10  of the power on/off control system in accordance with an embodiment. The power supply module  10  comprises transformer  11 , a rectifier bridge  12  connected to the transformer  11 , a first stabilized voltage supply  13  connected to the rectifier bridge  12 , and a second stabilized voltage supply  14  connected to the first stabilized voltage supply  13 . The transformer  11  is used to receive a 220V alternating current (AC). The rectifier bridge  12  comprises four connecting terminals  120 ,  121 ,  122 ,  123 . The connecting terminals  120 ,  121  are connected to the transformer  11 . The connecting terminal  122  is grounded. The connecting terminal  123  is connected to an input terminal of the first stabilized voltage supply  13 . The connecting terminal  123  is further connected to a first capacitor C 1  and a second capacitor C 2 . A first terminal of the first capacitor C 1  is connected to the input terminal of the first stabilized voltage supply  13 , and a second terminal of the first capacitor C 1  is grounded. A first terminal of the second capacitor C 2  is connected to the input terminal of the first stabilized voltage supply  13 , and a second terminal of the second capacitor C 2  is grounded. A ground pin of the first stabilized voltage supply  13  is grounded. 
         [0013]    An output terminal of the first stabilized voltage supply  13  is connected to an input terminal of the second stabilized voltage supply  14 . A first terminal of a third capacitor C 3  is connected to the output terminal of the first stabilized voltage supply  13 , and a second terminal of the third capacitor C 3  is grounded. A first terminal of the fourth capacitor C 4  is connected to the output terminal of the first stabilized voltage supply  13 , and a second terminal of the fourth capacitor C 4  is grounded. The output terminal of the first stabilized voltage supply  13  is connected to a positive of a diode D 1  via a resistor R 1 , and a negative of the diode D 1  is grounded. 
         [0014]    A first terminal of a fifth capacitor C 5  is connected to the input terminal of the second stabilized voltage supply  14 , and a second terminal of the fifth capacitor C 5  is grounded. A first terminal of a sixth capacitor C 6  is connected to the input terminal of the second stabilized voltage supply  14 , and a second terminal of the sixth capacitor C 6  is grounded. A first terminal of a seventh capacitor C 7  is connected to the output terminal of the second stabilized voltage supply  14 , and a second terminal of the seventh capacitor C 7  is grounded. A first terminal of an eight capacitor C 8  is connected to the input terminal of the second stabilized voltage supply  14 , and a second terminal of the eighth capacitor C 8  is grounded. The output terminal of the first stabilized voltage supply  14  is connected to a positive of a diode D 2  via a resistor R 2 , and a negative of the diode D 2  is grounded. The transformer  11  is used to change the 220V AC to a 12V AC. The rectifier bridge  12  is used to change the 12V AC to a 16V direct current (DC). The first stabilized voltage  13  is used to change the 16V DC to a 12V DC. The second stabilized voltage  14  is used to change the 12V DC to 5V DC. 
         [0015]      FIG. 3  illustrates the control module  20  of the power on/off control system in accordance with an embodiment. The control module  20  comprises a microcontroller  21 , a switch device  22  is connected to the microcontroller  21 , and a setting module  23  is connected to the microcontroller  21 . The pin P 3 . 5  of the microcontroller  21  is grounded via a switch K 1  and is further connected to the 5V DC via a resistor R 4 . The pin P 3 . 6  of the microcontroller  21  is grounded via a switch K 2  and further connected to the 5V DC via a resistor R 5 . The pin P 3 . 7  of the microcontroller  21  is grounded via a switch K 3  and further connected to the 5V DC via a resistor R 6 . The pin EA of the microcontroller  21  is connected to the 5V DC. The pin RST of the microcontroller  21  is connected to a first node  24  via a resistor R 7 . The first node  24  is connected to the 5V DC via a ninth capacitor C 9  and further connected to the 5V DC via a switch K 4 . The first node  24  is grounded via a resistor R 8 . The pin XTAL  2  is connected to a tenth capacitor C 10 , and the tenth capacitor C 10  is grounded. The pin XTAL  1  is connected to an eleventh capacitor C 11 , and the eleventh capacitor C 11  is grounded. A quartz oscillator  25  is connected to the pin XTAL  1  and the pin XTAL  2 . 
         [0016]    The switch device  22  comprises a photoelectric coupler  220  and a relay  221  connected to the photoelectric coupler  220 . The positive of the light-emitting diode (LED) of the photoelectric coupler  220  is connected to a pin P 1 . 3  of the microcontroller  21  via a resistor R 3 . The negative of the LED of the photoelectric coupler  220  is grounded. The emitter of a phototransistor of the photoelectric coupler  220  is grounded. The collector of the phototransistor of the photoelectric coupler  220  is connected to a first terminal of the relay  221 , and a second terminal of the relay  221  is connected to the 12V DC. A first terminal  223  of each switch  222  of the relay  221  is connected to AC (not shown), and a second terminal  224  of each switch  222  of the relay  221  is connected to an electronic device (not shown), such as a computer. 
         [0017]      FIG. 4  illustrates the displaying module  30  of the power on/off control system in accordance with an embodiment. The displaying module  30  comprises a display  31 . The pin VSS of the displayer  31  is grounded. The pin VDD of the displayer  31  is connected to a 5V DC. The pins RS, RW, E of displayer  31  are connected to the pins P 1 . 0 , P 1 . 1 , P 1 . 2  of the microcontroller  21 , respectively. The pins D 0 , D 1 , D 2 , D 3 , D 4 , D 5 , D 6 , D 7  of the displayer  31  are connected to the pins P 2 . 0 , P 2 . 1 , P 2 . 2 , P 2 . 3 , P 2 . 4 , P 2 . 5 , P 2 . 6 , P 2 . 7  of the microcontroller  21 , respectively. 
         [0018]    In use, when the switch K 1  is pressed, the pin P 3 . 5  of microcontroller  21  is grounded via the switch K 1 , and the control module  21  is located in a setting mode. Thus, the parameters, comprising a conduction time (ON), a power-off time (OFF), a power on/off time (CY), and a total of the power on/off time (PCY) of the displayer  31 , can be set by the displayer  31 . A value of each parameter can be set in a range of 0000-9999. The switch K 1  is pressed repeatedly, and the order of the ON-OFF-CY-PCY can be changed. The switch K 2  is pressed, the pin P 3 . 6  of the microcontroller is grounded via the switch K 2 . The parameters can be set repeatedly 0-9 times via pressing the switch K 2 . The switch K 3  is pressed, the pin P 3 . 7  of the microcontroller is grounded via the switch K 3 . When the parameters are set, the conduction time (ON) is completed by the switch K 3 , and a high level ‘1’ is output by the pin P 1 . 3  of the microcontroller  21 . The LED of the photoelectric coupler  220  is lit, so that the phototransistor of the photoelectric coupler  220  is switched on. Thus, a coil of the relay  221  is powered on to generate magnetism, to turn on the switch  27  of the relay  221 . The OFF is completed by the switch K 3 , and a low level ‘0’ is output by the pin P 1 . 3  of the microcontroller  21 . The LED of the photoelectric coupler  220  stopping lighting, so that the phototransistor of the photoelectric coupler  220  is switched off. Thus, the coil of the relay  221  is powered off, and magnetism is not in the relay  221 , to turn off the switch  27  of the relay  221 . At this time, the electronic device is powered off to count the OFF. When the ON is set, a low level ‘0” is output by the microcontroller  21 , and the relay  221  stops supplying power to the electronic device and start the OFF. When the OFF is set, a high level ‘1” is output by the microcontroller  21 , and the relay  221  supplies power to the electronic device and start the ON. The ON and the OFF are set repeatedly, until the total of the PCY is equal to a predetermined total of the PCY. 
         [0019]    It is to be understood, however, that even though numerous characteristics and advantages have been set forth in the foregoing description of embodiments, together with details of the structures and functions of the embodiments, the disclosure is illustrative only and changes may be made in detail, especially in the matters of shape, size, and arrangement of parts within the principles of the disclosure to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.