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

Discussion in 'General Electronics Chat' started by GopherT, Oct 7, 2015.

  1. GopherT

    Thread Starter AAC Fanatic!

    Nov 23, 2012
    6,001
    3,756
    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.
     
  2. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,520
    1,247
    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
     
  3. Aleph(0)

    Member

    Mar 14, 2015
    343
    323
    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
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    How do you keeping the out0 on high when the clock trigger the output to the out1?
     
  5. Hypatia's Protege

    Distinguished Member

    Mar 1, 2015
    2,781
    1,227
    ---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
    Picking up a stutter there, Aleph? Last I checked it was Ahk-October:p
     
    Last edited: Oct 8, 2015
  6. GopherT

    Thread Starter AAC Fanatic!

    Nov 23, 2012
    6,001
    3,756
    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.
     
    Aleph(0) likes this.
  7. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,520
    1,247
    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
     
    Last edited: Oct 8, 2015
    absf and ScottWang like this.
  8. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    AK, That's great idea.
    I'm just thinking the mosfets are too many, does any other buffer IC as ULN2803 to replace them?
     
  9. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,520
    1,247
    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
     
  10. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,520
    1,247
    In post #1 you mentioned driving the LEDs with transistors. BJT or MOSFET?

    ak
     
  11. GopherT

    Thread Starter AAC Fanatic!

    Nov 23, 2012
    6,001
    3,756
    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.
     
  12. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    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
     
    absf and GopherT like this.
  13. Hypatia's Protege

    Distinguished Member

    Mar 1, 2015
    2,781
    1,227
    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
    Oh! -- She 'sends me' alright! 'Tho I'm bound to say the 'direction' bears more 'edgeword' than lexical...:rolleyes::rolleyes::rolleyes::D
     
    Last edited: Oct 8, 2015
    GopherT likes this.
  14. GopherT

    Thread Starter AAC Fanatic!

    Nov 23, 2012
    6,001
    3,756
    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.
     
    Hypatia's Protege likes this.
  15. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    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: Oct 8, 2015
    GopherT likes this.
  16. GopherT

    Thread Starter AAC Fanatic!

    Nov 23, 2012
    6,001
    3,756

    There it is!

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

    Distinguished Member

    Aug 1, 2013
    4,520
    1,247
    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
     
    GopherT likes this.
  18. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,520
    1,247
    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
     
  19. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    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.
     
Loading...