PROXIMITY SENSOR DIMMING CONTROL FOR A LIGHT
Field of the Invention
The present invention relates to a controller for a light, a lamp and a method of controlling a light. In particular, the invention relates to an apparatus and method for controlling a light according to the detected movement of an object such as a user's hand.
Background of the Invention Lights are conventionally controlled using one or more manually operated controllers such as mechanically operated switches or knobs. These controllers can be incorporated within the housing of the light or alternatively within a housing separate from the light.
Remote methods of controlling lights are also known. For example, security lights conventionally detect the presence of a person using a passive infrared detector. The presence of a person usually triggers the security light to turn on for a predetermined time period.
It is desirable to provide for a remote method of controlling a light which can provide for a greater degree of control, such as may be required for active control of a lamp, rather than the passive control required in a security light environment. Our co-pending British patent application No. 0323076.0 discloses a lamp in which switching is carried out by detection of an infra-red beam being broken when a user's hand is inserted into a predetermined space.
Summary of the Invention
The present invention aims to provide for a more flexible control method. According to a first aspect of the present invention there is provided a controller for a light, comprising means for detecting an object and control means for providing a control signal for controlling the light in response to a change in the location of a detected object.
The controller is therefore capable of controlling the light not simply in response to detecting the presence of an object, but rather in response to movement of that object once it has been detected.
The control signal can be operable to control the brightness of the light in response to a change in distance between the detected object and the detecting means.
The control signal can be operable to switch the on/off state of the light in response to a change in location of the detected object from a detectable location to an undetectable location.
The controller can comprise location measuring means operable to perform first and second successive measurements each indicative of the location of the detected object, wherein the control signal is operable to control the light in response to a difference between the first and second measurements.
The difference between the first and second measurements can, for instance, be that the detected object is not detected by the second measurement. Alternatively, the difference can be a difference in the magnitude of the first and second measurements.
The control signal can be operable to switch the on/off state of the light in the event that the time interval between the first and second measurements is greater than a first predetermined time period. The first predetermined time period can be approximately 40ms.
This first predetermined time period is used so that the on/off state of the light is switched in the case that a detected object is detected for longer than a brief time. Objects only detected over a short time interval can be indicative of erroneous measurements or for example, insects such as moths that pass only transiently through the detection area.
The control signal can be operable to switch the on/off state of the light in the event that the time interval between the first and second measurements is less than a second predetermined time period. The second predetermined time period can be approximately 0.6 seconds.
This second predetermined time period, for instance, enables the controller to provide a control signal to control the light in a different manner to controlling the on/off state of the light after the second predetermined time period has elapsed.
The control signal can be operable to control the brightness of the light in the event that the time interval between the time that the detected object is first detected and the time of a subsequent detection of the detected object is greater than a third predetermined time period. The third predetermined time period can be equal to the second predetermined time period.
Having the third predetermined time period set equal to the second predetermined time period enables the controller to operate such that objects detected for a shorter time than the second predetermined time period can result in a first manner of control of the light and objects detected for a longer time than the second predetermined time period can result in a second manner of control of the light.
The control signal can be operable to decrease the brightness of the light in response to the location of the detected object indicated by the first measurement being further from the detecting means than the location of the detected object indicated by the second measurement and increase the brightness of the light in response to the location of the detected object indicated by the first measurement being closer to the detecting means than the location of the detected object indicated by the second measurement. Operation in the opposite manner is also envisaged.
The controller can comprise comparing means for comparing each of the first and second measurements with one or more predetermined thresholds to determine whether the first and second measurements indicate that an object is detected. The
comparing means may be further operable to compare the first measurement with the second measurement to determine the change in the location of the detected object.
The detecting means can comprise an object detector for receiving a measurement signal reflected from the detected object. The controller can further comprise an emitter for providing the measurement signal, the emitter can comprise an infrared light emitting diode and the object detector can comprise an infrared photodiode arranged, for example, in a reverse leakage photocurrent mode.
The light emitting diode can be powered by a capacitor that is charged and discharged through first and second switching means. Powering the emitter in this way can avoid drops in the power available to other circuit components when the emitter is activated.
The controller can further comprise an ambient detector for detecting ambient emissions and signal processing means for adjusting the output signal of the object detector in response to the output signal of the ambient detector. Ambient emissions can add noise to measurements and therefore the ambient detector can aid noise removal from measurements.
The signal processing means can comprise a differential amplifier arrangement comprising a plurality of operational amplifiers arranged so as to amplify received signals by approximately a factor of 100.
The controller can further comprise reference measuring means operable to perform a reference measurement indicative of a difference between the output signal of the object detector and the output signal of the ambient detector caused by signals other than the measurement signal.
The signals other than the measurement signal can be noise signals that are not detected by the ambient detector. The reference signal is therefore indicative of the common error between the object detector and the ambient detector. The reference
measurement can, for instance, be performed at a time when the measurement signal is not being provided.
The controller can further comprise means for adjusting the first and second measurements in response to the reference measurement.
The controller can further comprise a lens arrangement in association with the object and ambient detectors, wherein the ambient detector is positioned at a position other than a focal point of the lens arrangement.
The controller can comprise means for adjusting the first and second measurements in accordance with a calibration signal corresponding to an object detected as being stationary. The controller can also comprise means for continually adjusting the calibration signal in response to successive measurements indicative of the detected stationary object.
The controller can therefore be capable of filtering a signal caused by a stationary object, for instance a ceiling under which the detecting means is located, from the first and second measurements. This can make the controller less likely to confuse stationary objects with detected objects that are genuinely required to control the light.
The controller can comprise a memory for storing a brightness value indicative of a brightness level of the light. The memory can also be configured to store an indication of the on/off state of the light.
The control signal can be operable to adjust the brightness level of the light to the stored brightness value when the light is switched on.
The memory can be a non-volatile memory. This enables the memory to retain stored brightness levels and/or on/off states even when the power to the controller is disconnected.
A lamp including a controller according to the invention can comprise a socket for receiving a light source, wherein the socket can be tilted so that when received in the socket, the light source points away from the detecting means. Tilting the light source can help to reduce the amount of infrared light emitted from the light source that is detected by the detecting means.
According to the present invention there is further provided a method of controlling a light, the method comprising detecting an object and providing a control signal for controlling the light in response to a change in the location of the detected object.
Brief Description of the Drawings
To aid understanding of the invention, embodiments thereof will now be described, purely by way of example, with reference to the accompanying drawings in which:
Figure 1 illustrates a lamp including a controller according to the present invention;
Figure 2 is a block diagram of the electronic circuitry associated with the lamp of
Figure 1;
Figure 3 is a flow diagram illustrating the operation of the lamp of Figure 1; Figure 4 is a flow diagram illustrating the process of recording a measurement;
Figure 5 is a circuit diagram illustrating the electronic circuitry of the lamp of Figure
1; and
Figure 6 is a circuit diagram illustrating the sensing arrangement circuitry of the lamp of Figure 1.
Detailed Description
Referring to Figure 1, a lamp 1 according to the invention is illustrated. The lamp 1 comprises a light 2, an object detector 3 for detecting an object 4 and a control circuit 5 for controlling the light 2. The lamp 1 also comprises an emitter 6 for providing a measurement signal for detection by the object detector 3. In this example, the emitter 6 is an infrared light emitting diode (LED), and the object detector 3 is an infrared photodiode. However, other components suitable for detecting an object 4 could be used.
In the illustrated example, the light 2 is an incandescent light bulb and is held in a light bulb socket 7. The lamp 1 also comprises a lens arrangement 8 and, in addition to the object detector 3, an ambient detector 9, in this example an infrared sensitive photodiode. The ambient detector 9 is positioned next to the object detector 3, but is not located under a focal point of the lens arrangement 8 and, in use, detects ambient infrared light in the vicinity of the lamp 1. The emitter 6, object detector 3, ambient detector 9 and lens arrangement 8 are housed together within a housing unit 10. The housing unit 10 shields the object detector 3 and ambient detector 9 from infrared light emitted by the light 2 and is, in this example, painted black to reduce the amount of ambient infrared light that is reflected from the housing unit 10 onto the detectors 3, 9.
The lamp 1 is powered via a power lead 11 connected to the mains power supply using an electric plug 12.
In use, the emitter 6 is activated to provide an outward infrared beam 13, which, in the case that an object 4 such as a user's hand is positioned in the path of the outward beam 13, is reflected from the object 4 to form a reflected beam 14 to be detected by the object detector 3. The lens arrangement 8 directs emissions from the emitter 6 to form the outward beam 13 and focuses the reflected beam 14 onto the object detector 3 to improve the sensitivity of the object detector 3. A signal dependent on the intensity of infrared light received at the object detector 3 is provided to the control circuit 5. A processor 15 (see Figure 2) within the control circuit 5 analyses the measurement of infrared light to determine whether it indicates that the object 4 is detected. Since the intensity of infrared light reflected from the object 4 and received at the object detector 3 is dependent on the inverse square of the distance from the object detector 3 to the object 4, in this case, at least a component of the signal will be indicative of the distance between the object 4 and the object detector 3.
Successive measurements are performed and processed by the control circuit 5. When an object 4 is detected in a first measurement and not in a subsequent
measurement, this indicates that the object 4 has been removed from the outward beam 13 between the respective times at which the first and subsequent measurements were taken. For instance, movement of the object 4 in the direction illustrated by the sideward pointing arrow 16 of Figure 1 during the period between the first and subsequent measurements would give this result. In this event, the processor 15 provides a control signal to switch the on/off state of the light 2. For example, if the light 2 is on, the processor 15 provides a control signal to switch off the light 2. Conversely, if the light 2 is off, the processor 15 provides a control signal to switch on the light 2.
When an object 4 has been detected for longer than a certain predetermined time period, the processor 15 performs a comparison of the two most recent measurements to determine any movement of the object 4 away from or towards the object detector 3 between the times at which the measurements were taken. According to the result of the comparison, the processor 15 provides a control signal to control the brightness of the light 2. For instance, when the result of the comparison is that the object 4 has moved closer towards the object detector 3, for instance in the direction illustrated by the downward pointing arrow 17 of Figure 1, the processor 15 provides a brightness control signal for reducing the brightness of the light 2. Conversely, when the result of the comparison is that the object 4 has moved away from the object detector 3, for instance in the direction illustrated by the upward pointing arrow 18 of Figure 1, the processor 15 provides a brightness control signal to increase the brightness of the light 2.
Figure 2 is a schematic illustration of the electronic components of the lamp 1. The processor 15 is connected to a memory 20, signal processing means 21 which is in turn connected to object detector circuitry 22 and ambient detector circuitry 23, emitter circuitry 24 and power control circuitry 25 which is connected to the light 2. Power supply circuitry 26 is provided for supplying a regulated power supply to power the lamp 1.
Figure 3 illustrates in more detail the operation of the control circuit 5 of the lamp 1.
The control circuit 5 performs a measurement routine (SlOl to Sil l), which is illustrated in Figure 4 (step Sl). Referring to Figure 4, a reference signal is initially produced (step SlOl). To do this, the signal processing means 21 receives signals from the object detector circuitry 22 and the ambient detector circuitry 23 whilst the emitter 6 is not emitting the outward beam 13. Since the emitter 6 has not yet been activated, any difference between these signals indicates that the ambient detector 9 is not receiving the same ambient noise as the object detector 3 and/or that the detectors 3, 9 have differing outputs for the same ambient noise level due to, for example, component tolerances. The signal processing circuitry 21 subtracts the output signal 27 (see Figure 2) of the ambient detector circuitry 23 from the output signal 28 of the object detector circuitry 22 to produce the reference signal. The reference signal is thus indicative of the common error between the outputs of the detectors 3, 9.
The processor 15 receives the reference signal from the signal processing means 21 (step S102) and the value of the reference signal is stored in the memory 20 (step Sl 03). The processor 15 then sends a signal to activate the emitter circuitry 24 to power the emitter 6 so that it produces the outward infrared beam 13 (step S 104). A measurement signal is then produced in a similar manner to the reference signal (step Sl 05). In particular, the signal processing circuitry 21 subtracts the output signal 27 (see Figure 2) of the ambient detector circuitry 23 from the output signal 28 of the object detector circuitry 22.
The measurement signal is received at the processor 15 (step S106) and the value of measurement signal is stored in the memory 20 (step S107) together with a time indication of the time at which the measurement signal was received (step Sl 08). The time indication can take any of a number of forms, but in the present example is provided by a clock within the processor 15.
The processor 15 retrieves the reference signal value and the measurement signal value from the memory 20 and subtracts the reference signal from the measurement signal (step Sl 09). Since the reference signal is indicative of the common error
between the outputs of the detectors 3, 9, subtracting the reference signal from the measurement signal compensates for this error in the measurement signal.
Signal filtering of the resulting measurement signal is performed to remove errors caused by unwanted reflections from objects such as ceilings (step SHO) as is described in more detail below, and the resulting measurement is stored (step Si ll) in the memory 20. The measurement routine (SlOl to Sil l) is thus completed so that a first measurement has been performed and stored in the memory 20.
Referring again to Figure 3, the processor 15 determines from the first measurement whether an object 4 is detected (Step S2). To achieve this, in this example a comparison is made of the first measurement with a predetermined detection threshold. The detection threshold is ideally set to a value below which measurements are more likely to be entirely noise measurements and above which measurements are more likely to be caused by reflections from objects 4. The detection threshold value chosen may depend on the required level of sensitivity to objects 4 placed in the outward beam 13, for instance the distance from the object detector 3 that objects 4 are required to be detected. The detection threshold value can be affected by factors such as the size of the lamp housing and the set-up and choice of components such as the lens arrangement 8.
When the first measurement is below the predetermined detection threshold, this indicates that an object 4 is not detected and the control circuit 5 performs the measurement routine (SlOl to Sil l) again (step Sl) to provide a further first measurement. This is repeated until an object 4 is detected.
When the first measurement is above the predetermined detection threshold, this indicates that an object 4 is detected and the control circuit 5 performs the measurement routine (SlOl to Si ll) again (step S3), as previously described, to produce a second measurement stored in the memory 20.
The processor 15 then determines whether the second measurement indicates that an object is detected by comparing the second measurement with the predetermined
detection threshold (step S4). If the result is that no object 4 is detected, this can indicate that a user has passed their hand through the outward beam 13 momentarily such that their hand was detected by the first measurement (performed at step Sl) and not by the second measurement (performed at step S3). In this event, the control circuit 5 compares the time interval t between the time when the first measurement was made and the time when the second measurement was made to determine whether this interval t falls within certain upper and lower limits (step S5).
In the illustrated example, the processor 15 only provides the control signal to switch the on/off state of the light 2 when an object 4 is detected for more than a first predetermined time period t_moth. This is to avoid the control circuit 5 controlling the light 2 in response to the detection of undesired objects, for instance insects such as moths, which are present in the outward beam 13 for a brief period of time. The first predetermined period t_moth is set to 40ms in the present example, however other values can be used.
The processor 15 also only provides the control signal to switch the on/off state of the light 2 when an object 4 is detected for less than a second predetermined time period t_switch. This value is set to 0.6 seconds in this example, however, other time periods can be used.
When, the time interval t between the first and second measurements is greater than the first predetermined time period t_moth and less than the second predetermined time period t_switch the processor 15 provides a control signal to control the light 2, in this case to turn the light 2 on or off (step S6). In particular, if the light 2 is in an On' state, the control signal switches the light 2 to an 'off state and if the light 2 is in an Off state, the control signal switches the light 2 to an 'on' state. The control circuit 5 then returns to the start of the process to perform the measurement routine (SlOl to Sill) again'to provide a first measurement (step Sl).
When the time interval t does not meet the time interval requirements, the control circuit 5 does not control the light 2. Instead the control circuit 5 returns directly
to the start of the process to perform the measurement routine (SlOl to Si ll) again to provide a first measurement (step Sl).
The invention is not limited to provide control signals to switch the on/off state of the light 2. In alternative examples, a mode of operation of the light 2 could, for instance, be altered by the control signal instead of the on/ off state. For instance, the light 2 could be placed in a flashing mode, or a mode in which the light 2 changes colour or brightness.
When the result of the comparison of the second measurement with the detection threshold (step S4) is that an object 4 is detected, the processor 15 next determines whether the object 4 has been detected for a time interval t greater than a third predetermined time period t_bright (step S7).
In the example illustrated, the third predetermined time period t_bright is set to the same value as the second predetermined time period t_switch. This therefore acts to distinguish between object movements intended to activate the on/off function of the lamp 1 and those intended to activate the brightness control function of the lamp 1.
If the time t that has lapsed between the time when the first measurement was made and the time when the most recent measurement, in this case the second measurement, was made, is smaller than the third predetermined time.period t_bri.ght, the control circuit 5 performs the measurement routine (SlOl to Sil l) again- (step S3) to produce another second measurement.
Alternatively, if the elapsed time interval t between the time of the first measurement and the time of the second measurement is greater than the third predetermined period t_bright, the control circuit 5 retrieves the two most recent measurements from the memory 20 (step S 8).
The processor 15 then subtracts the earlier measurement from the later measurement (step S 9). Since the measurements are, in this example, each
indicative of the distance of the detected object 4 from the object detector 3, the difference between the two measurements indicates any change in this distance between the times at which the two measurements were taken. The result of the subtraction is then used to determine whether the object 4 has moved (step SlO). In this example, whether or not a movement has occurred is determined by a comparison of the magnitude of the subtraction result with a predetermined movement threshold. The movement threshold is ideally a threshold below which the subtraction result is more likely to have been caused by a change in the noise level and above which the subtraction result is more likely to have been caused by a change in location of the detected object 4. The value of the comparison threshold will determine the minimum amount an object is required to move before this movement is used to control the light 2.
When the result of the comparison shows that no movement has occurred, the control circuit 5 returns to perform a further second measurement (step S3).
Conversely, when the result of the comparison shows that a movement has occurred, the control circuit 5 next determines whether the light 2 is in an 'on' state or an 'off state (step Sl 1). If the light 2 is in an 'off state, control of the light 2 is in this example not necessary and the control circuit 5 returns to perform a further second measurement (step S3). If the light 2 is determined to be in an 'on' state, the control circuit 5 provides a control signal to control the light 2, in this example to control the brightness of the light 2. In particular, the control signal is dependent on whether the detected object 4 was detected to have moved towards or away from the object detector 3. The direction of movement of the object 4 is determined by whether the later measurement is smaller or greater than the earlier measurement, since the measurements are dependent on the distance of the object 4 from the object detector 3. If the object 4 has moved closer to the object detector 3 the brightness of the light 2 is decreased by the control signal and conversely, if the object has moved further away from the object detector 3 the brightness of the light is increased by the control signal.
The brightness adjustments may consist of a predetermined change in the brightness level in response to each detected movement, this change being irrespective of the amount of movement that has been detected. Alternatively, the brightness adjustments may be dependent on the amount of movement that has been detected. The brightness of the light 2 may also be limited to stay within a maximum level and a minimum level, for instance to avoid completely turning off the light 2.
In the present example, the brightness of the light 2 is stored in the memory 20. Therefore, in response to the light 2 being turned on (e.g. at step S6), the turn-on brightness of the light 2 can be adjusted to the level at which it was set at a previous time, for instance the time at which the light 2 was last turned off.
At least a portion of the memory 20 comprises non-volatile memory capable of retaining stored data when power to the lamp 1 is disconnected. This portion of the memory 20 is used to store brightness levels of the light 2 and indications of the on/off state of the light 2. In this way, when the power is reconnected, the light 2 can be set to the on/off state in which it was set when the power was disconnected and when the light 2 is turned on, the brightness level of the light 2 can be adjusted to the level at which the light 2 was set at a previous time, for instance when it was last turned off. This turn-off could have been caused either by the disconnection of the power or a switch in the on/off state of the light 2 in response to the movement of a detected object 4.
In response to the detected object 4 moving away from or towards the object detector 3, the invention is not limited to controlling the brightness of the light 2. Alternatively, the mode of operation of the light 2 could be altered, for instance to place the light 2 in a mode in which the light 2 is visibly flashing, with the frequency of the flashing being then adjusted by an amount dependent on the direction of movement of the detected object 4. Alternatively, the control signal could independently control the brightness of a plurality of lights, for instance adjusting the brightness of a first light having a first colour in a first direction and adjusting the brightness of a second light of second colour in a second direction.
The filtering performed by the control circuit 5 in the illustrated example, referred to as step SIlO in Figure 4, acts to remove signals indicative of detected objects that are permanently stationary from the first and second measurements. For instance, if the lamp 1 is positioned under a low ceiling, the outward beam 13 is reflected from this ceiling and the reflected beam 14 can be confused by the control circuit 5 with a reflected beam 14 from a detected object 4 required to control the light 2, such as a user's hand. Therefore, the control circuit 5 is operable to perform a calibration so as to determine measurements indicative of stationary objects rather than objects 4 such as a user's hand, for controlling the light 2.
For instance, in a particular example, a 'slow' calibration is performed over a number of measurements by continually adjusting each of a set of calibration variables stored in the memory 20. A first of these, namely a measurement variable, is adjusted according to the value of the measurement signal. For instance, the measurement variable is initially set to the value of the measurement signal associated with a first measurement. If the measurement signal of a subsequent measurement is greater than the measurement variable, the measurement variable is increased. Conversely, if the measurement signal of the subsequent measurement is smaller than the measurement variable, the measurement variable is decreased. Each adjustment is relatively small such that, following a change in the measurement signal, it will take several successive adjustments for the measurement variable to reach the new measurement signal level. In this way, the measurement variable is not affected much by rapid changes in the measurement signal, for instance caused by erroneous objects such as moths in the path of the outward beam 13, but is adjusted gradually to meet the average measurement signal level caused by permanent objects, for instance a ceiling.
A reference variable is adjusted in a corresponding manner, this time according the value of the reference signal. The reference variable is therefore gradually adjusted to the average reference signal level over a number of successive measurements.
The reference variable is subtracted from the measurement variable to produce a calibration signal for use in calibrating the lamp 1. During the signal filtering step
(SIlO) of the measurement routine (SlOl to Sil l) illustrated in Figure 4, the calibration signal is subtracted from the measurement to take account of permanent objects in the path of the outward beam 13.
Multiple sets of calibration variables can be used. For instance, a first set of reference and measurement variables may be stored for situations in which the light 2 is 'on', and a second set stored for situations in which the light 2 is coff . Since infrared light emitted from the light 2 can influence measurements and therefore may affect the value of the calibration variables, havins separate sets ensures that each set is at an appropriate level according to the state of the light 2.
The magnitude of adjustments made to the calibration variables may be fixed at a predetermined value or may be dependent on the magnitude of difference between the calibration variable and the corresponding reference or measurement signal.
In the present example, the calibration variables are reset to the value of the reference and measurement signals when the light 2 is turned on or off and each time the brightness level of the light 2 is altered. However, the calibration variables may alternatively be reset at other times. The calibration variables can be stored in the non-volatile portion of the memory 20 so that they are not lost when the lamp power is switched off.
Alternative calibration methods can be used. For instance, if a stationary object is detected for longer than a fourth predetermined time period t_calib, then the processor 15 can be operable to store in the memory 20, for instance in the non¬ volatile portion of the memory 20, a stationary object measurement that includes this stationary object. The filtering performed by the control circuit 5 can thus subtract from future measurements the value of this stationary object measurement. The fourth time period is, in one example, set to 2 minutes so that any detected stationary objects are unlikely to be reflections from a user's hand. Alternatively, other time periods can be used.
Figures 5 and 6 illustrate in more detail the electronic circuitry of the lamp 1 of Figure 1. The processor 15 is used to control the emitter 6 and light 2 in a manner dependent on signals received from the signal processing circuitry 21. The signal processing circuitry 21, object detector circuitry 22, object detector 3, ambient detector circuitry 23 and ambient detector 9 are illustrated in the circuit of Figure 6.
Referring to Figure 5, the circuit is powered via a live terminal 40 and a neutral terminal 41 connected to an external plug 12 (see Figure 1) for connection to mains electricity. A 1MΩ discharge resistor 41a is arranged between the live terminal 40 and the neutral terminal 41 to discharge residual charge when the lamp 1 is switched off. The light 2 is powered by power control circuitry including a first bridge rectifier network 42 that provides full-wave rectification of the mains alternating current (AC) input. This first network 42 comprises four diodes D1-D4 connected in a standard bridge rectifier arrangement. The light 2 is connected to the positive output 43 of the first bridge rectifier network 42 via a first light terminal 44. A second light terminal 45 is connected to the negative output Vss of the first bridge rectifier network 42 at a Vss terminal 46 via a silicon controlled rectifier (SCR) 47, also referred to as a thyristor.
Also connected to the power control circuitry are a fuse 48 and a snubber circuit 49. The fuse 48 is fitted so that if the light 2 fails such that is presents a short circuit, then the fuse 48 will blow. It also protects the circuitry against failure in other high voltage components. The snubber circuit 49 is used to reduce high frequency ringing in the power control circuitry and, together with a 0.68uF capacitor (not shown) connected across the mains terminals 40, 41, provides electromagnetic compatibility (EMC) to the circuit.
The processor 15 has a trigger output terminal 50 connected to the trigger input terminal of the SCR 47, via a trigger resistor 51. The processor 15 is also connected to a square-wave generating circuit 52, which is in turn connected to the live terminal 40. The square wave generating circuit 52 comprises a current limiting resistor 53 in series with a parallel combination of a first capacitor 54, a resistor 55
and a zener diode 56. The output of the square-wave generating circuit 52 is applied to a timing input 57 of the processor 15.
The Io w- voltage components of the circuit are also powered from the mains via a transformer 58, a second bridge rectifier network 59 and a low drop-out regulator 60 to produce a constant direct current (DC) voltage Vcc between the circuit terminals labelled Vcc and those labelled Vss respectively in Figures 5 and 6. The input of the transformer 60 is connected to the mains AC supply terminals 40, 41 and the output of the transformer 60 is applied to the AC input of the second bridge rectifier network 59. The second bridge rectifier network 59 operates with a common ground Vss to the first bridge rectifier network 42 and comprises four diodes D5-D8 connected in a standard bridge rectifier arrangement. The positive output 61 of the second bridge rectifier network 59 is connected to a first voltage terminal 62 of the low drop-out voltage regulator 60 and to Vss at a Vss terminal 63 via a second capacitor 64. The negative output Vss of the second bridge rectifier network 59 is connected to a second voltage terminal 65 of the low drop-out voltage regulator 60.
The output 66 of the low drop-out voltage regulator 60 is connected to Vss via a third capacitor 67, and provides a voltage Vcc to power the low voltage components of the circuit such as the processor 15 and emitter 6.
An emitter driving circuit 68 is provided to drive the infrared LED 6 to emit infrared light when a measurement of an object 4 is to be made. The LED driving circuit 68 includes a supply capacitor 69, which is used to provide power to drive the LED 6. The supply capacitor 69 is charged via a charging resistor 70 and a first transistor 71 connected in series to a Vcc supply terminal 72. A first output 73 of the processor 15 is connected, via a first resistor 74, to the control input of the first transistor 71 such that the charging of the supply capacitor 69 is controlled by the processor 15.
The supply capacitor 69 is connected to a first terminal 75 of the infrared LED 6. A second terminal 76 of the infrared LED 6 is connected to a Vss terminal 77 via a
second transistor 78. The second transistor 78 is connected at its control terminal to a second output 79 of the processor 15, via a second resistor 80, such that the discharging of the supply capacitor 69 through the LED 6 is controlled by the processor 15.
An analogue to digital converter input terminal 81 of the processor 15 is connected to the signal processing circuitry 21. The signal processing circuitry 21 is illustrated in Figure 6, together with the object detector circuitry 22 and ambient detector circuitry 23. Referring to Figure 6, there is provided the object detector, in this case a measurement photodiode 90 and the ambient detector, in this case an ambient photodiode 91. These photodiodes 90, 91 are each used in their linear, reverse leakage photocurrent mode. The measurement photodiode 90 is arranged having a first terminal 92 connected to a Vcc terminal 93 via a first resistor 94, and a second terminal 95 connected to a Vss terminal 96 via a second resistor 97. The second terminal 95 is also connected to a Vss terminal 98 via a fourth capacitor 99, and to the input of a measurement operational amplifier arrangement 100 via a first connection 101.
The ambient photodiode 91 is arranged in a similar manner to the measurement photodiode, having a first terminal 102 connected to a Vcc terminal 103 via a first resistor 104, and a second terminal 105 connected to a Vss terminal 106 via a second resistor 107. The second terminal 105 is also connected to a Vss terminal 108 via a fifth capacitor 109, and to the input of an ambient operational amplifier arrangement 110 via a second connection 111.
The output of the ambient operational amplifier arrangement 110 is applied, via connection line 112, to a non-inverting amplifier arrangement 113.
The output of the non-inverting amplifier arrangement 113 and the output of the measurement operational amplifier arrangement 100 are applied via first and second connection lines 114, 115 respectively to a differential amplifier arrangement, or subtractor arrangement 116. This subtracts the signal received from the non- inverting amplifier arrangement 113 from the signal received from the measurement
operational amplifier arrangement 100 and amplifies the result by a factor of approximately 10. As a result, the signal processing circuitry 21 has an overall amplification factor of approximately 100. The final output is supplied on a third connection 117 to the analogue to digital converter input 81 of the processor 15 (see Figure 5). The subtractor arrangement 116 is operable to amplify the difference between its inputs 114, 115 by a factor of approximately 10.
In use, the processor 15 controls the power supplied to the light 2 using a control signal it provides on the trigger output terminal 50 connected to the trigger input terminal of the SCR 47. The processor 15 runs a timing loop that it synchronises with the mains phase using the output of the square-wave generating circuit. In this case, the square-wave is high when the mains live signal is greater than the mains neutral signal, and low otherwise. The resulting timing signal applied to the timing input 57 of the processor 15 enables the processor 15 to control the light 2 by triggering the SCR 47 to power on the light 2 at a predetermined point in each mains half-cycle. To adjust the brightness of the light 2, the processor 15 is operable to trigger the SCR 47 later or earlier in each half-cycle. The light 2 can be turned off when the control signal is used to stop triggering the SCR 47.
The processor 15 samples its analogue to digital converter input 81 at every rising or falling edge of the square-wave produced by the square-ware generating circuitry 52. Each of these samples is processed by the processor 15 in the manner described with reference to the measurement routine (SlOl to Si ll) to determine whether the sample results in a measurement indicative of the detection of an object 4. According to the results of successive measurements, the processor 15 is operable to provide a control signal at its trigger output 50 suitable for controlling the light 2 as previously described.
The illustrated lamp circuitry is configured to receive UK mains power, i.e. AC at 240V and 50 Hz. However, the lamp circuitry can be powered alternatively by other mains signals with relatively little change required, for instance a change of transformer 58 such that it provides an appropriate signal level to the low drop out regulator 60.
While a specific example of a circuit has been illustrated, the skilled person would appreciate that the circuit is not Limited to this example and could be implemented in other ways. For instance, aspects of the circuit implemented in software in the example could alternatively be implemented in hardware and vice versa.
While a lamp has been specifically illustrated, the skilled person would appreciate that the lamp could have any form and include any suitable light source, not just a light bulb. The invention also extends to control lights remote from the switch housing.
The skilled person would also appreciate that the invention is not limited to the specific process steps described herein. For instance, the control circuit 5 may store measurements only after the second and/or third predetermined time periods t_switch, t_bright have elapsed.. Also, the control circuit 5 may be limited to a single type of control of the light 2, for instance the on/off switching of the light 2. In this case, use of the second and third predetermined time periods t_switch, t_bright may be unnecessary.