Now that the Bidirectional LED demo is working but we realized a few problems.
The refresh rate is too slow. It appears that it is taking too much time for the LED to discharge. However this is quite minor, we fixed this by grounding the LED using a resistor.
When we try to extend this to the 8×8 LED Matrix we found a much bigger problem and we are quite clueless as to how to solve it. When we work with the matrix, we are not dealing with a single LED. All the LED are connected to each other by the matrix. The problem is that when a user places a finger on an LED, all the matrix in the entire array is distrubed, so it is almost impossible to determine where the user is touching.
We don’t really have a solution right now but we are thinking about switching to a multitouch surface instead.
We basically set up our bi-directional LED the circuit according to diagram shown in the last last post. We did followed all the instruction stated the paper on the implementation of a simple bidirectional LED demo, but it just doesn’t work!! There are I think two possibilities why this is not working.
- We did something seriously wrong
- Something is wrong with the microcontroller
At the current moment, I really don’t know how to fix this but here is a picture of the setup followed by the source code
#define digi_fwd 2
#define digi_rev 3void setup(){
Serial.begin(9600);
Serial.println("Arduino");
pinMode(digi_fwd, OUTPUT);
pinMode(digi_rev, OUTPUT);
}
void loop(){
//Emitting
digitalWrite(digi_fwd, HIGH);
digitalWrite(digi_rev, LOW);
//Reverse Bias
digitalWrite(digi_fwd, LOW);
digitalWrite(digi_rev, HIGH);
//Discharge
digitalWrite(digi_rev, LOW);
pinMode(digi_rev, INPUT);
count = 0;
while(digitalRead(digi_rev)){
count++;
}
Serial.println(count, DEC);
pinMode(digi_rev, OUTPUT);
}
The Arduino Sketch can be downloaded here
Since there isn’t really much Information on any multitouch LED display, we started off with some background research on the subject. The paper by Paul Dietz, William Yerazunis, and Darren Leigh talks in detail about using LEDs as both input and an output.
Part A of the above diagram illustrate the noramal operating condition a typical LED driver. The current is flowing from the cathode to the anode of the LED and the LED is emitting light. However LED is also a photodiode and therefore it is sensitive to light.
Part B of the diagram illustrate a LED that is reverse biased. Under such conditions, the LED acts as a capacitor and the reverse biases charges the capacitance.
In Part C of the diagram, the I/O pin that is previously at VCC is switched to input mode. This allows the photocurrent to discharge the capacitance built up in the LED. By timing how long it takes the LED to discharge we can measure the amount of photocurrent. (Paul Dietz, William Yerazunis, Darren Leigh) If we extend this to a LED matrix, then it is possible to create a multitouch LED Display.
References:
E. Fred Schubert, Light-Emitting Diodes
Paul Dietz, William Yerazunis, Darren Leigh, Very Low-Cost Sensing and Communication Using Bidrectional LEDs
Jonathan Pak, The Light Matrix: An Interface for musical expression and performance.
Scott E. Hudson, Using Light Emitting Diode Arrays as Touch-Sensitive Input and Output Devices
