2
\$\begingroup\$

I need to drive a large seven segment display (segment length is a about 2 inches) using a micro-controller (PIC 16F877). I've driven normal seven segments directly from PICs without issues, but I found that 5v is not enough to drive this one. It needed something around 9 volts (is this normal?)

So what came to my mind is this. (Designed using Proteus ISIS 7 Pro)

I've supplied 12v to this circuit and used the RV1 preset to adjust it (to make it 9V or something close). 8 inputs to the transistors come from the micro-controller. So I can drive the large 7 segment (which require 9v) this way...

But it wasn't success. I checked the voltages and found the transistors switch between 0-5v (can't imagine how can this happen???).

Anyway, then I tried putting the resistor to the collectors side. And took the output from collector pin. That was somewhat ok. But the brightness was varying with the number of lighting segments...(When lighting only one segment, there was very little brightness. It's almost not visible. But when lighting all the segments, brightness was too high. Felt like the display will blow.)

I don't feel like to try other means. This was a so simple project. But this large seven segment ruins everything. Can some one help me with this...

\$\endgroup\$
  • 2
    \$\begingroup\$ Instead of making guesses as to the correct voltage and current required for the display you should check its datasheet! \$\endgroup\$ – Wouter van Ooijen Sep 10 '12 at 11:53
  • 1
    \$\begingroup\$ @WoutervanOoijen What should I do if I don't have a datasheet. Purchased this from local market. No manufacturer name. Searched the internet. Couldn't find anything similar... \$\endgroup\$ – Anubis Sep 10 '12 at 11:56
  • 2
    \$\begingroup\$ Sigh, pray to all deities you can think of? Put 20mA through a segment and measure the voltage, that gives a best guess. But remember that an LED is NOT to be driven by a voltage but by a CURRENT!! This can be approximated by a larger voltage and a series resistor. \$\endgroup\$ – Wouter van Ooijen Sep 10 '12 at 12:15
  • 1
    \$\begingroup\$ The real question is of course: whatever happened to Q1? :-) \$\endgroup\$ – stevenvh Sep 10 '12 at 13:08
  • \$\begingroup\$ @stevenvh this is just a part of the full sketch. Q1 (and R1,R2... didn't you notice?) belongs to main controller board circuit. That one's OK. \$\endgroup\$ – Anubis Sep 10 '12 at 14:21
4
\$\begingroup\$

This isn't right, and you're lucky the display needs 9 V or it would have gone up in smoke.

First, the LEDs are in parallel with the resistors: your emitters go to both LEDs and resistors, and their other connections are to ground. You need them in series.

Then, your circuit is a common collector circuit. One of the disadvantages is that it can't drive a load higher than the control voltage - 0.7 V, that's 4.3 V, too little for the LEDs. That's where you're lucky, if it were 3 V LEDs they would have been driven with no current limiting at all \$\rightarrow\$ magic smoke.

There are no single LEDs that work at 9 V. Since you're talking about a large display it will have 4 LEDs in series for each segment, to provide equal lighting. At 2.2 V per LED you arrive near 9 V.

The more common way is to drive them common emitter. That is emitter to ground, and LED + resistor in series on the collector side. For a common emitter you'll also need base resistors. 1 kΩ will give you 4.3 mA, which should be enough to drive the BC547 in saturation. You can also use a ULN2803, which is a transistor array of 8 transistors with their base resistors built in. Then you only need one part (except for the current limiting resistors).

Your resistor values are also too high. If each segment needs 9 V and your supply is 12 V then the current though a segment is 3 V/ R. With 10 kΩ resistors that's 300 µA, and that's too little for any LED. A typical 20 mA LED would need a 150 Ω resistor. But check the display's datasheet for both voltage and current.



The TI TLC5916 mentioned by Michael is an excellent alternative. It's three times the price of the ULN2803, but at 1.24 euro in 1s still won't break the bank (Mouser, 1.65 dollar at Digikey).

enter image description here

It has constant current outputs, so you don't need the series resistors anymore, brightness won't depend on input voltage variations, and you save I/Os on your controller because it's serially driven. You only need data out, clock, and latch. The current is set with a resistor.

Michael would still use series resistors, but they're probably not required. If you have 20 mA and a 3 V drop (from 12 V to 9 V) then all LEDs on will give you less than 500 mW, which a 16-pin DIP certainly can handle. At higher currents or input voltage they may be a good idea, though.

\$\endgroup\$
  • \$\begingroup\$ Thanks! The resistor values are not 10k, it's 1.0k. But of course, they are still too high it seems. Also, I don't have a datasheet for the display. That was a major problem. \$\endgroup\$ – Anubis Sep 10 '12 at 11:52
  • \$\begingroup\$ Why did you say above schematic is common collector?? The signal is given WRT ground and output is taken WRT ground too. And it is the emitter, which is grounded through the 1k s. Isn't it CE?? \$\endgroup\$ – Anubis Sep 10 '12 at 11:54
  • \$\begingroup\$ @Anubis - because it is a common collector circuit! :-) The "common" refers to the pin of the transistor which is connected to one of the power rails, and that doesn't have to be ground! A common collector PNP circuit will have its collector to ground, but a common emitter PNP will have the emitter to Vcc. So it's not related to the signals, but the transistor's pins. "emitter, which is grounded through the 1k": that's not what we call grounded; grounded normally means direct connection. (Though there are common emitter circuits which have a small resistor on the emitter side.) \$\endgroup\$ – stevenvh Sep 10 '12 at 12:54
  • 1
    \$\begingroup\$ @stevenvh Use of series resistors with the TLC5916 is sometimes necessary. The constant current nature of the part says that there will some voltage drop from each chip output to GND. Depending upon the current in each display segment, the LED supply voltage and the segment forward voltage drop will allow calculation of the power dissipated in each driver output. There is a spec sheet limit of the safe total power for the whole package at 1W (for the plastic DIP and different for the SOIC depending upon mounting method). \$\endgroup\$ – Michael Karas Sep 10 '12 at 15:41
  • 1
    \$\begingroup\$ Continuing...If the display power rail is too high this can put in excess of 1W into the driver chip. Adding series resistors as I said in my answer posting can help to spread the power across additional components. \$\endgroup\$ – Michael Karas Sep 10 '12 at 15:42
3
\$\begingroup\$

I have had great success driving large format 7-segment displays using the TLC5916 chip from TI. One chip can drive one display module and if you had multiple modules the TLC5916 chips for each can be connected in series. From the perspective of the microcontroller the display connects with just a few pins as a serial shift register. Simple software can bit bang the interface to output the data for each display update.

The TLC5916 chip can drive displays that are connected to 9V. It also will use a constant current technique for each segment to keep brightness even for all segments. It may be advisable to still put some resistance in series with each segment before connecting to the TLC5916 outputs to share some of the voltage drop and reduce power dissipation in the driver chip.

You can obtain the TLC5916 chips from Mouser in both DIP and SOIC package styles. The data sheet is available from there as well.

http://www.mouser.com/ProductDetail/Texas-Instruments/TLC5916INE4/?qs=sGAEpiMZZMsE420DPIasPooIeIm0f6XqBnwnNFIuvQE%3d

\$\endgroup\$
-1
\$\begingroup\$

for me a simple opto isolator will do.

  • pic seg output(+)-- 1k---opto pin 1(diode anode) *

  • gnd --------------- to opto pin 2(diode catode) *

  • (+9v to +15v) ---1k-- to opto pin 3 *

  • opto pin 4 to segment *

  • repeat the above for all the 7 segments (A to G) + dot

  • *

  • common display catode ---- to npn collector (bc457) *

  • pic mpx out --5k-- to npn base *

  • gnd -------------- to npn emitter

    • repeat the above for all the 7 segments displays

    • NOTE *

    • jumbo 7 seg display common catode display *

    • 1 npn transistors for each display *

    • opto isolator (P620) or similar (4 pins) *

    • each line is between two asterics *

    • hope all this is more clear *

\$\endgroup\$
  • 2
    \$\begingroup\$ I can't tell what all that is supposed to be. Are you trying to sketch out a schematic using dashes and dots? It's not very clear. We have a really nice schematic tool if you could take a couple minutes and use that. \$\endgroup\$ – I. Wolfe May 14 '15 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.