PC Dimmer v2

USB / Infrared Controlled Dimmer

This is a 2nd version of my PC controlled dimmer. It is much smaller and has a few extra features:
  • Very small formfactor
  • Can be controlled by infrared remote (RC5/Sony SIRCS)
  • Can be connected to an USB port (enumerates as a serial port CDC compatible)
  • Up to 16 presets can be defined and programmed into the device (EEPROM)
  • Intensity lineairization (lookup table)
  • Constant fade speed (between multiple presets)
  • Very low power consumption (in standby)
  • Firmware can be uploaded/updated over USB, no need for any programmer
  • EventGhost plugin available
The hardware of this new dimmer is mostly built with SMD components. It uses the AT90USB162 8-bit RISC USB microcontroller to offer USB connectivity directly. Using a seperate USB-to-serial converter chip would use much more space.

The microcontroller decodes both the USB-signal as well as the infrared-signal, stores any presets into its EEPROM and generates a synchronized trigger signal for the optically-isolated high-voltage output stage. A lookup table is used to linearize the normally S-shaped light curve.

The output stage consists of a Sharp S202S01 high-power opto-triac, a snubber network and a inductor. This opto-triac is capable of switching currents up to 8A. For current up to 2A it doesn't need any cooling fins. The inductor is used to limit the current when the opto-triac switches and thereby reduces emitted RF-radiation. The snubber network prevents the opto-triac from random firing on inductive loads.

The signal to the opto-triac is synchronized with the mains frequency by an AC-capable opto coupler and 2 resistors directly coupled to the mains. This in turn generates an interrupt in the microcontroller on every zero-crossing of the mains voltage.

The dimmer is powered by a very small mains transformer (0.35W). A full-bridge rectifier is used to rectify the AC input from the transformer. A 5V low-drop linear regulator together with a 470u capacitor is used to derive a stable 5V supply voltage. It should be noted that this seperate supply is needed, since the dimmer cannot be controlled by the remote control anymore when the PC is switched off.

The command protocol is very basic. The dimmer enumerates itself as a standard serial port onto the PC. Commands can be given by any serial-port terminal. Both the commands as the responses are human-readable. This makes it very easy to control this dimmer from any application that allows to send a string to a serial port. To make things easy, I have written a special plugin for EventGhost in Python to control and configure this dimmer from my PC.

The maximum switching power is 2A @ 230V, which gives a allowed power consumption of about 450W. Stand-by power consumption is well below 1W.

Schematics and PCB

USB Dimmer (schematics + PCB)

Pictures