I had an interest in phase control for lighting and this provided an opportunity to develop a circuit to investigate phase control.
Consider the average lounge/living room in a home residence. Unless some effort and money has been invested in installing a more sophisticated lighting arrangement one would generally encounter the following arrangement: A single main light hanging from the ceiling in the centre of the room or possibly one or two lights mounted on the walls. There is a single light switch on the wall with two positions: ON and OFF. The light(s) is usually bright enough to light up the whole room. Sometimes a single rotary dimmer switch may be installed to dim this light but that is about it. If the inhabitant wants more softer lighting then they need to add their own floor or desk lamps, most of these usually also only have a basic on/off switch. In my humble opinion this is a bit boring.
Picture however a room with spot lights mounted on the ceiling or walls pointing in different directions. Some of the spot lights may also be coloured. The spot lights may be arranged to light up individual walls or some interesting feature of the room – e.g. fireplace, painting or plant in the corner. A spot light may also be positioned directly over a chair to act as a reading light. Consider also that these spot lights can be dimmed individually to change the mood in the room as desired. If there are individual table or floor lamps they can also be dimmed. The dimming is done by a central control unit that has some pre-programmed settings in it for various scenarios. Then consider the lighting unit being controlled with an infra red remote control, giving one the ability to select any of the stored pre-sets or dimming each light individually. That was my intention behind this project.
6 channel light dimming unit where each channel can be controlled individually.
Manual control knob for each channel.
Push button control for automatic control of a bank of channels –
ON button – brings the lights up to full brightness over 20 second period.
OFF button – dims the lights to off over 20 second period.
STOP button - halts the change in light intensity at an point.
Separate 0-5V inputs for each channel. 0V the light is completely off, 5V the light is completely on and anywhere in-between sets the light intensity.
Phase control is usually performed using thyristors or triacs. If one uses thyristors then one has to rectify the mains to produce a haversine waveform since thyristors cannot pass current in both directions. The thing with thyristors and triacs is that once turned on they cannot be turned off easily and only reset to their off state when the power is removed. So phase control is achieved by creating a trigger pulse synchronized to the zero crossing points of the mains sine wave and delayed by a time interval. This trigger pulse turns the thyristor on and current flows into the load. One then makes use of the next zero crossing point of the mains sine wave to turn the thyristor off. By varying the delay of the trigger pulse after the zero crossing point and thus the turn on time of the thyristor one can control the amount of current flowing into the load. The advantage of this method is that the losses in the thyristor are minimal as it is either completely ON of OFF.
So the first problem is creating a waveform that is synchronised to the mains. Since I was using a transformer to power the circuitry in this project I took the output from the secondary of the transformer and rectified it (without smoothing) to produce a haversine wave. I set a reference voltage just above zero volts and using an op-amp comparator compared the havesine with the reference level. This produced a series of narrow pulses synchronised to the zero crossing points of the mains sine wave. The exact pulse width of these pulses turned out not to be too important as I shall point out later. The next step was to create a saw tooth waveform that was synchronised with the mains.
Using a constant current source connected to a capacitor I created a linear ramp generator. I then applied the mains synchronised train of pulses to a transistor to discharge the capacitor at the zero crossing points of the mains. This generated the required mains synchronised sawtooth waveform. The last step was to feed the sawtooth waveform into another op-amp comparator that compared the sawtooth wave with a variable input level. The output of the comparator would then give a PWM signal which could be used to trigger the thyristors through an opto coupler. Such a design can be easily expanded to control as many “channels” or lights as required. The sawtooth wave provides the reference for all channels and each channel consists of a single op-amp comparator, opto coupler, thyristor and its associated drive circuitry. The input for each channel is a 0-5V analogue signal. I designed the PC boards in modular form with the power supply and sawtooth generator on one board and six identical trigger channels on another board. The automatic control was designed onto a third board.
As with my other projects I constructed the box myself and did all soldering and wiring. I had the PC boards made by one of the university technical staff. When it came to testing and set up, all that was required was to set the reference level of the mains synchronizing comparator circuit, followed by the constant current source level. The reference level of the mains synchronizing comparator sets the width of the reset pulse that discharges the capacitor in the linear ramp generator. In theory this pulse should be very short as the phase control trigger pulse cannot occur during this reset period. However I determined that if the trigger pulse occurs less than 1ms before the zero crossing point (< 10% on time), the lamps being controlled do not conduct enough current to glow so they are “OFF”. If the trigger pulse occurs less than 1ms after the zero crossing point ( > 90% on time) the lamps are at their maximum brightness and no detectable increase in brightness occurs if the duty cycle is made any long. This means that the reset pulse can be loosely set to something less than 2ms. Thereafter the current in the constant current source is set such that the linear ramp spans 0 to 5V.
Originally for the automatic control circuitry I used basic digital logic devices, namely an up-down counter, flip-flops and 555 timer to create a circuit that at the push of a button would count up/down or pause count. I fed the output of the counter into a discrete R-2R ladder as a basic DAC. Although simple this was quite adequate to achieve the automatic control functionality. However I always had it in mind to have some sort of remote control so many years after completing this project I decided to revisit the automatic control and designed a new board using a Freescale MC68HC08GR4 microprocessor, octal 8-bit DAC and IR receiver device to replace the discrete logic board. I implemented the remote control functionality and the local push button control in software which I wrote in C language using Freescale CodeWarrior for the HC08 processors. Since I had a home theatre projector with a universal remote controller it made sense to make use of the universal controller to control the lights. The controller has a “light” function, so I choose one of the standard IR codes used for lights and programmed an IR decoding algorithm to work with it.
1994 - April 1995
IR board: 2006-2007
Internal view of the Light Controller with the original Automatic Control board separate
(the more recent IR board with processor visible in green)