Connect with us

Help: Driving a 5 inches 7 segment display

Discussion in 'General Electronics Discussion' started by abo0badr, Apr 25, 2013.

Scroll to continue with content
  1. abo0badr

    abo0badr

    11
    0
    Mar 23, 2013
    Good morning guys,
    I had finished a small project for car racing, in that Project I have a timer displaying the running time for each lap, I am currently using the small 7-segment displays which is powered up by 5 volts only. This was for testing purposed only (or lets say a miniature only).

    Now I have to convert everything into semi-industrial type of equipment. So I have decided to use a 5 inches or 6 inches common anode 7-segment display to display the time.
    My only problem is how am I going to do it as I am a newbie to bigger 7-segment displays.

    I am already using a 74LS47 (BCD-To-7Segment Decoder) and a simple 2n2222A to drive each multiplexed display using 5volts.

    I already new that the bigger 7 segment displays requires around 12 to 15 volts (based on 4 to 6 inches displays).

    My question is what should be the replacement parts for the BCD-To-7Segment Decoder and the 2n2222A Transistor?
    Any help will be much appreciated. Thank you​
     
  2. GreenGiant

    GreenGiant

    842
    6
    Feb 9, 2012
    you dont need to replace anything, if you get some relays that are driven by 5V and switch more than that and youll be golden.

    Just make sure you connect the right output to the right input on the new 7-segment and youre good.

    This will delay the display but only by a millisecond or two at most so I wouldnt worry too much :p
     
  3. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    We need a lot more information.
    How are the displays multiplexed? Are you sure they're multiplexed?
    Post a schematic of what you have so far.
    Why are you using LSTTL? What year is it in your world? ;-)

    In general, if you're using common anode displays and multiplexing them, you just need a higher voltage supply rail and some level shifting. But the devil is in the details. There are many possible configurations that you could be using. We need a lot more information.
     
  4. abo0badr

    abo0badr

    11
    0
    Mar 23, 2013
    I already thought about that and was about to try it, but the race differ in 1's of milliseconds. and relays don't switch that fast, transistors do, I already has it running all ok but I want to make use of a 5inch 7-segment.

    [​IMG]


    here is an image of what I did but this is an old design, I already have added 2 extra segments so that should be 6 digits. And this design is doubled, for 2 Cars in the race. Already done it also, so all in all 12 digits, for each car the timer is 2 milliseconds digits, 2 seconds digits, and 2 minutes digits. so each car has a 6 digits timer.

    all these is already running in very good condition, don't mind the buttons I have functions for that. it's clearly that the design is good. but my problem is how am I gonna change those small segments into 5 inches? what am I going to replace?
     
  5. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    OK. So you want to duplicate that circuit (actually two circuits, and with six digits instead of four), using larger displays that contain several LED elements in series and need 12~15V across the segment. Right?

    You need another supply rail at a higher voltage, and you need level shifting circuitry.

    Your higher-voltage supply would normally be a positive rail that's a few volts higher than the voltage drop of a segment. In this case I'd recommend 19V or more. Laptop power supplies are typically rated around this voltage and might be a convenient power source. You can derive the 5V rail from the higher rail using a linear or switching regulator.

    Voltage shifting is normally done with a 0V-referenced common emitter switching transistor (or MOSFET) (NPN or N-channel) driving a second common-emitter switching transistor (or MOSFET) (PNP or P-channel) that operates from the high voltage supply. When the control signal goes high (+5V), the first transistor turns ON and provides bias to the second transistor, which turns ON and provides the positive supply rail to the display.

    I think you should take this opportunity to reconsider the interface between the micro and the display. Specifically, the external BCD-to-7-segment decoder causes two main disadvantages: it limits the characters you can display, and its outputs use TTL/LS levels, which are more difficult to deal with.

    I would reserve an 8-bit port to drive all of the individual segments, including the decimal points, independently. This will require more I/O but I think it will be worthwhile, because you can display arbitrary symbols such as dashes and some capital letters.

    You will need two of these ports; one for each six-digit display. The other option is to multiplex by 12 instead of by six, but I wouldn't do that; the peak current and the electrical noise would be doubled.

    You can however use an external selector to reduce the number of control signals needed for the digit selection. The commonest choice is the 74xx138. In this case I would use a 74HC138. There is also a 74HC238 which has active-high select outputs, which may be more appropriate, depending on the interface circuitry. (The 74xx138 has active-low select outputs.) Using a 3-to-8 decoder/selector reduces the number of I/O lines required to select the digit from six to three.

    So with those changes you would need the following I/O:
    3 outputs to drive the 3-to-8 decoder for digit selection;
    8 outputs to drive the segments and decimal point for the first display;
    8 outputs to drive the segments and decimal point for the second display;
    possibly, extra outputs to drive other LEDs such as colon indicators between pairs of digits, if you want that feature.

    The last factor that determines the best interface circuit to use is the arrangement of the displays - common anode, or common cathode. Either can be used; the drive circuitry just needs to be different in each case.

    Assuming you can use either common anode or common cathode displays, and assuming that you will use separate 8-bit ports to drive the segment, my recommendation would be:

    1. Common anode displays.
    2. Both displays multiplexed together, i.e. a single digit selection control and two independent sets of segment drives.
    3. Three-bit digit selection using a 74HC138
    4. N-channel MOSFETs (6) in common-gate configuration with sources driven from the HC138 outputs and gates tied to +5V, with drains driving the gates of P-channel MOSFETs (6) with their sources connected to the high positive supply and their drains driving the common anodes.
    5. Two sets of eight N-channel MOSFETs (16 total) with their gates driven from two 8-bit I/O ports on the microcontroller and their sources grounded, with their drains driving the cathodes of the segments through individual current limiting resistors (16).

    Have a good think about what you want and let me know; I'll draw up a schematic.

    Edit 1: Also, can you use SMT devices in this project or do you want to use only through-hole?
    Edit 2: Do you have any particular display devices in mind? If so, can you give the part number and a link to the data sheet?
     
    Last edited: Apr 27, 2013
  6. quantumtangles

    quantumtangles

    152
    3
    Dec 19, 2012
    Very interesting thread.

    I shall revisit it upon becoming sentient.
     
  7. GreenGiant

    GreenGiant

    842
    6
    Feb 9, 2012
     
  8. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Relays are no good if the displays are multiplexed. Also they're expensive and large.
     
  9. GreenGiant

    GreenGiant

    842
    6
    Feb 9, 2012
    not that expensive, and size doesnt seem like it would be an issue seeing as how the new displays are 5x7, but transistors would work the same way with less current needed so they should still work, transistors are pennies on the dollar.
     
  10. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Multiplexing operates at hundreds of hertz. You can't have relays operating at those frequencies.
     
  11. GreenGiant

    GreenGiant

    842
    6
    Feb 9, 2012
    Thats true, but the OP didnt mention multiplexing at all, you were the first to mention it.

    Just offering my opinion, Im a big fan of relays/transistors when it makes upgrades easier, and with the timing taken care of by the PIC and only delaying the display (somewhere in the 100uS to 50mS range isnt a big deal, I know that an Arduino would drive a small relay, or transistor no problem whatsoever, and though i have never used a PIC I would assume that they can do that as well.

    Either way, a BCD to 7 segment should be able to drive a transistor.
     
  12. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    I think you need to re-read post #1 on this thread!
     
  13. abo0badr

    abo0badr

    11
    0
    Mar 23, 2013
    Yes relays should not be used in that kind of matter..as the objective of the audience is to see the running time on the display. If relays are used, there will be a huge delay in switching, and that will cause the display to flicker or be noticed by human eyes that it is switching.

    By the way I tried Buying the 5 inch 7-segment display but has a problem turning it on, Already tested it with direct power of 15 volts, and it is good. but when I tried to create a simple count up program using a microcontroller to count from 0 to 9, The display is not turning on.

    The design of the circuit is the same as the above image, but I replaced the 2N3904 with a High Voltage High Current Transistor TIP41C, and the collector voltage to 15 volts, I tried using a tester to measure the emitter voltage going to the 7-segment display when HIGH/5V is supplied to the Base of the TIP41C. and it was not supplying 15Volts to the segment, rather it only supplies 5 Volts.

    What is the problem? is the current not enough to switch the TIP41C???
    or what Shall I do?

    By the way, the data sheet of the segment says it needs 15volts 20 to 30mA to turn on the segment.
     
    Last edited: May 20, 2013
  14. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    That's right. The digit driver transistors (Q1~4 in your diagram in post #4) are connected as emitter followers. If the voltage supplied to the base is +5V, the emitter voltage will only be about 4.3V, regardless of how high the collector voltage is.

    Please re-read my post #5 on this thread. I tried to explain everything there. You will have to change the way the anodes of the digits are driven, and preferably the cathodes as well.
    Do you know whether the segments include current limiting resistors? If in doubt, assume they don't, and provide the current limiting resistors externally.
     
  15. abo0badr

    abo0badr

    11
    0
    Mar 23, 2013
    I already read your post #5, it is a bit hassle for me as the project is already finished, and all is needed is to replace the 7-segment only. If I'm going to follow you components I have to re program my microcontroller which may cause problems to the output and spend time.

    Sorry. But do you have any way that when I supply a 5v/High signal, it can switch a 12-15volts signal?? is it possible? what components are needed?

    And by the way the 7-segment do not have internal limiting resistors. I already provided a 1kOhms which is a little bit big for it. but its for testing purposes only
     
  16. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    I don't believe that the minor changes that I suggested in post #5 should make any significant difference to the operation of the firmware. A simple table lookup takes a matter of microseconds. Those suggestions were designed to make better use of the I/O lines and improve the versatility of the design.
    Yes. You can modify the anode drivers to switch a higher voltage. Here is the part of my post #5 where I explained how to do this.
    You will also need to modify the cathode drive. The 7447 has active low outputs, which was appropriate for your initial design that used 5V drive to the LEDs, but is not appropriate now. This is only one of several problems you have created for yourself by choosing to use this obsolete and restrictive device. You will need to double-invert these outputs to provide proper cathode drive to the larger LEDs, using two cascaded common-emitter (or common-source) stages for each output; that's 28 transistors or MOSFETs (or 14 if you use some inverter ICs).

    Each 7447 output needs to be inverted once, by a common emitter or common source stage using a PNP or P-channel MOSFET, and the output of that device needs to drive an NPN or N-channel MOSFET with its emitter/source grounded. When the 7447 output goes low, the PNP will be turned ON and will provide bias to the NPN which will pull its collector/drain to 0V and activate the segment.

    Be sure to use pulldown resistors as necessary to make sure the transistors/MOSFETs switch OFF quickly otherwise you will get ghosting effects on your display. (This can also be fixed with minor changes to firmware but you don't seem to want to do that.)

    The amount of extra work that sticking with the 7447 would involve greatly exceeds the amount of time you would need to change the firmware and do it all properly. It would also make the design physically a lot larger. That's why I suggested redesigning the display interface. I don't like kludges when it's possible - and in fact easier - to "do it properly".
     
  17. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Another point I should mention is that TTL/LSTTL outputs do not pull strongly high and therefore do not have a good clean swing to drive a common-emitter stage. You might be better to use two cascaded NPN or N-channel stages for each output, because TTL/LSTTL outputs pull low much more strongly than they pull high.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-