Monthly Archives: November 2012

looking for production

Open hardware does not only mean that it’s free for anyone to tinker with it, modify it and use it, it also means that everybody is free to put it into production. Usually, you’d do that once you have made significant modifications to it, like, maybe, built an arduino like uC into a larger design.

It also means that you can take a project that has been abandoned for some reason and keep it alive. That’s what I’m trying to do here. While Neuroelec is away for reasons noone seems to know, there’s still demand for his excellent high power LED shield and thus I’m trying to not only scratch my own itch (I need a few more) but also, maybe, provide them to the others who are looking for a simple solution to drive 700mA LEDs en masse.

Thankfully, Neuroelec has made all required documentation and software available, either through his blog  or through google code, this way, I think, I should have everything needed to start another small production run. My problem is: despite the fact that I’ve tinkered with electronics for many years, I’ve never actually had anything produced in even a small batch. I’ve sent out e-mails to request prices, but what I usually got was board prices, not full production prices. I’ll have to keep looking, but I’m hopeful that I can provide a number of fully populated boards no later than January.

Power LED Review

1 year ago

 

led1

 

There are many different power LEDs from manufactures. Even the same LEDs mounted on different boards. I have some high power LEDs that I bought for the LED shield. Here is a brief review on these for the people who consider to buy one of those.

 

 

White LED

 

350mA White LED

 

led7

The LED is one of most common 350mA white LED and is copycat of famous Luexeon I. I bought it from Sparkfun but it is likely sourced from China. It come with MCPCB. Measured Vf=3.18 at 350mA

 

700mA Cree XR-E Q2

 

led5

Cree is a big name in the high power LED industry. They are simply cutting-edge in term of LED chip technology along with Philips. They are making one of the most efficient LED in the market. XR-E is also quite efficient 700mA line. “Q2” is the bin codes which indicate basically brightness LED among the same XR-E. There are quite a bit of price difference depending on bin code. Better bin code means brighter and better efficiency. (P2 bin – 67lm, Q2 – 87lm, Q5 – 107lm, all at 350mA, minimum flux). You can buy XR-E P4, Q2, Q5, R2 bins from dealextreme. Measured Vf=3.62 at 700mA

http://www.dealextreme.com/p/cree-xr-e-q2-emitter-with-star-2395

 

 

 

RGB LED

 

700mA Cree XR-E Color

 

led4

These are red, green, blue LEDs that are same series with white XR-E. Bought them from dealextreme as well. they are efficient and bright but don’t have any bin code. Color LED have slightly different wavelength depending on bin code. Since they are three separate LED, they are not good for RGB color mixing. Lens from Sparkfun can be used with these three LEDs for color mixing though. If you know any place I can buy Cree RGB mounted on single MCPCB, please let me know. Measured Vf at 700mA are red = 2.16V, green = 3.65V, blue =3.2V

http://www.dealextreme.com/p/blue-cree-led-emitter-20mm-3-2-3-4v-1775

http://www.dealextreme.com/p/green-cree-led-emitter-20mm-1-9-2-2v-1777

http://www.dealextreme.com/p/red-cree-led-emitter-20mm-1-9-2-2v-1776

 

3W (350mA x 3) RGB LED

 

led6

This is basically 3 LED dies (Red, Green, Blue) combined in a chip. Each color is rated 350mA. I bought it from sprakfun. Almost same kind are widely available from many places.  Since 3 different LED dies are in a chip, it has very good color mixing. Quility of build is just fine. Solder points are a bit too close. Be careful not to make a short. Measured Vf at 350mA are red=2.36, green = 3.24, blue = 3.18

http://www.sparkfun.com/products/8718

 

10W (350mA x 3 x 3) RGB LED

 

led8

When you want to have a powerful RGB LED that has a good color mixing, this is what your looking for. This LED is exactly 3x 3W RGB LED above. This LED has 3x 350mA in series for each color. This is not exactly 10W more less 8.8W, but still very bright. Quality of build is very good. It is cheaper than similar 700mA Lumiled comination. Measured Vf at 350mA are red=6.39V, Green=9.38V, Blue=9.22V

http://www.dealextreme.com/p/10w-500-lumen-multi-color-rgb-led-emitter-metal-plate-140-degree-44043

 

700mA Philips Lumiled Color

 

led2led9

 

Philips is another big name in LED market along with Cree, Osram, SSC and so on. They make very efficient 700mA. Unlike Cree color led, you can easily find RGB LEDs that are mounted on single MCPCB or FR-4 PCB. Believe or not red big PCB (from Sparkfun) and small white star MCPCB (from ledsupply) have same kinds of LEDs. They have all Three RGB 700mA Lumileds. A difference in LEDs is one from Sparkfun has royal blue rather than ragular blue. Royal blue is the way how Philips call deeper blue (shorter wave length). MCPCB has smaller thermal resistance than FR-4 PCB. Small thermal resistance means cooler LED (about 10 Celsius degree difference). Due to the larger size of PCB (Sparkfun), it has poorer RGB color mixing.

 

http://www.sparkfun.com/products/9738

http://www.sparkfun.com/products/9732

 

http://ledsupply.com/07007-prgb0-0.php

http://ledsupply.com/10509.php

LED Brightness to your eye, Gamma correction – No!

1 year ago

Human perceive brightness change non-linearly

When you want to change the brightness of LED or any light source, one thing you need to consider is how human perceive the brightness. As you see in the following chart, human perceive the brightness change non-linearly. We have better sensitivity at low luminance than high luminance. For example, when we control LED brightness using Arduino PWM, we see big brightness change between analogWrite(9,1) and analogWrite(9,2). We don’t see brightness change between analogWrite(9,244) and analogWrite(9,255). If you didn’t know, just quickly test yourself with Arduino. If you want to control LED brightness linearly to your eye, it require to have some adjustment.

Mis-understanding of Gamma Correction

In Arduino or any microcontroller, a common way to achieve linear brightness change is a lookup table that compensate or correct the value according to the curve. There are a common misunderstand or confusion regarding what curve to use. Many people use so called gamma correction table or equation which is not related with human perception of brightness. The Maxim App note describe “Gamma correction is used to correct for the nonlinear relationship between luminance and brightness” which is simply wrong. The gamma correction is used to correct nonlinear relationship between applied voltage to CRT and luminance of CRT. It is nothing to do with human perception. It is not just Maxim, I could find many implementation of gamma correction to correct luminance and brightness. The cyz_RGB also use the gamma correction.

Brightness_perception

Why people so easily confuse about it? The gamma correction is necessary for the display application. When movie or image is displayed on LED matrix like a stadium display, you want to have gamma correction since movie and image data itself is already gamma corrected data. It is also useful for LED based LCD backlight. When LED is used for lighting, however gamma correction is irrelevant. A funny thing is co-incidentally gamma correction and human perception of luminance is very similar. http://www.poynton.com/PDFs/SMPTE93_Gamma.pdf Take a look at following chart. Again it is just a co-incidence. So somehow the gamma correction is close approximation of human perception the luminance.

Correction calculation of luminance and brightness describe in CIE 1931 report then used for CIELAB color space.

L* = 116(Y/Yn)^1/3 – 16 , Y/Yn > 0.008856
L* = 903.3(Y/Yn), Y/Yn <= 0.008856

Where L* is lightness, Y/Yn is Luminance ratio.

For the correction curve, you need to inverse the equation.

CIElab_VS_Gamma

Due to the similarity between gamma correction and brightness vs luminance, there is only minor differences. If you still want to have more accurate correction, you can use following table for cyz_RGB firmware. Don’t get confused about 16bit valves, your PWM is still 8 bit. It is internally use 16 bit value for conversion.

 1:
 2: /*
 3: 16 bits to 8 bit CIE Lightness conversion
 4: L* = 116(Y/Yn)^1/3 - 16 , Y/Yn > 0.008856
 5: L* = 903.3(Y/Yn), Y/Yn <= 0.008856
 6: */
 7:
 8: prog_uint16_t pwm_table[] PROGMEM = {
 9:     65535,    65508,    65479,    65451,    65422,    65394,    65365,    65337,
 10:     65308,    65280,    65251,    65223,    65195,    65166,    65138,    65109,
 11:     65081,    65052,    65024,    64995,    64967,    64938,    64909,    64878,
 12:     64847,    64815,    64781,    64747,    64711,    64675,    64637,    64599,
 13:     64559,    64518,    64476,    64433,    64389,    64344,    64297,    64249,
 14:     64200,    64150,    64099,    64046,    63992,    63937,    63880,    63822,
 15:     63763,    63702,    63640,    63577,    63512,    63446,    63379,    63310,
 16:     63239,    63167,    63094,    63019,    62943,    62865,    62785,    62704,
 17:     62621,    62537,    62451,    62364,    62275,    62184,    62092,    61998,
 18:     61902,    61804,    61705,    61604,    61501,    61397,    61290,    61182,
 19:     61072,    60961,    60847,    60732,    60614,    60495,    60374,    60251,
 20:     60126,    59999,    59870,    59739,    59606,    59471,    59334,    59195,
 21:     59053,    58910,    58765,    58618,    58468,    58316,    58163,    58007,
 22:     57848,    57688,    57525,    57361,    57194,    57024,    56853,    56679,
 23:     56503,    56324,    56143,    55960,    55774,    55586,    55396,    55203,
 24:     55008,    54810,    54610,    54408,    54203,    53995,    53785,    53572,
 25:     53357,    53140,    52919,    52696,    52471,    52243,    52012,    51778,
 26:     51542,    51304,    51062,    50818,    50571,    50321,    50069,    49813,
 27:     49555,    49295,    49031,    48764,    48495,    48223,    47948,    47670,
 28:     47389,    47105,    46818,    46529,    46236,    45940,    45641,    45340,
 29:     45035,    44727,    44416,    44102,    43785,    43465,    43142,    42815,
 30:     42486,    42153,    41817,    41478,    41135,    40790,    40441,    40089,
 31:     39733,    39375,    39013,    38647,    38279,    37907,    37531,    37153,
 32:     36770,    36385,    35996,    35603,    35207,    34808,    34405,    33999,
 33:     33589,    33175,    32758,    32338,    31913,    31486,    31054,    30619,
 34:     30181,    29738,    29292,    28843,    28389,    27932,    27471,    27007,
 35:     26539,    26066,    25590,    25111,    24627,    24140,    23649,    23153,
 36:     22654,    22152,    21645,    21134,    20619,    20101,    19578,    19051,
 37:     18521,    17986,    17447,    16905,    16358,    15807,    15252,    14693,
 38:     14129,    13562,    12990,    12415,    11835,    11251,    10662,    10070,
 39:     9473,    8872,    8266,    7657,    7043,    6424,    5802,    5175,
 40:     4543,    3908,    3267,    2623,    1974,    1320,    662,    0
 41: };

Patched cyz_RGB firmware can be found at google code download.

http://code.google.com/p/neuroelec/downloads/list

You can test linearity of LED brightness to your eye using following Arduino example code.

Just put any LED on pin 9 with current limiting resistor.

 1: /*
 2:  Change brightness of LED linearly to Human eye
 3:  32 step brightness using 8 bit PWM of Arduino
 4:  brightness step 24 should be twice bright than step 12 to your eye.
 5: */
 6:
 7: #include <avr/pgmspace.h>
 8: #define CIELPWM(a) (pgm_read_word_near(CIEL8 + a)) // CIE Lightness loopup table function
 9:
 10: /*
 11: 5 bit CIE Lightness to 8 bit PWM conversion
 12: L* = 116(Y/Yn)^1/3 - 16 , Y/Yn > 0.008856
 13: L* = 903.3(Y/Yn), Y/Yn <= 0.008856
 14: */
 15:
 16: prog_uint8_t CIEL8[] PROGMEM = {
 17:     0,    1,    2,    3,    4,    5,    7,    9,    12,
 18:     15,    18,    22,    27,    32,    38,    44,    51,    58,
 19:     67,    76,    86,    96,    108,    120,    134,    148,    163,
 20:     180,    197,    216,    235,    255
 21: };
 22:
 23: int brightness = 0;    // initial brightness of LED
 24: int fadeAmount = 1;
 25:
 26: void setup()  {
 27:   // declare pin 9 to be an output:
 28:   pinMode(9, OUTPUT);
 29: }
 30:
 31: void loop()  {
 32:   // set the brightness of pin 9:, 0-31, 5 bit steps of brightness
 33:   analogWrite(9, CIELPWM(brightness));
 34:
 35:   // change the brightness for next time through the loop:
 36:   brightness = brightness + fadeAmount;
 37:
 38:   // reverse the direction of the fading at the ends of the fade:
 39:   if (brightness == 0 || brightness == 31) {
 40:     fadeAmount = -fadeAmount ;
 41:   }
 42:   // wait for 500 milliseconds to see the bightness change
 43:   delay(500);
 44: }

keeping things up

A chap by the nickname of “neuroelec” created an Arduino shield to drive high power LEDs easily.

Sadly, he disappeared at one point and we were all left without a message or any kind of information.

I’ve set up this blog to capture the information on his site, http://neuroelec.com/hp-rgb-led-shield-2, which is about to expire, to keep the project going. I hope that he’ll return and, if so, he’ll be ok with this measure.
Mostly, however, I hope he’s ok.

pj