Running a 7 segment display with a single decimal input

Discussion in 'Digital Circuit Design' started by subway5411, Jul 28, 2016.

  1. subway5411

    Thread Starter New Member

    Jul 28, 2016
    9
    0
    Hello, I'm new to this whole microprocessor thing, and I am trying to run a 7 segment display through a decimal. (0-9) I have this selector switch thing that will allow you to choose a number / output from 0-9, and I want the LED display to respond to that. I kinda looked this up online and what I found could work was to use a Decimal to BCD encoder, then a BCD to 7 segment decoder. This runs off of 3.3v with each display having 7 200 ohm resistors. I am also using a common anode display. Could someone let me know what I need to do this?

    Thanks!
     
  2. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    A picture of your selector switch would be helpful...
    Since you're using 3.3V, the 7-segment decoder has to be in CMOS chip like 4511/4513/4543.

    Allen
     
  3. subway5411

    Thread Starter New Member

    Jul 28, 2016
    9
    0
    What I am trying to do is get a number from a single push button. Ex, Pressing 0, will display 0, and so on. I have this keypad from 0-9 out of an old nixie box that i'm trying to hook up to an LED display. They are just simple chained push button switches.

    Here is the selector: (One row goes to one display)

    [​IMG]

    Here is the unfinished LED Board, which has 7 digits: (For each row of 0-9 on selector)

    [​IMG]
     
  4. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    How was the wiring at the back of the buttons? Are they wired like a matrix, or each button contributes one wire with a common wire for all the 10 buttons?

    It looks like each button has more than 2 contacts.

    Allen
     
  5. subway5411

    Thread Starter New Member

    Jul 28, 2016
    9
    0
    The buttons are not wired in a matrix. Yes there is a big common for all 10 buttons in a row. Is there a way to wire these buttons in a BCD array? If so how? Or is there a 10 to BCD converter I can use? These are common anode.
     
  6. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    You'd need a 10 line to BCD encoder chip 74LS147. See datasheet attached.

    I think this chip is no produced anymore. You can also do it by programming an EPROM or use discrete logic chips to perform the function for you.

    Allen
     
  7. subway5411

    Thread Starter New Member

    Jul 28, 2016
    9
    0
    Ok, that's what I was thinking. Would this chip work on 3.3v and work a common anode display?
     
  8. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    Or you can use 2 pieces of MC14532B and cascade them to form a 10 to BCD encoder.

    See P6 of the datasheet attached.

    This chip would work from 3 - 18V Vcc.

    Allen
     
    Last edited: Jul 29, 2016
  9. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    Unless you can find the CMOS version of '147. It may be possible. See post #8.

    Allen
     
  10. subway5411

    Thread Starter New Member

    Jul 28, 2016
    9
    0
    Ok, could you show me how to wire this? Also, please make sure this would work with common anode.
     
  11. Kjeldgaard

    Member

    Apr 7, 2016
    71
    16
  12. subway5411

    Thread Starter New Member

    Jul 28, 2016
    9
    0
    How would I wire this? It doesnt look like there is 10 inputs. It goes from I1 to I9. My box goes from 0-9, not 1-9.

    Again, Please make sure this works with common anode.
     
  13. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    Yes, you're right. I also noticed it when I studied the datasheet of 74HC147. That's the first problem to solve.

    When pressing one of the 10 buttons (1-9), the corresponding number was displayed. But when the button is released, the display would go back to dispaly "0" which is default when no button is pressed.

    The outputs of 4511 are for common cathode displays, so I just use 7 inverters to invert the outputs so it would work with common anode display.

    Here is my first design. Dont rush to buy the parts yet. There are some problems to be solved before the schematic is finalized.

    SUBWAY5411-A.PNG

    Allen
     
    Last edited: Jul 29, 2016
  14. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    Are your buttons locking or non-locking?
     
  15. subway5411

    Thread Starter New Member

    Jul 28, 2016
    9
    0
    They are locking
     
  16. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    It means that, there is always one button in the "ON" position, right ?

    Allen
     
  17. subway5411

    Thread Starter New Member

    Jul 28, 2016
    9
    0
    Yes
     
  18. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    In that case, the circuit in post #13 should work.:)

    Just leave out button "0" and connect buttons 1-9 to I1-I9. So when button "0" is pressed, it's like no button press, and the '147 would display the default "0" on the 7 segment CA LED.

    Allen
     
  19. subway5411

    Thread Starter New Member

    Jul 28, 2016
    9
    0
    Ok thanks for your help! And again, this will work on common anode right?
     
  20. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    Yes, that's the purpose of the ULN2003A. To turn CC into CA display.

    Only thing is that the "6" and "9" will not look nice like a calculator on the 4511 or 7447 chips.

    Allen
     
Loading...