Forums

Numerical output from a single LED

Started by John Speth December 26, 2019
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
John Speth <johnspeth@yahoo.com> writes:
> 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.
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.
On 2019-12-26 14:51, John Speth wrote:
> 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.&nbsp; It takes practice > to get right. I have not been able to find even a hint of possible > methods using Google. > > Thanks - JJS
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
John Speth <johnspeth@yahoo.com> wrote:
> 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.
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
John Speth <johnspeth@yahoo.com> writes:
> 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.
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.
On 26 Dec 2019 22:59:36 +0000 (GMT), Theo
<theom+news@chiark.greenend.org.uk> wrote:

>John Speth <johnspeth@yahoo.com> wrote: >> 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. > >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)
A color blind person might have problems decoding these colors. There are many different kinds of color blindness. not just red/green,
> >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
On Thursday, December 26, 2019 at 2:51:44 PM UTC-5, John Speth wrote:
> 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
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 flash one or two times for the binary part and then flash the 1 to 6 times for the quinary part. I think the flashing should be a bit rapid so as to make it easier to count without blinking. Still, there could be some confusion between the binary part and the quinary 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 parts, 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
On 12/27/19 2:29 AM, Rick C wrote:
> On Thursday, December 26, 2019 at 2:51:44 PM UTC-5, John Speth wrote: >> 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 > > 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 flash one or two times for the binary part and then flash the 1 to 6 times for the quinary part. I think the flashing should be a bit rapid so as to make it easier to count without blinking. > > Still, there could be some confusion between the binary part and the quinary 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 parts, very short pause between flashes within a bit or quint. >
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.
On Thu, 26 Dec 2019 11:51:39 -0800, John Speth <johnspeth@yahoo.com>
wrote:

>Does anybody have any ideas how one might drive the LED to output a >numerical value?
Transmit as serial data. Sell them a device that they can hold up to the LED to read the data and display the number.
>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.
Simply print the number on the label? -- RoRo
Robert Roland <fake@ddress.no> writes:
> Transmit as serial data. Sell them a device that they can hold up to > the LED to read the data and display the number.
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.