linear1 forums
[part of the
linear1 network
]
+ [
linear1 case mods
]
+ [
LED Center
]
+ [
privacy policy
]
Welcome,
Guest
. Please
login
or
register
.
March 20, 2010, 01:53:38 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
linear1 forums
|
LED discussion
|
LED questions and discussion
| Topic:
How is it done?
« previous
next »
Pages:
1
[
2
]
3
Author
Topic: How is it done? (Read 34822 times)
SurJector
Smart like tractor
Offline
Posts: 107
Re: How is it done?
«
Reply #15 on:
October 19, 2005, 12:29:04 PM »
Quote from: justDIY on October 19, 2005, 11:18:57 AM
cool - thanks for the reply ... I'd been worried that this stuff was just scaring everyone / or giving them headaches!
You're not going to scare me with micro-electronics !
Quote
I did read some theory about using a resistor, to measure the current stored in the led... according to what I read you place a resistor as a short, across the led, and then measure the voltage across the resistor, then using I=V/R it will tell you the current being generated by the led
the problem with this is, if you want to also use the led as an indicator, your resistor needs to be high impedence so it won't short out the led... and then you are back to square one.
That's what I was trying to say as my second proposition. I don't have any PIC at home and much less protoboards so I can't try for myself, but out of thin air I'd try 10k, then 1k, then 100k to see if it gives anything.
Quote
Picked up a quad channel op-amp last night, of course they only had one. I'm hoping the op-amp will give me more sensitivity since the leds are not very sensitive to their own light reflected from my fingers ... when I use a white piece of paper I get a lot better results. I've also noticed (when I was more awake) that a 1ms sample time is causing a slight flicker of the leds... but reducing the sample time is causing terrible results in the sensitivity department
I'm sorta confused as to how I'll shoe-horn this op-amp in, putting it directly between the led and the pic will prevent the pic from being able to bias the led forward or reverse, that is unless I use a third control line from the pic... for each led
line 1 = adin ... connected to the output of the op-amp
line 2 = digital ... connected to the cathode on the led
line 3 = digital ... connected to the anode of the led
led cathode connected to op-amp in+ (yes, backward, i think)
led anode connected to op-amp in-
then I forward bias, reverse bias and then go high-z on both digital lines, leaving the led to discharge into the op-amp, sample the adc real fast, and then resume forward bias
whatcha think?
This sounds correct (as for the op-amp: you want to put the + where the 5V is when reverse biased). It's probably difficult to do without the third line; you can try to use only one line as a clock a reverse bias all the leds together, but that would be a terrible mess; as an alternative, you may be able to keep the anode at a constant potential (around 4V) with a simple resistor ladder and free a line (that's a little bit better than before).
Code:
+5V
|
---
1R | | CL is current limiting resistor. R is an arbitrary value (not too high)
| |
---
|-CL---|>|------- line 1 (0V when on, 5V when charging, high-z when sampling)
--- |- +|
4R | | ----------
| | \ /
--- \ /
| \ /
| \/
GND -------- line 2 (always sampling)
Looks fishy !
Logged
justDIY
Microcontroller Madman
Administrator
Smart like tractor
Offline
Posts: 1652
UFOric
Re: How is it done?
«
Reply #16 on:
October 19, 2005, 06:25:13 PM »
I tried a 10k and a 100k resistor, both were too much and completely drained the led before the adc had a chance to sample it
I did get a reading using the 100k and much faster sampling time (50 uS) however, the dynamic range was severely compressed, it seemed all the resistor was doing was attenuating the signal from the led, but not exagerating it.
----
I have upgraded to four leds in the array now, acting as four separate inputs.
a 750 uS sampling rate provides an acceptable range, and no visible flicker... the increased light output of having two more leds has helped the array 'see' my fingertips a lot better, even with the faster sampling rate (down from 1000 us).
I need to make up some more cables to go from my pic protoboard to my breadboard, so I can run the full eight leds
Here's the active sensor array:
This is me moving my finger around the array:
The numbers are tenths of a volt ... so 32 = 3.2v, 8 = 0.8 ... Each color represents one of the sensors.
So, I need to figure out the analysis side; how do those differing values relate to where the object is in the array and how far it is above the array - sort of like a 3D touch-pad!
Also need to work on scaling the project to support an enormous sized array... My thoughts on that subject:
I need to be able to reverse the bias for individual leds, keeping all the others lit.
Maxim has a 16 to 1 'selector' ... but I wonder if it is latching (if that is the correct term)... that is, will the switch hold its state (high or low), even when it is not actively being driven.
the easiest (hah!) way I can think of is using an army of pics, something cheap like the 16f684 has 12 adc channels ... use it for adc and reverse bias ... and use something beefier like an 18f2xxx as the 'master control', each of the slave pics would also be accompanied with a 16 bit i2c port-expander, for driving the anode sides of the leds
well enough for now, time to fool around a bit more!
«
Last Edit: October 19, 2005, 08:16:29 PM by justDIY
»
Logged
Want to contact me directly? gmail gordonthree
My Project Blog -
http://projects.dimension-x.net
Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
sanjed
Imaginator
Smart like tractor
Offline
Posts: 105
Re: How is it done?
«
Reply #17 on:
October 19, 2005, 07:17:52 PM »
Quote from: justDIY on October 19, 2005, 11:18:57 AM
then I forward bias, reverse bias and then go high-z on both digital lines, leaving the led to discharge into the op-amp, sample the adc real fast, and then resume forward bias
whatcha think?
That bit melted my brain. Have you been watching a lot of Star Trek lately ?
Logged
wooferkiIIer
Strong like bull
Offline
Posts: 1
Re: How is it done? using digital inputs
«
Reply #18 on:
April 06, 2006, 01:01:00 PM »
Hey i am also investigating the subject.
i've also read
http://www.merl.com/publications/TR2003-035/
and it looks to
me you can use digital inputs for the sensing. The digital inputs of PIC's have a treshold value of about 0.8V. So you could measure the time needed to discharge the LED/CAP, as a value for amount of light.
with some clever programming, the digital inputs can even be used to make it an analog measurement.
I wil go experiment some this weekend myself. quite busy at the moment
Have fun and keep on freakin'
Logged
Cabwood
Strong like bull
Offline
Posts: 1
Re: How is it done?
«
Reply #19 on:
July 20, 2006, 04:44:30 PM »
I believe you could use half the LED array to illuminate the other half, uniformly over the entire surface of the array. If you imagine a chess board where all the white squares are iluminated while all the black squares are being sampled, and then swap them so that now the black squares iluminate while the white squares are sampled.
Then another idea - since the sample procedure is so short, you could perform the above two cycles, creating a very short, imperceptible burst of light, leaving you with eons of time before the next sampling to do whatever you want with
all
the LEDs. Three cycles, then:
1) 2ms - Light whites, measure blacks
2) 2ms - Light blacks, measure whites
3) 20ms - make a picture with all the LEDs
Step 3 could be to switch on the LEDs which the previous measurements indicated detected light. so that the LEDs glow following the movement of anything in proximity, as in the video.
Another observation is that since the ilumination of one set of LEDs is only as long as the sampling of the other set, you can light them up really bright - perhaps with twice as much current as you would normally use. As long as the average power they dissipate is within limits, they should be fine, and this would surely improve performance in high ambient light.
Another ambient light fix: would it be possible to perform
two
measurements for each LED - one charging the LED's capacitance without any illumination from the other LEDs, and then another
with
illumination from the others LEDs? That way, I imagine the derived values are determined by difference in discharge times, rather than some static threshold.
I love this - I'm going to wrestle with my mind for weeks with this, I just know it. I simply
have
to figure out some multiplexing system to make all this easy for the PIC.
Logged
Rob
LED guy
Administrator
Smart like tractor
Offline
Posts: 1970
The constant-current gardener
Re: How is it done?
«
Reply #20 on:
July 20, 2006, 05:39:45 PM »
Welcome to the boards, Cabwood. I think you'll find some multiplexing discussion on the boards here.
http://forums.linear1.org/index.php/topic,748.msg4285.html#msg4285
for starters.
Logged
jfmateos
Strong like bull
Offline
Posts: 7
Re: How is it done?
«
Reply #21 on:
February 21, 2008, 01:48:13 PM »
Dear justdiy:
I would like to study the source code of the PIC that you used in this 2x2 led sensor matrix. Where could I fing it?
thanks
Quote from: justDIY on October 19, 2005, 06:25:13 PM
I tried a 10k and a 100k resistor, both were too much and completely drained the led before the adc had a chance to sample it
I did get a reading using the 100k and much faster sampling time (50 uS) however, the dynamic range was severely compressed, it seemed all the resistor was doing was attenuating the signal from the led, but not exagerating it.
----
I have upgraded to four leds in the array now, acting as four separate inputs.
a 750 uS sampling rate provides an acceptable range, and no visible flicker... the increased light output of having two more leds has helped the array 'see' my fingertips a lot better, even with the faster sampling rate (down from 1000 us).
I need to make up some more cables to go from my pic protoboard to my breadboard, so I can run the full eight leds
Here's the active sensor array:
This is me moving my finger around the array:
The numbers are tenths of a volt ... so 32 = 3.2v, 8 = 0.8 ... Each color represents one of the sensors.
So, I need to figure out the analysis side; how do those differing values relate to where the object is in the array and how far it is above the array - sort of like a 3D touch-pad!
Also need to work on scaling the project to support an enormous sized array... My thoughts on that subject:
I need to be able to reverse the bias for individual leds, keeping all the others lit.
Maxim has a 16 to 1 'selector' ... but I wonder if it is latching (if that is the correct term)... that is, will the switch hold its state (high or low), even when it is not actively being driven.
the easiest (hah!) way I can think of is using an army of pics, something cheap like the 16f684 has 12 adc channels ... use it for adc and reverse bias ... and use something beefier like an 18f2xxx as the 'master control', each of the slave pics would also be accompanied with a 16 bit i2c port-expander, for driving the anode sides of the leds
well enough for now, time to fool around a bit more!
Logged
jfmateos
Strong like bull
Offline
Posts: 7
Re: How is it done?
«
Reply #22 on:
February 23, 2008, 12:12:41 PM »
Dear justdiy:
This is a video of the results I have got till now, but i would like to study your PIC source code to impove it.
Thanks
http://www.youtube.com/watch?v=l0joutRSC1M
«
Last Edit: February 24, 2008, 04:08:23 AM by jfmateos
»
Logged
thebman80
Smart like tractor
Offline
Posts: 23
Re: How is it done?
«
Reply #23 on:
February 23, 2008, 08:03:30 PM »
Quote from: sanjed on October 19, 2005, 07:17:52 PM
Quote from: justDIY on October 19, 2005, 11:18:57 AM
then I forward bias, reverse bias and then go high-z on both digital lines, leaving the led to discharge into the op-amp, sample the adc real fast, and then resume forward bias
whatcha think?
That bit melted my brain. Have you been watching a lot of Star Trek lately ?
LOL that went through my mind as well this looks like the begging technology of the Star Trek Holodeck. Light sensors interacting with your movement neat stuff even though I haven’t really understood half of what is going on in the processes technologically speaking.
Logged
cadstarsucks
Smart like tractor
Offline
Posts: 449
Re: How is it done?
«
Reply #24 on:
February 24, 2008, 04:42:24 PM »
Quote from: justDIY on October 14, 2005, 09:27:37 AM
Found this on del.icio.us:
http://mrl.nyu.edu/~jhan/ledtouch/
Dude is using an led matrix display as some sort of interactive touch sensor
I've watched the video again and again, but I haven't figured out how he's using the led as a sensor and an emitter at the same time?
In a common anode matrix, if you put a pull up resistor on the low side and a I/V circuit on the high side you will get a negative voltage out that is related to the amount of light hitting the LED. A threshold comparator will then give you a presence output. If you put column switches on the pull ups you can scan for presence during the column off times.
Dan
Logged
drain
Strong like bull
Offline
Posts: 3
Re: How is it done?
«
Reply #25 on:
March 05, 2008, 11:24:56 AM »
Hello people, this is my first post
I'm spanish.
I'm triying to test this touch-led by myself, but i don't get anything.
I'm using a pic16f84, using different delays (1 us, 100 us, 1 ms, 5 ms, ....), different resistors (447 ohm, 1k, 10k, ...)...
in the oscilloscope I can see a small "curve" (dont know how to say it in english, sorry) like the capacitor discharge "curve" (xD)... and, as I think, it should change while i'm moving my hand over the led... but nothing happens.
Hope i explained well. thanks
Logged
BVnursery
Smart like tractor
Offline
Posts: 210
Re: How is it done?
«
Reply #26 on:
March 05, 2008, 06:04:43 PM »
At least more work is being done.
Logged
jfmateos
Strong like bull
Offline
Posts: 7
Re: How is it done?
«
Reply #27 on:
March 06, 2008, 01:53:16 AM »
Hello Drain
Hola Drain
I´m also spanish
Yo también soy español
and now I am trying to emulate Jeff Han´s multitouch led matrix (
http://cs.nyu.edu/~jhan/ledtouch/index.html
).
You can find my work at
http://www.todopic.com.ar/foros/index.php?topic=20510.0
.
The problem with the oscilloscope/multimeter is that it charges very much the LED, so the slope down curve you are seeing is not the real one. The Led will discharge slower without the oscilloscope.
If you are really interested in the development of this project I would like to collaborate with you.
Logged
drain
Strong like bull
Offline
Posts: 3
Re: How is it done?
«
Reply #28 on:
March 07, 2008, 12:10:18 AM »
Hola Jfmateos. Gracias por contestar.
Ya conseguí que funcionara. Tenías razon con lo del osciloscopio. Pero yo lo hacía mal. Leyendo un poco más me dí cuenta de dónde estaba el fallo: Yo ponía el pin en entrada (alta impedancia) y tomaba el dato, cuando lo que tengo que hacer es medir el tiempo que pasa desde que lo pongo en alta impedancia hasta que el dato llega a 0.
Haciendo distintas pruebas ya he conseguido optimizar el funcionamiento... ahora bien, me pasa lo siguiente.
Cuando uso una resistencia alta (200k) el led tarda poco en descargarse (unos 30 o 40 ciclos del pic)... pero no se ilumina a penas, debido a la poca corriente.
Si uso una más pequeña... (1k) el led brilla bien, pero tengo unos tiempos de caida mucho mas lentos (~2500 ciclos) con lo que el led pasa mucho tiempo apagado y se observa un ligero parpadeo.
La solucion imagino que es la intermedia. Sabiendo que lo que quiero conseguir es algo como lo que te explico mas abajo... Qué me recomiendas?
Sobre tu proyecto... El panel que estas haciendo es interesante, pero para mí no le encuentro ninguna aplicación. Lo que yo estoy intentando desarrollar es un dimmer digital para luces y sonido. Como este ->
http://www.youtube.com/watch?v=YampMtX5hn0
Muchas gracias.
(a ver como traduzco todo esto al inglés ... xDD no te rias mucho, que mi nivel es muy normalito)
---------------------------------
Hi JfMateos, thanks for the reply.
Finally it's working. You were right about the oscilloscope. I have searched and now I know how it works. You have to measure the time that high-Z pin takes falling to 0V.
Doing a lot of tests, finally I optimized the result. But now I've got an issue:
If I put a high value resistor (~200k) then it takes ~30 cycles of the pic... but the led won´t shine.
And if I put a ~1k resistor... it takes a longer time (~2500 cycles)... and the led is OFF all this time, so the result is the led blinking.
About your project... this led matrix is very cool, but i have no real application for it. What I'm trying to develope is something like this ->
http://www.youtube.com/watch?v=YampMtX5hn0
Thanks a lot.
Logged
jfmateos
Strong like bull
Offline
Posts: 7
Re: How is it done?
«
Reply #29 on:
March 07, 2008, 02:00:05 AM »
Where are you using the resistor, in the LED´s anode or cathode?
In my project I use the PIC ADC to read the voltage at the LED´s cathode 10 times, and the resistor is in its anode. This way I don´t have to wait for the cathode to reach its low state; I jus interpolate the discharging slope through that 10 measures.
Now I am using a 220 ohm resistor, but I will try different values to investigate your problem... Could you post your source code?
What kind of LEDs are you using? I use intermediate luminosity red leds.
That dimmer is very cool... I am looking forward seeing it finished.
Logged
Pages:
1
[
2
]
3
linear1 forums
|
LED discussion
|
LED questions and discussion
| Topic:
How is it done?
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Important
-----------------------------
=> Please read our rules
-----------------------------
Case mod questions
-----------------------------
=> Case modding
-----------------------------
LED discussion
-----------------------------
=> Special Offers
=> Article discussion
=> LED questions and discussion
=> Electronics discussion
=> Microcontroller madness
=> LED project showcase
-----------------------------
Other Stuff
-----------------------------
=> La Bodega
=> Garden
=> Woodwork