Help needed: Alter simple circuit with 74HC138

Discussion in 'The Projects Forum' started by Goant, Sep 24, 2010.

  1. Goant

    Thread Starter New Member

    Sep 24, 2010
    4
    0
    Hi there,

    I've just begun studying digital electronics, and I have to do a small project.

    I'm recieving a 3 bit BCD signal to a 74HC138 connected to 7 LEDs which will act as a digital VU-meter.

    My problem is that right now, the 74HC138 is limited to activate only one led at a time and not all LEDs leading up to the highest active LED.

    This is what I want:

    [​IMG]

    Someone told me I should look into using multiple 74HC138's to produce the outcome but it doesn't seem obvious to me at this point :)

    How can I get the output I want using a minimal amount of components? I'm not sure yet which components I have access to besides the 74HC138 and some simple logic gates, but any suggestions is very much welcome at this point.

    Thank you!
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Take another look at the truth table. See what inverting the address bits does for you.
     
  3. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    Inverting the address bits?? I don't get it.

    I don't see how the 74138 can ever do this job. If it's enabled via E1-E3, just one output bit can be active. And that's all!

    You could do it via a matrix of diodes, but that's cheating.
     
  4. Goant

    Thread Starter New Member

    Sep 24, 2010
    4
    0
    Thank you for the answers.

    beenthere: As I see it, if I invert the address bits I will get all BUT the active level LED to turn on. And that's not really the output I want.

    John P. Yes, I can't alter the number of LEDs. But do you have any suggestions to any ICs I could add between the 74138 and the LEDs to create the wanted outcome?

    I'm also controlling the 3-bit signal from a micro controller so any changes to the bit-combination is also possible.

    Thanks again
     
  5. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Use your microcontroller to light up the LEDs in sequence so fast that it appears that all of the required LEDs light up together as seen with the naked eyes.

    e.g. If you want to light three LEDs, just outputs 0, 1, then 2 to the 74HC138 in quick succession and repeats.
     
  6. Goant

    Thread Starter New Member

    Sep 24, 2010
    4
    0
    eblc1388: Thanks, actually I did think of that solution being a possibility. And I guess it would be the simplest way of dealing with this.

    I think I'll use that approach to begin with and see how it goes :)

    Thanks again!
     
  7. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Or get rid of the 74HC138 and use a 74HC595 instead. :)
     
  8. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    If using a 74HC595 driven by a microcontroller is a possibility--then yes, do it that way.

    Or have 8 independent outputs from the processor, if they're available.
     
  9. Goant

    Thread Starter New Member

    Sep 24, 2010
    4
    0
    I've verified that I have access to the 595, and I've looked at the 595's datasheet but can't see how I'm suppose to implement it.. What will the circuit look like and how does the input values match the output on the LEDs?

    I really appreciate your help.
     
  10. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    You can learn more about how to light the LEDs using 74HC595 by putting the phrases "74HC595 LEDs" into Google.

    There are at least 279,000 results, some with detailed descriptions and circuit diagram.
     
Loading...