Maker Pro
Maker Pro

Adding 60 LEDs to digital clock to mimic second hand

L

Largo

For digital clock, I have a 3 to 8 decoder driving six common anode,
7-segment displays via PNP transistors. In a common scenario, display
segments are strobed from 8 bits of the microchip pins. I have 220
Ohm resistors in series with each segment. Clock displays time format
in "hh:mm:ss" where the minutes increment for each count "00 to 59".

I want to add 60 LEDs for mimicing a second hand moving around the
circle of a clock face. LEDs must be off at the 12 O-Clock position,
then illuminiate one LED, two LED, etc. for each second all around the
face each minute.

Aside from 60 LEDs, I thought adding or modifying the above circuit
with darlington transistors--it's base driven from the 8 bit port.
Plus connecting individual segments to the darlington collector while
figuring which LED's cathode to connect, illuminate and remain lit in
sequence for each cycle of the simulated minute.

Do I need to reprogram my PIC for this? Or is there some extra
decoder chips or whatnot I could use to create the desired LED analog
effect?

Largo
 
L

Largo

For digital clock, I have a 3 to 8 decoder driving six common anode,
7-segment displays via PNP transistors. In a common scenario, display
segments are strobed from 8 bits of the microchip pins. I have 220
Ohm resistors in series with each segment. Clock displays time format
in "hh:mm:ss" where the minutes increment for each count "00 to 59".

I want to add 60 LEDs for mimicing a second hand moving around the
circle of a clock face. LEDs must be off at the 12 O-Clock position,
then illuminiate one LED, two LED, etc. for each second all around the
face each minute.

Aside from 60 LEDs, I thought adding or modifying the above circuit
with darlington transistors--it's base driven from the 8 bit port.
Plus connecting individual segments to the darlington collector while
figuring which LED's cathode to connect, illuminate and remain lit in
sequence for each cycle of the simulated minute.

Do I need to reprogram my PIC for this? Or is there some extra
decoder chips or whatnot I could use to create the desired LED analog
effect?

Largo
 
L

Luhan

Largo said:
For digital clock, I have a 3 to 8 decoder driving six common anode,
7-segment displays via PNP transistors. In a common scenario, display
segments are strobed from 8 bits of the microchip pins. I have 220
Ohm resistors in series with each segment. Clock displays time format
in "hh:mm:ss" where the minutes increment for each count "00 to 59".

I want to add 60 LEDs for mimicing a second hand moving around the
circle of a clock face. LEDs must be off at the 12 O-Clock position,
then illuminiate one LED, two LED, etc. for each second all around the
face each minute.

Aside from 60 LEDs, I thought adding or modifying the above circuit
with darlington transistors--it's base driven from the 8 bit port.
Plus connecting individual segments to the darlington collector while
figuring which LED's cathode to connect, illuminate and remain lit in
sequence for each cycle of the simulated minute.

Do I need to reprogram my PIC for this? Or is there some extra
decoder chips or whatnot I could use to create the desired LED analog
effect?

Reprogramming the PIC is far simpler than whatever circuit would be
needed if you don't.

Luhan
 
L

Largo

Reprogramming the PIC is far simpler than whatever circuit would be
needed if you don't.

Luhan

This comment does not give much thought. I suggest two 4017,
modulo-60 counter driven off the tens-of seconds and seconds of the
displays.

Can anyone site actual schematics? Any other suggestions?
Largo
 
P

Pubudu

Largo said:
This comment does not give much thought. I suggest two 4017,
modulo-60 counter driven off the tens-of seconds and seconds of the
displays.

Can anyone site actual schematics? Any other suggestions?
Largo


Hi,

4017 will not fit his requirement. This is a jhonson counter and at
a time, only one LED will lit. For my knowledge I think programming the
microcontroller will be far easier than making addiotnal circuits.
Anyway microcontroller pins are limited thus it is better to use shift
registers.


Pubudu
 
G

Glenn Gundlach

Largo said:
For digital clock, I have a 3 to 8 decoder driving six common anode,
7-segment displays via PNP transistors. In a common scenario, display
segments are strobed from 8 bits of the microchip pins. I have 220
Ohm resistors in series with each segment. Clock displays time format
in "hh:mm:ss" where the minutes increment for each count "00 to 59".

I want to add 60 LEDs for mimicing a second hand moving around the
circle of a clock face. LEDs must be off at the 12 O-Clock position,
then illuminiate one LED, two LED, etc. for each second all around the
face each minute.

Aside from 60 LEDs, I thought adding or modifying the above circuit
with darlington transistors--it's base driven from the 8 bit port.
Plus connecting individual segments to the darlington collector while
figuring which LED's cathode to connect, illuminate and remain lit in
sequence for each cycle of the simulated minute.

Do I need to reprogram my PIC for this? Or is there some extra
decoder chips or whatnot I could use to create the desired LED analog
effect?

Largo

I'm not sure what precisely you're attrempting. As I read it, you have
an operating 6 digit clock and you want to add a circle of 60 LEDs for
seconds. will the seonds 7 segment still be running? Do you want 1 LED
lit at a time? In paragraph 2 you say no LEDs for 0 then ..... which
implies to me more than 1 LED lit meaning a sequential illuminating
ring. Is that it? Basically you need 60 LED drives decoded from the
seconds counter. You suggested 2 4017 Johnson counters but you still
need to gate together the 20 outputs for the 60 LEDs. Pubudu suggested
shift registers which would need a 1 second clock pulse, data input and
reset/clear. With this you could do 1 LED/second or an advancing ring
if you like that better by setting or clearing the data input before
shifting. I vote for the shift registers

GG
 
L

Largo

I'm not sure what precisely you're attrempting. As I read it, you have
an operating 6 digit clock and you want to add a circle of 60 LEDs for
seconds.
will the seonds 7 segment still be running? Yes.

Do you want 1 LED lit at a time? Yes

In paragraph 2 you say no LEDs for 0 then ..... which
implies to me more than 1 LED lit meaning a sequential illuminating
ring. Is that it?

Yes. I wish create an all-LED digital clock with an analog sweep
seconds display and central 7-segment-digits display. The desired
effect and appearance to a broadcast universal clock like Leitch model
UDC-5212.
Basically you need 60 LED drives decoded from the
seconds counter. You suggested 2 4017 Johnson counters but you still
need to gate together the 20 outputs for the 60 LEDs. Pubudu suggested
shift registers which would need a 1 second clock pulse, data input and
reset/clear. With this you could do 1 LED/second or an advancing ring
if you like that better by setting or clearing the data input before
shifting. I vote for the shift registers
Which shift register chip do you suggest?

Or what about MAX7219? I'll have to reprogram my PIC and use three
spare pins. Or would spare pins from a CPLD do it?

Thank you.
Largo
 
P

Pubudu

Largo said:
Yes. I wish create an all-LED digital clock with an analog sweep
seconds display and central 7-segment-digits display. The desired
effect and appearance to a broadcast universal clock like Leitch model
UDC-5212.

Which shift register chip do you suggest?

Or what about MAX7219? I'll have to reprogram my PIC and use three
spare pins. Or would spare pins from a CPLD do it?

Thank you.
Largo

Hi Largo,

This is one of the shift (SN54LS673) register that I found. It has
16 outputs so u need only 4 of them (if my calculation right - but
never more than 5). Pick CMOS output if your fan out is only a single
LED (TTL output chips consumes more power but more fan out) . You can
design deferrent patterns only by using code without changing hardware
once assembled. Schematic is available in the data sheet.

http://focus.ti.com/docs/prod/folders/print/sn54ls674.html
Data sheet : http://www-s.ti.com/sc/ds/sn74ls595.pdf

GG's idea for using MAX7219 (decoder) is nice because u can save boards
space and current consumption. Those are multiplxed display drivers
(saves current lot) so it is very good to use them.

MaX7219 : http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1339
This IC can control the intensity as well.

4017 counters have 10 outputs. So u need 6 of them (provided u need one
active at a time) . But u need all off state thus only 9 output can be
used. Thats means you need 7 of them.


- Pubudu
 
E

ehsjr

Pubudu said:
4017 counters have 10 outputs. So u need 6 of them (provided u need one
active at a time) . But u need all off state thus only 9 output can be
used. Thats means you need 7 of them.


- Pubudu

He could do it with 2 4017's, I think. First 4017 selects
Units position leds 0-9 6 leds at a time; second 4017
selects tens position (which group of 10 leds) is
"active"; each time the units 4017 goes 9->0, the
tens 4017 gets advanced 1 by that transition.

Ed
 
G

Glenn Gundlach

ehsjr said:
He could do it with 2 4017's, I think. First 4017 selects
Units position leds 0-9 6 leds at a time; second 4017
selects tens position (which group of 10 leds) is
"active"; each time the units 4017 goes 9->0, the
tens 4017 gets advanced 1 by that transition.

Ed

True but you have a units and a tens counter that would need to be
gated to drive the separate LEDs. That 74LS673 could do it with 4 chips
driving the LEDs directly though with only 8 mA but that should look
OK, especially if high effeciency LEDs are used. The '673 has the async
clear to be reset at each minute and then set data to '1' and clock in
the first bit. Then clear the data and clock 59 more times and repeat
for the next minute. Software-wise, if the 3 lines are available, it
would be pretty simple.

BTW, the TV station I worked at had the Leitch clock mentioned.

GG
 
P

Pubudu

Glenn said:
True but you have a units and a tens counter that would need to be
gated to drive the separate LEDs. That 74LS673 could do it with 4 chips
driving the LEDs directly though with only 8 mA but that should look
OK, especially if high effeciency LEDs are used. The '673 has the async
clear to be reset at each minute and then set data to '1' and clock in
the first bit. Then clear the data and clock 59 more times and repeat
for the next minute. Software-wise, if the 3 lines are available, it
would be pretty simple.

BTW, the TV station I worked at had the Leitch clock mentioned.

GG


HI GG,

You are right.first I thought he needs more than one LED has to be on
at a given time. But he needs one on at a time. Thus it is possible to
ise 4017. Thanks for your opinion.


Pubudu
 
P

Pubudu

Glenn said:
True but you have a units and a tens counter that would need to be
gated to drive the separate LEDs. That 74LS673 could do it with 4 chips
driving the LEDs directly though with only 8 mA but that should look
OK, especially if high effeciency LEDs are used. The '673 has the async
clear to be reset at each minute and then set data to '1' and clock in
the first bit. Then clear the data and clock 59 more times and repeat
for the next minute. Software-wise, if the 3 lines are available, it
would be pretty simple.

BTW, the TV station I worked at had the Leitch clock mentioned.

GG


HI GG,

You are right.first I thought he needs more than one LED has to be on
at a given time. But he needs one on at a time. Thus it is possible to
ise 4017. Thanks for your opinion.


Pubudu
 
E

ehsjr

Glenn said:
True but you have a units and a tens counter that would need to be
gated to drive the separate LEDs.

The point was that you don't need 6 4017's.
That 74LS673 could do it with 4 chips
driving the LEDs directly though with only 8 mA but that should look
OK, especially if high effeciency LEDs are used. The '673 has the async
clear to be reset at each minute and then set data to '1' and clock in
the first bit. Then clear the data and clock 59 more times and repeat
for the next minute. Software-wise, if the 3 lines are available, it
would be pretty simple.

BTW, the TV station I worked at had the Leitch clock mentioned.

GG


I'm not recommending one way over the other.
Just pointing out that the 2 4017's suggested
by Largo would work.

Ed
 
J

James Waldby

Pubudu said:
....
This is one of the shift (SN54LS673) register that I found. It has
16 outputs so u need only 4 of them (if my calculation right - but
never more than 5). Pick CMOS output if your fan out is only a single
LED (TTL output chips consumes more power but more fan out) . You can
design deferrent patterns only by using code without changing hardware
once assembled. Schematic is available in the data sheet.

http://focus.ti.com/docs/prod/folders/print/sn54ls674.html
Data sheet : http://www-s.ti.com/sc/ds/sn74ls595.pdf
....

Some other posts suggested 3 io lines driving the shift
registers, presumably clock, data, and reset. But if you
don't have enough io lines, those three lines need not be
additional io's, as follows:

Reset - You don't need the reset line because you can just
shift in 64 zeroes whenever you need to clear the SR's.

Clock - You have 2 spare outputs from the 3 to 8 decoder. Use
one of them to clock the SR's. Eg, select output 7 so it goes
low, then select some other output. (You could also use one
of the spare decoder outputs as an SR reset line.) (Of course,
if you do have an io available from the micro, just go ahead and
use it for the Clock output.)

Data - Attach one of the segment io's to the SR data input as
well as to its current segment. Sending segment data won't
affect SR data because when you are sending segment data the
SR clock isn't changing.


Hookup: The Clock output line connects in parallel to the 4 SR
Clk lines. The Data output line connects to the first SN54LS673's
Ser input. The data input lines of other SR's hook to the Y15
output of the previous SR in the chain. Each of 60 SR Y-output
lines is attached to an LED through a resistor.

In normal operation: At second #0, set the data line to 0 and
blip [lower and raise] the clock 64 times to clear the SR chain.
At second #1: Set the data line to 1 and blip the clock.
At other seconds: Set the data line to 0 and blip the clock.

You could make different patterns on the LED's for conditions
such as alarms.

-jiw
 
Largo said:
For digital clock, I have a 3 to 8 decoder driving six common anode,
7-segment displays via PNP transistors. In a common scenario, display
segments are strobed from 8 bits of the microchip pins. I have 220
Ohm resistors in series with each segment. Clock displays time format
in "hh:mm:ss" where the minutes increment for each count "00 to 59".

I want to add 60 LEDs for mimicing a second hand moving around the
circle of a clock face. LEDs must be off at the 12 O-Clock position,
then illuminiate one LED, two LED, etc. for each second all around the
face each minute.

Aside from 60 LEDs, I thought adding or modifying the above circuit
with darlington transistors--it's base driven from the 8 bit port.
Plus connecting individual segments to the darlington collector while
figuring which LED's cathode to connect, illuminate and remain lit in
sequence for each cycle of the simulated minute.

Do I need to reprogram my PIC for this? Or is there some extra
decoder chips or whatnot I could use to create the desired LED analog
effect?

Largo

Nuts and Volts published a 2-part article (Aug & Sep 2003) written by
John Carter on a clock ("Ben") that used individual LEDs (no 7-seg
displays). The minute "hand" works like you want your second "hand" to
work.
HTH
-Dave Pollum
 
Top