[0001] This invention relates to electrical switches.
[0002] The background to the invention will be described in relation to switches for the
control of AC mains lamps. It will be readily understood, however, that the invention
is applicable in other fields.
[0003] It is common for lamps to be controlled from two switches so that, for example, a
hall light can be turned on and off by either of two switches, one in the hall, the
other on a landing on the floor above. The switches operate co-operatively so that
either can switch the light on and either can switch it off.
[0004] There are occasions when it would be desirable for the lamp to be controlled by more
switches, for example a switch at both ends of the hall and another on the landing
above. To achieve that using conventional switches involves complicated wiring and
the use of two two-way switches and one or more intermediate switches.
[0005] Some electronic switches provides switching at more than one location by connecting
a number of switches to a "controller" which takes the inputs from the various switches
and provides the output to control the light. This is expensive and involves more
wiring.
[0006] Other electronic switches provide switching at more than one location by providing
a 'Master' switch and 'Slave' switches. The Master switch provides the output to control
the light and takes inputs from the various slave switches. This is also expensive
and involves more wiring.
[0007] Against this background, in accordance with the invention there is provided an electrical
switch for AC, for connection in parallel with others of the same kind, comprising:
an operating member, a controlled switching device and a controller for controlling
the time in a cycle from which the switching device conducts, the controller being
responsive to the voltage across the switching device to detect a time in a cycle
from which the switching device in one of the parallel switches conducts so as to
determine whether all parallel switches are idle, that another switch is on, or when
it is itself on that another switch has been operated;
and when all parallel switches are idle being responsive to an operating signal
produced by operation of the operating member to perform an on function causing the
switching device to conduct from a first set time within the cycle then being responsive
to a subsequent operating signal to cause the switching device not to conduct, or
to the determination that another switch has been operated to cause the switching
device not to conduct; when another parallel switch is on, being responsive to the
operating signal to cause the switching device to conduct from a second set time in
advance of the first and to perform an off function. Installation of the switches
is simple since they need only to be connected in parallel at the switch or the light
fitting. Each switch can then both turn on the light or turn it off independently.
[0008] Preferably, during the on function and/or the off function, the switching device
is controlled to gradually increase the conduction period during the cycle.
[0009] In order to provide a dimmer function, the increase or decrease is provided for a
time corresponding to the time for which the operating member is operated.
[0010] In another form, the operating member is a movement sensitive switch which produces
a operating signal when movement is detected, the controller acting to operate the
off function when movement has not been detected for a predetermined period.
[0011] Preferably, the operating member is a touch pad. In other arrangements the operating
member is a passive infra red movement sensor, light level sensor, infra red communication
link (i.e. as in infra red remote control), wireless, e.g. radio or optical receiver
etc.
[0012] The first and second set times are preferably defined by a phase locked loop.
[0013] The phase locked loop preferably has a digital oscillator and a digital phase detector.
[0014] Embodiments of the invention will now be described, by way of example, with reference
to the accompanying drawings, in which:
Figure 1 is a state diagram of a switch embodying the invention;
Figure 2 is an exploded pictorial view of the switch of Figure 1;
Figure 3 is a circuit diagram of a control module and switching device of the switch
of Figure 1;
Figure 4 is a circuit diagram of an operating member of the switch of Figure 1; and
Figure 5 is a detail of the waveform across the switching device of the embodiment
of Figure 1.
[0015] Referring to the drawings and in particular Figure 3, AC mains supply to a lamp (not
shown) is switched by a switching device in the form of pair of back to back thyristors
2 in series with a choke 3 between a live terminal 4 and a load terminal 6. The point
at which the thyristors fire in the cycle is controlled by a controller in the form
of a micro controller 8 and associated circuitry. A half wave rectifier 10 supplies
power to the controller 8 on lines 12 and 14. When power is first applied, a transistor
Q1 is off and input to the master reset pin 4 of the controller 8 is logically low.
This prevents the micro controller from starting up when the supply voltage is low.
As the voltage rises above the breakdown voltage of zener diode D3, The transistor
Q1 conducts pulling the voltage at pin 4 to VDD allowing the micro controller to start
functioning. This happens when the supply voltage is about 5 V. As a part of the start
up routine pin 3 is programmed as an output and logical low. The values of resistors
R6 and R8 are chosen so that transistor Q1 remains on until the supply voltage falls
to about 2.5 V. If the voltage falls below this threshold transistor Q1 stops conducting,
so that the input at pin 4 becomes low and the micro controller shuts down. Temperature
sensing is provided by a thermistor 15 in series with a resistor R5. The node between
the thermistor and resistor R5 is connected to pin 7 of the controller 8 which switches
off when the temperature exceeds a value set by the thermistor and resistor R5
[0016] During operation an AC reference signal is applied to pin 5 of the controller via
resistors R1, R2 and R3. A signal emitted by an operating member, e.g. a touch pad
is fed from a connector 16 to pin 2 of the controller 8. Pin 6 of the controller supplies
a signal correctly phased to trigger the thyristors 2.
[0017] One of the functions of the controller 8 is to provide a digital phase locked loop,
phase locked to the AC mains, and by which four points T0 to T6, are set (see Figure
2).
[0018] In the following phase lock loop routine, the variable TMRO is a number stored by
a counter which is incremented by an oscillator; FILL is a number which determines
the number of times a FILL or dummy subroutine executes; OSCCAL is a number which
sets the frequency of the oscillator; and HALFTIME is a number which is a constant
corresponding closely to a half cycle.
| 1 |
INITIALISE |
|
| 2 |
SET TMRO = 0 |
|
| 3 |
SET FILL = Y |
|
| 4 |
SET OSCCAL = 0 |
|
| 5 |
SET HALFTIME = X |
|
| 6 |
FIRST STEP LOCK |
|
| 7 |
Has a 0-1 transition of the mains taken place? |
|
| 8 |
If yes goto 9, if not goto 7 |
|
| 9 |
IS TMRO = HALFTIME? |
|
| 10 |
IF YES goto 11, if no goto 9 |
|
| 11 |
RUN FILL SUBROUNTINE |
|
| 12 |
SET TMRO = 0 |
|
| 13 |
Has a 0-1 transition of the mains taken place? |
|
| 14 |
If yes goto 15, if not goto 13 |
|
| 15 |
IS TMRO > HALFTIME |
|
| 16 |
If yes goto SECOND STEP LOCK, if no goto 17 |
|
| 17 |
Increment OSCCAL |
|
| 18 |
RUN FILL SUBROUNTINE |
|
| 19 |
SET TMRO = 0 |
|
| 20 |
Goto 9 |
|
| 21 |
SECOND STEP LOCK |
|
| 22 |
RUN FILL SUBROUNTINE |
|
| 23 |
SET TMRO = 0 |
|
| 24 |
IS TMRO = HALFTIME? |
|
| 25 |
IF YES goto 26, if no goto 24 |
|
| 26 |
RUN FILL SUBROUNTINE |
|
| 27 |
SET TMRO = 0 |
|
| 28 |
Has a 0-1 transition of the mains taken place? |
|
| 29 |
If yes goto 30, if not goto 28 |
|
| 30 |
Is TMRO > HALFTIME? |
|
| 31 |
If yes goto 32, if no goto 33 |
|
| 32 |
Increment FILL, goto 34 |
|
| 33 |
Decrement FILL, goto 35 |
|
| 34 |
If FILL > FILLmax goto 36, if not goto 22 |
|
| 35 |
If FILL < FILLmin goto 39, if not goto 22 |
|
| 36 |
Let FILL = Y |
|
| 37 |
Decrement OSCCAL |
|
| 38 |
Goto 22 |
|
| 39 |
Let FILL = Y |
|
| 40 |
Increment OSCAL |
|
| 41 |
Goto 22 |
|
[0019] Starting from an all idle state 20 in which all switches are off, in step 22 the
controller continuously monitors the voltage on pin 5 during each positive half cycle.
As long as all switches are off, or idle, the voltage V across the switching device
is normal mains voltage, i.e. V > 0, and towards the end of the positive half the
controller returns to the all idle state 20. In the event that another switch becomes
active, the voltage across the switching device is zero, i.e. V = 0, and the controller
keeps a record of the time, i.e. T5, and passes to step 32.
[0020] When in the all idle state the switch's own touch pad is operated (touched) in step
24, the controller passes to test state 25 on function state 26 and prepares to turn
on at T5 in the next cycle. Immediately before turning on the switching device at
T5, i.e. at T4, the controller will monitor the voltage on pin 5 and will proceed
to on function 26 to turn on the switching device only if the voltage is not zero,
i.e. V > 0, indicating no other device is on. If the voltage is zero, then the controller
passes to step 32. The time in the on function when the switching device 2 conducts
in the cycle is T5. T5 is a variable determined by the on function or by a dimmer
function and lies between T2 and T6, in Fig. 5. T2 and T6 are fixed positions within
the positive cycle. The on function could be a gradual increase or decrease in the
value of T5 in one alternative, or T5 could remain in one fixed time in another. In
either eventuality this turn on time in the positive half cycle is reflected in the
negative half cycle.
[0021] In each positive half cycle, the controller 8 now tests the voltage on pin 5 at T2.
If the voltage were zero, this would be a signal that another switch had been operated.
If V > 0 the controller returns to state 26. This cycle continues, unless interrupted,
completing the on function, when the following half cycles will all fire at T5 = T3.
[0022] If the touch pad is operated again at step 30 when the controller is in the state
26, the controller passes to an off function state 32 in which the conducting time
in a cycle of the switching device is reduced to zero, either immediately or over
a time period. The controller then returns to the all idle state 20.
[0023] If the voltage in step 22 or step 28 is found to be equal to zero, V = 0, the controller
passes to an idle with lamp on state. Thus, from step 22 the controller which is idle
notices that another switch is on. From step 28, the switch which turned the lamp
on notices that another switch has been operated and itself stops controlling the
lamp, leaving it under the control of the newly operated switch.
[0024] If when in the idle with lamp on state 32 the switch's touch pad is operated at step
34, the controller passes to state 36 in which the switching device is turned on at
T4 which comes before T5 in a positive half cycle, to let the switch which is controlling
the lamp know, operates the turn off function and the controller returns to the all
idle state.
[0025] A connector 40 mates with the connector 16 in Figure 3 to receive power on pins 2
and 4. Power on pin 2 is fed back to Figure 3 on pin 1 via the series connected LEDs
D1, D2 and D3. The LEDs are used to illuminate the switch so that it can be located
in the dark. R5 is connected between pins 2 and 3 and a series of high value resistors
R1, R2, R3 is connected between a touch pad 42 and pin 3. When there is no touch on
the touch pad, pin 3 of the connector 16 and 40, and thus pin 2 of the controller
8 are at -5V due to the effect of R5. Touching the touch pad 42 pulls the voltage
to OV at the time when the controller 8 samples the input at pin 2.
[0026] Referring to Figure 2 the physical realisation of the embodiment is illustrated.
An insulating box 50 contains two printed circuit boards 52 and 54. The board 52 constitutes
the circuit shown schematically in Figure 3 and incorporates wire terminals 4 and
6 accessible through slots 56 in an end wall 58 of the box. The board 52 is contained
in one side of the box 50 and closed by a cover not shown. The board 54 constitutes
the circuit shown schematically in Figure 4 and is accommodated by a recess 60 in
the other side of the box 50. The connectors 16 and 40 communicate through a slot
62. This side of the box is closed by an insulating cover 64 which supports a metallic
touch pad 66 connected by a conducting spring 68 to a conducting area 70 on the board
54.
[0027] In another embodiment the controller has an on function which gradually increases
the brightness of the lamp as long as the touch pad is touched. If the touch pad ceases
to be touched before the lamp is fully bright, the controller maintains the level
of brightness at which touch ceased. Similarly the off function gradually decreases
the brightness of the lamp as long as the touch pad is touched. When the touch pad
ceases to be touched before the lamp is fully off, the controller maintains the level
of brightness at which touch ceased.
[0028] In yet another embodiment, the operating member is a passive infra red movement detector
(PIR). Each movement produces an operating signal to pin 2 of the controller 8 which
acts to maintain the lamp on as long as movement is detected within a predetermined
period from the last detected movement.
[0029] Generally, there are a number of different functions which may be performed by the
operating number. Examples are:
Touch ON Touch OFF
[0030] If the switch, or another switch, is active, activating the touch pad will turn it
off. The switch will perform this function by "grabbing" control of the circuit, perform
a blink (to indicate it has started to turn it off) and then starts ramping down the
light towards switch off.
[0031] If the circuit is inactive, i.e. all switches are off, then activating the touch
pad will turn it on. The switch will simply ramp up the light level from a minimum
level to the maximum level gradually.
Time Lag
[0032] If the switch, or another switch, is active, by activating the touch pad the switch
will immediately "grab" control of the circuit, ramp up the light level gradually
from what ever level it was to a maximum level and starts the count for the timer.
When the timer has reached a preset time, the light will blink to indicate that the
end of the timed period and then starts ramping down the light towards switch off.
[0033] If the circuit in inactive, i.e. all switches are off, then activating the touch
pad will turn it on. The switch will simply ramp up the light level from a minimum
level to the maximum level gradually and starts the count for the timer. When the
timer has reached a preset time, the light will blink to indicate that the end of
the timed period and then starts ramping down the light towards switch off.
[0034] When the switch is already active when the touch pad is activated, the count for
the timer will be re-started. Should the touch pad be operated again within 1 second,
then the light will blink to indicate that the timed period is doubled.
Touch Dimmer
[0035] If the switch, or another switch, is active, activating the touch pad momentarily
will turn it off. The switch will perform this function by "grabbing" control of the
circuit, perform a blink (to indicate it has started to turn it off) and then starts
ramping down the light from its present level (i.e. whatever level it was at) towards
switch off.
[0036] If the circuit is inactive, i.e. all switches are off, then activating the touch
pad momentarily will turn it on. The switch will simply ramp up the light level from
a minimum level to the preset light level gradually.
[0037] If the touch pad is activated for longer than one second then the light will ramp
up (or down) gradually toward maximum, stays there for one second and starts to ramp
down towards minimum, stays there for one second and starts to ramp up towards maximum
and the sequence is repeated until such a time the touch pad is de-activated (i.e.
not touched). Whatever the light level was becomes the preset light level for that
switch.
PIR Sensor
[0038] In this implementation, the touch pad is replaced by a PIR sensor with daylight sensing
facility. When the ambient light level is above a set level, the output is maintained
at a high level and when the ambient light level is below that of a set level, the
output is maintained at a low level. When a movement is detected, the output changes
between levels and settles eventually to the level determined by the ambient light
level. The microcontroller will determine when to react to the input signal from the
PIR sensor, a "movement" is deemed to be detected if there are more than two transitions
within a given period (to cut out false triggering), will turn on the light when the
ambient light level is below a given threshold, once turned on, it will remain on
until a timed period has expired, the timed period will be re-started if triggered
again while active, it will dimmed gradually down to idle at the end of the timed
period, it will ramps up slowly to full power when activated.
1. An electrical switch for AC, for connection in parallel with others of the same kind,
comprising: an operating member, a controlled switching device and a controller for
controlling the time in a cycle from which the switching device conducts, the controller
being responsive to the voltage across the switching device to detect a time in a
cycle from which the switching device in one of the parallel switches conducts so
as to determine whether all parallel switches are idle, that another switch is on,
or when it is itself on that another switch has been operated;
and when all parallel switches are idle being responsive to an operating signal
produced by operation of the operating member to perform an on function causing the
switching device to conduct from a first set time within the cycle then being responsive
to a subsequent operating signal to cause the switching device not to conduct, or
to the determination that another switch has been operated to cause the switching
device not to conduct; when another parallel switch is on, being responsive to the
operating signal to cause the switching device to conduct from a second set time in
advance of the first and to perform an off function.
2. A switch as claimed in claim 1, in which during the on function and/or the off function,
the switching device is controlled to gradually increase/decrease the conduction period
during the cycle.
3. A switch as claimed in claim 2, in which the increase or decrease is provided for
a time corresponding to the time for which the operating member is operated.
4. A switch as claimed in claim 2, in which the operating member is a movement sensitive
switch which produces a operating signal when movement is detected, and the controller
acting to operate the off function when movement has not been detected for a predetermined
period.
5. A switch as claimed in any of claims 1 to 3, wherein the operating member is a touch
pad.
6. A switch as claimed in any preceding claim, wherein the first and second set times
are defined by a phase locked loop.
7. A switch as claimed in claim 6, wherein the phase locked loop has a digital oscillator
and a digital phase detector.