N/A
N/A
In household electrical systems, it is common to supply a wall outlet with electrical power through a wall switch positioned near an entryway. A lamp may then be plugged into the switched wall outlet. If the switch at the lamp is left on, the lamp can be turned on and off from the wall switch. This allows a person entering a dark room to turn on the lamp from the wall switch and avoids the need to search for the lamp switch in the dark.
Commonly, however, it is more convenient to turn the lamp off using the switch near the lamp. As a result, when the person leaves and later re-enters the room after dark, an attempt to turn on the lamp at the wall switch fails. Also, if the wall switch is turned off, the lamp cannot be turned on using the lamp switch. The bedside lamp illustrates the problem. While it is convenient to turn the lamp on using the wall switch when entering the room after dark, it is more convenient to use the switch near the lamp to turn the lamp off when retiring. As a result, in the morning when the room is well lit by daylight, the bedside lamp switch is typically left switched off. Thus at nightime when the room is reentered, the wall switch can't be used to turn the lamp on again.
It would thus be desirable to provide a switching device that can be used to control a lamp that is plugged into a switched outlet from either the wall switch or the lamp switch.
Various devices have been disclosed over the years to resolve this problem. Platzer (U.S. Pat. No. 3,872,319) requires two outlets, switched and un-switched, with local circuitry to provide the capability. Liang (U.S. Pat. No. 4,383,186) describes the use of relays to provide the various switching states but also suffers from the need to use two wall outlets to control a single lamp. Bennett (U.S. Pat. No. 5,574,319) overcomes the two outlet requirement by requiring the operator to flip the wall switch off and then on again for each desired change in lamp state. Bennett suffers from the additional problem that if the wall switch is left in the “off” state, the local switch cannot be used to turn the lamp on again. Logan (U.S. Pat. No. 6,710,553) provides a variation on Bennett that allows the original lamp switch to be used as the local switch, as well as providing an alarm if the wall switch is accidentally left in the “off” position.
The implementations of the above cited patents all have the disadvantages of either requiring two wall outlets or double actuation of the wall switch by a user. Moreover, if the user leaves the wall switch in the wrong state the lamp switch becomes inoperative. There is a continuing need to have a control device that allows for the simple actuation of a wall switch, does not require two electrical outlets, and has no failure modes.
This invention relates to electrical power control circuitry and more particularly to apparatus for controlling a lamp or other electrical load using either a remote wall SPDT switch or a local switch to control the power delivered to the load.
In accordance with the present invention, apparatus is provided for controlling a lamp or other electrical load that is connected to a wall socket under the control of a wall mounted switch. The state of the lamp (either on or off) is toggled when either the wall mounted switch is moved to its opposite position or the local switch associated with the controlling device is actuated. The local switch may be any one of a toggle switch, a pushbutton, or a touch switch. The apparatus includes control circuitry operative in response to a control signal from the wall switch or from the local switch.
The control signal from the wall switch is provided by the use of a break before make SPDT switch with both of its poles tied together. This creates a brief interruption to the flow of power to the wall socket, which is detected by the control circuit to change the lamp state. The control signal from the local switch is provided by a change in the switch state caused by manual actuation of the local switch.
In a further embodiment, the local switch may be used to control the brightness levels of the lamp, providing the equivalent of a three way bulb for the price of a simple bulb. As an alternative, the local switch may be used as a continuous dimmer control.
These and other objects, features and advantages of the invention will be more clearly understood by considering the following detailed description of a preferred embodiment of the invention. In the course of this description, frequent reference will be made to the attached drawings.
a and 3b show the flow chart of the operation of microprocessor implementing the control functions;
FIGS. 4 shows one physical package for the circuitry of
Referring to
Control device 105 is connected to wall outlet 103 via wall plug 104. Used in conjunction with wall switch 102, it provides the key mechanism for effecting the load control from either of the two locations. Power supply 110 provides low voltage DC power for the operation of the other circuits that make up control device 105.
AC timer 106 is used to detect the momentary power loss when wall switch 102 is actuated. It is reset with each zero crossing of the AC supply 101. For 60 Hz power, this occurs approximately every 8 milliseconds, or 10 milliseconds for 50 Hz power. As an alternative, it could be reset once each cycle, with periods twice as long as mentioned above. Timer 106 is set to expire with a period of approximately 10 milliseconds, so that an expiration of the timer indicates that wall switch 102 has been actuated.
An expiration signal from timer 106 is sent to power state register 107 which in turn controls load control 108 to deliver power to load 111. In the simplest embodiment, power state register has two states, ON and OFF, which cause load control 108 to deliver power, or not, respectively. Each time an expiration signal is received from timer 106, power state register 107 is toggled to its opposite state, thereby allowing wall switch 102 to control the power delivered to load 111. Load control 108 may be any one of a variety of electrically controlled power switches, for example, a relay or a solid state device such as a triac.
Local switch 109 provides the other mechanism for controlling power to the load. Each time it is actuated, power state register 107 toggles to its opposite state, controlling power to load 111 via load control 108. Local switch 109 may be any kind of switch, including pushbutton, toggle, rotary, touch, etc.
A mechanism must be provided such that power state register 107 retains its state during the power interruption caused by the actuation of wall switch 102. Typically this is done by having power supply 110 have sufficient capacitance to provide enough energy to the power state register 107 for the duration of the power interruption. As an alternative embodiment, power state register 107 can be built out of non volatile semiconductor memory, such as electrically erasable programmable read only memory (EEPROM) or flash memory.
In an alternative embodiment, power state register 107 may have more states than just two. For example, three brightness levels for a lamp may be achieved by assigning four states to power state register, representing off and three brightness levels. For this embodiment, load control 108 must be capable of delivering partial power, not just on or off. Details of how this control is effected will be described later in this detailed description.
Referring to
Power supply 110 is a conventional half wave rectified, capacitor filter supply of a design well known to those familiar with the art. Diode 201 rectifies the AC signal to DC, resistor 202 allows for a voltage drop from the high AC voltage to the low DC voltage (typically 3-5 volts), and capacitor 103 provides for energy storage and delivery during the half cycle of AC when diode 201 is not conducting as well as during the power interruption when switch 102 is actuated. Zener diode 204 provides voltage regulation.
Resistor 205 is a high value resistor that allows the microcontroller 211 to sense the zero crossings of the AC supply to reset the AC timer. As will be seen in a discussion of the software, this zero crossing signal will also be used to help implement the touch switch as well as to control the timing of an actuation signal to the triac 210 through resistor 209.
Resistors 207 and 206 as well as touch point 208 make up the touch switch. At each zero crossing of the AC supply a pulse will be put out on the TOUCH_OUT output of microcontroller 211 and sensed several microseconds later. If a person 212 is touching sense point 208, the RC delay of resistor 207 and the capacitance of person 212 (typically greater than 30 picofarads) will prevent the pulse from being sensed on input TOUCH_IN. If there is no person in contact with sense point 208, then the pulse will be sensed on input TOUCH_IN. This will be used to control the power to the load as described in the flowchart in
Triac 210 implements load control 108 in conjunction with microcontroller 211. Resistor 209 limits the flow of current through microcontroller 211.
The flowchart of
The PowerState variable represents the value of power to be delivered to the load. It takes on values 0, 1, 2, and 3 which represent off, one third, two thirds power, and full power, respectively.
The LastTouch variable is used to keep track of a person touching the terminal for the local switch which in the illustrated embodiment is a touch switch. The touch switch is sampled on each zero crossing of the AC line and an actuation is defined to occur when a person is touching the sense point and was not on the previous sample. LastTouch has the value 1 if the previous sample indicated a touch.
Step 301 waits for a zero crossing of the AC line. The subsequent steps depend on this synchronization event.
Steps 303 through 306 are used to detect an AC power interruption and change the power state appropriately upon such detection. Step 303 checks to see if the timer has expired. Since zero crossings occur approximately every 8 milliseconds and the timer is set to expire after 10 milliseconds, an expiration of the timer means that AC power had been lost and the program waited at step 301 for longer than a normal half cycle of the AC line. If the timer expires, the program goes to step 304 which checks to see if any power had been delivered to the load. If PowerState has any value but 0 , some power is present and the program turns the power in step 305 by setting PowerState to 0 . If PowerState has a 0 value, then power was off, and the program turns the power on in Step 306 by setting it to 3, for full power. As an alternative, the power can be configured to bring the power up at a value less than full power, if that was deemed preferable for some applications.
For the final handling of the power interruption algorithm, the timer is reset to its starting value in step 307.
Steps 308 through 314 deal with the handling of the touch switch. Steps 308 through 310 assert the TOUCH_OUT pin high, wait 5 microseconds, and then read the TOUCH_IN pin. If no one was touching the sense terminal, the TOUCH_IN pin will be high because it is driven by the TOUCH_OUT pin. If , however, a person is touching the terminal, the TOUCH_IN pin will read low because the short delay is not enough to allow the pin to become high, given the delay caused by resistor 207 and body capacitance of the person touching the sense terminal.
If a touch is sensed, the program goes to step 311 and checks whether the touch was present the last time through the loop. If so, then this is not the moment of initial touch, and no change is made to PowerState. If, however, it is the initial touch, then the PowerState variable is advanced to its next valid value in step 312. This causes successive touches on the sense terminal to advance the control device through all of the brightness levels, including off.
Steps 313 and 314 set the LastTouch variable to the current state of the sense terminal, so that it has a valid value for the next pass through the loop. Step 315 resets the TOUCH_OUT pin to be ready for the next cycle.
Step 316 disables control power to the triac at the zero crossing. This is in preparation for the following steps.
Steps 317 through 320 control the power delivered to the load by triac 210 in accordance with the value of the PowerState variable. The power control employs a phase control mechanism, which itself is well known to those familiar with the art. A more detailed description of how triac phase control works may be found, as an example, in Teccor Electronics document AN1003, “Phase Control Using Thyristors”, 2002. A simple summary for the purposes of this description is that the power delivered to the load is a function of the delay from AC zero crossing at which the triac is turned on. The longer the delay, the less power is delivered to the load.
Step 317 checks the value of PowerState. If 0, no power should be delivered, and the program goes back to step 301 to wait for the next zero crossing of the AC line.
If PowerState is 1, then we wish to deliver one third power to the load and this is accomplished by waiting approximately 60% of the half cycle before turning on the triac. For a 60 Hz line, this is about 5 milliseconds. Step 318 implements this.
If PowerState is 2, step 319 sets a delay of 3.5 milliseconds.
If PowerState is 3, full power requires that the triac be turned on without appreciable delay.
Steps 320 activates the triac to deliver power to the load.
Although the preferred embodiment described above shows a four state power level system, it should be apparent to those skilled in the art that modified embodiments can provide either more or fewer power levels.
It will be recognized that any of the package configurations shown in