Looking for IC to increment 8 illuminated LED's

AnalogKid

Joined Aug 1, 2013
12,169
Aninteresting circuit but the TS did request "small", and with all of those parts, SMALL it isn't.
Agree. I like Wally's circuit in #11.

If the system is running on 5 V, you can use AC logic ( for example, 74AC164 ). The logic components can drive the LEDs directly without external drivers or latches. The TS does not say how this will be assembled or what his skill set is. If the project is limited the through-hole components on 0.1" perf board, I think this is about as small as it can get.

ak
 

sghioto

Joined Dec 31, 2017
8,634
Aninteresting circuit but the TS did request "small", and with all of those parts, SMALL it isn't.
Actually he said "very space limited" and that could mean large enough to accommodate the circuit. The SCRs and transistor are all TO92 case styles so it's possible to construct in a small footprint.
The 4017 and the SCRs have the advantage of higher supply voltages and LED currents.
 

MisterBill2

Joined Jan 23, 2018
27,683
t is a puzzle as to why there has been no comment about the suggestion for using one of those LED bar-graph ICs to drive the LED stack, and the CD4017 to drive resistors to provide the increasing voltage steps. Is it because I don't provide the actual circuit and that nobody can visualize what I am describing.? This is one of those rare instances where an analog approach seems like it will be much simpler.
 
Last edited:

crutschow

Joined Mar 14, 2008
38,545
Curious why you modified it. In my version D1 resets the counter to 0 at the ninth pulse.
Okay, I didn't see at first how your were resetting it.
With the diode, you would need to add a pull-down resistor.

Here's the sim with your reset configuration:

1672878906013.png
 

sghioto

Joined Dec 31, 2017
8,634
On the breadboard it actually works without the resistor. The voltage measured appx .39 volts but adding the 100K resistor drops the voltage to zero for best results. Post #17 edited to add R3.
 
Last edited:

sghioto

Joined Dec 31, 2017
8,634
That low voltage is likely because the input impedance of you meter doing the measurement drains the capacitor voltage.
Without that it likely stays near 2.5V for a long period of time.
Actually I suspect the leakage from D1 is keeping the Reset low enough to function as the circuit does work without a pull down resistor. However D1 can be replaced by R3 and maintain circuit stability.
 
Last edited:

Ian0

Joined Aug 7, 2020
13,158
A diode and a resistor. Each output will be driving a different number of LEDs with the same voltage, so each stage will need a different current limiting resistor.

By the time you have the diode drop, there's very little overhead left for that last output that's driving eight LEDs. If the Vf averages out to 2.2 V, your goose is pretty well cooked.

And this is assuming that the part can maintain the output at the rail even under load, and that it can drive the LEDs in the first place. I'm a bit skeptical of both.

https://www.ti.com/lit/ds/symlink/cd4017b.pdf



At 15 V supply rails, the device is only spec'ed to source of sink 3.5 mA (about twice that being typical) when the output is pulled 1.5 V away from the rail. So even if you use a Schottky diode, you may well be down to just over 16 V even if you choose LEDs that only want 5 mA or so.
Screenshot at 2023-01-05 06-39-35.pngD19 can be added if a count of 1 to 10 is required instead of 0 to 9.
A 4017 is perfectly capable of driving LEDs, and red LEDs require about 1.8V.
You can get 20V rated CMOS
But it is right at the limit of what can be achieved: if you want any other colour than red, you would need an alternative circuit.
It can be arranged as two strings, with some additional logic, but it still takes rather less additional logic than the other methods.
 

WBahn

Joined Mar 31, 2012
32,934
D19 can be added if a count of 1 to 10 is required instead of 0 to 9.
A 4017 is perfectly capable of driving LEDs, and red LEDs require about 1.8V.
You can get 20V rated CMOS
But it is right at the limit of what can be achieved: if you want any other colour than red, you would need an alternative circuit.
It can be arranged as two strings, with some additional logic, but it still takes rather less additional logic than the other methods.
The data sheet indicates that the part is only spec'ed to provide at least 3.4 mA (6.8 mA typical) from a 15 V supply (they don't spec at 18 V since that is the absolute max supply voltage) and that's with a 1.5 V pull away from the rail. I'm not making that up, I posted the excerpt from TI's data sheet.

So what voltage is needed? 9xVf + Vbe + Vd.

Even letting the mirror go down to Vcb = 0 V and using a Schottky diode, you are at over 17 V, which doesn't allow much pull away from the rail.

And you are assuming that the transistors in your mirror are very well matched. Are you envisioning the use of an IC transistor array chip for that part?

I agree that it is very borderline. I don't like pushing the datasheet specs. I know lots of people that take great pride in doing so -- and do some pretty cool things in the process.
 

Ian0

Joined Aug 7, 2020
13,158
The data sheet indicates that the part is only spec'ed to provide at least 3.4 mA (6.8 mA typical) from a 15 V supply (they don't spec at 18 V since that is the absolute max supply voltage) and that's with a 1.5 V pull away from the rail. I'm not making that up, I posted the excerpt from TI's data sheet.

So what voltage is needed? 9xVf + Vbe + Vd.

Even letting the mirror go down to Vcb = 0 V and using a Schottky diode, you are at over 17 V, which doesn't allow much pull away from the rail.

And you are assuming that the transistors in your mirror are very well matched. Are you envisioning the use of an IC transistor array chip for that part?

I agree that it is very borderline. I don't like pushing the datasheet specs. I know lots of people that take great pride in doing so -- and do some pretty cool things in the process.
One thing we have both overlooked because the TS said “decade counter” - there are actually only 8 LEDs.
Texas devices are rated for 18V operation (20V absolute max).
If the TS doesn’t want red LEDs, it’s a moot point.
 

MisterBill2

Joined Jan 23, 2018
27,683
Back in post #1 the TS was rather specific about WHITE 5mm LEDs. Those typically have a Vf exceeding 3 volts, often about 3.2 volts. Note that 3v x 8=24 volts, so the series string concept demands a fairly high supply voltage..
As for resetting the 4017, I have seen frequency dividers that reset iit directly from an output. So the RC pulse stretcher is not mandatory.
 

WBahn

Joined Mar 31, 2012
32,934
One thing we have both overlooked because the TS said “decade counter” - there are actually only 8 LEDs.
Texas devices are rated for 18V operation (20V absolute max).
If the TS doesn’t want red LEDs, it’s a moot point.
I didn't overlook it. My first response to your approach assumed 8 LEDs at a 2 V drop each. The second approach was merely an analysis of the circuit you offered up.

I still think the simplest approach is to use a shift register like I suggested back in Post #8. Use a 9-pin bussed resistor SIP pack and you are getting down pretty small part count.
 

AnalogKid

Joined Aug 1, 2013
12,169
You could do it with one of the LED voltmeter ICs in the bar mode, plus a charge pump so that each press dumps more charge into the capacitor. Then the last press drives an FET that drains the cap back to zero. That could be done with one IC, I am thinking. And a couple of transistors. About as small as I can come up with, no code to generate and almost no digital logic.
This was my first thought. If the circuit is to sit at any stage for so long that capacitor droop is an issue, an alternative is to drive an R-2R resistor network with a binary counter, and the resistor network output drives a bar graph display like an LM3914. At this low a resolution, cheap 5% resistors should be good enough

For only 8 LEDs, use a 4017 with resistors to deliver higher voltages and then the last one to deliver none, and reset to zero. That takes only 2 IC devices and tiny resistors, no capacitors, and the bar-graph IC drives the LEDS directly. That is as simple as I can make it.
Kicking around numbers in my head, I couldn't see a resistor value set that will work if all resistors are summed into a single node at the bar graph chip input. If you put a diode in series with each resistor it is a simple solution set, but there are all of those diodes taking up space. Replacing the 4017 with a shift register eliminates the diodes, but without extra parts the solution is limited to 8 steps.

ak
 

Tonyr1084

Joined Sep 24, 2015
9,744
https://www.ebay.com/itm/125642680815 this is a CD4022BF chip - an OCTAL counter. Similar to the decade counter but only eight outputs. Here are a few more:
https://www.ebay.com/itm/223918324799
https://www.ebay.com/itm/125644486562

The requirement stated is for pressing a button once and lighting the first LED. With each subsequent press of the button the LED's advance one position at a time. BUT at the same time the previous LED's remain illuminated. IF the TS wants 8 presses of the button to advance from no LED's illuminated to all eight - an octal counter won't work. Use of a decade counter is the only counter that will perform the very first function of lighting an LED, which means it's using the second output as the first LED illumination just as post #30 shows. Note that output 00 has no LED attached to it. Also notice that output 09 shows feeding D1 to D15, which is a 9th output that the TS doesn't want. The TS is asking for 8 outputs. The 9th stage should be wired back to the reset so that when the 9th output goes high it resets the counter back to output 00 (no LED's attached). The circuit in post #30, with one modification was the exact circuit I was thinking of.

However, if the TS wants only one LED lit at any given stage and doesn't mind the first LED being lit (or any LED being lit at any moment) then an octal counter would be the choice. But that doesn't meet the TS's requirements as stated.
 

crutschow

Joined Mar 14, 2008
38,545
Q7 goes high on the 8th pulse. Next pulse asserts MR which resets everything to zero.
Not quite.
When Q7 goes high, the SR will reset immediately, since the PB output is also still high.
That's why I added a FF to my version of the circuit in post #11.
So it requires two IC's, the same as your circuit.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,683
WEare not given any time limit detail from the TS. And if a long time, relatively speaking, is needed then a buffer. But from a 4017counter, 8 different voltage dividers can be provided with as few as 9 resistors. And the small surface mount diodes are 0.7mm by 1mm, which is quite small and hard to handle. But that makes the divider math much easier.
 
Top