Detecting 7-Segment LED's With Phototransistors

Nov 06, 2013 91 Replies

On a sunny day (Sun, 17 Nov 2013 10:37:06 -0800 (PST)) it happened Roger Monroe wrote in :

formatting link
Maybe with a Raspi, a USB to RS232 adaptor, plus a cheap webcam if you can get it to compile. That last thing would surprize me... :-) And even then.. making the config file.

I am not going to try.

Does the chip look like this:

formatting link

Please post a pic of the board somewhere.

Thanks

Until you find out which chip is used, you may burn up your existing chip.

Why risk it ?

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?

PS: Whats the make/model of the water bath ?

That's a MSP430F4250IDL (16-bit microcontroller in 48-pin SSOP package with a 16-bit sigma-delta DAC on board). Datasheet here:

formatting link

It won't do you much good, it's a custom programmed microcontroller, no doubt with the code protected. You could erase it through the programming port, but then you'd likely have to throw it away anyway without the code to load in.

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

PS:

Anyways the above demo is runnining on the Raspi now.

This is what I did on the Raspi:

# get mplayer if not already there

# make compile directory: mkdir 7s_parser

# go there cd 7s_parser

# get 7s_parser wget

formatting link

# get libcurses apt-get install ncurses-term

# Add this to 7s_parser.h file, before the line that says #include #include

# compile 7s_parser make

# install 7s_parser, maybe do that sudo thing ... make install

# create configuration file directory mkdir -p ~/.7s_parser

# copy configuration file cp segments.conf ~/.7s_parser/

# make a yuv formay test file mplayer 7_segment_recognition_test_source.avi -vo yuv4mpeg

# test it, output to stdout

7s_parser -s -u < stream.yuv

# That should show the test recording, and very slowly display digits to stdout

# Get a Linux supported USB to serial adaptor, and plug it in the Raspi USB port (I use Logilink) # Type:

7s_parser -d /dev/ttyUSB0 -b 115200 -s -u < stream.yuv

That should send at 115200 Bd to that serial port anytime digit changes.

----------------- Now your problem is a usable webcam, none of mine work OK on the Raspi, the reason is Raspi USB is too slow for video (never mind what anybody else tells you), and the driver in that kernel version has issues, Re-scaling fails (Logitech E2500 needs that) in ffmpeg too. v4l2??

I tried an cheap Chinese ethernet webcam, but that really is very very slow.

So that leaves the Raspi camera module, but that has a fixed focus lens IIRC, you may need to replace it (not sure that is possible), or put some piece of goggle glass in front to make it in focus close up. I do not have the Raspi cam module (it fits directly in a different connector on the Raspi board), so you are on your own. Everything on my side works.

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.

To everyone who's posted, THANKS! So much useful input, my gratitude to you . Hey, let me run this by you. A mouse left button is probably just an open c ontact that I could hook two wires to and run them to one of the relay outp uts on my PLC. I could then generate a mouse "click" any time I wanted. Bef ore I incorporate a RasberryPi I could use my little netbook (Win7) with a USB camera (or IP camera) and hover my mouse over the "snapshot" button. Th en the PLC would "click" at desired moments, saving image(s) for later mani pulation. I don't want to dedicate my netbook for this, I would eventually use a Rasberry, I see some come as a camera kit. Does this sound doable? Thaanks again for everyone's time, Bart

On a sunny day (Mon, 18 Nov 2013 07:32:09 -0800 (PST)) it happened Roger Monroe wrote in :

I looked on the web, an it seems the Raspi camera fix focus lens is just fixed in position with some drops of glue, People have removed the epoxy glue and then it is threaded, it can get as close as 10 cm (4 inches) it seems.

So, now if mplayer can read the output and write yuv format then it should work with my software. You need the camera to be fixed so the display can not move about in the video, spend some time making a configuration file for that display, and probably shield from any external light sources. I depends also if the exposure time does not show the display multiplexing, that would be a no go. You will have to look up if that Raspi camera exposure time can be controlled in some way. A netbook running Linux with some camera should work, would be cool for testing before you buy into anything.

On Sun, 17 Nov 2013 18:44:28 GMT in sci.electronics.design, Jan Panteltje wrote,

Although Raspberry already has a serial port (3.3V levels) on the GPIO connector.

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

at the circuit board. As best I can see the numbers on the main chip are M4

30F4250 Rev A

a programming port on the board (there is a vacant socket on the board). N o other technical info in the waterbath manual, these terms were found in t he alarm/troubleshooting section.

ct to the display (no milliamps/millivolts).

port/socket.

Ohio, both places are somewhat local. How does the camera thing work? I sn ap a photo and then look at the binary of the file to interpret individual pixel color/location?

how did you connect the photodiodes/transistors?

M430F4250 sound like a texas mcu,

considered a voltmeter(with some thing like rs232) in parallel with the ADC on the micro ?

-Lasse

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.

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 just got some 475-3022-ND photo transistors from Digikey and actually sa w them react to the green segmented LED display. However I've been playing with a Trendnet wireless IP camera which I can access with Internet Explore r. When connected, the webpage has a "snapshot" button and I took about 40 snapshots and they all look good and they all look the same. There was no p artial segments from "refresh" frequencies of the LED's. I took my mouse apart and found the left mouse button is a mechanical micr oswitch which I think I can splice into and run the wires to the relay outp ut of the PLC. Ah, progress. So much thanks to the group, hopefully someday I can donate s omething helpful. Bart

On a sunny day (Mon, 18 Nov 2013 15:59:06 GMT) it happened Jan Panteltje wrote in :

I ran some test on the cheap Chinese ethernet webcam today, but now directly from the Raspi (normally I am ssh remote too it),

mcamip -m 1 -p CAMERA_PORT -a CAMERA_IP_ADDRESS -u USER_NAME -w PASSWORD -t -f 2 -y | 7s_parser -u -s

gives me about 2 fps, should be enough for temperature. Picture is 100% stable.

I think because now the Raspi ethernet connection is used only one way, speed is better. And I do not use the Raspi USB (except for keyboard and mouse and even then that sucks, drops characters)

mcamip latest with support for Chinese IP camera I put on my site:

formatting link

Camera is 'easyn IP camera', type it in ebay search window (about 50$ for mine). More expensive than Raspi HD camera, but it can move, has a real housing, and ethernet of course. Color is bad (wrong in strong light trees look purple), clearly some code error, looks like UV vector overflow, but should work.

There is also this list of usable (and not usable) cameras for the Raspi:

formatting link
Do not have any of those.

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required