Maker Pro
Maker Pro

Detecting 7-Segment LED's With Phototransistors

R

Roger Monroe

Jan 1, 1970
0
Hi All,
I'm tasked with logging into a PLC the temperature of a waterbath over time. Well, not exactly. The waterbath has a three character display that shows its temperature. Three 7-segment LED's would show, for example, 45.7
I have a PLC that I have to log what the display shows. I cannot access the back of the display board to pickup any output.
So my idea was to use several phototransistors (I've seen tiny ones) each strategically positioned on a segment of the displayed characters.
I bought two styles from Midwest Surplus (no markings) and tested them with my desk lamp as the light source and it was cool to watch them turn on and off (first time with these things). But when I tested them at the displayof the waterbath they wouldn't turn on.
I tried a waterbath with a green display and one with a red display but none of my phototransistors would work. Digikey lists wavelengths as a parameter in their search engine for phototransistors. How would I know which wavelength to buy and am I even on the right track?
One guy suggested, instead of photodiodes, a webcam run through some OCR software, then the ascii transmitted to the PLC. Now THAT was thinking outside the box. Not really do-able in my situation.
Any suggestions?
All help is appreciated,
Bart
 
M

Martin Riddle

Jan 1, 1970
0
Hi All,
I'm tasked with logging into a PLC the temperature of a waterbath over time. Well, not exactly. The waterbath has a three character display that shows its temperature. Three 7-segment LED's would show, for example, 45.7
I have a PLC that I have to log what the display shows. I cannot access the back of the display board to pickup any output.
So my idea was to use several phototransistors (I've seen tiny ones) each strategically positioned on a segment of the displayed characters.
I bought two styles from Midwest Surplus (no markings) and tested them with my desk lamp as the light source and it was cool to watch them turn on and off (first time with these things). But when I tested them at the display of the waterbath they wouldn't turn on.
I tried a waterbath with a green display and one with a red display but none of my phototransistors would work. Digikey lists wavelengths as a parameter in their search engine for phototransistors. How would I know which wavelength to buy and am I even on the right track?
One guy suggested, instead of photodiodes, a webcam run through some OCR software, then the ascii transmitted to the PLC. Now THAT was thinking outside the box. Not really do-able in my situation.
Any suggestions?
All help is appreciated,
Bart
If a Webcam or even Labviews machine vision is out of the question,
you could try the same color LED to sense the segment. It will be
close to the wavelength and would produce a small voltage. How ambient
lighting will effect it I'm not sure. The webcam idea starts to look
better because software is flexible and it's been done before.

Cheers
 
H

hamilton

Jan 1, 1970
0
Hi All,
I'm tasked with logging into a PLC the temperature of a waterbath over time. Well, not exactly. The waterbath has a three character display that shows its temperature. Three 7-segment LED's would show, for example, 45.7
I have a PLC that I have to log what the display shows. I cannot access the back of the display board to pickup any output.
So my idea was to use several phototransistors (I've seen tiny ones) each strategically positioned on a segment of the displayed characters.
I bought two styles from Midwest Surplus (no markings) and tested them with my desk lamp as the light source and it was cool to watch them turn on and off (first time with these things). But when I tested them at the display of the waterbath they wouldn't turn on.
I tried a waterbath with a green display and one with a red display but none of my phototransistors would work. Digikey lists wavelengths as a parameter in their search engine for phototransistors. How would I know which wavelength to buy and am I even on the right track?
One guy suggested, instead of photodiodes, a webcam run through some OCR software, then the ascii transmitted to the PLC. Now THAT was thinking outside the box. Not really do-able in my situation.
Any suggestions?
All help is appreciated,
Bart

Name the PLC, does it have a serial port ?

hamilton
 
R

Roger Monroe

Jan 1, 1970
0
Name the PLC, does it have a serial port ?



hamilton

On hand, I've got several Horner PLC's, models XLe and XL4, both with serial communication available for applications. I've also got several Automation Direct's "CLICK" family of PLC's, also with serial communication available in the ladder software.
All are a joy to program,
Bart
 
D

Don Y

Jan 1, 1970
0
Hi All,
I'm tasked with logging into a PLC the temperature of a waterbath over
time. Well, not exactly. The waterbath has a three character display that
shows its temperature. Three 7-segment LED's would show, for example, 45.7

Why can't you add a temperature probe and log it directly? (Or, are
you trying to characterize the display's performance?)
I have a PLC that I have to log what the display shows. I cannot access
the back of the display board to pickup any output.
So my idea was to use several phototransistors (I've seen tiny ones) each
strategically positioned on a segment of the displayed characters.

You probably don't have to use 7 detectors for each digit. Examine the
"segment mapping" for each displayed digit value. You have 7 signals
encoding only 10 values. In theory, you only need 4 bits for this
(though you might not be able to pick them off the display directly!)

Build a Karnaugh map for each and see what they have in common.
I bought two styles from Midwest Surplus (no markings) and tested them
with my desk lamp as the light source and it was cool to watch them turn
on and off (first time with these things). But when I tested them at
the display of the waterbath they wouldn't turn on.

Lots more light from your desk lamp as well as spectral content.
Also, desklamp gives you a higher duty cycle (I suspect the LED
displays are multiplexed so each "lit" segment is really "off"
70% of the time!)
I tried a waterbath with a green display and one with a red display but
none of my phototransistors would work. Digikey lists wavelengths as a
parameter in their search engine for phototransistors. How would I know
which wavelength to buy and am I even on the right track?

Try using an LED (of the same color) as a photodetector -- with a
fair bit of gain!
One guy suggested, instead of photodiodes, a webcam run through some
OCR software, then the ascii transmitted to the PLC. Now THAT was
thinking outside the box. Not really do-able in my situation.

You also still have to deal with the possibility that the display
is multiplexed -- beating against the frame rate of the camera.
Any suggestions?
All help is appreciated,

Does the water bath/indicator have a 4-20mA output or any other
means of getting at the "signal" it is displaying?
 
M

Martin Brown

Jan 1, 1970
0
Hi All,
I'm tasked with logging into a PLC the temperature of a waterbath over time. Well, not exactly. The waterbath has a three character display that shows its temperature. Three 7-segment LED's would show, for example, 45.7
I have a PLC that I have to log what the display shows. I cannot access the back of the display board to pickup any output.
So my idea was to use several phototransistors (I've seen tiny ones) each strategically positioned on a segment of the displayed characters.
I bought two styles from Midwest Surplus (no markings) and tested them with my desk lamp as the light source and it was cool to watch them turn on and off (first time with these things). But when I tested them at the display of the waterbath they wouldn't turn on.
I tried a waterbath with a green display and one with a red display but none of my phototransistors would work. Digikey lists wavelengths as a parameter in their search engine for phototransistors. How would I know which wavelength to buy and am I even on the right track?
One guy suggested, instead of photodiodes, a webcam run through some OCR software, then the ascii transmitted to the PLC. Now THAT was thinking outside the box. Not really do-able in my situation.
Any suggestions?
All help is appreciated,
Bart

Basically you are dead in the water unless either it is either in pitch
dark or a multiplexed display and you can use frequency of the wanted
signal to detect the segment on or off against strong ambient light.

It would be orders of magnitude easier to put another independent
thermocouple into the thing being controlled.
 
R

Roger Monroe

Jan 1, 1970
0
Hi All,

I'm tasked with logging into a PLC the temperature of a waterbath over time. Well, not exactly. The waterbath has a three character display that shows its temperature. Three 7-segment LED's would show, for example, 45.7

I have a PLC that I have to log what the display shows. I cannot access the back of the display board to pickup any output.

So my idea was to use several phototransistors (I've seen tiny ones) each strategically positioned on a segment of the displayed characters.

I bought two styles from Midwest Surplus (no markings) and tested them with my desk lamp as the light source and it was cool to watch them turn on and off (first time with these things). But when I tested them at the display of the waterbath they wouldn't turn on.

I tried a waterbath with a green display and one with a red display but none of my phototransistors would work. Digikey lists wavelengths as a parameter in their search engine for phototransistors. How would I know which wavelength to buy and am I even on the right track?

One guy suggested, instead of photodiodes, a webcam run through some OCR software, then the ascii transmitted to the PLC. Now THAT was thinking outside the box. Not really do-able in my situation.

Any suggestions?

All help is appreciated,

Bart

I have an external thermometer to log the temperature of the water and I have an AC current transducer on the power cord (a kind of "clamp ammeter") to log the amperage, revealing when the heater is on or off. I need to log the display so I have a record of what the waterbath is saying the temperature is. I cannot crack open the waterbath's case to access the electronics inside (well I could but that opens up a can of worms, "Observer Effect").
I have 12 available inputs on the PLC so I'm working on a way to logic outthe three 7-segment displays to a 4 bit binary number, doable (AND, NAND, etc.).
-
This is a great group!
Bart
 
J

Jasen Betts

Jan 1, 1970
0
Why can't you add a temperature probe and log it directly? (Or, are
you trying to characterize the display's performance?)


You probably don't have to use 7 detectors for each digit. Examine the
"segment mapping" for each displayed digit value. You have 7 signals
encoding only 10 values. In theory, you only need 4 bits for this
(though you might not be able to pick them off the display directly!)

Build a Karnaugh map for each and see what they have in common.

a
f b
g
e c
d
h

_ _ _ _ _ _ _ _
| | | _| _||_||_ |_ ||_||_|
|_| ||_ _| | _||_| ||_| _|

you need g to tell 0 and 8 apart
you need b to tell 6 abd 8 apart
you nned e to tell 9 and 8 apart
you need f to tell 9 and 3 apart

you need either a or d to tell 9 and 4 apart
you need either a or f to tell 1 and 7 apart

it looks like 5 is enough. a,b,e,f,g
 
D

Don Y

Jan 1, 1970
0
Hi Jasen,

a
f b
g
e c
d
h

_ _ _ _ _ _ _ _
| | | _| _||_||_ |_ ||_||_|
|_| ||_ _| | _||_| ||_| _|

you need g to tell 0 and 8 apart
you need b to tell 6 abd 8 apart
you nned e to tell 9 and 8 apart
you need f to tell 9 and 3 apart

you need either a or d to tell 9 and 4 apart
you need either a or f to tell 1 and 7 apart

it looks like 5 is enough. a,b,e,f,g

He may be able to improve on this. I.e., is
the leftmost digit 0-9? Or, some smaller range?
Likewise, can the rightmost digit assume all
values? Or, just every 0.2 degrees, etc.? Can
he switch the indicator to degrees C/F to change
the range of options he has to deal with?

Can "blank" appear (e.g., leading zeroes)?
Or, "display off"?

Note, also, that some "fonts" might remove
the tails on 6 and or 9. Others might add a
serif to the 7... It depends on whether there
is a discrete "seven segment decoder" driving
the display segments, or a bit of software, or
some outputs from an integrating ADC that has
been coaxed into serving this role, or...

(Also depends on what the segments actually look
like; there are lots of "artistic" versions of the
stock "7 straight line segments")

And, is it possible for a segment/driver to fail?
(is this a short term "experiment" or a long term
"monitoring process"?)
 
G

George Herold

Jan 1, 1970
0
Hi All,

I'm tasked with logging into a PLC the temperature of a waterbath over time. Well, not exactly. The waterbath has a three character display that shows its temperature. Three 7-segment LED's would show, for example, 45.7

I have a PLC that I have to log what the display shows. I cannot access the back of the display board to pickup any output.

So my idea was to use several phototransistors (I've seen tiny ones) each strategically positioned on a segment of the displayed characters.

I bought two styles from Midwest Surplus (no markings) and tested them with my desk lamp as the light source and it was cool to watch them turn on and off (first time with these things). But when I tested them at the display of the waterbath they wouldn't turn on.

I tried a waterbath with a green display and one with a red display but none of my phototransistors would work. Digikey lists wavelengths as a parameter in their search engine for phototransistors. How would I know which wavelength to buy and am I even on the right track?

One guy suggested, instead of photodiodes, a webcam run through some OCR software, then the ascii transmitted to the PLC. Now THAT was thinking outside the box. Not really do-able in my situation.

Any suggestions?

All help is appreciated,

Bart

So why can't you do the web cam/ OCR idea? If not that I'd much rather hack open the display and get access to the electrical signals, rather than trying the photo-transistor idea... that seems 'squishy'. (to use a technical term.)

George H.
 
T

tm

Jan 1, 1970
0
John Fields said:
---
Definitely.

Just for fun, I've shown a static encode for a single 7-segment
digit as a baseline.

If the OP comes back with the actual drive scheme, then an
appropriate design can follow.

I wonder if a seven segment display could be used as the detector? The red
leds should give some photo response to the red light from the display. It
should match up pretty closely.
 
Won't there be an issue if the segments are sequentially activated,
Definitely.

Yes, you have to hunt for and lock into the refresh cycle.
Just for fun, I've shown a static encode for a single 7-segment
digit as a baseline.

Fun exercise perhaps, but impractical to do it in hardware. Just program a micro for it.
 
T

tm

Jan 1, 1970
0
Yes, you have to hunt for and lock into the refresh cycle.

Why? Just integrate the signal over enough time. Temperature usually doesn't
change very fast.
 
On Tuesday, November 5, 2013 11:25:36 PM UTC-5, Roger Monroe wrote:

Wow- are you the retired porn star who hit the lotto for millions and started your one man male dancer review?
 
Why? Just integrate the signal over enough time. Temperature usually doesn't
change very fast.

Let says there are N digits, and assume a common cathode LED. The LED driver will first drive some of 7 rows high and drive digit 1 low. After T, drive some other pattern and drive digit 2 low. ...etc. So the refresh cycleis N * T. You have to adjust your sampling time T accordingly.
 
D

Don Y

Jan 1, 1970
0
I wonder if a seven segment display could be used as the detector? The
red leds should give some photo response to the red light from the
display. It should match up pretty closely.

Clever idea -- instead of manually placing (and securing) individual
detectors.

But, most displays are "tilted" at an angle. Mating a similar display
face-to-face would result in the detector segments being rotated
through twice this angle -- relative to the emitting segments.
 
D

Don Y

Jan 1, 1970
0
Let says there are N digits, and assume a common cathode LED. The LED
driver will first drive some of 7 rows high and drive digit 1 low.
After T, drive some other pattern and drive digit 2 low. ...etc. So
the refresh cycle is N * T. You have to adjust your sampling time T
accordingly.

Falls out of the equation. Sample each segment while "off"
(which, in fact, may not actually be off -- if the driving
interface isn't smart enough to insert a dead-time between
column updates) to establish a baseline for each emitter/detector
pair. Then, see what the maximum signal you *ever* see is
(over the integration period). Set slicing level somewhere
between these extremes.

If a lit segment only sees a ~30% duty cycle, it's still better
than the 0% that an unlit segment sees!

What you have to worry more about is synchronizing with the
*data* update interval (i.e., when the next "value" will appear
in the digits).

And, whether the new value will appear the same way each time
(i.e., is the display update rate frequency locked to the digit
refresh rate?)
 
J

Jasen Betts

Jan 1, 1970
0
Let says there are N digits, and assume a common cathode LED. The LED driver will first drive some of 7 rows high and drive digit 1 low. After T, drive some other pattern and drive digit 2 low. ...etc. So the refresh cycle is N * T. You have to adjust your sampling time T accordingly.

you could use a filter tuned to the refresh rate, that'd help exclude
ambient light. but 15 filters is quite a lot of work.

you could or all the filter outputs together per digit to find the
hot place value
and or them together per segment and get the digit that goes in that
place.
 
J

John S

Jan 1, 1970
0
On Tuesday, November 5, 2013 11:25:36 PM UTC-5, Roger Monroe wrote:

Wow- are you the retired porn star who hit the lotto for millions and started your one man male dancer review?

Wow! - Something is really wrong with Fred. He wasn't quite this
obnoxious before.

Fred - please go to a doctor with copies of your latest emails to help
explain your condition.
 
Top