Detecting 7-Segment LED's With Phototransistors

Hi All, I'm tasked with logging into a PLC the temperature of a waterbath over tim e. Well, not exactly. The waterbath has a three character display that show s 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 th e 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 wit h my desk lamp as the light source and it was cool to watch them turn on an d 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 no ne of my phototransistors would work. Digikey lists wavelengths as a parame ter in their search engine for phototransistors. How would I know which wav elength 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 outs ide the box. Not really do-able in my situation. Any suggestions? All help is appreciated, Bart

Reply to
Roger Monroe
Loading thread data ...

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

Reply to
Martin Riddle

The phototransistors will respond to the LED segments, but the current will be low. The LED segments may also be scanned - or may not - so you could look at the phototransistor current on an oscilloscope and see if anything is going on.

Phototransistors don't exactly turn on and off, they just conduct more as the light increases. You might get microamps, or even nanoamps, from an LED segment. Most of them have similar spectral responses. [1]

You'd need a lot of photosensors, 21, or possibly less if you think through all the patterns. Messy.

Why not add a new temperature sensor in the water bath? Connect it to a cheap USB data acquisition thing.

[1] I was playing with a large-area photodiode this afternoon, 13 mm^2 active area. Huge, actually. Office room light gave me roughly 200 nA. To get 200 uA, I had to hold it about 6" below a bright halogen under-counter lamp thing.
--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

Somewhere on the web there's a table of visible light colors and wavelengths. I think red starts getting visible around 700 or 750nm. I can't remember what the wavelength of green is. Google is your friend.

Order your phototransistors by wavelength and sensitivity -- you want nice sensitive ones. Then use bigger and bigger collector resistors until you start seeing a response. This ain't rocket science.

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

Name the PLC, does it have a serial port ?

hamilton

Reply to
hamilton

r 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

ss the back of the display board to pickup any output.

each strategically positioned on a segment of the displayed characters.

m 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 di splay of the waterbath they wouldn't turn on.

ut none of my phototransistors would work. Digikey lists wavelengths as a p arameter in their search engine for phototransistors. How would I know whic h wavelength to buy and am I even on the right track?

OCR software, then the ascii transmitted to the PLC. Now THAT was thinking outside the box. Not really do-able in my situation.

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

Reply to
Roger Monroe

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.

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!)

Try using an LED (of the same color) as a photodetector -- with a fair bit of gain!

You also still have to deal with the possibility that the display is multiplexed -- beating against the frame rate of the camera.

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

Reply to
Don Y

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.

--
Regards, 
Martin Brown
Reply to
Martin Brown

--
Instead of phototransistors, you might want to try LDRs.
Reply to
John Fields

ime. Well, not exactly. The waterbath has a three character display that sh ows its temperature. Three 7-segment LED's would show, for example, 45.7

the back of the display board to pickup any output.

h strategically positioned on a segment of the displayed characters.

ith 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 displ ay of the waterbath they wouldn't turn on.

none of my phototransistors would work. Digikey lists wavelengths as a para meter in their search engine for phototransistors. How would I know which w avelength to buy and am I even on the right track?

R software, then the ascii transmitted to the PLC. Now THAT was thinking ou tside the box. Not really do-able in my situation.

I have an external thermometer to log the temperature of the water and I ha ve an AC current transducer on the power cord (a kind of "clamp ammeter") t o log the amperage, revealing when the heater is on or off. I need to log t he display so I have a record of what the waterbath is saying the temperatu re is. I cannot crack open the waterbath's case to access the electronics i nside (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 out the three 7-segment displays to a 4 bit binary number, doable (AND, NAND, etc.).

- This is a great group! Bart

Reply to
Roger Monroe

I'm liking the web-cam idea- it's perhaps a lot easier to implement than you think. There are a very finite number of possible readouts, so make up template images with each possible readout (maybe you can record the temperature while it's ramping, otherwise tedious hand editing). Then to do a reading compute sum of least squared difference between the captured image and the many template images (sum the squared difference of each pixel between captured image and template image) to find the one which most closely matches (the one with the least difference). There will clearly be a lot of simple preprocessing you can do: mask out the background, convert image to binary to distinguish between on and off..

Long ago I did something just like this: I captured output to VFD and simulated keypresses on a credit card terminal to automate data entry of medicaid cards to verify entitlement for patients at a methadone clinic. I certainly did take the machine apart :-) Used Xilinx XC2064 FPGA. My consulting fee was much less than the cost of the software package which did the same thing.

--
/*  jhallen@world.std.com AB1GO */                        /* Joseph H. Allen */ 
int a[1817];main(z,p,q,r){for(p=80;q+p-80;p-=2*a[p])for(z=9;z--;)q=3&(r=time(0) 
+r*57)/7,q=q?q-1?q-2?1-p%79?-1:0:p%79-77?1:0:p158?-79:0,q?!a[p+q*2 
]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}
Reply to
Joseph H Allen

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

--
For a good time: install ntp 

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Reply to
Jasen Betts

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"?)

Reply to
Don Y

On a sunny day (Thu, 07 Nov 2013 00:37:05 -0700) it happened Don Y wrote in :

Been thinking about your suggestions, and now for something shocking: I think one can do this with a PIC 18F14K22 and a cheap analog PAL or NTSC camera module. No character recognition software, no big processor.

Long Time Ago, In A Place Not Far From Here, Jan Panteltje Designed And Wrote MVP

formatting link
In Those Days Evil Forces Added Bad Impulses During The Vertical Interval Originally Designed To Protect The Empire The System Was Used Against Its Own People MVP Was The Rebels Answer And Claimed Back Their Own Territory.

Now if you look at the contents of the tgz you will find a very slow 8 pin PIC doing analog video processing.

The way I did that is use one of the PIC comparators to slice the video so to make a sync separator, and then detect the vertical interval and count lines. Now the plot PIC has 2 comparators, the other one can also be used to slice the video signal at say at 50%, so you can tell light from dark areas. IF, and that is a requirement, the camera can be fixed relative to the display (some bracket perhaps), then, as 18F has internal 16 MHz oscillator and 4 x PLL, so 64 MHz clock, 16 M instructions / second, it would be easy to count a few lines in every frame, and in a line look for 'segment on' or segment off' The rest is just a few lines asm, to 'decode' the 7 segments back to say a serial RS232 stream with numbers and CRLF for example one new reading per second, We need to watch out for flipping digits, scanning, so one needs to take the result of a few frames, and if nothing changes between frames use that as result, maybe even average over some frames to defeat scanning. Any changes would point to flipping digits. Could be an interesting project. I am not volunteering, but hey, here is the source to get you going if you like video and asm.

Greetings Luke Skywater

Reply to
Jan Panteltje

ime. Well, not exactly. The waterbath has a three character display that sh ows its temperature. Three 7-segment LED's would show, for example, 45.7

the back of the display board to pickup any output.

h strategically positioned on a segment of the displayed characters.

ith 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 displ ay of the waterbath they wouldn't turn on.

none of my phototransistors would work. Digikey lists wavelengths as a para meter in their search engine for phototransistors. How would I know which w avelength to buy and am I even on the right track?

R software, then the ascii transmitted to the PLC. Now THAT was thinking ou tside the box. Not really do-able in my situation.

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

George H.

Reply to
George Herold

I think the camera is a good idea, You can use not a webcam but a digital out camera like this:

formatting link

(Or one of her sisters with more resolution...)

Instead of putting sensors on leds segments, You find the segmants in some position in a string of byte, obviously the display and the camera system must be rigid

bye delo

Reply to
delo

On Wed, 6 Nov 2013 05:06:21 -0800 (PST), Roger Monroe wrote:

--- Here's an encoder for a single digit:

Version 4 SHEET 1 2212 1492 WIRE 160 32 32 32 WIRE 352 32 160 32 WIRE 544 32 352 32 WIRE 736 32 544 32 WIRE 928 32 736 32 WIRE 1120 32 928 32 WIRE 1312 32 1120 32 WIRE 1504 32 1312 32 WIRE 32 80 32 32 WIRE 32 80 -448 80 WIRE 64 80 32 80 WIRE 1696 80 128 80 WIRE 176 128 32 128 WIRE 368 128 176 128 WIRE 560 128 368 128 WIRE 1136 128 560 128 WIRE 1328 128 1136 128 WIRE 1520 128 1328 128 WIRE 1712 128 1520 128 WIRE 32 176 32 128 WIRE 32 176 -368 176 WIRE 64 176 32 176 WIRE 752 176 128 176 WIRE 944 176 752 176 WIRE 192 224 32 224 WIRE 384 224 192 224 WIRE 576 224 384 224 WIRE 960 224 576 224 WIRE 1152 224 960 224 WIRE 1344 224 1152 224 WIRE 1728 224 1344 224 WIRE 32 272 32 224 WIRE 32 272 -288 272 WIRE 64 272 32 272 WIRE 768 272 128 272 WIRE 1536 272 768 272 WIRE 400 320 32 320 WIRE 784 320 400 320 WIRE 976 320 784 320 WIRE 1360 320 976 320 WIRE 1552 320 1360 320 WIRE 32 368 32 320 WIRE 32 368 -208 368 WIRE 64 368 32 368 WIRE 208 368 128 368 WIRE 592 368 208 368 WIRE 1168 368 592 368 WIRE 1744 368 1168 368 WIRE 416 416 32 416 WIRE 800 416 416 416 WIRE 992 416 800 416 WIRE 1568 416 992 416 WIRE 32 464 32 416 WIRE 32 464 -128 464 WIRE 64 464 32 464 WIRE 224 464 128 464 WIRE 608 464 224 464 WIRE 1184 464 608 464 WIRE 1376 464 1184 464 WIRE 1760 464 1376 464 WIRE 240 512 32 512 WIRE 432 512 240 512 WIRE 816 512 432 512 WIRE 1008 512 816 512 WIRE 32 560 32 512 WIRE 32 560 -48 560 WIRE 64 560 32 560 WIRE 624 560 128 560 WIRE 1200 560 624 560 WIRE 1392 560 1200 560 WIRE 1584 560 1392 560 WIRE 1776 560 1584 560 WIRE 256 608 32 608 WIRE 448 608 256 608 WIRE 832 608 448 608 WIRE 1024 608 832 608 WIRE 1216 608 1024 608 WIRE 1408 608 1216 608 WIRE 1600 608 1408 608 WIRE 32 656 32 608 WIRE 64 656 32 656 WIRE 640 656 128 656 WIRE 1792 656 640 656 WIRE 160 704 160 32 WIRE 176 704 176 128 WIRE 192 704 192 224 WIRE 208 704 208 368 WIRE 224 704 224 464 WIRE 352 704 352 32 WIRE 368 704 368 128 WIRE 384 704 384 224 WIRE 400 704 400 320 WIRE 416 704 416 416 WIRE 544 704 544 32 WIRE 560 704 560 128 WIRE 576 704 576 224 WIRE 592 704 592 368 WIRE 608 704 608 464 WIRE 736 704 736 32 WIRE 752 704 752 176 WIRE 768 704 768 272 WIRE 784 704 784 320 WIRE 800 704 800 416 WIRE 928 704 928 32 WIRE 944 704 944 176 WIRE 960 704 960 224 WIRE 976 704 976 320 WIRE 992 704 992 416 WIRE 1120 704 1120 32 WIRE 1136 704 1136 128 WIRE 1152 704 1152 224 WIRE 1168 704 1168 368 WIRE 1184 704 1184 464 WIRE 1312 704 1312 32 WIRE 1328 704 1328 128 WIRE 1344 704 1344 224 WIRE 1360 704 1360 320 WIRE 1376 704 1376 464 WIRE 1504 704 1504 32 WIRE 1520 704 1520 128 WIRE 1536 704 1536 272 WIRE 1552 704 1552 320 WIRE 1568 704 1568 416 WIRE 1696 704 1696 80 WIRE 1712 704 1712 128 WIRE 1728 704 1728 224 WIRE 1744 704 1744 368 WIRE 1760 704 1760 464 WIRE -448 720 -448 80 WIRE -368 720 -368 176 WIRE -288 720 -288 272 WIRE -208 720 -208 368 WIRE -128 720 -128 464 WIRE -48 720 -48 560 WIRE 32 720 32 656 WIRE 224 768 208 768 WIRE 416 768 400 768 WIRE 608 768 592 768 WIRE 800 768 784 768 WIRE 992 768 976 768 WIRE 1184 768 1168 768 WIRE 1376 768 1360 768 WIRE 1568 768 1552 768 WIRE 1760 768 1744 768 WIRE 224 784 224 768 WIRE 240 784 240 512 WIRE 256 784 256 608 WIRE 416 784 416 768 WIRE 432 784 432 512 WIRE 448 784 448 608 WIRE 608 784 608 768 WIRE 624 784 624 560 WIRE 640 784 640 656 WIRE 800 784 800 768 WIRE 816 784 816 512 WIRE 832 784 832 608 WIRE 992 784 992 768 WIRE 1008 784 1008 512 WIRE 1024 784 1024 608 WIRE 1184 784 1184 768 WIRE 1200 784 1200 560 WIRE 1216 784 1216 608 WIRE 1376 784 1376 768 WIRE 1392 784 1392 560 WIRE 1408 784 1408 608 WIRE 1568 784 1568 768 WIRE 1584 784 1584 560 WIRE 1600 784 1600 608 WIRE 1760 784 1760 768 WIRE 1776 784 1776 560 WIRE 1792 784 1792 656 WIRE -448 848 -448 800 WIRE -368 848 -368 800 WIRE -368 848 -448 848 WIRE -288 848 -288 800 WIRE -288 848 -368 848 WIRE -208 848 -208 800 WIRE -208 848 -288 848 WIRE -128 848 -128 800 WIRE -128 848 -208 848 WIRE -48 848 -48 800 WIRE -48 848 -128 848 WIRE 32 848 32 800 WIRE 32 848 -48 848 WIRE -448 896 -448 848 WIRE 240 912 240 848 WIRE 304 912 240 912 WIRE 624 912 624 848 WIRE 624 912 544 912 WIRE 704 912 624 912 WIRE 816 912 816 848 WIRE 880 912 816 912 WIRE 1008 912 1008 848 WIRE 1072 912 1008 912 WIRE 1392 912 1392 848 WIRE 1456 912 1392 912 WIRE 240 944 240 912 WIRE 304 944 304 912 WIRE 432 944 432 848 WIRE 544 944 544 912 WIRE 624 944 624 912 WIRE 704 944 704 912 WIRE 816 944 816 912 WIRE 880 944 880 912 WIRE 1008 944 1008 912 WIRE 1072 944 1072 912 WIRE 1200 944 1200 848 WIRE 1392 944 1392 912 WIRE 1456 944 1456 912 WIRE 1584 944 1584 848 WIRE 1776 944 1776 848 WIRE -96 992 -416 992 WIRE 2000 1024 1952 1024 WIRE 32 1040 32 848 WIRE 96 1040 32 1040 WIRE 304 1040 304 1008 WIRE 304 1040 176 1040 WIRE 704 1040 704 1008 WIRE 704 1040 304 1040 WIRE 1072 1040 1072 1008 WIRE 1072 1040 704 1040 WIRE 1456 1040 1456 1008 WIRE 1456 1040 1072 1040 WIRE 1776 1040 1776 1008 WIRE 1776 1040 1456 1040 WIRE 1888 1040 1776 1040 WIRE 2000 1120 1952 1120 WIRE 32 1136 32 1040 WIRE 96 1136 32 1136 WIRE 624 1136 624 1008 WIRE 624 1136 176 1136 WIRE 880 1136 880 1008 WIRE 880 1136 624 1136 WIRE 1392 1136 1392 1008 WIRE 1392 1136 880 1136 WIRE 1584 1136 1584 1008 WIRE 1584 1136 1392 1136 WIRE 1888 1136 1584 1136 WIRE 2000 1216 1952 1216 WIRE 32 1232 32 1136 WIRE 96 1232 32 1232 WIRE 544 1232 544 1008 WIRE 544 1232 176 1232 WIRE 816 1232 816 1008 WIRE 816 1232 544 1232 WIRE 1008 1232 1008 1008 WIRE 1008 1232 816 1232 WIRE 1200 1232 1200 1008 WIRE 1200 1232 1008 1232 WIRE 1888 1232 1200 1232 WIRE 2000 1312 1952 1312 WIRE 32 1328 32 1232 WIRE 96 1328 32 1328 WIRE 240 1328 240 1008 WIRE 240 1328 176 1328 WIRE 432 1328 432 1008 WIRE 432 1328 240 1328 WIRE 1888 1328 432 1328 WIRE -336 1360 -336 944 FLAG -448 896 0 FLAG 2000 1024 Q0 FLAG 2000 1120 Q1 FLAG 2000 1216 Q2 FLAG 2000 1312 Q3 SYMBOL Digital\\inv 64 16 R0 WINDOW 3 8 104 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A1 SYMBOL Digital\\inv 64 112 R0 WINDOW 3 8 104 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A2 SYMBOL Digital\\inv 64 208 R0 WINDOW 3 8 104 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A3 SYMBOL Digital\\inv 64 304 R0 WINDOW 3 8 104 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A4 SYMBOL Digital\\inv 64 400 R0 WINDOW 3 8 104 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A5 SYMBOL Digital\\inv 64 496 R0 WINDOW 3 8 104 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A6 SYMBOL Digital\\inv 64 592 R0 WINDOW 3 8 104 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A7 SYMBOL voltage -448 704 R0 WINDOW 3 20 97 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR Value 5 SYMATTR InstName V1 SYMBOL voltage -368 704 R0 WINDOW 3 22 99 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR Value 5 SYMATTR InstName V2 SYMBOL voltage -288 704 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V3 SYMATTR Value 5 SYMBOL voltage -208 704 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V4 SYMATTR Value 0 SYMBOL voltage -128 704 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V5 SYMATTR Value 0 SYMBOL voltage -48 704 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V6 SYMATTR Value 5 SYMBOL voltage 32 704 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V7 SYMATTR Value 5 SYMBOL Digital\\and 256 736 R90 WINDOW 0 -6 51 VRight 2 WINDOW 3 16 52 Invisible 2 SYMATTR InstName A8 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 192 816 M90 WINDOW 0 -5 76 VLeft 2 WINDOW 3 16 112 Invisible 2 SYMATTR InstName A9 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 448 736 R90 WINDOW 0 -6 51 VRight 2 WINDOW 3 16 52 Invisible 2 SYMATTR InstName A11 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 384 816 M90 WINDOW 0 -5 76 VLeft 2 WINDOW 3 16 112 Invisible 2 SYMATTR InstName A12 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 640 736 R90 WINDOW 0 -6 51 VRight 2 WINDOW 3 16 52 Invisible 2 SYMATTR InstName A14 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 576 816 M90 WINDOW 0 -5 76 VLeft 2 WINDOW 3 16 112 Invisible 2 SYMATTR InstName A15 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 832 736 R90 WINDOW 0 -6 51 VRight 2 WINDOW 3 16 52 Invisible 2 SYMATTR InstName A17 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 768 816 M90 WINDOW 0 -5 76 VLeft 2 WINDOW 3 16 112 Invisible 2 SYMATTR InstName A18 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 1024 736 R90 WINDOW 0 -6 51 VRight 2 WINDOW 3 16 52 Invisible 2 SYMATTR InstName A20 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 960 816 M90 WINDOW 0 -5 76 VLeft 2 WINDOW 3 16 112 Invisible 2 SYMATTR InstName A21 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 1216 736 R90 WINDOW 0 -6 51 VRight 2 WINDOW 3 16 52 Invisible 2 SYMATTR InstName A23 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 1152 816 M90 WINDOW 0 -5 76 VLeft 2 WINDOW 3 16 112 Invisible 2 SYMATTR InstName A24 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 1408 736 R90 WINDOW 0 -6 51 VRight 2 WINDOW 3 16 52 Invisible 2 SYMATTR InstName A26 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 1344 816 M90 WINDOW 0 -5 76 VLeft 2 WINDOW 3 16 112 Invisible 2 SYMATTR InstName A27 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 1600 736 R90 WINDOW 0 -6 51 VRight 2 WINDOW 3 16 52 Invisible 2 SYMATTR InstName A29 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 1536 816 M90 WINDOW 0 -11 84 VLeft 2 WINDOW 3 16 112 Invisible 2 SYMATTR InstName A30 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 1792 736 R90 WINDOW 0 -6 51 VRight 2 WINDOW 3 16 52 Invisible 2 SYMATTR InstName A32 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL Digital\\and 1728 816 M90 WINDOW 0 -5 76 VLeft 2 WINDOW 3 16 112 Invisible 2 SYMATTR InstName A33 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMBOL diode 224 944 R0 WINDOW 0 21 64 Left 2 WINDOW 3 -18 73 VLeft 2 SYMATTR InstName D8 SYMATTR Value 1N4148 SYMBOL res 192 1024 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R1 SYMATTR Value 10K SYMBOL res 192 1120 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R2 SYMATTR Value 10K SYMBOL res 192 1216 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R3 SYMATTR Value 10K SYMBOL res 192 1312 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R4 SYMATTR Value 10K SYMBOL diode 288 944 R0 WINDOW 0 -20 1 Left 2 WINDOW 3 52 74 VLeft 2 SYMATTR InstName D9 SYMATTR Value 1N4148 SYMBOL diode 416 944 R0 WINDOW 0 21 64 Left 2 WINDOW 3 -18 73 VLeft 2 SYMATTR InstName D1 SYMATTR Value 1N4148 SYMBOL diode 528 944 R0 WINDOW 0 21 64 Left 2 WINDOW 3 -18 73 VLeft 2 SYMATTR InstName D2 SYMATTR Value 1N4148 SYMBOL diode 800 944 R0 WINDOW 0 21 64 Left 2 WINDOW 3 -18 73 VLeft 2 SYMATTR InstName D3 SYMATTR Value 1N4148 SYMBOL diode 992 944 R0 WINDOW 0 21 64 Left 2 WINDOW 3 -18 73 VLeft 2 SYMATTR InstName D4 SYMATTR Value 1N4148 SYMBOL diode 1184 944 R0 WINDOW 0 21 64 Left 2 WINDOW 3 -18 73 VLeft 2 SYMATTR InstName D5 SYMATTR Value 1N4148 SYMBOL diode 1376 944 R0 WINDOW 0 21 64 Left 2 WINDOW 3 -18 73 VLeft 2 SYMATTR InstName D6 SYMATTR Value 1N4148 SYMBOL diode 1568 944 R0 WINDOW 0 21 64 Left 2 WINDOW 3 -18 73 VLeft 2 SYMATTR InstName D7 SYMATTR Value 1N4148 SYMBOL diode 1760 944 R0 WINDOW 0 21 64 Left 2 WINDOW 3 -18 73 VLeft 2 SYMATTR InstName D10 SYMATTR Value 1N4148 SYMBOL diode 688 944 R0 WINDOW 0 -31 0 Left 2 WINDOW 3 52 74 VLeft 2 SYMATTR InstName D11 SYMATTR Value 1N4148 SYMBOL diode 864 944 R0 WINDOW 0 -28 1 Left 2 WINDOW 3 52 74 VLeft 2 SYMATTR InstName D12 SYMATTR Value 1N4148 SYMBOL diode 1056 944 R0 WINDOW 0 -32 2 Left 2 WINDOW 3 52 74 VLeft 2 SYMATTR InstName D13 SYMATTR Value 1N4148 SYMBOL diode 1440 944 R0 WINDOW 0 -30 1 Left 2 WINDOW 3 52 74 VLeft 2 SYMATTR InstName D14 SYMATTR Value 1N4148 SYMBOL diode 608 944 R0 WINDOW 0 21 64 Left 2 WINDOW 3 -16 75 VLeft 2 SYMATTR InstName D15 SYMATTR Value 1N4148 SYMBOL Digital\\buf 1888 976 R0 WINDOW 3 8 120 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A35 SYMBOL Digital\\buf 1888 1072 R0 WINDOW 3 8 120 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A36 SYMBOL Digital\\buf 1888 1168 R0 WINDOW 3 8 120 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A37 SYMBOL Digital\\buf 1888 1264 R0 WINDOW 3 8 120 Invisible 2 SYMATTR Value trise 50n tfall 50n vhigh 5v SYMATTR InstName A38 TEXT 256 880 Left 3 ;9 TEXT 448 880 Left 3 ;8 TEXT 640 880 Left 3 ;7 TEXT 832 880 Left 3 ;6 TEXT 1024 880 Left 3 ;5 TEXT 1216 880 Left 3 ;4 TEXT 1408 880 Left 3 ;3 TEXT 1600 880 Left 3 ;2 TEXT 1792 880 Left 3 ;1 TEXT -456 760 Left 2 ;a TEXT -376 760 Left 2 ;b TEXT -296 760 Left 2 ;c TEXT -216 760 Left 2 ;d TEXT -136 760 Left 2 ;e TEXT -56 760 Left 2 ;f TEXT 24 760 Left 2 ;g TEXT -400 880 Left 2 !.tran 20 startup uic TEXT -464 1424 Left 3 ;7-SEGMENT TO BCD ENCODER TEXT -464 1472 Left 3 ;JOHN FIELDS 07 NOV 2013 TEXT -416 968 Left 3 ;DEC TEXT -288 928 Left 3 ;SEGMENT TEXT -400 1024 Left 3 ;01 TEXT -304 1024 Left 3 ;0 1 1 0 0 0 0 TEXT -304 968 Left 3 ;a b c d e f g TEXT -400 1064 Left 3 ;02 TEXT -304 1064 Left 3 ;1 1 0 1 1 0 1 TEXT -400 1104 Left 3 ;03 TEXT -304 1104 Left 3 ;1 1 1 1 0 0 1 TEXT -400 1144 Left 3 ;04 TEXT -304 1144 Left 3 ;0 1 1 0 0 0 1 TEXT -400 1184 Left 3 ;05 TEXT -304 1184 Left 3 ;1 0 1 1 0 1 1 TEXT -400 1224 Left 3 ;06 TEXT -304 1224 Left 3 ;1 0 0 1 1 1 1 TEXT -400 1264 Left 3 ;07 TEXT -304 1264 Left 3 ;1 1 1 0 0 0 0 TEXT -400 1304 Left 3 ;08 TEXT -304 1304 Left 3 ;1 1 1 1 1 1 1 TEXT -400 1344 Left 3 ;09 TEXT -304 1344 Left 3 ;1 1 1 0 0 1 1 TEXT 1992 1344 Left 2 ;MSB

If you muxed in the segments you could save a lot of hardware.

can you do that?

Reply to
John Fields

Won't there be an issue if the segments are sequentially activated, which is, I think, the case with many 7-segment driving schemes... relying on the eye's persistence response? ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   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.
Reply to
Jim Thompson

--
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.
Reply to
John Fields

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.

Reply to
tm

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.