Maker Pro
Maker Pro

Any way to make LEDs mimic analog seconds movement on a clock?

L

Largo

Jan 1, 1970
0
I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?

Largo
 
L

Luhan Monat

Jan 1, 1970
0
Largo said:
I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?

Largo

If I understand what you need to do, drive 60 individual LEDs, the
minimum drive line count is 16 (8 x 8 matrix). PIC16F870 has enough
lines plus some for I/O. Matrix LED anodes on Port-B, cathodes on
Port-C. Drive 1 line high, and one low from each port. Float the rest.
Then move on to the next line for a count of 60.

The PIC's all have 25ma current limit so resistors are not needed. This
is a 'one chip' solution.
 
S

Spehro Pefhany

Jan 1, 1970
0
If I understand what you need to do, drive 60 individual LEDs, the
minimum drive line count is 16 (8 x 8 matrix). PIC16F870 has enough
lines plus some for I/O. Matrix LED anodes on Port-B, cathodes on
Port-C. Drive 1 line high, and one low from each port. Float the rest.
Then move on to the next line for a count of 60.

9 port lines are enough to directly drive 60 LEDs.
The PIC's all have 25ma current limit so resistors are not needed. This
is a 'one chip' solution.

I think I'd like to see 9 current limiting resistors in there. The
maximum current is not well defined.

But converting the drive from two digits of an existing digital clock
into unary sounds pretty unpleasant.


Best regards,
Spehro Pefhany
 
T

Tim Wescott

Jan 1, 1970
0
Spehro Pefhany wrote:
snip
But converting the drive from two digits of an existing digital clock
into unary sounds pretty unpleasant.


Best regards,
Spehro Pefhany

It's probably easier to make a whole clock with a PIC than to decode the
digits...
 
S

Spehro Pefhany

Jan 1, 1970
0
Spehro Pefhany wrote:



How do you do 60 LEDs with 9 lines?

Connect two antiparallel LEDs betwen each unique pair of lines (series
resistor on each line assumed). The maximum number of LEDs with n
lines is thus n*(n-1) for n>=2. To drive a single LED you tristate all
but two lines, on those two you make one high and the other low. The
antiparallel LED is turned on by reversing the polarity, of course.
Only one LED can be on at once, but that's okay for this application
(and multiplexing can increase the number that visually appear to be
lit, within reason).


Best regards,
Spehro Pefhany
 
D

Donald

Jan 1, 1970
0
antiparallel ???


Could you please post a simple schematic.

I don't get it.
 
S

Spehro Pefhany

Jan 1, 1970
0
antiparallel ???


Could you please post a simple schematic.

I don't get it.

Okay, sounds like dinner's almost ready, let's see if I can get it
done and scanned.. ah, in the nick of time:

http://www.speff.com/12_from_4.jpg

This is an example of driving 12 LEDs from 4 port lines.


Best regards,
Spehro Pefhany
 
J

Jim Thompson

Jan 1, 1970
0
I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?

Largo

I pondered this myself for use with a WWVB clock.

Reset a 60-long shift-register at 00, then clock it at one second
intervals.

MAYBE smaller, use counters and decoding logic.

...Jim Thompson
 
K

Ken Smith

Jan 1, 1970
0
Spehro Pefhany said:
But converting the drive from two digits of an existing digital clock
into unary sounds pretty unpleasant.


To make the design easier you can:

Do it in two steps. The first could be a PROM look up table with 128
elements, 10 of which will ever be addressed. From there it is a simple
decode.


Since this is only got to work at 1Hz like time frames: you could just
make a table of LED states and search down the list for one that matches
the clock's output. There could be a second table that gives the port
state for the LED drive.
 
S

Spehro Pefhany

Jan 1, 1970
0
On Fri, 20 May 2005 13:55:10 +0000 (UTC), the renowned
To make the design easier you can:

Do it in two steps. The first could be a PROM look up table with 128
elements, 10 of which will ever be addressed. From there it is a simple
decode.


Since this is only got to work at 1Hz like time frames: you could just
make a table of LED states and search down the list for one that matches
the clock's output. There could be a second table that gives the port
state for the LED drive.

And, on the input end, de-multiplexing the digit data (most likely)
and level-shifting the LED drive (assuming it's an LED clock)- maybe a
bunch of comparators.

I did something like this ages ago using a few 4051s to mux static
3-1/2 digit LED drive into a single comparator. Plus some magic to
synchronize with updates. Unpleasant.


Best regards,
Spehro Pefhany
 
M

MSC

Jan 1, 1970
0
I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Several electronics stores (in Europe at least) sell kits made by a
company called Velleman. One of their kits is a roulette wheel, which
uses a PIC to drive 36 LEDs. The circuit for it is here:

http://www.velleman.be/Downloads/0/Manual_MK119.pdf

It's the same principle as Spehro's, just taken a few stages further
(and so far as I can see, still a fair bit of room for expansion).
Very cunning!

Mike
 
L

Luhan Monat

Jan 1, 1970
0
Spehro said:
Connect two antiparallel LEDs betwen each unique pair of lines (series
resistor on each line assumed). The maximum number of LEDs with n
lines is thus n*(n-1) for n>=2. To drive a single LED you tristate all
but two lines, on those two you make one high and the other low. The
antiparallel LED is turned on by reversing the polarity, of course.
Only one LED can be on at once, but that's okay for this application
(and multiplexing can increase the number that visually appear to be
lit, within reason).


Best regards,
Spehro Pefhany

You are most exactly correct on this. I'll keep it in mind next time I
need to run a shitload of LED's from just a few line.
 
S

Spehro Pefhany

Jan 1, 1970
0
Several electronics stores (in Europe at least) sell kits made by a
company called Velleman. One of their kits is a roulette wheel, which
uses a PIC to drive 36 LEDs. The circuit for it is here:

http://www.velleman.be/Downloads/0/Manual_MK119.pdf

It's the same principle as Spehro's, just taken a few stages further
(and so far as I can see, still a fair bit of room for expansion).
Very cunning!

Mike

I think the Velleman design is a sub-optimal variation that, in
return, for the extra port lines, allows an inexpensive single-sided
PCB layout


Best regards,
Spehro Pefhany
 
A

Anno Siegel

Jan 1, 1970
0
Spehro Pefhany said:
Okay, sounds like dinner's almost ready, let's see if I can get it
done and scanned.. ah, in the nick of time:

http://www.speff.com/12_from_4.jpg

This is an example of driving 12 LEDs from 4 port lines.

Nice drawing :)

It could also be arranged in a matrix with diodes across each crossing
except the main diagonal, all the same orientation. The port lines
are connected to both the rows and the columns of the matrix. That are
n^2 - n = n*(n - 1) diodes. To light the diode at i,k (i != k), make
line i high, line k low, and make all other lines hi-z.

Anno
 
F

Fred Bloggs

Jan 1, 1970
0
Largo said:
I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?

I would forget the 7219 and use two M74HC42 available from Mouser. The
74HC42 are BCD to decimal decoders which means you input a 4-bit BCD
code in the range 0-9 and it activates 1 of 10 outputs low. So you
arrange the 60 LEDs into 6 groups of 10, use the MSD of the clock
seconds for input to one 74HC42 to select one group of 10 LEDs, and then
the clock LSD inputs to the second HC42 to select the 1 of 10 LEDs in
the group. This requires 2x 16-pin 74HC42, one current limiting
resistor, and six cheap transistor+ base resistor like so- how you
extract the seconds MSD and LSD depends on what's in the clock:

View in a fixed-width font such as Courier.
 
L

Largo

Jan 1, 1970
0
I would forget the 7219 and use two M74HC42 available from Mouser. The
74HC42 are BCD to decimal decoders which means you input a 4-bit BCD
code in the range 0-9 and it activates 1 of 10 outputs low. So you
arrange the 60 LEDs into 6 groups of 10, use the MSD of the clock
seconds for input to one 74HC42 to select one group of 10 LEDs, and then
the clock LSD inputs to the second HC42 to select the 1 of 10 LEDs in
the group. This requires 2x 16-pin 74HC42, one current limiting
resistor, and six cheap transistor+ base resistor like so- how you
extract the seconds MSD and LSD depends on what's in the clock:

View in a fixed-width font such as Courier.
This sounds very helpful. I wish i could just recode the PIC based
digital clock since all the PIC code is offered from this site:
http://hobby_elec.piclist.com/e_pic6_76.htm

The circuit already uses a BCD decoder for driving six 7-segment LED
displays. There a link to the circuit I refer which I purchased most
of the parts. It uses a PIC and also a CPLD for 3 to 8 decoder, some
divider for time accuracy and debounce logic. I use a 10Mhz metal-can
oscillator for the time keeping input. I cannot find the oscillator
used in the original description. Perhaps the circuit shown to the
group can loosen a few extra suggestions. Thanks for your
suggestions.

This circuit can be found on this link:
http://hobby_elec.piclist.com/e_pic6_71.htm

Largo
 
F

Fred Bloggs

Jan 1, 1970
0
Largo said:
This sounds very helpful. I wish i could just recode the PIC based
digital clock since all the PIC code is offered from this site:
http://hobby_elec.piclist.com/e_pic6_76.htm

The circuit already uses a BCD decoder for driving six 7-segment LED
displays. There a link to the circuit I refer which I purchased most
of the parts. It uses a PIC and also a CPLD for 3 to 8 decoder, some
divider for time accuracy and debounce logic. I use a 10Mhz metal-can
oscillator for the time keeping input. I cannot find the oscillator
used in the original description. Perhaps the circuit shown to the
group can loosen a few extra suggestions. Thanks for your
suggestions.

This circuit can be found on this link:
http://hobby_elec.piclist.com/e_pic6_71.htm

Largo

It looks like the simplest add-on that does not require a programmable
part would be some simple logic to detect 00 written to DSP5,6 digits-
this then resets two BCD counters like the 74HC162 or 74HC192- these
counters then increment with each TR6 strobe (assuming the update is 1
sec)- the BCD counters are used to drive the MSD, LSD of the 74HC42 circuit.
 
F

Fred Bloggs

Jan 1, 1970
0
Fred said:
It looks like the simplest add-on that does not require a programmable
part would be some simple logic to detect 00 written to DSP5,6 digits-
this then resets two BCD counters like the 74HC162 or 74HC192- these
counters then increment with each TR6 strobe (assuming the update is 1
sec)- the BCD counters are used to drive the MSD, LSD of the 74HC42
circuit.

Looks like the DSP6 strobe is going to be several KHz- so scratch that
idea. Why don't you learn how to re-program the PIC- or ask the kit
maker to do it, so that RC0-RC6 output a 4-bit BCD instead of 7-segment
when addressing DSP5,6- then 2x 4-bit latches capture the data and drive
the 74HC42 circuit.
 
Top