Multi-Channel Dimmer Controller

This project is a multi-channel dimmer controller module suitable for use with standard incandecent bulbs.

Background / Inspiration

When visiting my sister in Palo Alto during the recent ESC in San Jose, I was shown her new studio/stage in their basement. My sister is a singer and musician in her spare time, and is currently hosting the band at her place. I noticed a couple of rows of stage lights on either side of the ceiling all going to a couple of X10 appliance modules. When asked if she was happy with a simple on/off for the lights she gave me a questioning look and replied, sure, it's great to be able to push a button and turn them all on and off.

Talk about unlimited opportunity for improvement. They had just replaced the X10's with appliance modules this time because ganging 6 75W spots on a single 300W dimmer module seemed to be a bit much for the things (yes, they let the smoke out). Ok, so the new design will need at least 6 channels and should be able to handle multiple lamps per channel. There are two of them in the current setup but there are multiple outlets around the ceiling for more if needed, so I should make the controls aware of multiple modules. We now have what appear to be the beginnings of a product requirements list.

Add to all of this a mbed LPC1768 module I picked up at ESC and ideas start popping into my head before we even finish looking at the studio.

Requirements / Features

Ok, we are going to keep the hardware requirements somewhat simple to start so I can actually get to doing the firmware and UI which is where all the effort will eventually end up.

Hardware

  • Operate from 120VAC
  • Have a small form factor to allow mounting on the ceiling without being an eyesore
  • Capability of a minimum of 6 independently controlled outputs
  • Minimum current capability of 15A per output
  • Minimum current capability of 15A for all outputs combined (standard branch service in US)
  • Isolate the controller circuit from the lamp outputs so we can connect it to a PC without frying it

Implementation

Typical Dimmer circuits rely on switching a TRIAC on at the correct phase angle to produce some fraction of the incoming line voltage. This is inexpensive and relatively easy to do but it has several drawbacks.

  • Poor power factor
  • High inrush currents when switching towards the middle of the cycle
  • 120Hz flicker and audible buzzing from some lamps

The method I will be using is commonly referred to a chopper. This is accomplished by running the incoming AC line voltage through a full wave bridge rectifier to get a DC output. This converts the 120VAC @ 60Hz to 120VDC @ 120Hz. The DC is now a rectified sine wave, it is referenced to a negative rail so the current only flows in one direction through the load. The peak voltage will be 120 * sqrt(2) or about 170V. The use of DC allows the use a FET in place of a TRIAC. The FET may be turned on and off very quickly unlike the TRIAC which requires a zero crossing (actually it requires current to fall to zero) to shut off. Dimming is controlled by the duty cycle to the gate of the FET and is usable from 0 to 100%. Using a PWM period of 1mS will allow about 8 periods per cycle of the incoming line. I'll play with the PWM frequency once everything is running to tune it for a balance of power dissipation (in the FET) and perceived flicker.

This method of control relies on some specific behaviors of incandescent lamps, specifically halogen reflector spot and flood lamps used for stage lighting.

  • The load is resistive with little inductive or capacitive component.
  • The lamps work equally well with AC or DC current.

An alternate method using the same control scheme is to forego the rectifier an use a pair of NFET's in series with a common Source connection.  The load and supply would then attach to the two Drains.  The Gates are tied to gether and switched as one.  The common for controlling the FET's is the junction of the Drains.  The advantage to this method is you do not have the 2 diode drops from the bridge rectifier, the disadvantage is you now have double the Rds(on) for the FET and double the gate capacitiance to drive.

Initial Prototype

The initial prototype consisted of:

  • NXP1768 mbed
  • muRata NKA0512SC isolated DC-DC converter (5V in, 12V out)
  • IXYS IXTP50N20PM Power MOSFET, 200V, 20A, Rds(on) < 60mOhm
  • Vishay GISB2540 Bridge Rectifier, 400V, 25A (with heatsink)
  • Fairchild FOD3181, 0.5A Output Current, High Speed MOSFET Gate Driver Optocoupler
  • Track Light fixture with a single 50W hallogen spotlight populated.
  • AC input power cord
  • AC recepticle

A breadboard of the bridge design  worked very well for a brief time, then the gate driver failed. As I had several, I replaced the blown one and promptly destroyed a second one after a bit more testing. This went on about four times before I had the bright idea to check the datasheet. Note to self: When the datasheet has a "Note:" at the bottom indicating that a 100nF bypass capacitor must be connected between pins 5 and 8, it would be wise to highlight the word "must" and follow the recommendation.

 Initial test firmware assigned a PwmOut object to pin 21 and had a simple monitor on the USB port looking for either +/- or 1/0 for increment, decrement, 100%, or 0% settings.  Period for the PWM was set to 1000uS. Any change to value was displayed on an attached LCD and also echoed to the USB port.

Next Steps

Well, the basic idea works fine so far, now for the hard parts:

  • Determine what communications media to use for controlling the device
  • Define a User Interface and extent of control desired

Initial PCB

I was having problems with AC on the proto board so I decided to commit to a PCB layout of a 6-Channel controller. The design actually was done with a dual FET arrangement as discussed previously (I did try this on the breadboard and it worked fine).

After waiting a week for boards to come in, I quickly built up the first one and populated a single output driver. I powered it up and was rewarded with no smoke (always a good sign) and a smoothly working single channel dimmer. I went back and populated the other 5 output drivers and powered it up again. With a lamp plugged into what I thought was channel 1, I set the output level to 20% and was pleased to see the lamp come on to the right level. I then set output 2 to 50% and the lamp got a bit brighter. Something was not quite right here but I didn't have a lot of time to play with it that night. My first thought was that I had a short on the board, unlikely but possible. No, the board was fine. Then it hit me, all 6 channels share a common node on the isolated power side. In order for the FET's to block AC 2 of them are used back to back so when one is reverse biased and would be conducting through the diode from sorce to drain the other is forward biased and off preventing the current flow. By tying all the Sources together I created a sneak path from any other channel that was on bypassing the FET that was supposed to be blocking current. In the immortal words of Homer Simpson... DOH!

Oh well, Plan B (really it was Plan A), by removing half the FET's and adding an off-board bridge, I could get back to the original circuit, a DC chopper. After a trip back to the workbench, a lot of solder wick, and some luck I now had a working board.

In my rush to get to a PCB I neglected a few things like finding a proper enclosure for the board, deciding on a power supply that would fit, mounting requirements, how to get access to the USB port and the Ethernet jack I had used. Basically, all of the things that would make it a finished product instead of a proto.


0 comments

You need to log in to post a comment