Kitchen Lighting Project
By Martin Bernier, Engineer, MBA, Future Electronics Canada
READ THIS TO FIND OUT ABOUT
 |
- Lumileds Luxeon® K2
- STMicroelectronics
- STM32 (ARM Cortex-M3) -
32-bit microcontroller
- STCS1 1.5A max. constant current LED driver
- ST7 8-bit microcontroller - ST7Lite
- QST108 capacitive touch sensor
|
 |
|
|
|
This technical view is different from previous
FTM releases and offers an opportunity to share
my personal project experience while I walk you
through my design process.
The Project
The idea came from my kitchen renovations last
fall; we decided to include solid-state lighting
under the top cabinet, for ambiance and working
illumination on the counter area. So I decided to
build my own LED lighting system.
Before starting the project, I defined some guidelines:
- Wanted to be able to drive eight (8) individual lighting zones
- Each zone should have five (5) light fixtures, with each fixture being controlled individually
- Would like to use new Capacitive Touch technology for control switch
- Would like to use 9V AC to power the fixture (approx 12.7V DC)
- Use a supplier that can bring me a solution for each section of my design
- Use a supplier with new parts so I can learn more about them and help my customers

Figure 1. Project Block Diagram
The block diagram in Figure 1 shows the total
capability of the system; for the actual project I
only used 4 zones and 1 touch switch.
Networking
A serial RS-485 network was chosen for
communication between the main controller, the
light fixtures and the touch sensor. The RS-485
communication network is robust and allows a
daisy chain configuration. Before the installation of
the new kitchen cabinets, installed a control cable
with two twisted pair wires (one pair for 9V AC and
the second pair for the RS-485 network).
Touch Switch
The touch switch is composed of 2 components
from STMicroelectronics: the QST108 as capacitive
touch sensor and the ST7Lite39 MCU.
The MCU is used to configure and interface the
QST108 with the main controller board. If a contact
pad is touched and released within 2 seconds,
the microcontroller sends an ON or OFF (according
to the previous state) to the main controller
which activates or deactivates the appropriate
group of fixtures. Dimming of a particular zone
can be achieved by holding the touch pad for more
than 2 seconds. The microcontroller will send
continuous dimming commands until the touch
is released (when the lowest dimming level is
reached, the dimming value resets to the highest
level).

Figure 2. Touch Switch Block Diagram
QST108
The QST108 from STMicroelectronics is a solution
for capacitive sensing based on QProx™ patented
technology developed by Quantum Research Group
(QRG).
The QST108 offers as a standard:
- Up to 8 independent QTouch™ keys supported
- Individual key state outputs or I2C interface
- Fully “debounced” results
- Patented AKS™ Adjacent Key Suppression
- Self-calibration and auto drift compensation
- Spread-spectrum bursts to reduce EMI
- Up to 5 general purpose outputs
In my design, I used the QST in an I2C
configuration. This configuration gives five (5)
general purpose outputs (GPOs), access to low
power mode and internal capacitive sensing
parameters. I used the GPOs for driving the LED in
the touch pad behind the face plate.
As you can see in the Touch Switch Block
diagram (Figure 2), I used only four keys (of the
eight available); this is related to the space I
had on my PCB. For aesthetic reasons, I used a
standard Decora-Style wall plate; this plate is
about 1.25” x 2.50”. Figure 3 shows a picture of
the actual PCB; the top portion represents the
four 0.5” diameter touch pads on the top layer
with the LED behind the bottom layer. The other
components are on the bottom layer below the
touch pad.

Figure 3. Touch switch PCB (top view)
To design this PCB, I used Quantum Research
Application Note AN-KD02 “Secret of a successful
QTouch™ design”.
ST7Lite39 MCU
STMicroelectronics’ ST7Lite series consists of
low memory size and general purpose 8-bit Flash
microcontroller.
KEY FEATURES
- 8 Kbytes Flash, 384 bytes RAM and 256 bytes data EEPROM
- Internal RC 1% oscillator
- Five power saving modes
- 15 multifunctional bidirectional I/O lines, 7 high sink outputs
- A/D Converter (7 input channels with 10-bit resolution)
- Master/slave LINSCI™ asynchronous serial interface and SPI synchronous serial interface
- 10 interrupt vectors plus TRAP and RESET and 12 external interrupt lines (on 4 vectors)
- 5 Timers
- Two 8-bit Lite Timers with prescaler
- 1 real-time base and 1 input capture
- Two 12-bit auto-reload timers with 4 PWM outputs, input capture and output compare functions
- Configurable Watchdog Timer
- 40 to 125°C extended temperature range
The only weak point of the ST7Lite39 in this application
is that only an SPI interface is available while
the QST108 has an I2C interface. I could use the
individual key state outputs, but I wanted the full
control on the QST108. To remedy this situation,
I programmed a software I2C interface using the
STMicroelectronics Application Note AN1045 “ST7
S/W implementation of I2C bus master”.
For the development of the ST7Lite firmware, I
used Raisonance Integrated Development Environment
(RIDE). The RKitLST7 Lite Kit is available free
of charge from Raisonance (with registration) and
includes:
- The RIDE interface for Windows 2000, XP and NT
- The RC-ST7 C Compiler limited to 16 Kbytes
- The MA-ST7 Macro-Assembler (full version)
- The RBuilder-ST7 Application Builder
- The RL-ST7 Linker
- The SIMICE-ST7 Simulator/Debugger (full version)
For programming and debugging, I used RLink-
Pro In-Circuit Debugger and Programmer from
Raisonance. RLink supports both JTAG and ICC
protocols and connects to your application board
via one of three adapters:
- 20-pin JTAG ARM adapter for STR7, STR9 and STM32 microcontrollers
- 14-pin JTAG µPSD adapter for µPSD microcontrollers
- 10-pin ICC-ST7 adapter for ST7 microcontrollers
You may also use RLink’s standard version for ST7
debugging and programming, but RLink standard
will only do full programming for STR7, STR9
and STM32, and the debugger will only work for
applications less than 32K.
Main Controller
The heart of the main controller is the new
STM32; a 32-bit Flash microcontroller based on
the breakthrough ARM Cortex™-M3 core - a core
specifically developed for embedded applications.
The STM32 family benefits from the Cortex-M3 architectural
enhancements, including the Thumb-2
instruction set to deliver improved performance
with better code density, significantly faster response
to interrupts, all combined with industry
leading power consumption.
In this application, I used the STM32 as a
communication bridge between the touch switch
and the light fixtures. With the three UARTs, the
STM32 was a perfect fit for this application. The
STM32 receives a command from the RS-485
network of the touch switch and redirects the
command to the appropriate lighting zone. The
main controller will also poll each light fixture
in the network to get status (overheat and LED
disconnect).

Figure 5. STM32F10x Block Diagram
Even if I didn’t use all the performance features of
the STM32, working with the MCU allowed me to
better understand the new Cortex™-M3 core.

Figure 4. Main Controller Block Diagram
On my board, I used the STM32F101 access line,
which has the same features as the performance
line (STM32F103) except for the following items:
- Max. speed 36MHz
- No USB/CAN/PWM Timer
- Only 1xADC
- SRAM up to 16K
Like with the ST7Lite, I used the same RLink-Pro
In-Circuit Debugger and Programmer from Raisonance,
but with the new Integrated Development
Environment Ride7 (available free of charge from
Raisonance).
STM32 (Cortex-M3) GNU tools are fully integrated
into Ride7, so that there is no need for makefiles or
complex command lines. Moreover, some specific
libraries are provided for a better adaptation to the
STM32 (Cortex-M3) microcontrollers:
- The STM32 libraries from ST allow a quick configuration and simple use of the embedded peripherals
- The original ANSI libraries from GNU (scanf, printf, etc.) have been simplified and optimized to match with the embedded world requirements
Light Calculation
Based on the Future Lighting Solutions brochure
“The 6 Steps to LED Lighting Success”, to illuminate
a working plan for reading or writing, we need
around 500 LUX. Based on Table 1, for a distance
of 1 meter, I would need 112.8 lumens.
To facilitate my mechanical design, I decided to
use a standard optic (#151) from Polymer Optic
(see Figure 6 on the next page). This optic is
normally used with a K2 LED in color mixing applications,
but works perfectly with three neutral
white K2 LEDs when we add a 25° diffuser (# 161)
on top of it.

Figure 6. Polymer optics lens assembly
With three K2 LEDs driving at 350mA, I should
get around 150 lumens based on an S bin
(LXK2-PWN2-S00).
Light Fixture

Figure 7. Light Fixture Block Diagram
All the light fixtures are based on a microcontroller
ST7Lite39 previously used in the touch switch design
and a STCS1 1.5A max. constant current LED
driver from STMicroelectronics.
According to the command received on the RS-485
network, the microcontroller will do the following:
- Enable the LED driver
- Disable the LED driver
- Set the appropriate PWM value
- Send a status
When the LEDs are ON, the microcontroller verifies
the board temperature and the load disconnect
signal, to report any anomaly to the main
controller.
STCS1
The STCS1 is a BiCMOS constant current source
designed to provide a precise constant and the
following features:
- Up to 40V input voltage
- Less than 0.5V voltage overhead
- Up to 1.5A output current
- PWM dimming pin
- Shutdown pin
- LED disconnection diagnostics

Figure 8. Typical application diagram for 0.5A LED current
Power Dissipation
In the actual application the 3 white LEDs (VF=3.42)
are driving at a current of 350mA and a voltage of
12.7V DC (9V AC x √2). The power dissipation in
the device can be calculated as follows:
PD = (VDRAIN - VFB) x ILED + (VCC x ICC)
Based on this, the thermal resistance and the
ambient temperature; the junction temperature
can be calculated as:
TJ = RthJA x PD + TA
- Package: DFN8 3x3mm
- Ambient Temperature: TA = 50°C
In this case VDRAIN = 12.7 - 3 x 3.42 = 2.44V
PD = (2.44 - 0.1) x 0.35 + 12.7 x 0.0005 = 825mW
at 50°C, a DFN8 could dissipate around 1.5W.
The junction temperature will be:
TJ = 37.6 x 0.825 + 50 = 81.03°C.
Maximum for a DFN8 = 150°C
Board Layout Considerations
The LUXEON K2 must be electrically isolated from
the anode, cathode and other slugs. This requirement
stems from the basic internal construction of
InGaN LUXEON K2 devices.
An Aluminium Metal Core has been used for the
light fixture layout. The Metal Core PCB (MCPCB)
achieves very efficient heat conduction from the
PCB and offers an electric isolation between the
slugs.
Installation
The working prototype is still on my lab bench; this
is why the lighting source in my kitchen is still an
incandescent fixture. As soon as I complete the
assembly of the LED based fixtures, I will be able
to install them. I will include some pictures of my
new LED illuminated kitchen counter in the next
article.
Martin Bernier, an EE graduate from École Polytechnique
de Montréal in Electrical Engineering, has a Masters in
Business Administration from Université de Sherbrooke joined
Future Electronics’ Advanced Engineering Team in 2005.
Martin has more than 14 years of research and development
experience.