Connect with us

Help explain strange behavior of my circuit?

Discussion in 'Electronic Basics' started by Daniel Pitts, Mar 8, 2013.

Scroll to continue with content
  1. Daniel Pitts

    Daniel Pitts Guest


    So, I noticed something strange with my circuit, and while I can
    "work-around" it, I'd like to understand what's going on.

    I took my LED display project to school so I could use their DC power
    supply. I found that my project works (MCU runs, the LEDs light up as
    expected, etc...) if I connect it to an already on 3.5v to 4.0v. If I
    ramp up the voltage, it seems to get stuck, If the voltage goes much
    above 4v, it seems to stop working, and I have to disconnect the power
    supply and lower it back to 4v.

    My current block diagram:

    | 8x8 RGB LED matrix |
    | Common Cathode per |
    | row |
    | |
    | |
    |||| |||||||||||||
    8||| 24 anode pins
    Row| ||||\|||| \||||
    Select |||| \|||| \||||
    pins |||| \|||| \|||||
    |||| RED| \GRN| \BLU|
    |||| |||| \|||| \||||
    |||| [TLC5916]-[TLC5916]-[TLC5916]
    |||| ||||
    [54HC238] ||||
    || ||||
    || |||| [20MHz xtal][2 caps for 20MHz resonance]
    || |||| |||
    \\ [ATTiny84 MCU]

    The way that this works is that each of the TLC5916 chips sink current
    (if all on, that's 24 times current sink from the chips) from the
    specific PIN which is "active" on the 54HC238.

    Though the RED is configured for lower current (it is brighter than the
    green and blue for the same current).

    I built this before I understood how transistors work and can be applied.

    As far as I know, all my chips are rated to run at 5v. The only thing I
    can think of is maybe the constant current sinks are drawing more
    current from the 54HC238 than it supports, and is causing it to stick?

    If I limit the current from the power supply, the starts moving all over
    the place of course, but the circuit seems to continue working. At first
    I thought the crystal oscillator wasn't working at the voltages, but the
    oscilloscope at school shows a great sine wave at 20MHz with a
    peak-to-peak of 5v, regardless of VCC voltage.

    I'm wondering if I need to use transistors (MOSFETs maybe) with the gate
    connected to the output of the 54HC238. Thoughts?

    Thanks for any comments/suggestions/thoughts.
  2. Daniel Pitts

    Daniel Pitts Guest

    The OE pin is controlled by the MCU (I disable the current sink while
    I'm switching rows). It should be pulled down by default by the MCU.

    Actually, now that I think about it, the MCU defaults to high-impedence
    input mode for each pin, hmm... maybe I need an external pull down
    resistor on that signal line?
  3. Jon Kirwan

    Jon Kirwan Guest

    What you describe "sounds like" a properly working shutdown
    feature, actually. And there is a section called
    "Overtemperature Detection and Shutdown" in the TLC5916
    I can't find a datasheet on the military version, but the
    74HC238 (from NXP) shows the following:

    Absolute MAX:
    Io < 25mA

    2.0 < Vcc < 6.0
    Voh spec'd at [email protected]=4.5V and [email protected]=6V
    (Vol is spec'd the same way.)

    I don't find a shutdown feature on the 74HC238.

    It's my own intent to permit all of the outputs of the
    TLC5916 to be active at 100mA each (5 columns at an average
    of 20mA means 100mA per column) and this means that the high
    side switch has to handle 800mA in my case. So I am using two
    external cheap small signal PNPs rather than pay for a high
    side mosfet or finding a more expensive, less available
    larger PNP. Each of the two have separate .22 ohm emitter
    resistors to help them share the current better at higher
    currents (the resistors won't do as much at lower currents
    when only one or two of the TLC5816 sinks are active.) There
    is only a need for one pair of .22 ohm resistors as all of
    the PNP pairs can share the same set.
    Well, you don't specify the constant current you designed
    (and you can change things using the configuration register,
    too.) So it's hard to say. But it "sounds like" a designed
    shutdown, to me. Which makes me think it is the TLC5916,
    which can actually do that.
    Let's consider what's happening at the RED LED TLC5916 and
    for a moment assume that you set 20mA for each LED (which
    will get divided by 8, in terms of average value, I guess.)
    I'm guessing this because I'm guessing you thought the
    Absolute MAX rating of 25mA was "okay" (I don't agree.) I
    really think you can only expect 4mA from the high hide (or
    low side) output of the HC238. And should design for that.
    But let's assume you decided you could "pull" 20mA out of it.

    Your RED LEDs probably have a Vf=2V (or so) at 20mA. The
    HC238 outputs are said to be, at T=25C, Voh=4.32V typical
    with Vcc=4.5V and Io=4mA. (worst case Voh=3.98.) Let's assume
    typical. We get [email protected] or 45 ohms at the output. At
    20mA, that's a drop of 0.9V. The LEDs drop another 2V, so we
    are at 2.9V drop already. Let's assume that Vcc=5V for now,
    with the above calculations remaining. So this leaves 2.1V
    drop for the internal current sinks. So they have to drop
    [email protected] or 42mW each. With 8 of these, that's 336mW for the

    Max power dissipation on a 4-layer board is specified at
    600mW. They don't say what it is for a 1-layer board. But
    mounted on a 1-layer board the TLC5916 says 103C/W, and
    mounted on a 4-layer board the TLC5916 says 66C/W. From this,
    I'm guessing that they support 0.6W*66C/W=39.6C rise over
    ambient. For a 1-layer board, this means 384mW. Note this is
    close to the above calculated figure of 336mW, for Vcc=5V and
    20mA with red leds.

    The datasheet for the TLC5916 also says that EACH output has
    it's own sensor. And some of them are surrounded by neighbors
    and won't have "edge effects" for getting rid of heat. It's
    possible that some of them heat up more than others. And
    certainly, as the voltages rise above 5V, there will be still
    increasing dissipation at the TLC5916, which MUST pick up the
    remaining voltage, whatever it is, when holding a constant

    As far as the HC238 goes, as I said I don't see "shutdown" in
    the datasheet. I would guess that the limitations are analog
    in nature.

  4. Jon Kirwan

    Jon Kirwan Guest

    That's for the short moment during power-on reset of the
    micro. But yes, it's wise to have a pull up on active low
    inputs and a pull down on active high inputs (which may also
    include a small bypass cap, as well I think, to help hold it
    down or up while the power supply ramps.) You could use a
    reset IC and gate its output through an OR to the lines, if
    you were being terribly safe about it.

    /OE is active low, though. So that's a pull up, not down.

    But the datasheet for the TLC5916, page 2, already shows a
    pull up present on /OE.

  5. Daniel Pitts

    Daniel Pitts Guest

    This is mounted in a breadboard. It likely will not make it out of
    prototype into a real circuit board, since I was mostly just playing
    around and have no real application for this project ;-).
    The voltage doesn't even make it to 4.3v before the circuit starts
    That all makes sense. Much more sense now than I would have before I
    started taking the class I'm taking now (Linear Circuits).

    Anyway, so it sounds like the 238 chip just isn't meant to source that
    much current, and I should find some other way to source it.

    I think when I first read the specs on my 238, I was thinking that the
    maximum current was how much it would allow through, not something that
    would cause failure (and probably damage).

    Thanks for the analysis help here.
  6. Jon Kirwan

    Jon Kirwan Guest

    That's even worse, then, I'd guess. So even LESS dissipation
    is supported.
    Which could be, because you are using a breadboard.
    All this is making me "like" my earlier design better. The
    high side switches never have to dissipate more than 100mA
    times their voltage drop each. Same with the low side BJTs,
    as well. Even with everything ON, it's 100mA each. Since
    package dissipation has to be under 500mW, this means a drop
    of no more than 5V. But that is a far, far better rating than
    the TLC5916 can even HOPE to achieve.

    So, although the parts count and wiring is WORSE, the parts
    price is less and the capability is still better.

    Another possibility is to use a shift register (with very low
    Io capability) and use external BJT current mirrors activated
    by it, so that it mirrors the TLC5916 design. This uses MORE
    BJTs on the low side, but I lose all of the separate BJTs for
    each LED (which may be a net win and certainly is a win
    regarding the wiring mess.) The price I pay for that is that
    the high side switches then again have to handle the SUM of
    the ON LED currents. Which makes them have a "bigger"
    requirement. (And it slightly complicates my use of a single
    external current-set resistor.)

    I have to carefully think about my goals, I guess.

  7. Jon Kirwan

    Jon Kirwan Guest

    One last thought about the TLC5916. They say 120mA per
    output. There are 8 of them. They say that on a 4-layer board
    600mW is the max rating. That's 600mW/8/120mA = 625mV per
    driver. Current sinks can be built with either BJT or MOSFET,
    but with Vce=625mV and BJTs, that would be slightly saturated
    operation. Which also makes some sense in a way, as that's
    about when the mirror'd currents would go out of spec.

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