Numerical output from a single LED

I'm working on a project in which the hardware is already designed. The customer added a late stage requirement to output a numerical counter value. The only output port is a single three-color (RGB) LED.

Does anybody have any ideas how one might drive the LED to output a numerical value?

The device is a single purpose hand held grocery labeler and we want to count labels dispensed. The counter would not exceed 50,000 labels.

In the past, I've experimented with single LED numerical output by flashing the LED for each digit. The user must pay strict attention to the LED without blinking to count flashes accurately. It takes practice to get right. I have not been able to find even a hint of possible methods using Google.

Thanks - JJS

Reply to
John Speth
Loading thread data ...

That is crazy and unworkable. How about having some kind of operation to print a label giving the printer status including the number of labels printed.

Reply to
Paul Rubin

Have the user whirl it around on its cable, and output alphanumeric data in Morse code. Or sell them a phone app to do it via the camera.

"Late stage requirement", forsooth.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC / Hobbs ElectroOptics 
Optics, Electro-optics, Photonics, Analog Electronics 
Briarcliff Manor NY 10510 

http://electrooptical.net 
http://hobbs-eo.com
Reply to
Phil Hobbs

I can't think of a way to make it user friendly, but you could use the RGB LED to output a binary number, using additional colours to aid in synchronisation.

For example, LED goes blue for a 1, green for a 0. In each pulse there's a flash of red to indicate a bit transition and prevent bits merging into each other. The 4 bit binary code 1011 would be:

black (inter-sequence gap) blue then magenta (1) green then yellow (0) blue then magenta (1) blue then magenta (1) black (end of sequence)

Someone with a user manual and a pen and paper could probably write that sequence down, but it wouldn't be very pleasant. You'd also need the colours to be well distinguishable - often this needs tweaking series resistors to get the colours of the different LEDs to match brightness.

Another option would be to write a basic phone app that uses the camera to decode the sequence. Or, alternatively, another means of signalling directly to the app (much higher bandwidth available).

Other kinds of self-synchronising line codes would also work, but none of them are very human friendly.

Theo

Reply to
Theo

Building on Theo's suggestion, if the idea is just for the operator to know how close the counter is to 50k:

1) steady green = 0 to 25k labels printed 2) blinking green = 25k to 40k 3) steady orange = 40k to 45k 4) blinking orange = 45k to 49k 5) blinking red = 49k to 50k 6) steady red = 50k, printer cannot operate

Use the receipt printer or a phone app to get the exact number out if desired. The printer can print human readable numbers and/or a QR code that a phone app can scan, allowing easy tracking of the activity of the different printers.

Reply to
Paul Rubin

A color blind person might have problems decoding these colors. There are many different kinds of color blindness. not just red/green,

Reply to
upsidedown

I think you could make this work. Rather than flashing directly in decimal , I would have it flash a bi-quinary code. For each digit have it first fl ash one or two times for the binary part and then flash the 1 to 6 times fo r the quinary part. I think the flashing should be a bit rapid so as to ma ke it easier to count without blinking.

Still, there could be some confusion between the binary part and the quinar y part. Two flashes, two flashes, two flashes, two flashes, one flash, one flash... At some point you can lose your place in the sequence of digits. Maybe make the binary flashes longer since there will only be one or two. Long pause between digits, shorter pause between the binary and quinary p arts, very short pause between flashes within a bit or quint.

--

  Rick C. 

  - Get 1,000 miles of free Supercharging 
  - Tesla referral code - https://ts.la/richard11209
Reply to
Rick C

There are lots of ways to try to encode the value in a flashing light. One options that I have done similar to your bi-quinary is output a long dash for 5, and then short dashes for 1-4, you could change colors for different places, and so on. The long dash is easier to count than 5 extra short flashes, but how every you do it, it will be a pain if you need the exact number up to 50,000 (do they REALLY need to distinguish between 45675 and 45676?)

I do like the other suggestion of just outputting a crude status on the led (use the color and maybe a simple flash code for the basic range) and then give a way to print the exact count.

Reply to
Richard Damon

Transmit as serial data. Sell them a device that they can hold up to the LED to read the data and display the number.

Simply print the number on the label?

--
RoRo
Reply to
Robert Roland

A phone app could also do that, if the baud rate was slow enough for the phone camera to keep up.

This type of late requirement change indicates a flaky customer but I guess that is par for the course.

Reply to
Paul Rubin

Can you make one of the LEDs imitate a bar code?

Optical RS232? Sell a reader too!

--
Mike Perkins 
Video Solutions Ltd 
www.videosolutions.ltd.uk
Reply to
Mike Perkins

Resistor color code! Black, brown, red, orange ...

Reply to
Paul Rubin

That might work. A brief flash of bright white followed by a more sustaine d color flash. Still, it can be hard to tell orange from red or blue from green or violet. It used to be hard with resistors if they were creative w ith the exact color used. As someone else pointed out, colors don't work i f you are color blind and lots of people are.

Still, this could be an interesting thing to try to develop.

Rather than bi-quinary, it might work better to try three and four. Longer flashes for the multiples of three, followed by shorter flashes for the un its. long, long, short, short gives 8.

Or maybe Morse code. Looks like they used a Johnson ring counter sort of c ode with a 1 being a single dot with four dashes. 2 is two dots and three dashes and so forth until a 6 is one dash followed by four dots. 7 is two dashes followed by three dots, etc. Zero is all dashes taking the place of ten like on a phone dial. lol

I like the Morse code idea best of any I've seen here so far.

--

  Rick C. 

  + Get 1,000 miles of free Supercharging 
  + Tesla referral code - https://ts.la/richard11209
Reply to
Rick C

If this is for use by store clerks, every idea suggested so far is in forgeddabout it territory. If it's for use by a technician who maintains the equipment then these manual methods are too much hassle even if they are doable, and the label guns should really upload their status into a computer somehow. That can be done by whatever medium is used to program prices or skus or whatever else is in the guns.

Reply to
Paul Rubin

Not really. Back in the day my mom learned to use a slide rule when workin g in a factory. If it's part of the job you do every day it's no big deal for someone to learn that three short and two long means the digit 3.

Geeze! Look at all the damn blinking lights in use today. PCs used to bee p codes for boot errors. Even devices with hugely complex interfaces will have blinking lights with very specific meanings depending on just what the y are doing. Even my Tesla uses a tiny icon with a red light to indicate t he media for storing video is ready. Then there are several other states I don't remember because I don't see them on a regular basis.

Something like this a person sees every day will be second nature after a b it.

Actually the best idea is to print a label with the count, but I assume the re is a reason why that isn't being done as it is a rather simple and obvio us solution.

--

  Rick C. 

  -- Get 1,000 miles of free Supercharging 
  -- Tesla referral code - https://ts.la/richard11209
Reply to
Rick C

That's exactly what Bosch did in the Motronic ML4.1 fuel injection system in the Alfa 75 Twin Spark (and probably other cars). It outputs fault codes if booted while a button is pressed. Useful if you don;t have a proper fault code reader.

It's tedious, but it does work. You can re-run the process multiple times if you miss a code.

Clifford Heath.

Reply to
Clifford Heath

If you only want to express numbers, Morse code is inefficient. "Dits" for 1 - 4 with a "Dah" at the beginning for 5 - 9 and a double "Dah" for

0 would be faster, and equally easy for a person who doesn't know Morse.
--
Best wishes, 
--Phil 
pomartel At Comcast(ignore_this) dot net
Reply to
Phil Martel

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.