Decade counter "dot" output to "bar" output.

Thread Starter

GopherT

Joined Nov 23, 2012
8,009
I have a circuit where a decade counter is driving 10 transistors that drive 10 LEDs. This circuit lights only one LED at a time. I was hoping that a last minute design change will allow me to turn on all LEDs from 1 to X in the string of LEDs. Hopefully someone knows a trick - nothing is coming to me immediately (e.g. some diodes and resistors). I am not looking for a LM3914 solution (whole additional chip). Hopefully an easy solution exists. If not, new design. Thanks.
 

AnalogKid

Joined Aug 1, 2013
11,055
Assuming normal LEDs with about 2 V Vf, there is a design trick. But you need a 24 V power source and 10 switching transistors. If the 10 LEDs are in series starting at 24 V, and each 4017 output drives a small switching transistor connected to a tap on the LED string with a resistor, then as each successive output comes on there are more LEDs illuminated. Counter output zero is connected to the LED at the top of the string, and counter output 9 is connected to the bottom one. Each of the 10 current limiting resistors must have a different value to provide approximately constant brightness at each count.

ak
 

Aleph(0)

Joined Mar 14, 2015
597
What AnalogKid said, or just go all jejune and program 2, 8bit eproms for dedicated decoders:) So like always read enabled and selected. Adr lines for input and Data lines for output:) I do like that when needed binary to hex 7 seg dvr but only bin to bcd available. But you need two chips cuz 10 bits for bargraph unless find 16 bit data word eprom
 

ScottWang

Joined Aug 23, 2012
7,409
Assuming normal LEDs with about 2 V Vf, there is a design trick. But you need a 24 V power source and 10 switching transistors. If the 10 LEDs are in series starting at 24 V, and each 4017 output drives a small switching transistor connected to a tap on the LED string with a resistor, then as each successive output comes on there are more LEDs illuminated. Counter output zero is connected to the LED at the top of the string, and counter output 9 is connected to the bottom one. Each of the 10 current limiting resistors must have a different value to provide approximately constant brightness at each count.

ak
How do you keeping the out0 on high when the clock trigger the output to the out1?
 

Hypatia's Protege

Joined Mar 1, 2015
3,228
What AnalogKid said, or just go all jejune and program 2, 8bit eproms for dedicated decoders:) So like always read enabled and selected. Adr lines for input and Data lines for output:) I do like that when needed binary to hex 7 seg dvr but only bin to bcd available. But you need two chips cuz 10 bits for bargraph unless find 16 bit data word eprom
---Emphasis added---

I take it you mean 8 bits wide (i.e. 8 data lines) and at least 10 bytes 'deep' (hence 80 bits each chip)... Ah! Heck just use a 'brace' of 2716s (2K*8) and call it good...:)

Officiously
HP:cool:

PS
or just go all jejune
Picking up a stutter there, Aleph? Last I checked it was Ahk-October:p
 
Last edited:

Thread Starter

GopherT

Joined Nov 23, 2012
8,009
Thanks guys and gals, very creative. I wasn't sure I explained myself very well but it appears everyone understood.

Special thanks to @Aleph(0) for sending me to the dictionary for a six-letter word - and possibly sending HP there, too.

I guess I didn't describe all of my constraints and wishes. I was hoping to keep the board extremely small (one chip) and 12V or less power source. I was hoping to make a beginners DIY project so I want to limit the design to readily available chip without programming.

Unless another idea comes along, I'm going to settle for a dot display instead of the bar.

Thanks everyone.
 

AnalogKid

Joined Aug 1, 2013
11,055
How do you keeping the out0 on high when the clock trigger the output to the out1?
As the counter counts up, each successive output turns on more LEDs. The resistors are chosen for a constant 20 mA at each stage. If you don't have 24 V but do have 12 V, you can split the string in two with a net increase of 1 resistor and 6 small signal diodes. Or, replace the 10 transistors with two ULN2803s for two 12 V strings with no external diodes or resistors.

ak
LED-Decade-1-c.gif
 

Attachments

Last edited:

ScottWang

Joined Aug 23, 2012
7,409
As the counter counts up, each successive output turns on more LEDs. The resistors are chosen for a constant 20 mA at each stage. If you don't have 24 V but do have 12 V, you can split the string in two with a net increase of 1 resistor and 6 small signal diodes. Or, replace the 10 transistors with two ULN2803s for two 12 V strings with no external diodes or resistors.

ak
View attachment 92662
AK, That's great idea.
I'm just thinking the mosfets are too many, does any other buffer IC as ULN2803 to replace them?
 

AnalogKid

Joined Aug 1, 2013
11,055
The only reason the MOSFETs are there is because Gopher said he was driving the LEDs with transistors. They can be replaced by two ULN2003s or 2803s. Here is an update using 2803s and splitting the LED string for a lower operating voltage. It uses extra 2803 stages to eliminate OR-ing diodes.

ak
LED-Decade-2-c.gif
 

Attachments

AnalogKid

Joined Aug 1, 2013
11,055
I was hoping to keep the board extremely small (one chip) and 12V or less power source. I was hoping to make a beginners DIY project so I want to limit the design to readily available chip without programming.
In post #1 you mentioned driving the LEDs with transistors. BJT or MOSFET?

ak
 

Thread Starter

GopherT

Joined Nov 23, 2012
8,009
In post #1 you mentioned driving the LEDs with transistors. BJT or MOSFET?

ak
Either will work. I originally thought something from my pile of BJTs but your idea of the 2N7000 / 7002 works as well. Since I saw that on my WA into work this morning, I was wondering what I could do with that FET and a diode to make a latch. And a second diode normally with +5V on the cathode and dropping that to 0V when I want to drain the gate. I'm in the office now but I'm open to hear additions comments as this brainstorming continues.

Ak, thanks for drawing up the circuit with the FETs. I assume your question about FET vs BJT was going in the direction of the latch idea as well.
 

Bernard

Joined Aug 7, 2008
5,784
Using 3 ea 74AC32PC OR gates capable of driving LEDs @ 24 mA arranged as a stacker roughly illustrated in an old thumbnail.

Use all 9 or 10 4017 outputs instead of the 8 shown. ULN-- driver not needed.
Operate at 5 to 7 V.Stacker 00000.png
 

Hypatia's Protege

Joined Mar 1, 2015
3,228
I was hoping to keep the board extremely small (one chip) and 12V or less power source. I was hoping to make a beginners DIY project so I want to limit the design to readily available chip without programming.
Inasmuch as you desire a single chip design you could use an LM3914 in conjunction with a series resistor/capacitor 'network' as the analog signal source -- 'recycling' (i.e. discharge of the 'timing' capacitor) could be accomplished via 'keying' the active component of your choice with a signal developed from the (delayed) HO output 'turn on' transition ---- I feel this design has advantages in the ways of simplicity and component count -- moreover chronological linearity of bar-segment illumination wouldn't seem to be a requirement...

Best regards
HP

PS
and possibly sending HP there, too.
Oh! -- She 'sends me' alright! 'Tho I'm bound to say the 'direction' bears more 'edgeword' than lexical...:rolleyes::rolleyes::rolleyes::D
 
Last edited:

Thread Starter

GopherT

Joined Nov 23, 2012
8,009
Inasmuch as you desire a single chip design you could use an LM3914 in conjunction with a series resistor/capacitor 'network' as the analog signal source -- 'recycling' (i.e. discharge of the 'timing' capacitor) could be accomplished via 'keying' the active component of your choice with a signal developed from the (delayed) HO output 'turn on' transition ---- I feel this design has advantages in the ways of simplicity and component count -- moreover chronological linearity of bar-segment illumination wouldn't seem to be a requirement...

Best regards
HP
I need to keep the board on the clean side so the newbies can follow along with what is happening and, since it is a digital project, I would like too avoid the LM3914 chip. After a day of brainstorming, I will give up the "bar" format and go with the original plan.

I really appreciate the effort everyone put into it. Unfortunately, there us only so much space on the board for the display and complexity that the newbies can follow before their eyes glaze over.
 

WBahn

Joined Mar 31, 2012
30,077
You might try something like this:

upload_2015-10-8_20-6-39.png

If your Vcc is high enough, then the fact that you are dropping about a quarter volt across each diode (so between 2.0 V and 2.5 V from the first LED to the last) should have a minimal effect on perceived LED intensity. If you replace the resistors with simple current sources, then you won't have any variation (to speak of) as you walk up the bar.

If you want better results without using current sources, add a diode from a LED to each LED to the right of it. Then you could use regular silicon diodes. This would require 45 diodes, though. You could improve the results by adding an additional matching diode in each chain, for a total of 55 diodes.

I'd recommend trying the Schottky approach first -- it only requires nine diodes and they can probably be bridged across the current components on the current PCB. But keep in mind that the last diode is carrying ~10x the current of any of the LEDs -- the same for the final transistor.
 
Last edited:

Thread Starter

GopherT

Joined Nov 23, 2012
8,009
You might try something like this:

View attachment 92711

If your Vcc is high enough, then the fact that you are dropping about a quarter voltage across each diode (so between 2.0 V and 2.5 V from the first LED to the last) have a minimal effect on perceived LED intensity. If you replace the resistors with simple current sources, then you won't have any variation (to speak of) as you walk up the bar.

If you want better results without using current sources, add a diode from a LED to each LED to the right of it. Then you could use regular silicon diodes. This would require 45 diodes, though. You could improve the results by adding an additional matching diode in each chain, for a total of 55 diodes.

I'd recommend trying the Schottky approach first -- it only requires nine diodes and they can probably be bridged across the current components on the current PBC. But keep in mind that the last diode is carrying ~10x the current of any of the LEDs -- the same for the final transistor.

There it is!

Now it's obvious, no need to simulate. Thank you!
 

AnalogKid

Joined Aug 1, 2013
11,055
Note that for the circuit in post #15, the LEDs will not be constant brightness. Each of the LEDs under the one for the count will be at successively less brightness, a consequence of the Shottkey diode Vf drops adding up.

ak
 

AnalogKid

Joined Aug 1, 2013
11,055
I assume your question about FET vs BJT was going in the direction of the latch idea as well.
Don't know nothing about no latches. I was asking just to have a complete picture of what you described in post #1. What latch/function are you talking about?

Also, I assumed that you are using a 4017 as the counter. Is this correct?

ak
 

WBahn

Joined Mar 31, 2012
30,077
Note that for the circuit in post #15, the LEDs will not be constant brightness. Each of the LEDs under the one for the count will be at successively less brightness, a consequence of the Shottkey diode Vf drops adding up.

ak
Which is the reason why you need a high enough supply voltage. If the drop across the current limiting resistor is, say, 8V or so, then the variation due to the drop across the diodes will result in about a 25% variation in current. Most people are fairly insensitive to that, but then again we are talking about LEDs that are near each other and we are most sensitive to comparative differences in light than to absolute differences. To address that you can either use current sources or you can use parallel diodes and even compensation diodes -- but that requires about fifty diodes and is probably not worth it; I'd opt for a simply current source in each chain first.
 
Top