Detecting 7-Segment LED's With Phototransistors

Nov 06, 2013 91 Replies

What if it is a static display? :>

The point is, you can't fashion a solution without more knowledge of how the display is driven.

Think about how you would do this with a "hardware monitor" (i.e., just looking at the signals on the pins of the displays).

If static drive, there's no "multiplex clock" that you can extract from digit enables *or* segment enables.

If multiplexed drive, (assume digit-at-a-time) you can be tempted to use a "digit enable" (whether common cathode or common anode) to "clock" the data from the "segment enables".

But, is the segment data "set up" prior to the digit enable? Is there a deadtime between chronologically sequential digit enables? Can two digits be enabled simultaneously -- even if only for a brief period?

Likewise, are the segment enables gated off before the digit enable is disabled? Or, after? Are they re-enabled for the "next" digit before that digit is enabled? Or, after?

The same sort of questions apply to how the *data* updates merge into the observations. There's no "clock" that you can reliably lock onto to know that a set of observations apply to one "reading" vs. the next/previous.

Damn near any design can easily be "wrong" and that only evident when it is actually applied to a real "display" (hopefully, the characteristics of the display don't *change* over time or from one unit to another).

Snip a hell of a lot of google s*it

if it was 1980 and you had to erase an eprom and ship to someone with a programmer then maybe ;)

-Lasse ==================================================

But can you fit it in a 1702 EPROM?

tm

Lose the google and the whitespace.

Maybe I need a filter that rejects on the basis of the ratio of whitespace to total lines ?>:-} ...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.

Den tirsdag den 12. november 2013 01.24.31 UTC+1 skrev Jim Thompson:

I do wonder if google have hired "Mordac The Preventer"

seems like google is trying their very best to scare away people by upgrading everything to new versions of useless

-Lasse

The point is that I posted a picture - worth a thousand words - of a perfectly valid hardware solution, while you code monkeys spew thousands of words dictating how it should be done, but produce no pictures.

Den tirsdag den 12. november 2013 02.17.28 UTC+1 skrev John Fields:

lds

deways...

one with the open gate instead of the one where you have to crawl through m ud

most code is text

switch(abcdefg) { case 0x7E: digit = 0;break; case 0x30: digit = 1;break; case 0x6D: digit = 2;break; case 0x79: digit = 3;break; case 0x33: digit = 4;break; case 0x5B: digit = 5;break; case 0x5F: digit = 6;break; case 0x70: digit = 7;break; case 0x7F: digit = 8;break; case 0x7B: digit = 9;break; default:break; }

-Lasse

Over here, on this side of the pond, we call that expose setting yourself up for the kill >:-} ...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.

I think I'd contact the manufacturer for a clue...

just debounce it, if you get the same reading repeatedly for 100 ms it's probably good.

For a good time: install ntp --- news://freenews.netfront.net/ - complaints: news@netfront.net ---

On a sunny day (Mon, 11 Nov 2013 19:17:28 -0600) it happened John Fields wrote in :

I do not see any monkey, but you are making one of yourself, because I gave a link to my PIC asm code for analog video processing,. I guess, even you, with help, could extend that code to read segments,

You resolution is extremely limited anyway, because it will not be possible to implement in many cases without lenses or even extremely small photocells. Usually there is some glass or plastic in front of the displays, so you could never get close enough to 'trigger' a single photocell, LDR, or whatever. You NEED the camera,

Just for fun I was thinking if somebody would bet I can make it with an analog camera module and a PIC in a month or 2 (weekend project), versus you a working one with your photo sensors in the same time, And it should work with LCD displays and displays of any reasonable size too.

It is especially there (flexibility) that software wins. And on component count, and maybe even on price, on market ability (yours needs a new design for every display in existence?), and ease of installation. :-)

formatting link

Best regards, Spehro Pefhany

"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com

On a sunny day (Tue, 12 Nov 2013 02:44:19 -0500) it happened Spehro Pefhany wrote in :

Cool, then you can have voice output too.

Jan,

I know that there are people using the Raspberry Pi camera module and OpenCV to do facial recognition:

formatting link

formatting link

One might think (famous last words ) that software capable of recognizing faces could be adapted to recognize multiple segmented digits. On the other hand, I don't know enough about either the Pi or OpenCV myself to say much more.

Hope it helps...

Frank McKenney

...[T]he people know in their hearts that journalism is a conventional art like any other, that it selects, heightens, and falsifies. Only its Nemesis is the same as that of other arts; if it loses all care for truth it loses all form likewise. The modern who paints too cleverly produces a picture of a cow which might be the earthquake at San Francisco. And the journalist who reports a speech too cleverly makes it mean nothing at all. -- G.K. Chesterton / On the Cryptic and the Elliptic (1908)

I posted a finished, viable solution to the OP's problem assuming, of course, a static display. I also asked about whether the display was muxed or not, but no answer has been forthcoming. If/when it is, I'll post another hardware solution and you may post a software solution if you care to.

On a sunny day (Tue, 12 Nov 2013 12:55:07 -0600) it happened Frnak McKenney wrote in :

Well that is amazing!

There is a lot going on .. only one lifetime to try it all...

Hi, yes, very much what I had been thinking after I posted that. I was thinking of using the Raspberry, but not the HD camera that you can get for it, because AFAIK it has a fixed focus lens, that would make coming real close a problem, but I have some webcams (Logitech E2500, Q-Tec both cost peanuts, that DO sort of work under Linux, and have an adjustable lens (no HD and not needed either). About 13 years ago (2000 or there about) I ran some tests on Linux OCR soft, at that time it needed a TIFF (from from a scanner) and I think the number of recognized fonts was limited too. But 13 years have past. I can grab a jpg from those webcams, convert it to tiff with 'convert' and run that old Linux OCR on it,. and maybe with some luck it would produce text, Could be done in an evening... If Linux OCR has improved, and why not, then it could be really good. Maybe in low light with long exposure time the display scanning frequency is less of an issue. So Raspi 25 Euro, webcam 12 Euro, there you are.

On a sunny day (Tue, 12 Nov 2013 14:29:39 -0600) it happened John Fields wrote in :

I doubt you get it working get your photocells close enough to see single segments. :-)

The creativity I run into these days _is_ amazing. It's not so much that I think that we have more people who are creative, but we certainly hear from more of them via the 'Web, USENET, blogs, and such.

I've been meaning to fix that.

About two years back I scanned in a typed report on a collection of pocket watches as part of handling my mother's estate and shoved them through an OCR program (don't recall which, perhaps gocr). Of perhaps two hundred pages, only three or four needed manual correction.

I was impressed.

And time. Don't forget the "time" part.

Just to make a long post longer, I kept looking around after making my last post and found a lot of people working on this exact problem:

OCR for reading multimeter?

formatting link

and

formatting link

both led me to this already-written software:

Seven Segment Optical Character Recognition

formatting link

And then there's:

formatting link

and:

formatting link

I also ran across some PDF papers, but those mostly discussed how to _do_ the OCR part.

Since I won't be getting a Pi any time soon, I hope you report your results back here.

Thanks...

Frank

The point of statistics is not to do myriad rigorous mathematical calculations; the point is to gain insight into meaningful social phenomena. -- Charles Wheelan / Naked Statistics

On a sunny day (Wed, 13 Nov 2013 11:24:25 -0600) it happened Frnak McKenney wrote in :

Been reading some of those links, and downloaded one of those programs.

That is almost a challenge to get me to try it...

Maybe I could test it on my digital alarm clock (big greenish 7 segment LEDs) I will get the latest gocr tomorrow :-)

Maybe I could test it on my digital alarm clock (big greenish 7 segment LEDs) I will get the latest gocr tomorrow :-)

PS I just got gocr on the pc, v 0.5, and ran some tests It works very well on my rxvt screenshot.

I do think this should compile on the Raspi.

BUT

formatting link
with this (long exposure) test picture it does not recognize ANY of the characters. But I can slice this very easy with some software. This is my Sony alarm clock, at faster exposure you see the scanning: I do not see any scanning effects (muxing) in the pictures, but if you move the clock around you can clearly see the segments are addressed somehow sequentially, maybe the scanning speed is faster than the shutter speed.

And maybe gocr can _learn_ these characters.. more later.

UPDATE: I cheated and cracked open the waterbath this weekend and looked at the circuit board. As best I can see the numbers on the main chip are M430F4250 Rev A The logo is sketchy, maybe looks like Texas. I remember stumbling across 32Khz mentioned in a manual, and a mention of a programming port on the board (there is a vacant socket on the board). No other technical info in the waterbath manual, these terms were found in the alarm/troubleshooting section. I've tried three different types of photo transistors/diodes and none react to the display (no milliamps/millivolts).

I wonder if I can access any information if in fact that is a programming port/socket. I can get PIC's in Fairborn, Ohio and I can get Rasberry's in Springboro, Ohio, both places are somewhat local. How does the camera thing work? I snap a photo and then look at the binary of the file to interpret individual pixel color/location? I'm willing to do the work, just need pointed in a good direction. Thanks to all, Bart

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required