Showing posts with label LED. Show all posts
Showing posts with label LED. Show all posts

Thursday, November 17, 2011

First Hack - The LED Strip

Finally finished my first hack.

I needed a light for my kitchen counter, so I ordered a LED Strip from eBay and hacked an AC adapter to include an ON / OFF button and to connect it to mains without using a power socket.

So here's the theoretical work:

To cover the surface of my counter I used 48 segments of the LED strip (about 2 meters). Each segment has 3 white SMD leds (type 3528) and a 150 Ohm resistor. For it to work it needs a 12V power source with sufficient current output.
After learning from [ladyada] about these strips I figured that the theoretical current each segment needs to function at it's maximum is 16 mA. That is:
12V total - (3 leds * 3.2V) / 150R = 0.016A

For the total 48 segments that's 768 mA, resulting in under 10W lighting!!!
For that I bought a SMPS AC adapter in order to guarantee the regulated 12V while using that much current. An average (unregulated) AC adapter wouldn't provide nor the 12V neither near the maximum 1A stated. [ladyada] also shed me some lights on that matter.

White LED StripSuitable AC AdapterThe best switch button I could find

For the practical work:

As you will see for yourself, the tools weren't exactly the best suited for the job: a kitchen knife to cut, a soldering iron to remove plastic, a hammer and a nail to open holes...

The innards of a power outletMains power derivationAdhesive cable duct

In order to cut the space for the switch button in the AC adapter, my kitchen knife wasn't enough, so I used my soldering iron to heat a metal needle and a kind of a thick clip used by stores to keep shirts folded in it's package. Even so it was a hard work.

Pierced top cover from the AC AdapterCreating the space for the switch buttonThe working conditions

Then I just needed to solder the switch button and the wire to the board and cover it all with electrical tape.

The final cutConnecting the switch buttonThat's a wrap

And there we have it!
Our working LED Strip!


Thursday, March 17, 2011

RGB LED Part II

After some absence, I finally got some weekend time to play with my electronics.
Now that I have 100 new RGB LEDs, it’s time for some experiments.

I wanted to know how to control the colors emitted by this LEDs so here’s how I did it.

First I searched for a datasheet and found this one on Sparkfun.
According to it, the recommended current is 20mA, and the voltages are 2.0V, 3.2V and 3.2V for red, green and blue. As I wrote on my last post, each color has a different lead, and there is another for Ground (GND). These are common cathode LEDs, as it receives energy on the leads for the colors and all that energy is returned to the circuit on a single lead.

As I source all my projects with the Arduino connected to the laptop (as it already is a regulated power source), I calculated the resistors for a 5V source power.

V=R.I
Red --> (5 – 2.0) / 0.20 = 150 Ohm
Green / Blue --> (5 – 3.2) / 0.20 = 90 Ohm (The closest I have is 100 Ohm)


Connecting all wires, we can see that 3 different tiny LEDs lit up inside our 5mm RGB LED as you can see below.

Also we can see that we can’t count on a mixed color far from the LED, as the three parts point to different directions, although there might be some ways to try to improve that situation.

So the LED lights up. Big deal! Let’s play some more...

The next step is to be able to combine the three colors into making new colors.

First I tried to make a simple program on the Arduino using a (very, very poor) simulated PWM. Basically I would light up only one color at a time and tried different delay() times, to control the ‘quantity of color embedded’ in the final result. That idea came from the LED matrix project, as some kind of multiplexing.
Please, don’t waste your time on something like this.

After some online searching, I saw that the best way is to use ‘real’ PWM, as in using the PWM pins in the Arduino and analogWrite() the value (0-255) for each color. This controls the voltage at the pin, altering the luminosity of the LED. It is best to keep all color lit at the same time (not using delay()).

So now we can programmatically define the color we want to obtain, in theory. Again, with clear LEDs, it is kind of hard to observe a good mix of the light emitted by the three ‘sub-LEDs’.

But isn’t it cooler to be able to mess with those values by hand? So enter the potentiometers (pots).
My first try was to use 3 pots, to control each color. As two of them aren’t ‘breadboard friendly’, you can see below what a mess it is to connect it all.


But then I thought: “What a good opportunity to try to use push buttons.”
So I replaced the 3 potentiometers by 3 push buttons, and altered the Arduino program to cycle through the values for each color.
A simple control to avoid altering the values too much in one push was to have a small delay() after the digitalRead() of each button.




You might notice some resistors connected from each button to GND in parallel with the reader pins of the Arduino.
Those are push-down resistors.

And here is the code:
int R = 9;
int G = 10;
int B = 11;

int vR = 0;
int vG = 0;
int vB = 0;

int T = 200;
int d = 15;

void setup() {
pinMode(R, OUTPUT);
pinMode(G, OUTPUT);
pinMode(B, OUTPUT);
pinMode(7, OUTPUT);

pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(4, INPUT);

digitalWrite(7, HIGH);
}

void loop() {
if(digitalRead(2) == HIGH)
{
vR+=d;
if(vR>l)
vR=0;

delay(T);
}

if(digitalRead(3) == HIGH)
{
vG+=d;
if(vG>l)
vG=0;

delay(T);
}

if(digitalRead(4) == HIGH)
{
vB+=d;
if(vB>l)
vB=0;

delay(T);
}

analogWrite(R, vR);
analogWrite(G, vG);
analogWrite(B, vB);
}


So to end it, I wanted to create a demo to cycle to all colors as simply as possible. I found ‘Hue-controllable RGB LED lamp‘ that shows how to cycle through the colors using only a Hue value.
I tried to use the conversion code directly from http://www.easyrgb.com/math.php?MATH=M21#text21, but all the values were quite wrong, so I lazily used the code akgraphics provided on the first post.
As the code was kind of slow because of lots of (unnecessary) math, I reduced it to:

void setup() // run once, when the sketch starts
{
//Serial.begin(9600); // set up Serial library at 9600 bps
}

void h2rgb(float H, int& R, int& G, int& B) {
int var_i;
float S=1, V=1, var_1, var_2, var_3, var_h, var_r, var_g, var_b;

var_h = H * 6;
if ( var_h == 6 ) var_h = 0; //H must be < 1
var_i = int( var_h ) ; //Or ... var_i = floor( var_h )

//var_1 = V * ( 1 - S );
var_1 = 0;

//var_2 = V * ( 1 - S * ( var_h - var_i ) );
var_2 = ( 1 - ( var_h - var_i ) );

//var_3 = V * ( 1 - S * ( 1 - ( var_h - var_i ) ) );
var_3 = ( var_h - var_i );

if ( var_i == 0 ) {
var_r = V ;
var_g = var_3 ;
var_b = var_1 ;
}
else if ( var_i == 1 ) {
var_r = var_2 ;
var_g = V ;
var_b = var_1 ;
}
else if ( var_i == 2 ) {
var_r = var_1 ;
var_g = V ;
var_b = var_3 ;
}
else if ( var_i == 3 ) {
var_r = var_1 ;
var_g = var_2 ;
var_b = V ;
}
else if ( var_i == 4 ) {
var_r = var_3 ;
var_g = var_1 ;
var_b = V ;
}
else {
var_r = V ;
var_g = var_1 ;
var_b = var_2 ;
}

R = (1-var_r) * 255; //RGB results = 0 ÷ 255
G = (1-var_g) * 255;
B = (1-var_b) * 255;
}

void loop() // run over and over again
{
for(int val=0;val<1024;val++)
{
//Serial.println(val);
float h = ((float)val)/1024;
int h_int = (int) 360*h;
int r, g, b;
h2rgb(h,r,g,b);

analogWrite(9, r);
analogWrite(10, g);
analogWrite(11, b);

delay(10);
}
}

Monday, January 24, 2011

RGB LED

This weekend I started playing with a RGB LED. This LEDs have 3 separate light emitting materials. One for red (R), other for green(G) e the last for blue(B).

As you can see in the image below, there are 4 leads. This LED has a common cathode, which means that all 3 parts share the connection to GND.


From up to down, we have Blue, Green, Ground and Red.

To start experimenting, I searched for a generic datasheet, as I don't know any reference for this LED. It recommended a 20mA current and stated that the typical voltages are 2.0V (Red) and 3.2V (Green and Blue).
As I was drawing power to the breadboard from the Arduino (only for power), I did the math for the resistors.

V=R.I
(5-2)/0.02=150 Ohm
(5-3.2)/0.02=90 Ohm

There where 3 150 Ohm resistors in the anti-static bag the LED came in, but I decided to use 100 Ohm resistors for green and blue.

So, the simplest test was to light each one at a time:

Check!
Check!
Check!

Next step, how about lighting all at once?
It would be nice, but there was a problem. When I disconnected the GND from the breadboard, I accidentally let it touch the lead for the red color. Without a resistor to limit the current passing at the moment, it burned out in a second.

So what could I do with a 'limp led'? I tried to combine the green and the blue colors to see the effect, but I ended up getting a slightly lighter blue.
When I read the datasheet I noticed that the brightness (measured in candela) of the 3 colors isn't the same. It also looks like the blue color is more diffuse (spreads all around) as the green light appears more directional. I filmed it try to show what I mean, but the colors aren't very noticeable.



The good news is that I ordered a 100 RGB led pack on eBay, so if all goes well, I will try again soon.

One hint: I read that PWM is the way to go in order to combine colors...

P.S. The LEDs have arrived, all working and with some free resistors. Thank you giorgio11185!

Saturday, December 4, 2010

Big LED Matrix

In my last post I built a 5x7 LED matrix. After reading this hackaday article, I decided to expand my LED matrix to the most.


In order to reuse the board I had to grow on the columns, which are 7 leds each.
So I soldered 7 more columns to a total of 12. With the existing 7 rows, I will need now 19 pins of the Arduino, the same as in the Jack-o-lantern (14+5), but my matrix totals 84 leds, against 70 of the mentioned article.


As I'm lighting by column, I can send a current of 20mA for the 7 leds to total the same safe 140mA to the Arduino.

In the previous post I also mentioned the issue when each pin of the Arduino can only support a 40mA current. To solve it we need to connect transistors to the matrix cathodes, for diverting that current to a real GND pin. That way, the Arduino pins that were connected to the cathodes will now connect to the base pin of each transistor, and the other pins will receive the total column current and send it to GND.
Notice that the GND pins can only support up to 200mA.


There are two types of transistors we can use in this case.
Here's the basic lecture I read on their differences.
In this case the difference will be how to program the Arduino. Using NPN transistors means we need to set the pin to HIGH to light a led column, an using PNP transistors the pin has to be LOW.

I wanted to use PNP transistors because that way I could save my NPN for other projects. But after some tests on finding the best resistor to attach to the base, I didn't achieve any satisfactory result, in comparison to the currents I could obtain using NPN transistors.

According to the math, I should be using 100 Ohm resistors for each line, and 2.2k Ohm resistors for the base of each transistor, but after some tests with a multimeter, those numbers were quite different from the reality.
I ended up using 47 Ohm for the lines and 1k Ohm for the transistors.
[WILL TRY TO UNDERSTAND THIS BETTER]

I used a flat ribbon for the wires to the Arduino. The male connector soldered on the board may look as a tidy way to use, but it's a nighmare to solder the wires, so I wouldn't recommend to use it for this kind of amateur project...

To finish the hardware I applied hot glue on the connections for isolation and fixation.


Now it's time for the software...

//
// Controlo de uma matriz de LEDs 12x7
// thylux
//
int L01 = 4;
int L02 = 6;
int L03 = 5;
int L04 = 8;
int L05 = 10;
int L06 = 12;
int L07 = 11;
int C01 = A5;
int C02 = A4;
int C03 = A3;
int C04 = A2;
int C05 = A1;
int C06 = A0;
int C07 = 0;
int C08 = 1;
int C09 = 2;
int C10 = 3;
int C11 = 7;
int C12 = 9;

void setup()
{
  // Positivos
  pinMode(L01, OUTPUT);
  pinMode(L02, OUTPUT);
  pinMode(L03, OUTPUT);
  pinMode(L04, OUTPUT);
  pinMode(L05, OUTPUT);
  pinMode(L06, OUTPUT);
  pinMode(L07, OUTPUT);
  // Negativos
  pinMode(C01, OUTPUT);
  pinMode(C02, OUTPUT);
  pinMode(C03, OUTPUT);
  pinMode(C04, OUTPUT);
  pinMode(C05, OUTPUT);
  pinMode(C06, OUTPUT);
  pinMode(C07, OUTPUT);
  pinMode(C08, OUTPUT);
  pinMode(C09, OUTPUT);
  pinMode(C10, OUTPUT);
  pinMode(C11, OUTPUT);
  pinMode(C12, OUTPUT);

  //Serial.begin(9600);
}

int freq = 1000 / 600; // Hz
void loop()
{
  //char debug[10];
  
  // Demo
  for(int i = 1; i <= 12; i++)
  {
      for(int j=0; j<7; j++)
      {
        light(i, (byte) 2^j);
        delay(100);
      }
        
      //pot = map(analogRead(A0), 0, 1023, 0, 500);
      //delay(pot);
    
      //sprintf(debug, "i:%d j:%d", i, j);
      //debug[9]='\0';
      //Serial.println(debug);
  }
  
  int i=0;
  while(i<10000)
  {
      writeSymbol('a');
      i++;
  }
  
  i = 0;
  while(i<10000)
  {
      writeSymbol('b');
      i++;
  }
}

void writeMessage(char* msg)
{
  for(int i = 0; i < sizeof(msg); i++)
    writeSymbol(msg[i]);
}

void writeSymbol(char chr)
{
  switch(chr)
  {
      case 'a':
      case 'A':
        light(1, B1111100);
        light(2, B0010010);
        light(3, B0010001);
        light(4, B0010010);
        light(5, B1111100);
        break;
      case 'b':
      case 'B':
        light(1, B1111111);
        light(2, B1001001);
        light(3, B1001001);
        light(4, B1001001);
        light(5, B0111110);
        break;
  }
}

// Ilumina os LED indicados na coluna
void light(int column, byte data)
{
  reset();
  
  switch(column)
  {
      case 1: digitalWrite(C01, HIGH); break;
      case 2: digitalWrite(C02, HIGH); break;
      case 3: digitalWrite(C03, HIGH); break;
      case 4: digitalWrite(C04, HIGH); break;
      case 5: digitalWrite(C05, HIGH); break;
      case 6: digitalWrite(C06, HIGH); break;
      case 7: digitalWrite(C07, HIGH); break;
      case 8: digitalWrite(C08, HIGH); break;
      case 9: digitalWrite(C09, HIGH); break;
      case 10: digitalWrite(C10, HIGH); break;
      case 11: digitalWrite(C11, HIGH); break;
      case 12: digitalWrite(C12, HIGH); break;
  }
  
  digitalWrite(L01, data & B0000001 ? HIGH : LOW);
  digitalWrite(L02, data & B0000010 ? HIGH : LOW);
  digitalWrite(L03, data & B0000100 ? HIGH : LOW);
  digitalWrite(L04, data & B0001000 ? HIGH : LOW);
  digitalWrite(L05, data & B0010000 ? HIGH : LOW);
  digitalWrite(L06, data & B0100000 ? HIGH : LOW);
  digitalWrite(L07, data & B1000000 ? HIGH : LOW);
  
  delay(freq);
}

void reset()
{
  digitalWrite(L01, LOW);
  digitalWrite(L02, LOW);
  digitalWrite(L03, LOW);
  digitalWrite(L04, LOW);
  digitalWrite(L05, LOW);
  digitalWrite(L06, LOW);
  digitalWrite(L07, LOW);
  
  digitalWrite(C01, LOW);
  digitalWrite(C02, LOW);
  digitalWrite(C03, LOW);
  digitalWrite(C04, LOW);
  digitalWrite(C05, LOW);
  digitalWrite(C06, LOW);
  digitalWrite(C07, LOW);
  digitalWrite(C08, LOW);
  digitalWrite(C09, LOW);
  digitalWrite(C10, LOW);
  digitalWrite(C11, LOW);
  digitalWrite(C12, LOW);
}

Note:
During my initial tests I couldn't understand why the columns connected to pin 0 (RX) and pin 1 (TX) were always HIGH.
I found later that it was caused by turning on Serial communication with Serial.begin().
The Serial was used to send debug information to the computer, so if you try to debug my program don't be alarmed by some row/column of leds not behaving as intended.

Friday, November 26, 2010

LED Matrix

After a very frail Pringles Led Matrix that kept falling apart, I turned myself to a perforated board.
Better restart on the basics...

So I built a new 5x7 LED Matrix:

(Yes, this newbie is soldering on the wrong side of the board...
For all the other newbies that might let this one pass, those circles around the holes are to help soldering the components and should be on the lower side.)

I chose to use 7 anode rows and 5 cathode columns, for no particular reason.

To test the connections I used a 9V battery and a 220 Ohm resistor. That creates a current of 27mA during the test. My Leds support 30mA max, so it's fine for testing purposes.


As this matrix will be controlled by an Arduino, the circuit voltage will be 5V. So I soldered 100 Ohm resistors to the columns, so that at any given time the lit LED closing the circuit receives the datasheet recommended 20mA at 5V. I chose to connect the resistors with the columns because that way I would only need 5 resistors. I could connect them to the rows, as they would have the same effect on the circuit.


In order to connect the rows without touching the columns, I use a screwdriver to help me bend the ends.


This circuit has 12 ends, and all must connect to the Arduino. The simplest form to connect them is by linking each end to an Arduino pin. As the resulting circuit is still very frail and hard to manage, and I didn't have enough parts to make a better solution, I connected the Arduino to a breadboard so I could test the circuit.
You will notice a potentiometer also connected to the Arduino. I used it to control the refresh rate of the matrix, by defining the value passed to the delay function between each pass.


The hardest part was to connect the circuit to the breadboard, because I had very little space to maneuver the LEDs ends below the board. Also I only had some already cut wires (in groups of 5 for each length) for use with a breadboard, that are not fit for this kind of connections. As you can see I had to use two wires with claw ends for the two remaining pins. Connected to those claws are ends I had to cut of broken LEDs, in order to connect to the breadboard below.



Well now to program the Arduino:
//
// Controlo de uma matriz de LEDs 5x7
// thylux
//

void setup() 
{
// Positivos
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
// Negativos
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);

//Serial.begin(9600);
}

int freq = 1000 / 600; // Hz
int b[5][7];
int pot = 0;

//   2   3   4   5   6   7   8 
// -----------------------------
// |7 1|6 1|5 1|4 1|3 1|2 1|1 1| 9
// ----------------------------- 
// |7 2|6 2|5 2|4 2|3 2|2 2|1 2| 10
// -----------------------------
// |7 3|6 3|5 3|4 3|3 3|2 3|1 3| 11
// -----------------------------
// |7 4|6 4|5 4|4 4|3 4|2 4|1 4| 12
// -----------------------------
// |7 5|6 5|5 5|4 5|3 5|2 5|1 5| 13
// -----------------------------

void loop() 
{
//char debug[10];

// Demo
for(int i = 1; i <= 5; i++)
{
for(int j = 1; j <= 7; j++)
{
light(i, j);
pot = map(analogRead(A0), 0, 1023, 0, 500);
delay(pot);

/*sprintf(debug, "i:%d j:%d", i, j);
debug[9]='\0';
Serial.println(debug);*/
}
}

int i=0;
while(i<1000)
{
write('a');
i++;
}
}

void write(char chr)
{ 
switch(chr)
{
case 'a':
case 'A':
b[0][0]=1; b[1][0]=1; b[2][0]=1; b[3][0]=1; b[4][0]=1;
b[0][1]=1; b[1][1]=0; b[2][1]=0; b[3][1]=0; b[4][1]=1;
b[0][2]=1; b[1][2]=0; b[2][2]=0; b[3][2]=0; b[4][2]=1;
b[0][3]=1; b[1][3]=1; b[2][3]=1; b[3][3]=1; b[4][3]=1;
b[0][4]=1; b[1][4]=0; b[2][4]=0; b[3][4]=0; b[4][4]=1;
b[0][5]=1; b[1][5]=0; b[2][5]=0; b[3][5]=0; b[4][5]=1;
b[0][6]=1; b[1][6]=0; b[2][6]=0; b[3][6]=0; b[4][6]=1;

}

for(int i = 1; i <= 5; i++)
{
for(int j = 1; j <= 7; j++)
{
if(b[i-1][j-1] == 1)
light(i, j);
}
}
}

// Ilumina apenas o LED indicado de acordo com a posicao na matriz
void light(int line, int column)
{
reset();

switch(column)
{
case 1: digitalWrite(2, HIGH); break;
case 2: digitalWrite(3, HIGH); break;
case 3: digitalWrite(4, HIGH); break;
case 4: digitalWrite(5, HIGH); break;
case 5: digitalWrite(6, HIGH); break;
case 6: digitalWrite(7, HIGH); break;
case 7: digitalWrite(8, HIGH); break;
}

switch(line)
{
case 1: digitalWrite(9, LOW); break;
case 2: digitalWrite(10, LOW); break;
case 3: digitalWrite(11, LOW); break;
case 4: digitalWrite(12, LOW); break;
case 5: digitalWrite(13, LOW); break;
}

pot = analogRead(0);
if(pot <= 0)
pot = 1;

pot = 1000/(600+(400/pot));
Serial.println(pot);

delay(pot);
}

void reset()
{
for(int i = 2; i<=8; i++)
digitalWrite(i, LOW);
for(int i = 9; i<=13; i++)
digitalWrite(i, HIGH);
}


This is just a basic program to try out the matrix. It lights only 1 LED at any given time and defines a very high refresh rate, so that to our eyes it would seem that all LEDs are on at the same time (persistance of vision - POV).
We use digitalWrite() to define if the pin(i) will provide 5V (HIGH) or act as GND - 0V (LOW).
To light a LED we need to HIGH the anode controlling pin and to LOW the cathode controlling pin.
With analogRead() we can read a number between 0 and 1023 from an analog pin, and with a potentiometer connected to it, we can physically control variables, as the delay between the lighting of a LED. For a friendlier range of values there is the map() function.

So after some programming this is the end result:



After some research for other Led Matrices on the web I found an interesting tutorial on hackaday. Now I will try to use more Leds on my matrix to make the best use of Arduino.
But there are some things to take into consideration...

My Led Matrix works because I'm only lighting ONE led a a time. If I tried to light more than two Leds in the same row/column at the same time I would burn my Arduino.
As you can see in the datasheet, each pin can only support 40mA. In lighting 1 Led, in this matrix, it creates a current of 20mA (as defined above). With 2 Leds lid, 40mA will run on the circuit.
As you probably can already tell, this current could be supplied by two different pins, but it would be received on another pin connected as output, or would use same input and different outputs. These pins are not real GND, only regular pins set at 0V to create the electron flow. And they can only support 40mA of it...

So to correct this issue I should be using transistors, but that I'll talk about in the next post (part 2).

Saturday, October 23, 2010

Less pins for More LEDs

I found some videos on multiplexing and charlieplexing by Kevin Darrah that i think to be very helpful for any novice on 'LED tingling'.

Multiplexing:



Charlieplexing:

Saturday, October 16, 2010

LED Matrix 101

As a dummy in electronics I still find somewhat difficult to understand most electrical schematics and what parts to use on my projects.

My first attempt to do something more elaborate than to burn LEDs directly on a battery was to understand how does a LED matrix work.

I've read about 'multiplexing' and 'persistence of vision' but how does it work and how can i build it?



Looking at the schematics it would seem that all the wires are connected, but you should connect all the positive ends (anodes) to form lines and the negative ends (cathodes) to form columns separately.
As it is something hard to breadboard, it's best to really solder it all (if you want to breadboard it anyway take a look at this).

My doubts were what resistances to use and how to calculate them for such a complex schematic. Well, after some thought, I realized it's not complicated.

What we do to light up a LED matrix is to light each LED individually at a time. We only do it so fast that our eyes won't notice.

So, we only need to take that single LED into account when doing the math. There's no serial this or parallel that to complicate as it would appear initially to the untrained eye. At any given point in time we are dealing with such a simple circuit as this:



I know that my blue LEDs consume about 4.5V on a 30mA current (as stated in here), so, to a 9V battery i should use a 150 Ohm resistance [V=R.I ==> R=(9-4.5)/0.03=150].
The closest value resistances I have are 220 Ohm, so I'll use those.

I didn't have a perforated board on me and couldn't buy one in time so i turned to a Pringles pack lid for a 'solid' base.

With a matrix designed in a piece of paper where to perforate and fit the LEDs, we get an interesting place to solder our LEDs.


This is the end result:



So what now? The next step shall be to connect it to the Arduino and make some letters appear on my home made LED matrix.

Tuesday, September 14, 2010

Why oh why does a LED need a Resistor?

For the people that don't know why should a resistor be connected in series with your LEDs, here is the best explanation i've seen so far (dummy proof, as I understood it :P ).

Driving An Led With Or Without A Resistor/

Wednesday, August 4, 2010

LEDs

Surgiu-me a oportunidade de comprar uns LEDs de alto rendimento a baixo preço.

Com 12€, lá vêm 500 azuis... O que fazer agora com tanto material?
O que gostava era de construir uma matriz para programar um jogo, como se vê em tanto tutoriais.

O que falta? Tempo e paciência...