DESIGN AND IMPLEMENTATION OF A DIGITAL LED DESK LAMP USING THE HALFTONE METHOD AND A TOUCH PAD Chi-Huang Hung, Ying-Wen Bai* and Ren-Yi Tsai* Graduate Institute of Applied Science and Engineering, Fu Jen Catholic University, Taipei, Taiwan Department of Electrical Engineering, Fu Jen Catholic University, Taipei, Taiwan*
[email protected],
[email protected],
[email protected] ABSTRACT In this paper we propose a design of a digital LED desk lamp (DLDL) which consists of two parts: an LED array and a control unit with a touch pad. The LED array includes both LEDs and a constant current source not only to ensure that every LED receives a fixed current and but also to provide a uniform brightness. We use the halftone method which provides an on/off control for each LED of the array, transforms different gray levels into LED array patterns and uses those patterns to maintain digital levels of brightness. Our halftone method is similar to the PWM method of adjusting the brightness; however, it provides a digital control for the brightness of the LED array. In the digital control panel we use the capacitive sensor to design the touch pad and to replace the traditional mechanical button to provide a user-friendly interface. Index Terms—Desk lamp, Halftone, LED array, Capacitive sensor. 1. INTRODUCTION According to an appraisal by The Electric Power Research Institute (EPRI), global electrical energy consumption occupies 40% of the overall energy that is currently available [1]. Illumination consumes around 20% of the electric power. To reduce the power consumption of illumination, although some proposals introduce a control design for adjusting the light intensity, the majority of proposals still use an analog method, such as the PWM (Pulse Width Modulation) method. PWM is used both to control the frequency and the duty cycle to adjust light intensity [2]. The capacitive sensor provides the user with an easy way to operate some consumer electronics products like MP3 players and mobile phones. Some research indicates that this technology can be applied in a car [3]. We use this technology to enhance the control panel in the digital LED desk lamp (DLDL), which simultaneously provides a userfriendly interface and reduces the danger of leakage. Halftone is an image processing method used to represent the gray level by means of a combination of
continuous dots with spacing in between to display the stratified feeling of the image. This method demonstrates the integrity of the gray scale image [4]. Table I shows our comparison between the PWM and the halftone method. The PWM uses a variable resistor to control either the duty cycle or the working phase of the circuits to adjust the brightness of a desk lamp. The halftone method uses LED on/off patterns to represent the brightness. Moreover the halftone method provides a digital control which can be easily realized by both microcomputers and networks. It also has a more accurate control than the PWM method. Finally, as the PWM method normally uses high-power white LED, a heat sink is required, whilst in the halftone design we use a group of low-power LEDs which do not require any heat sink. TABLE I Comparison of the two methods Item Control method Circuit complex Accuracy Target LED Heat sink
Method PWM Duty cycle Medium No Hi-power LED Needed
Halftone On/Off Simple Yes Low-power LED Not needed
This paper is organized as follows. Section 2 introduces the circuit designs of the halftone LED desk lamp, Section 3 presents the light control in our design, Section 4 summarizes the implementation results, and Section 5 summarizes our conclusions. 2. CIRCUIT DESIGNS OF THE HALFTONE LED DESK LAMP Most desk lamps have no adjustable brightness because the desk lamp on the traditional market is available with three bulb types: incandescent lamp, fluorescent lamp and LED lamp. People like to use incandescent lamps in the home; the reason is that they are not only easy to obtain but also inexpensive. But one has to pay for high electricity consumption, and they also waste energy by generating heat. That is the reason why the fluorescent lamp began replacing the incandescent lamp. The fluorescent lamp is cheap and its light is soft, but it does not win any medals in regard to
CCECE 2011 Niagara Falls, Canada 978-1-4244-9789-8/11/$26 ©2011 IEEE IEEE CCECE 2011 - 000234
environmental protection. In recent years we find the LED lamp in many applications. Although the price is a little high, it lasts for a period of about 5 years without the need to replace it. Thus the LED lamp has a long lifetime, saves power and is suitable for the Green Earth design. In our design we integrate a couple of modules to adjust the brightness of a digital LED desk lamp (DLDL). Fig. 1 shows the architecture of such a digital LED desk lamp. It consists of four modules: LED array, LED latch driver, MCU and cap sensor board. We choose 128 LEDs as our light source. Every LED has 0.05W power consumption, with a total of around 6W. This compares with 21W for a fluorescent lamp under the same conditions. Both types have almost the same lumen but use different amounts of energy.
Fig. 2. 25+1 = 26 levels of gray images. Eq. (2) shows that when the gray scale value is larger than the marginal value which has been established, this is expressed by “1”. If the gray scale value is smaller than the marginal value, which is expressed by “0”, the halftone image can be produced by “0” and “1”. In this way we define many brightness patterns.
⎧1, x(i, j ) > T (i, j ) h(i, j ) = ⎨ ⎩0, x(i, j ) < T (i , j ) x(i, j ) present the original image halftone matrix.
Fig. 1. Block diagram of digital LED desk lamp. A. Halftone Method To present the gray level in a digital display and the level of brightness of a light source, some people use PWM, but it is not easy to obtain an accurate control over every LED in this way. We use the image process method called halftone to solve this problem. The halftone method disperses the one big dot of light into a group of small dots of light, thus making the light easy on the eyes. As a rule, the printer mostly cannot print a real gray level because of limited material and resolution. As an example we use an n-bits array to present the gray level shown in (1).
GrayLevel = ( nbits) 2 + 1
(1)
If n = 5, it displays 26 levels of gray images, as shown in Fig. 2. The algorithm fills in the black dot in the central point, and the display is filled up clockwise. The “+1” in (1) presents the blank matrix in which there is any black dot that has not yet been filled in. If we organize an LED array to represent the matrix by amplitude modulation with halftone patterns in Fig. 2, and the black dot presenting the LED is turned on, the white dot shows that an LED is turned off. In the same way we obtain a brightness matrix in proportion to the gray level. Therefore we only control every LED on/off in an LED array to control its brightness level.
(2)
h(i, j ) present the result of the halftone matrix. The threshold matrix size defers to the actual need to make an adjustment which causes different brightness patterns in an LED array. Therefore we use an error diffusion halftone method to distribute those black areas in the original halftone patterns. The new 4-bit halftone cells are shown in Fig. 3 [5]-[7]. If the gray level is the same, then the whole area of the gray levels becomes obscure. We certainly may increase the number of bits to generate the brightness matrix again, but if the result is similar to a common halftone image, we combine the brightness value by means of the 4-bit halftone cell. If we use a single 4-bit halftone cell, its brightness will be insufficient, so we use an 8-bit halftone cell to represent the brightness level.
Fig. 3. Four-bit halftone cells and boundary matrix. Finally, we group the brightness patterns together to generate 8 brightness levels by using this method, and if the brightness of a small LED array is not enough, we add a
IEEE CCECE 2011 - 000235
LED array of the same size to expand our lamp, so that the brightness patterns will be double. B. LED Latch and Driver We use the halftone method to control the brightness of an LED array that consists of 128 LEDs as shown in Fig. 4. We add a latch circuit, a control circuit and an MOSFET as a driver to control the brightness [8], [9]. There are different halftone patterns that drive the LED array; all control circuits can be integrated in a single chip [10]. To solve the heat sink problem we use many low-power LEDs and compose an LED array. The advantage is that we obtain a uniform source of light in a large area. We also have to add a latch to store every working state of each LED.
We propose two specific functions of the touchpad design in comparison with other designs. First, our desk lamp doesn’t require an accurate location like the touchpad of a notebook. The functions of the desk lamp are only “turn on”, “turn off” and dimming the light. Second, we set up four electrodes on a PCB as the function switch. This sensor doesn’t need a wide touch area, as it merely detects the capacity changes on the electrode, sends them to the charge amplifier and delivers the signal to the MCU to detect the finger touching the electrodes. D. Implementation Our design is implemented on a single chip board with the control code implemented in assembly language. The system flow chart is shown in Fig. 5. When the power for the DLDL is turned on, the program jumps into a sensing loop to sense three touch pads every 1 ms. The respective functions of the three touch pads are to turn the power on/off, to increase the brightness and to decrease the brightness.
Fig. 4. LED array, latch and control circuit. As we use many low-power LEDs as the light source, we need to concern ourselves with the current control. We add a constant current source (CCS) module in the control circuit as shown in Fig. 4. The CCS module receives the control signal from the latch circuit to decide how much current has been sent out. The latch circuit receives the control signal from the MCU. The MCU then reads the value of the brightness pattern in its memory, and the latch circuit decodes and locks every state of the LEDs to avoid an LED flash. C. Capacitive Sensor Circuit Most traditional desk lamps use a switch to switch the electric power on or off. But for the brightness control of the desk lamp we use a variable resistor as the on/off switch. Usually the adjustable function component is either a variable resistor, a contact touching switch or an infrared switch [11]-[13]. A capacitive sensor is an element which induces the body capacitance signal. This sensor is used to detect the micro miscellaneous noise capacity change of the human body. One can find it on the notebook where it is called either a touchpad or a touch screen. But those applications need to define the touch area, and they also require a complex control circuit.
Fig. 5. System flow chart of digital LED desk lamp. The sub-program for the power switch function turns the LEDs on the LED array completely on/off, enters the standby-mode and stores the LED turn-on time. When we initiate the brightness selection function, the MCU chooses a brightness pattern and sends it to the LED array. When the user touches the brightness selection pad, the cap-sensor controller sends a 3-bit control signal to the MCU. Because we have used 8 patterns for our brightness level, the control signals have 8 combinations of 3-bit control signals. In our design we add a 16-bit counter to calculate either the LED turn-on time or the utilization rate. If the period of the clock is 1 second, the overall system may count to 65536 seconds. If we adjust it to 2 seconds, the system can count to almost 36.4 hours. We can also use the higher 2 bits as the set of brightness bits. Our design has 4 sets of brightness patterns, and each set has 8 levels of brightness, but 4 sets are selected by the
IEEE CCECE 2011 - 000236
3. LIGHT CONTROL IN A DLDL Under normal circumstances, if a user directly touches the electrodes the operation may easily go awry because of dust on the touch area. But in our design as we increase the sensitivity of each electrode and incorporate this increase in the software modules to judge the finger moving between two electrodes, we reduce that possibility. When the user only touches a contact area of a single electrode, the software module recognizes the single touch but does not respond; the user must slide between two electrodes, and then the software module generates the control signal. Fig. 6 shows the control flow of the light control of the DLDL. The top of Fig. 6 shows the flowchart of the main program, which moves in circles to detect four electrodes that have been touched. Only the traditional sensing by touch waits for this step. In our design we rearrange the four sub-programs: turn on, turn off, increase brightness and decrease brightness. When the TP1 is pressed, the system enters the “Turn off” sub-program which continues sensing whether the TP2 electrode is being pressed down. Because we adjust the PCB of the touch pad size in order to cause the finger to move between two pads to follow the sequence change (TP1=1 AND TP2=0), (TP1=1 AND TP2=1), (TP1=0 AND TP2=1), the system may judge that the finger is making a “Turn off” movement, while a control signal is simultaneously sent to the MCU; this applies likewise to the other three sub-program movement functions.
need for a heat sink. We divide the brightness into 8 scales from 0% to 100% and store eight patterns in the memory of the MCU. To adjust the brightness of the DLDL the user only touches the control pad. The MCU then selects the corresponding pattern output and sends it to the latch and driver circuit to drive the LED array. The left-hand side of Fig. 7 shows the picture of our DLDL. The pattern of the LED array is at the top of the picture as the light source, and the bottom of the left-hand side represents both the touch pad area and the latch and control circuit. The right-hand side of Fig. 11 shows the different levels of brightness and the touch pad area of the DLDL.
Fig. 7. Photo of digital LED desk lamp. Fig. 8 shows the brightness level and power consumption of the DLDL while the LED array is located 45 cm above the desk. Every step of the level of brightness has a different power consumption.
700
5.94 5.39
Brightness (Lux)
600 500
Typical brightness level of a desk lamp
4.73
6.60 660
600
6.00
534
465
5.00
3.96
400
3.19 2.20
300
1.32
200
7.00
390
4.00
305
3.00
213 2.00
114 100 0
Power Consumption (W)
counter. Therefore when the design runs an extended period cycle, we can use our design for nearly 36 hours. That is the reason why the turn-on time of all LEDs is almost the same.
1.00
0.11 0
0.00
Level 0 Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 Level 8 (0%) (12.5%) (25%) (37.5%) (50%) (62.5%) (75%) (87.5%) (100%)
Brightness Level
Fig. 8. DLDL consumption.
Fig. 6. Flowchart of the light control of the DLDL.
brightness
LUX
level
Power Consumption
and
its
power
Fig. 9 shows the space distribution of the brightness level. The slope of the brightness level from the DLDL is smooth. In the typical reading area (-25 cm to +25 cm) the brightness level still has the 65% from the center area.
4. IMPLEMENTATION RESULTS In our design each LED of the LED array has only two states, “on” or “off”. Moreover, there is no flash and no
IEEE CCECE 2011 - 000237
[2] Wai-Keung Lun, K. H. Loo, Siew-Chong Tan, Y. M. Lai, and C. K. Tse, “Bilevel Current Driving Technique for LEDs”, IEEE Transactions on Power Electronics ,Vol. 24 , Issue 12, pp. 29202932, 2009.
Unit: Lux 700
Brightness
600 500
12.5% 25% 37.5% 50% 62.5% 75% 87.5% 100%
400 300 200 100
+ 50cm
+ 40cm
+ 30cm
+ 20cm
+ 10cm
Center
- 10cm
- 20cm
- 30cm
- 40cm
- 50cm
0
Distance from 50 ~ 50cm
Fig. 9. DLDL brightness level around the reading area. Table II is a comparison of a standard fluorescent desk lamp, an LED (PWM) desk lamp and our DLDL with regard to brightness and power consumption. The brightness of a typical fluorescent desk lamp can’t be adjusted, but with our LED lamp a digital adjustment is possible. For the same brightness our design consumes the least power, because we use 128 low-power LEDs, therefore our design does not need to add a heat sink on the LED base board and hence provides greater power and cost-efficiency in comparison with other designs. TABLE II
Adjustable brightness Power consumption Brightness
Desk lamps with different technologies DLDL LED desk Fluorescent lamp (Digital LED desk lamp (PWM) desk lamp) No Yes (Analog) Yes (Digital) 16.83 W 9.46 W 6.60 W 580 Lux 910 Lux 660 Lux
5. CONCLUSION In this paper we have proposed a design for a digital LED desk lamp using the halftone method and a touch pad. We use a group of low-power LEDs to form an LED array. Our design consumes less power than a fluorescent desk lamp, as shown in Table II. In addition our design does not need a heat sink, since a group of low-power LEDs is used, while the PWM method requires a heat sink because it uses highpower LEDs. Finally, our design provides a digital control of an LED desk lamp by using a touch pad as the user interface to easily adjust the brightness level. 6. REFERENCES [1] The Electric Power Research Institute, “End-Use Energy Efficiency and Demand Response in a Low-Carbon Future Program 170”, 2009
[3] B. George, H. Zangl, T. Bretterklieber, and G. Brasseur, “Seat Occupancy Detection Based on Capacitive Sensing”, IEEE Transactions on Instrumentation and Measurement, Volume 58, Issue 5, pp. 1487-1494, May 2009. [4] R. W. Floyd and L. Steinberg, “An Adaptive Algorithm for Spatial Grayscale”, Proceedings of Society for Information Display, Vol. 17(2), pp. 75-77, 1976. [5] A. Makur, and A. Kumar, “Iterative error diffusion halftoning using a zero phase error filter”, Proceedings of International Conference on Image Processing, 1997. Vol. 1, pp. 795-798, 1997. [6] Yihua Zhou, and Haijun Cao, “A Variable Printer Model in Tone-Dependent Error Diffusion Halftone”, International Conference on Computer Science and Software Engineering, Vol. 6, pp. 101-104, 2008. [7] Masahiro Nishikawa, Yoichi Ishizuka, Hirofumi Matsuo, and Koichi Shigematsu, “An LED Drive Circuit with Constant-OutputCurrent Control and Constant-Luminance Control”, INTELEC '06, 28th Annual International Telecommunications Energy Conference 2006, pp. 1-6, 2006. [8] Qingcong Hu, and R. Zane, “LED Drive Circuit with Series Input Connected Converter Cells Operating in Continuous Conduction Mode”, Twenty-Fourth Annual IEEE Applied Power Electronics Conference and Exposition, pp. 1511-1517, 2009. [9] M. Ogihara, H. Fujiwara, M. Mutoh, T. Suzuki, T.Igari, T. Sagimori, H. Kurokawa, T. Kaneto, H. Furuta, I. Abiko, and M. Sakuta, “LED array integrated with Si driving circuits for LED printer printhead”, Electronics Letters, Vol. 42, Issue 15, pp. 881883, 2006. [10] S. Mascaro, and H. H. Asada, “Virtual switch human-machine interface using fingernail touch sensors”, Proceedings of 1999 IEEE International Conference on Robotics and Automation, 1999 Vol. 4, pp. 2533-2538, 1999. [11] K. Watanabe, S. Ichikawa, and F. Hara, “A multi-link robotic finger-type soft touch-sensor system”, Proceedings of IEEE Sensors, pp. 1530-1533, 2004. [12] W. M. Jubadi, and N. Zulkifli, “Programmable infrared accessory light switch”, International Conference on Intelligent and Advanced Systems, ICIAS 2007, pp. 1130-1134, 2007. [13] S. Saponara, F. Iacopetti, A. Carrafiello, E. Valentini, L. Fanucci, and B. Neri, “Capacitive sensors for process control in industrial marble machines”, IDAACS 2009, IEEE International Workshop on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications, pp. 142-147, 2009.
IEEE CCECE 2011 - 000238