Wireless Control of Linearly Dimmed LED Drivers

Note: The following content was originally published in or before 1913, and has been migrated here in the interest of preserving historical information. Some referenced products/resources may no longer be available.



Despite the initial investment, solid state lighting (SSL) has proven to be a viable alternative over conventional technologies due to the combined savings in energy consumption and maintenance costs, as well as design flexibility. Furthermore, increased energy savings can be realized with active intelligence such as occupancy and ambient light sensors, as well as external dimming controls to eliminate excessive lighting. Since there are a wide variety of constant current LED drivers requiring a 0-10 volt DC input for dimming control available, the focus of this discussion will be utilizing these drivers with a wireless interface.

The overall concept is relatively straightforward. A data stream containing the desired control voltage is transmitted and then received by a module that has been configured to act as a transparent RS-232 interface to a microcontroller. The microcontroller in turn interprets the data stream and loads the appropriate values into the data registers of a digital-to-analog converter to produce the desired control voltage.

Component Selection

Control Circuit

Due to the widespread use of devices such as laptops, tablets, and cell phones, the Bluetooth connection protocol was selected for the transmission of the control voltage data stream. On the reception side, the 876-1005-ND evaluation board for the Panasonic PAN1555 was selected for its versatility and ease of use in prototyping.

The selection of the microcontroller was based upon 3.3 volt operation and the requirements of having a USART, a programmable internal oscillator, and sufficient yet not excessive I/O. Due to the consideration of future implementations requiring PWM for control and the storage of non-volatile data, the features of PWM and EEPROM were added to the requirements. The PIC12F1822-I/P-ND was ultimately decided upon.

The DAC selection was based upon the requirements of a single supply, an output voltage of at least 10 volts, a serial interface, 12-bit resolution, and an external reference input. The LTC1257IN8#PBF-ND proved to be a worthwhile candidate.

In order for the DAC to produce the necessary output range, a 10 volt voltage reference is required. The LM4040CIZ-10.0/NOPB-ND was selected due to its ±0.5% tolerance, TO-92 package, and 15mA output current capability.

Several criteria were considered in selecting the power supply for the circuit. First, the supply voltage needs to be sufficient enough to allow the DAC to provide a 10 volt output. According to the specifications of the LTC1257, VCC needs to exceed the reference voltage (10V) by 2.7 volts, making the selection of a 15 volt supply appropriate. The desire for an enclosed board-mount supply with a minimal footprint and at least 200 mA of output current resulted in the selection of the 945-1068-ND power module.

While the DAC is powered directly from the 15 volt supply, the Bluetooth module requires a 3.3 volt supply, which will also power the microcontroller. As dropping down from 15 volts to 3.3 volts with a linear regulator would be inefficient, the 945-1661-5-ND was selected due to the fact that it’s a switching regulator having a small footprint, a maximum input voltage of 28 volts, and a 500 mA output capability.

To facilitate powering external devices such as active cooling, the 945-1648-5-ND was chosen to produce a 5 volt supply, again due to it being a switching regulator with a maximum input voltage of 28 volts and a 500 mA output capability. In conjunction with this 5 volt supply, the 296-6549-5-ND “Rail Splitter” was selected to produce a voltage equal to one-half of the DAC output to correspond with, and allow for linear control of the 5 volt powered devices. Terminal block part number 277-1274-ND was utilized for connection to the 5 volt supply and “Rail Splitter” voltages.

To accommodate connection to the AC power source and the constant current LED driver wires, terminal block part number 277-1247-ND was selected due to its 0.200” spacing, the accommodation of 14-30 AWG wire, and the capability of handling up to 10 amps of current.

Bluetooth Module Configuration

As previously stated, the PAN1555 Bluetooth evaluation board needs to be configured to act as a transparent RS-232 interface to the microcontroller, and the microcontroller needs to be programmed to receive the control voltage data stream and load the DAC registers accordingly. Likewise, a means of transmitting the control voltage to the Bluetooth module needs to be addressed.

The factory default settings on the Panasonic PAN1555 Bluetooth module on the evaluation board need to be reconfigured for use in this particular application. This is accomplished using AT commands sent via a wired RS-232 interface. The use of a “Smart” USB cable such as the TTL-232R-3V3-WE from FTDI simplifies this task. There are two important considerations to take note of when using this cable. First, in order to make the FT232R in the cable appear as a virtual COM port, it is necessary to download the free USB drivers from FTDI at http://www.ftdichip.com. Secondly, despite the fact that the TTL levels on this cable are at 3.3 volts, the cable VCC supply voltage is at the USB port voltage of 5 volts. In order to power the evaluation board during configuration, this supply voltage must be regulated down to 3.3 volts. Regulation requires nothing more than a couple of components such as the combination of the L4931CZ33-AP 3.3 volt regulator and the EEA-GA1H2R2 2.2uF capacitor.

Configuration Instructions

The communication software implemented to reconfigure the module in this application was HyperTerminal. The initial settings for the module are 115200 bps, 8 data bits, no parity, 1 stop bit, and no flow control. Note that during the reconfiguration process the module should not be wirelessly connected to any Bluetooth enabled device.

In this application, the module is used as a transparent link between the device supplying the control voltage data stream it is paired with and the microcontroller in the linear dimming circuit. This being the case, we want to first inactivate the Startup Message of “ +++ Press < CR >, < CR >, < ESC >, < ESC > to enter BlueRS+ configurator ++ ” that is sent at a fixed speed of 9600 baud at power up. Inactivating the startup message eliminates any conflicts that could arise from using a baud rate other than 9600. The AT syntax required is: ATRSTMSG=0** Storing this parameter change in non-volatile memory is done with: ATSAVE**

In order to easily identify a given module, renaming it to something relevant to the application is in order. In this case, it is renamed to “ Linear Dimmer ” using: ATBNAME=Linear Dimmer**

Again, this parameter is written to non-volatile memory with: ATSAVE** As stated earlier, the initial baud rate setting for the module is 115220 bps. In this application, the microcontroller will be programmed to communicate at 19200. The syntax to change the baud rate to 19200 is done with: ATBR=5** (“5” denotes 19200). NOTE: Once the baud rate has been changed, re-establishing communication with the module requires disconnecting the current “ Call ”, configuring the COM port properties from 115200 to 19200, and then reconnecting the “ Call ”. At this point the parameter change can then be saved with: ATSAVE**

The last issue to address for this application is the transmission of result codes and messages after a command input to the module. In order for the module to appear as a transparent link and not cause any errant information to be sent to the microcontroller, the result codes and messages need to be suppressed. The syntax for suppressing these is: ATQ1 Again, the parameter change needs to be saved with: ATSAVE** NOTE: After the ATQ1 command is saved, no further responses to other commands will be returned. If future commands need to be sent and the responses need to be viewed, the ATQ command will re-enable the responses. If other parameters are changed and saved, be sure to lastly use the ATQ1 command followed by the ATSAVE** command.

The module is now ready to be paired with another Bluetooth enabled device and tested for functionality using the same HyperTerminal session that was used for configuration, in conjunction with a second session utilizing the virtual COM port that is assigned to the module once it is paired. With the configuration session open, perform a search for devices in range. The name that was previously assigned to the module (Linear Dimmer 1) should appear as one of the available devices. Initiate a pairing with the device and use 0000 (four zeros) for the Bluetooth pass code, making note of the virtual COM port assigned to the device. Open a second session of HyperTerminal using this COM port configured with 115200, 8, None, 1, None. When the connection is successful, the blue LED on the module will be lit. At this point characters entered into the Bluetooth session window should appear in the cable connected session window and vice versa, confirming that the module is functioning as a transparent link and ready to be used in the application.

For more complete information, the REV4 AT Command Reference document can be found at: http://www.stollmann.de/uploads/media/BlueRS__AT_Command_Reference_r04.pdf

Further information such as firmware upgrades, a configurator, and manuals can be found at: http://www.stollmann.de/en/support/downloads/bluetooth-adapter/bluemod-p2xg2.html


The wireless data stream transmission interface and receiver circuitry allow connection to literally any constant current LED driver requiring a 0-10 volt DC input for dimming control.

One applicable driver is the LXMG221W-0700034-D0-ND . Due to its compact size, universal input voltage range (90-277 VAC), 700mA constant current output, wide output voltage range (14-48 VDC), and an input control range of 1-10 volts, it’s an excellent choice. Most notable is its low power consumption mode which turns off the LEDs when the control voltage drops below 0.6 volts (max).

In the interest of providing a complete pseudo luminaire for the wireless control, the remaining design criteria of an LED, a thermal interface material, a heat sink, optics, and interconnect have also been addressed.

The personal preference of utilizing a cool white LED array (5000K) with a luminous flux greater than 1000 lumens at a modest test current, and a forward voltage near the upper end of the driver output voltage, resulted in the selection of the CXA2011-0000-000P00J050H-ND.

The need for a thermal interface material with exceptional thermal conductivity, while bearing in mind the physical dimensions of the LED array (22mm square), the 1168-2063-ND was chosen.

As the LED has a forward voltage of approximately 43.8 volts @ 700mA, a heat sink capable of handling a minimum of 31 watts is required. The desire for a round form factor with active cooling as well as ease of assembly and installation resulted in the 1061-1088-ND, a 40 watt universal heat sink, being chosen. To facilitate the active cooling of the heat sink, the 1061-1006-ND SynJet module, and wiring harness, the 1061-1050-ND, were selected.

The last two design criteria of optics and interconnect were addressed by using the WM4788-ND LED holder. From an interconnect standpoint, the holder not only eliminates the need for soldering to the LED array, it also fastens directly to the heat sink’s 4-40 hole pattern. While the lens cover may not qualify as true optics, it does provide some light dispersion as well as protection for the LED array.

Schematics & Images

Control Circuit

Control Circuit Schematic

Wireless Linear Dimmer Prototype

Bluetooth Module Configuration

PAN1555 Configuration Schematic

Breadboard Configuration Circuit


Complete Wireless Solution


PIC Microcontroller

Prior to delving into the specifics of programming the microcontroller to receive and interpret the control voltage data stream, the format of the data stream to be transmitted needs to be determined. In this instance, the format that was previously used for the Digi-Key Weather Station was decided upon. The format consists of a transmission type character byte, followed by a type identifier byte, followed by three data bytes. Specifically, the character type byte is “D” for data, the identifier byte defaults to “1” as only a single percentage will be transmitted, and the three data bytes consist of the hundreds, tens, and ones values of the desired D/A voltage. As an example, a percentage of 75% would be transmitted as “D1075”.

Having decided on the format that the percentage data will be sent in, the microcontroller can now be programmed to handle the data stream accordingly. The programming process consists of setting up the configuration words (bits), defining variables and specific register bits, setting up the I/O configuration, and initializing the UART. Simplistic yet functional assembly source code to receive the data stream and utilize bit-banging to load the DAC is available below. It should be noted that the program for this application was written to only interpret and load the DAC with percentages from 0% to 100% in 10% increments.

Download Source: Linear Dimmer.asm (11.8 KB)

Download Binary: Linear Dimmer.HEX (1.5 KB)

Android OS App

SSP Example

The transmission of the control voltage data stream using ubiquitous devices such as laptops and cellphones is a relatively simple task. Addressing the latter, one only needs to find an appropriate serial port profile app. In the case of Android OS devices, the Bluetooth SSP app located on Google Play is an excellent choice. Once the cell phone is paired with the PAN1555 Bluetooth module and connected, it allows the end user to select a “Keyboard mode” in which 12 keys can be labeled and configured to send a specific data stream, e.g. “D1050” (50%). An example screen image in which the keys have been labeled and configured is shown below.

Visual Basic

Visual Basic Interface Example

Another method of transmitting the control voltage data stream using a Bluetooth enabled laptop can be accomplished using Microsoft Visual Studio Express TM. The first task is to pair the PAN1555 Bluetooth module with the laptop, taking note of the COM port number created on the laptop for the “Standard Serial over Bluetooth link”. Generating the wireless interface is accomplished by creating a Visual Basic TM Windows Forms Application such as the one shown below that utilizes a serial port, and contains buttons and resource images for initiating the transmission of the control voltage data stream.

Utilizing the Linear Dimmer zip file below requires downloading and installing Microsoft’s Visual Studio Express™ for Windows Desktop. http://www.microsoft.com/visualstudio/eng/downloads

Once the software is installed and the zip files have been decompressed, the program can be accessed by running Visual Studio, selecting “File”, “Open Project”, and selecting the 8 KB “Linear Dimmer” Visual Basic Project file. At this point, “Form1.vb” under “Solution Explorer” should be selected to edit the code in order to change the dimensioned COM number to coincide with the one that was created during the pairing of the Bluetooth module. Specifically, lines 4, 5, 40, 70, 87, 104, 121, 138, 155, 172, 189, 206, 223, 240, and 257.

Once the program has been edited, the project is built using F7, and run using F5.

It should be noted that while the interface buttons transmit only a specific control voltage data stream, clicking on the grayscale image will transmit a control voltage that is dependent upon the specific shade. However, the program contained within the microcontroller will only interpret values from 0 to 100 in increments of 10.

Download Source: Linear Dimmer.zip (11.2 MB)

Component Parts Lists

Control Circuit

277-1247-ND 2 POS Terminal Block 3 CN1, CN2, CN3
WK4248BK-ND 1 Amp Fuse 1 F1
WK0001-ND Fuse Holder 1 NA
945-1068-ND 15V Power Supply 1 PS1
945-1661-5-ND 3.3V Switching Regulator 1 VR1
P13464-ND 47uF 50V Capacitor 1 C1
P13122-ND 100uF 25V Capacitor 2 C3, C5
399-9842-ND 0.1uF 50V Capacitor 2 C2, C4
LM4040CIZ-10.0/NOPB-ND 10V Voltage Reference 1 VREF1
2.7KEBK-ND 2.7K Ohm Resistor 1 R1
LTC1257IN8#PBF-ND 12-Bit D/A Converter 1 IC1
PIC12F1822-I/P-ND Microcontroller 1 IC2
876-1005-ND Bluetooth Module 1 EVAL_BD
AE10011-ND IC Socket 8-Dip 2 NA
S7006-ND Strip Socket 8-POS 2 NA
277-1274-ND 3 POS Terminal Block 1 CN4
296-6549-5-ND Rail Splitter 1 IC4
945-1648-5-ND 5.0V Switching Regulator 1 VR2
Q114-ND Power Cord 1 NA

Bluetooth Module Configuration

TTL-232R-3V3-WE USB/3.3V UART Cable 1 FTDI cable
L4931CZ33-AP 3.3V Regulator 1 VR1
EEA-GA1H2R2 2.2uF Capacitor 1 C1


CXA2011-0000-000P00J050H-ND LED Array 1
LXMG221W-0700034-D0-ND LED Driver 1
1168-2063-ND Thermal Interface Material 1
1061-1088-ND Universal Heat Sink 1
1061-1006-ND 5V PWM SynJet Module 1
1061-1050-ND SynJet Wiring Harness 1
WM4788-ND LED Holder 1
H343-ND 4-40 Machine Screw 5/16" 6