Interactive LED Surface

by Lindermann95 in Circuits > LEDs

1395 Views, 8 Favorites, 0 Comments

Interactive LED Surface

Superficie_1.jpg
Superficie_2.jpg

Some time ago I made one of this interactive surfaces on my sidetable, the main function is that when you place something above the sensor the LEDs will turn on only in the sector where the object is...

Back then I didn't knew about phototransistors so I made it with photoresistors, it was a little bit less acurate, depending a lot of the surrunding light but now, with the help of some IR LED's and phototransistors (and an Arduino...) I was abe to even add some animations to it.

Join me in this instructable.

Parts

4.jpg

It is a really simple project, if you hace all the components and a lot of patience to solder everyting together, you can make it in a few hours.

We will need...

- IR LED's

-IR Phototransistors

-Color LED's

- 22k Resistors

- 330ohm Resistors

-Wire

- Arduino Nano/Uno/Mega, etc.

- Push Button


Schematic

qwed.PNG

Here you can see, it it a really simple circuit, you can multiply the times you want it as long as your Arduino can hold on.

Basicly if you put the IR LED and the Phototransistor close enough but pointing to the same direccion, when an objects reflects the IR light then the transistor will turn on.

Of course... you can use this circuit without an Arduino, it will work almost the same, but you have to add a Darlington arraingment to fully turn on the LED's and also you will not be able to add animations.

Make the Surface

3.jpg

I'm using a sheet of PLA plastic, it is really easy to drill the 5mm holes that hold the LED's in place.

Remember, you have to place the IR LED and the phototransistor about 1/2 inch apart, this distance will work nice.

All the other LED's can be pretty much anywhere, as long as they "delimit" the area.

Soldering

5.jpg

I'm using 4 LED's at every Arduino output (4 in my case) so all the GND are together, all the VCC together and then 8 wires in total, 1 for the input and 1 for the output of every section.

Code

Really simple code,

I'm making the LED's stay on in the begining, if I press the button, they will bilk fast and if I push it aganin blink slow. Another push and the delay will go back to 1.

[code]
int x=1;

void setup() {

pinMode(12,INPUT); .

pinMode(11,OUTPUT);

pinMode(10,INPUT);

pinMode(9,OUTPUT);

pinMode(8,INPUT);

pinMode(7,OUTPUT);

pinMode(6,INPUT);

pinMode(5,OUTPUT);

pinMode(2,INPUT);

}

void loop() {

if(digitalRead(12)==HIGH)

digitalWrite(11,HIGH);

if(digitalRead(10)==HIGH)

digitalWrite(9,HIGH);

if(digitalRead(8)==HIGH)

digitalWrite(7,HIGH);

if(digitalRead(6)==HIGH)

digitalWrite(5,HIGH);

delay(x);

digitalWrite(11,LOW);

digitalWrite(9,LOW);

digitalWrite(7,LOW);

digitalWrite(5,LOW);

delay(x);

if(digitalRead(2)==HIGH){

x = x + 100;

if(x >= 300)

x = 1;

delay(500);

}

}

[/code]

You Are Good to Go!

If something went wrong and the LED's are not on then maybe you shoul check the phototransistor orientation, they could be a bit tricky... more if you cut the pins to the same lenght... (My bad)

Hope you like this instructable, let me know if you have any questions!