Touch-Controlled Lamp - LEKULE

Breaking

20 Sept 2016

Touch-Controlled Lamp

1.INTRODUCTION
The standard incandescent or new halogen lamps are widely used around the world. The convenient way to set the right amount of light is to use a dimmer-control unit. 

This unit brings new improved functionality to common lamps with metal body, or lamps equipped with a metal sensor. This small unit can create a mood from night light to full brightness, while saving money by eliminating the need for expensive mechanical switch with several bulbs. Instead of standard diming potentiometer, a touch-controlled dimming can be implemented. 

Touch-controlled unit brings new improved functionality to common lamps with metal body, or lamps equipped with a metal sensor.

Free scale Semiconductor brings a comprehensive solution, which combines high comfort and simplicity of use with low cost of the whole solution. It is possible to switch the lamp on, off, and fluently set the light intensity from minimum to maximum.

The lamp remembers the last setting of the light intensity when switched off. This dimmer is able to run with incandescent and halogen lamps up to 150 W of power only.


2 Descriptions

The block diagram of this application is shown in Figure 1.


Figure 1. Touch-Control Block Diagram

The touch-controlled unit provides a very simple connection into the controlled lamp. There are two wires for power line connection, one wire for bulb connection (other one is common with power line), and one wire for touch sensor connection. 
The touch sensor is usually the metallic body of the lamp. If the body of the lamp is made of plastic, the sensor can be a small metallic part under a plastic cover of the lamp too. In this case the plastic cover needs to be thin enough, and the metallic sensor needs to have a sufficient area for sensing.


3 Block Diagram of the System
The overall block diagram of the touch dimmer is shown in Figure 


Figure 2. Detailed Block Diagram


The whole touch-control unit consists of the following parts:
        Small, but sufficient power supply.
        MCU — MC9S08QD4 — low-power 8-bit is used.
        Triac for power control — this block includes an EMI filter too.
        Very high impedance resistor (R) for phase angle sensing.
        High-voltage small-value safety capacitor (C) for sensor (S) connection — metallic body of the lamp acts as sensor usually.


4 Touch-Control Unit Description


4.1 Hardware Description

The whole schematic of the touch-control unit is shown in Figure 3.

Power Supply — it is a very small, low-power, and stabilized power supply, which is able to source the whole circuit. It consists of diode D2, high-voltage N-MOSFET Q2, NPN transistor Q3, and associated components. A HV MOSFET in a short time charges the output capacitor C6 each positive halfperiod. This process is very short, thus all components stay cold. After the charging process of the output capacitor C6, the MOSFET is switched off by feedback through the D3 diode and transistor Q3. The capacitor C9 (1nF) can be of a smaller value too. It is possible to use 470 pF too.


MCU — the heart of the whole application. It senses the input voltage on the power line to check the zero-crossing. This is made by sensing resistors R4 + R5 of a very high value, and filtered by capacitor C3. This sensing provides phase information for proper phase control of the output triac. The next input — through the safety capacitor C4 and two resistors R1 and R2 — checks if the body of the lamp is touched. This sensing is based on the capacitance change. This capacitor has a small value of about 470 pF to 1000 pF, and working voltage of 2,5 kV. The MCU performs all necessary computations and falls to sleep mode, if the lamp is switched off.


Triac — is used to switch the resistive load in phase control, thus the standard incandescent or halogen lamp can be used. The serial inductor L1, together with the input capacitor C10, forms the filter for generated noise by triac. The thermal fuse takes care of thermal overheating of the output inductor — it can happen, when the circuit is overloaded by a higher-power bulb than recommended. The input capacitor C10, together with the small power supply, forms the filter for noise incoming from the power line.



Sensor — it is a metallic part of the lamp — it can be the body or a small metallic plate, stick, or strip. The touch sensing is based on changing the parallel capacity of the capacitors C5 and C7. The human body adds the capacitance to C4, R1, and R2 components. The resulting capacitance is periodically charged and discharged by resistor R11. The time for charge and discharge is measured by port PTA3 on the MCU. The difference between the touch and non-touch state is checked.

Figure 3.Touch Lamp Schematic

4.2 Software Description

The state diagram of the implemented software is shown in Figure 4.


Figure 4.State Diagram


The lamp is equipped with a low-power low-cost MCU MC9S08QD4. The MCU runs at 8 MHz bus clock and +5 V power supply. There are also internal peripherals used; two timer modules TIM1 and TIM2, one keyboard interrupt from the KBI module, COP module, and two GPIO pins.

One timer and two GPIO pins are used for touch sensing and power-line period measurement. Second timer is used for triac PWM control. The KBI module checks the zero-crossing of thepower line.
Each positive zero-crossing wakes the MCU up, then the MCU makes the touch sensing, and if no touch is registered, and the lamp is in off state, the MCU falls to sleep mode for low power consumption.

The KBI input for zero-crossing is disabled, until it is near to the end of period. It is enabled right before the next positive zero-crossing is expected. The touch-sensing routine time and run times of other routines are very short, and together with disabled sensing for the majority of the period it significantly improves the immunity against external noise from the power line.


5 Conclusion

The whole design is placed in a small plastic case on one-layer PCB. This case has four wires for connecting the lamp — see Figure 1. Most of the components are of SMD type, excluding triac, inductor L1, MOSFET Q2, diode D2, capacitors C4, C6, C9, C10, and resistors R1, R2, and R9. The thermal fuse F1 is of revert type 3 A / 250 V AC. The capacitor C4 must be of a safety type Y2, and the C10 for power-line filtering must be of type X2.

Three types of touch sensors were tested — a small metallic non-isolated stick, a small metallic isolated stick (covered by a plastic isolation tube 1 mm thick), and a non-isolated metallic body of the lamp. All sensors work well.

This design was made as an example how to make a touch-controlled lamp. It was assembled into a fully metallic lamp (metallic body connected to the sensor input) and into a lamp with asmall metallic stick as the touch sensor. Both were tested, and both worked well.

The final lamp with implemented touch-control is shown in Figure 5.
The design was tested with various kinds of simulated high-level noise on the power line with no impact to functionality of the lamp.


The software example is available as AN3826SW.zip file on the web.




Figure 5.Final Touch-Controlled Lamp

No comments: