Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Optical Feedback techniques

16 views
Skip to first unread message

Charlie E.

unread,
Apr 9, 2012, 1:37:45 PM4/9/12
to
Hi All,
Ok, an interesting technical question for the brain trust...

Going for a second generation color reader, and it was suggested to me
by a collegue that using optical feedback could greatly increase my
accuracy. AIUI, this would involved puting a photodiode or other
photodetector in the direct light path from my LEDs to directly
measure their light output, and then adjust the LED output (via PWM)
to meet a specified target output. I can think of several ways of
accomplishing this, the simpliest being simply read the output of the
PD with an ADC, and using a look up table or other means to set the
PWM duty cycle, but are there other methods that would be better or
more precise? Or use an analog method of having the two seperate (but
equal?) photo outputs into an opamp to read the proportion between
them? Will be awhile before I can get a board made, but wondered if
there were some places I should be looking for suggestions...

Thanks,
Charlie

Joerg

unread,
Apr 9, 2012, 2:01:35 PM4/9/12
to
That is very common with laser diodes because they age over time. So do
LEDs but AFAIK it's only significant in most applications if you run
them close to redline.

While you can obtain a clean optical feedback from a laser diode via its
back facet that is another story for LEDs. So the first question would
IMHO be, how do you get a meaningful output reading that is not
influenced by external light shining back into the LED? Not sure where
your reader will be used but outdoors there's bright sunlight and all
that. Indoors it's probably more the bling-bling people wear around thir
wrists and fingers while holding the reader, in conjunction with bright
light sources.

The regulator loop is pretty trivial compared to that part of the job.

--
Regards, Joerg

http://www.analogconsultants.com/

Tim Wescott

unread,
Apr 9, 2012, 2:06:34 PM4/9/12
to
Putting _a_ photodetector in the path of the your LEDs to measure _their_
output???

Possibly -- but that assumes that the light output of the three LEDs goes
up and down the same in response both to whatever environmental effect
(probably temperature and aging) that you're trying to control against,
and that it goes up and down the same in response to the LED current.

Or do you have a way to turn on each LED individually?

If you can, you want to adjust each LED output individually.

I hope that you're controlling your LED output by heavily filtered PWM:
turning it on and off to get an average is probably not your best path to
joy.

Whether you're adjusting them all at once, or individually, I'd read the
PD output with an ADC (assuming you can get enough accuracy), and I'd
have an integrating controller in there that bumps the PWM up or down
until the target output is met.

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
Why am I not happy that they have found common ground?

Tim Wescott, Communications, Control, Circuits & Software
http://www.wescottdesign.com

Paul Hovnanian P.E.

unread,
Apr 9, 2012, 2:24:21 PM4/9/12
to
Putting a PD in your LED's output path? Do you mean in addition to the PD
(or whatever) you are using to measure the color (reflection/transmission)?

The best scheme (if possible) uses the same sensor to measure both the LED
output and the measured quantity. It is possible to measure the entire
optical path attenuation. That way, you can compensate for variations in
the optics, the LED and the detector itself.

This is usually done by performing a calibration run of the system before
inserting the sample under test. Or switching the optical path between the
sample and no sample paths (or a color reference) if you suspect the system
drift to be significant over the measurement time.

This will require some sort of mechanics (mirror on an actuator), so it
might be beyond a cheap implementation.

--
Paul Hovnanian mailto:Pa...@Hovnanian.com
------------------------------------------------------------------
Who is General Failure and why is he reading my hard drive?

Charlie E.

unread,
Apr 9, 2012, 4:02:27 PM4/9/12
to
On Mon, 09 Apr 2012 11:01:35 -0700, Joerg <inv...@invalid.invalid>
wrote:
Don't know if my ascii art skills are up to this, but...


___________________ clear window
________ _________ heavy felt paper light barrier

PD >| |< LED
|< LED
|< LED


Basically, the three LEDs shine throught the window through a light
sheild. The photodetector would be along the edge of the LEDs light
cone, but in the direct path. (an alternative would be to put the PD
at a 45 degree angle to get the primary reflection...) You take one
reading with no LEDs on, and then readings with each individually on.
The actual sample needs to be directly against the window for best
accuracy. The LEDs are on a single power supply (switching) set for
20 mA operation. I would have to PWM the enable on the power supply
to vary the output, and filter the PD inputs.

Charlie

Joerg

unread,
Apr 9, 2012, 5:31:51 PM4/9/12
to
Hmm, I guess this one became butchered in transmission.

>
> Basically, the three LEDs shine throught the window through a light
> sheild. The photodetector would be along the edge of the LEDs light
> cone, but in the direct path. (an alternative would be to put the PD
> at a 45 degree angle to get the primary reflection...) You take one
> reading with no LEDs on, and then readings with each individually on.
> The actual sample needs to be directly against the window for best
> accuracy. The LEDs are on a single power supply (switching) set for
> 20 mA operation. I would have to PWM the enable on the power supply
> to vary the output, and filter the PD inputs.
>


One way that's sometimes done is this:


Window -----------------------------------------
Paper ------------- ---------------
|
\ <- V R
\ |
\ <- V G
| Hole |
V <- V B
Photo diode - \ -
| \ |
\
45 degree Reflector


(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)


If the photodiode has a short black and non-reflective tube in front of
it the chance of external light entering is miniscule. Except for stuff
that gets reflected back off of the LEDs.

Tim Wescott

unread,
Apr 9, 2012, 5:32:59 PM4/9/12
to
Coolness would be a white light source and a color wheel with R, G, B and
clear.

If you're willing to pay for a little solenoid-actuated mirror or white
card then you could calibrate the whole path -- but boy, the expense
would mount!

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com

Charlie E.

unread,
Apr 9, 2012, 5:44:57 PM4/9/12
to
Yes! We are trying to get this to the lowest price possible for the
best accuracy. Moving things, or even reflectors, or pretty much a
no-no! I think that Joerg's idea of a black tube might be the most
practical. I also have to worry about light reflecting off this
calibration PD onto my main measurement PD...

Charlie

Bill Sloman

unread,
Apr 9, 2012, 5:53:46 PM4/9/12
to
The answer to that bit of the problem is that you modulate your LED
drive, and synchronously detect the signal that you detect from it.

It won't stop the outside world from saturating your detector, but at
least you will know that your detector has been saturated because it's
output will be unreasonably high as well as not being modulated.

--
Bill Sloman, Nijmegen

Joerg

unread,
Apr 9, 2012, 6:28:34 PM4/9/12
to
That still doesn't fix self-pollution. Light reflected from some
bling-bling on a finger and reflected back inside will be in phase and
fool your detector. That's one reason for the design I've sketched.

Joerg

unread,
Apr 9, 2012, 6:31:36 PM4/9/12
to
Reflectors can be super simple. On one design I've helped debug we used
snippets of thin Perspex or something like that. That way it's partly
translucent and the cost was mere pennies. We didn't even need a hole
that way.

Charlie E.

unread,
Apr 9, 2012, 7:20:27 PM4/9/12
to
On Mon, 09 Apr 2012 15:31:36 -0700, Joerg <inv...@invalid.invalid>
wrote:
have any links to this type of material? I could theoretically use
this as a four way splitter, with the target PD looking at right
angles to the calibration PD...

Charlie

Bill Sloman

unread,
Apr 9, 2012, 7:31:34 PM4/9/12
to
On Apr 10, 12:28 am, Joerg <inva...@invalid.invalid> wrote:
> BillSlomanwrote:
If bling-bling featured corner cube reflectors, it could be a real
worry.

--
Bill Sloman, Nijmegen

Joerg

unread,
Apr 9, 2012, 7:36:24 PM4/9/12
to
I don't remember the source, some plastics outlet. But once when somone
accidentally jammed a screwdriver in there and busted this 45-degree
reflector I didn't have any. I just ripped a see-through hard plastic
insert out of a bonbon carton. Worked exactly like the original and we
could have cut a hundred or more from that one carton.

Of course, I had to volunteer and eat all those bonbons because the box
and their potential freshness was now compromised :-)

Joerg

unread,
Apr 9, 2012, 7:48:53 PM4/9/12
to
If it does then it'll be the expensive kind, the more important the
person feels the more karat :-)

George Herold

unread,
Apr 9, 2012, 9:02:22 PM4/9/12
to
> http://www.analogconsultants.com/- Hide quoted text -
>
> - Show quoted text -



You can just use a piece of glass as a reflector for the monitor
beam. The main beam passes straight through... Then light coming back
in reflects the wrong way.

monitor PD up here -
Paper ------------- ---------------
|
piece of glass -> \ <- V
R
\ |
| \ <- V
G
| \ |
sample \ <- V
B
| \ -
| \ |
\
45 degree Reflector

You get maybe 10% from the piece of glass.

George H.




Jamie

unread,
Apr 9, 2012, 9:29:17 PM4/9/12
to
I've taken clear acrylic, heated it in a controlled oven to soften it
but not burn it, pushed in LED's while it was soft. afterwards, you can
clean it up with find emery and then hit it with a heat gun which will
then take any abrasion that you in curd to make it turn to glass looking
surface.

I made a few optical bezels doing this and I've notice that this
material works very well, giving a glossy glass surface.

I've seen prisms made with that stuff just starting with a block of
plastic, cut it, sand it smooth as possible and then hit it with a heat gun.

Jamie

Michael A. Terrell

unread,
Apr 9, 2012, 11:50:02 PM4/9/12
to

George Herold wrote:
>
> You can just use a piece of glass as a reflector for the monitor
> beam. The main beam passes straight through... Then light coming back
> in reflects the wrong way.
>
> monitor PD up here -
> Paper ------------- ---------------
> |
> piece of glass -> \ <- V
> R
> \ |
> | \ <- V
> G
> | \ |
> sample \ <- V
> B
> | \ -
> | \ |
> \
> 45 degree Reflector
>
> You get maybe 10% from the piece of glass.


You've just reinvented the 'TeleprompterŽ'. :)


--
You can't have a sense of humor, if you have no sense.

Jasen Betts

unread,
Apr 10, 2012, 2:42:25 AM4/10/12
to
how about analogue feedback using an op-amp?

--
⚂⚃ 100% natural

--- Posted via news://freenews.netfront.net/ - Complaints to ne...@netfront.net ---

George Herold

unread,
Apr 10, 2012, 10:52:27 AM4/10/12
to
On Apr 9, 7:20 pm, Charlie E. <edmond...@ieee.org> wrote:
> On Mon, 09 Apr 2012 15:31:36 -0700, Joerg <inva...@invalid.invalid>
> Charlie- Hide quoted text -
>
> - Show quoted text -

I've used microscope cover slips as little beam pick-offs. You get a
zillion for a few dollars and they are nice and thin so the
reflections from the front and back side pretty much over lap.

George H.

o...@case.edu

unread,
Apr 10, 2012, 11:04:49 AM4/10/12
to
Pulse the leds at 500 Hz or 1 Khz after running them steady state for a few seconds. Use a simple lock in amplifier or gated ADC on a cheap microcontroller to pick up the measurement, Now you have a rough measure of any background, and the leds, without a shutter.

You could also use a few cheap dichroic filters to only look at the LED wavelengths, TAOS and Agilent make cheap RGB sensor chips for this very purpose.
The filters are on chip. The math to get color temperature, etc is in the app-notes.

I strongly suggest a microscope slide beamsplitter, and you can get fancy with plastic polarizers and plastic quarter wave plates as isolators. In most cases, a few carefully placed pinholes will let the LED light dominate over the outside light for the calibration sensor.

Steve

Charlie E.

unread,
Apr 10, 2012, 12:19:36 PM4/10/12
to
On Mon, 09 Apr 2012 16:36:24 -0700, Joerg <inv...@invalid.invalid>
Oh, the sacrifices we do for the sake of our art... ;-)

Charlie E.

unread,
Apr 10, 2012, 12:22:44 PM4/10/12
to
Yes, I have considered using my existing plastic window in this
fashion. My chief worry then, though, is that now you would also get
signal from the sample as well...

Hmmm... read with no sample, read with sample... nope, too
complicated for the user!

Charlie

dagmarg...@yahoo.com

unread,
Apr 10, 2012, 12:43:47 PM4/10/12
to
On Apr 10, 12:22 pm, Charlie E. <edmond...@ieee.org> wrote:
> On Mon, 9 Apr 2012 18:02:22 -0700 (PDT), George Herold wrote:
> >On Apr 9, 6:31 pm, Joerg <inva...@invalid.invalid> wrote:
> >> Charlie E. wrote:

> >> > Yes!  We are trying to get this to the lowest price possible for the
> >> > best accuracy.  Moving things, or even reflectors, or pretty much a
> >> > no-no!  I think that Joerg's idea of a black tube might be the most
> >> > practical.  I also have to worry about light reflecting off this
> >> > calibration PD onto my main measurement PD...
>
> >> Reflectors can be super simple. On one design I've helped debug we used
> >> snippets of thin Perspex or something like that. That way it's partly
> >> translucent and the cost was mere pennies. We didn't even need a hole
> >> that way.
>
>
> >You can just use a piece of glass as a reflector for the monitor
> >beam.  The main beam passes straight through... Then light coming back
> >in reflects the wrong way.
>
> >                        monitor PD up here   -
> >   Paper    -------------             ---------------
> >                                                                  |
> >      piece of glass ->   \                                    <- V
> >R
> >                           \                                      |
> >            |               \                                  <- V
> >G
> >            |                \                                    |
> >   sample                     \                                <- V
> >B
> >            |                  \                                  -
> >            |                   \                                 |
> >                                 \
> >                           45 degree Reflector
>
> >You get maybe 10% from the piece of glass.
>
> >George H.
>
> Yes, I have considered using my existing plastic window in this
> fashion.  My chief worry then, though, is that now you would also get
> signal from the sample as well...
>
> Hmmm... read with no sample, read with sample...  nope, too
> complicated for the user!

In my mind's eye you'd need a separate sensors and optical paths, one
for cal'ing the LEDs, the other for reading the sample.

sample

||
|^
\ ||
\v|
LED <---\<----- LEDs
sensor |\
| \
|
v
sample
sensor

--
Cheers,
James Arthur

Jim Thompson

unread,
Apr 10, 2012, 12:45:16 PM4/10/12
to
On Tue, 10 Apr 2012 09:22:44 -0700, Charlie E. <edmo...@ieee.org>
wrote:
Pressing long-throw button reads sample, flips mirror ?:-)

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.

dagmarg...@yahoo.com

unread,
Apr 10, 2012, 1:12:54 PM4/10/12
to
> I've used microscope cover slips as little beam pick-offs.  You get a
> zillion for a few dollars and they are nice and thin so the
> reflections from the front and back side pretty much over lap.

That's a neat idea. OTOH, LEDs do emit sideways too, especially at
the tip. Maybe Charlie could harvest that into a dedicated sensor,
saving a path and a few optical parts.

If he synchronously modulates and detects the LEDs, he can also remove
most of the effect of ambient light polluting his illumination
source. We discussed that, ISTM, back the first time, when Charlie
was first considering this project.

--
Cheers,
James Arthur

dagmarg...@yahoo.com

unread,
Apr 10, 2012, 12:31:55 PM4/10/12
to
On Apr 9, 5:44 pm, Charlie E. <edmond...@ieee.org> wrote:
> On Mon, 09 Apr 2012 16:32:59 -0500, Tim Wescott wrote:

> >If you're willing to pay for a little solenoid-actuated mirror or white
> >card then you could calibrate the whole path -- but boy, the expense
> >would mount!
>
> Yes!  We are trying to get this to the lowest price possible for the
> best accuracy.  Moving things, or even reflectors, or pretty much a
> no-no!  I think that Joerg's idea of a black tube might be the most
> practical.  I also have to worry about light reflecting off this
> calibration PD onto my main measurement PD...


You might make a cheap beam-splitter with some window film on an
angled piece of plastic.

--
Cheers,
James Arthur

George Herold

unread,
Apr 10, 2012, 2:58:17 PM4/10/12
to
Yeah that's what I had in mind... But I was thinking of letting the
sample light go straight through with the LED sensor at 45 degrees.
And then having the sample sensor 'after' the beam splitter

\ sample |
\ sensor |<--- sample
LEDS----->\------------> sample
|\
| \
V
LED
sensor

You should get more light that way.

George H.
>
> --
> Cheers,
> James Arthur- Hide quoted text -

George Herold

unread,
Apr 10, 2012, 3:15:11 PM4/10/12
to
Yup, lock-in detection seems to way to go. There shouldn't be any
phase shifts to worry about, as long as he doesn't modulate too fast.
You can most likely do the sychronous detection in software. (which
depresses my analog heart.)

I wonder how repeatable the light coming from the side of the LED
is?

George H.

> --
> Cheers,
> James Arthur- Hide quoted text -

dagmarg...@yahoo.com

unread,
Apr 10, 2012, 5:29:07 PM4/10/12
to
Should be fairly repeatable -- I once wrote a ray-tracing program to
analyze some ideas for LED package improvements. Total internal
reflections produce a sideways "spray" off the tip that's hard to
avoid.

It'll vary with die placement per part, but his calibration already
factors that out automagically.

--
Cheers,
James Arthur

Bill Sloman

unread,
Apr 10, 2012, 7:25:50 PM4/10/12
to
On Apr 9, 11:31 pm, Joerg <inva...@invalid.invalid> wrote:
> Charlie E. wrote:
> > On Mon, 09 Apr 2012 11:01:35 -0700, Joerg <inva...@invalid.invalid>
A further refinement is to cut grooves into the inside of the black
tube. We ended up putting a screw thread into our graphite "black
tube" insert when I was looking at the amount of beer foam that clung
to the side of the beer glass.

Some brewers do measure it - but the last time I heard, not nearly
enough of them to make Haffmans BV marketing entirely happy.

The screw-thread grooves kill the single pass low angle of incidence
reflections which otherwise widen the acceptance angle of the almost
non-reflective black tube ...

--
Bill Sloman, Nijmegen

George Herold

unread,
Apr 10, 2012, 8:08:58 PM4/10/12
to
> James Arthur- Hide quoted text -
>
> - Show quoted text -

I've only been following Charlie's project tangentially, so this may
already be part of it.
But how about an intensity calibration step where the user puts a
white reflective diffuser up against the output. You wouldn't have to
do this all the time, but it could be used to set the current going to
each LED. The nice thing is this needs no extra photodiodes... it's
all in software.

George H.

Joerg

unread,
Apr 10, 2012, 8:10:15 PM4/10/12
to
Good idea. I guess the emphasis is on "almost non-reflective" and the
groove helps to scatter off shallow angle light.

dagmarg...@yahoo.com

unread,
Apr 10, 2012, 10:56:42 PM4/10/12
to
> I've only been following Charlie's project tangentially, so this may
> already be part of it.
> But how about an intensity calibration step where the user puts a
> white reflective diffuser up against the output.  You wouldn't have to
> do this all the time, but it could be used to set the current going to
> each LED.  The nice thing is this needs no extra photodiodes... it's
> all in software.

Good idea. For that matter, the calibration target could be a mirror,
which is totally (almost) color-neutral. It doesn't have to be done
very often.

--James

George Herold

unread,
Apr 11, 2012, 8:51:48 AM4/11/12
to
> --James- Hide quoted text -
>
> - Show quoted text -

Hi James, I don't think a mirror would be as good. Then there are
all sorts of alignment issues. A diffuser (few pieces of white
paper?) would give a more uniform reflection.


George H.

dagmarg...@yahoo.com

unread,
Apr 11, 2012, 12:58:23 PM4/11/12
to
> Hi James,  I don't think a mirror would be as good.  Then there are
> all sorts of alignment issues.   A diffuser (few pieces of white
> paper?) would give a more uniform reflection.

Good point. I was thinking about ensuring color purity, but alignment
would be a bugger.

Charlie E.

unread,
Apr 13, 2012, 5:26:53 PM4/13/12
to
On Tue, 10 Apr 2012 19:56:42 -0700 (PDT), dagmarg...@yahoo.com
wrote:
Many existing units do exactly that, but it is a step that is fraught
with complications. Is the white target dirty? How do you signal to
do it? Does this mean that you need additional switches, longer on
times to give the user time to find the target, or other expensive
options? Some units literally have a 'lens cap' to protect the front
of the unit that is white to provide that calibration step. I want to
make my unit a lot simplier to the user - just hold it against your
target and press the button...

Charlie
0 new messages