LED driver circuit

Discussion in 'The Projects Forum' started by aradian, Mar 1, 2009.

  1. aradian

    Thread Starter New Member

    Mar 1, 2009
    3
    0
    Hello all,

    I have a project where I need to control a 9x9 grid of LEDs effectively wired in parallel. I will have a microcontroller controlling this array, but it only uses ±5v on its output pins.
    What would be the best way to step the 5v signal down to 2v while still allowing the signal to be changed rapidly for PWM?

    To clarify on the LED's connection:
    Each column and row is connected to the microcontroller by 1 pin, for a total of 18 pins. Each of the microcontroller's pins may be supplying a signal to 1-9 LEDs, depending on the state of the other pins. I figure that I'll have to have 9 of whatever circuit I'll use to adapt the voltage from 5 to 2.

    The LED I'm using is the Dialight 598-8610-207F, if that helps.
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    You can't drive LED's from a uC's output pins, even with limiting resistors. They are not meant to handle such large currents. You need something like a small Darlington array or discrete logic level FET's to handle the current.

    We could use a schematic of how you are wiring the LED's? You are aware that there is a red and a green LED on each of those chips?
     
  3. aradian

    Thread Starter New Member

    Mar 1, 2009
    3
    0
    Here's a diagram of how it's connected. There's one LED "package" at each wire intersection.
    Thanks for the tips, I'll have to do some research on those transistors (I'm kind of new to the hardware side of things).
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Actually, with Charlieplexing you can control a surprising number of LEDs, and directly from a microcontroller's output pins - with current limiting resistors of course, and you must stay within the individual pin's I/O current limits, and total current limits of the uC.
    http://en.wikipedia.org/wiki/Charlieplexing
    I have a little Microchip 12F675 8-pin 4MHz uC sitting here that's been flashing 12 LEDs using 5 I/O pins in various patterns for several months. Charlieplexing isn't particularly easy, because it requires tri-state I/O pins, and if you're driving quite a few LEDs, the low ON duty cycle per LED will require more current than a uC is capable of sourcing/sinking.

    With the LEDs you've chosen, Charlieplexing may be your only option - unless you only wish to display one color.

    I hope you haven't built the board yet, as Charlieplexing requires a different connection scheme than your X-Y grid.
     
  5. fish4fun

    New Member

    Feb 24, 2009
    8
    0
    I am by no means an expert on Displays, but I have investigated a similar project. An 8x8 array lends itself more readily to an easier solution using fairly easy to integrate ICs like the 4051 & 4053 bilateral switches. Depending on the series chosen these chips can sink/source a fair amount of current and have good switching speeds. You can use six bits to control a pair of 4051s to select Row and Column, and you can use 2 bits to control 2/3rds of a 4053 to provide +V/Gnd to the 4051's input pins. (I am ASS-U-MEing you plan to use each chip configured in anti-parallel?) To "upgrade" to 9X9 you need to add 2 "chip select bits" and for simplicity, another pair of 4051s. Sequencing through the Rows / Columns for a complete "refresh" will take 64 or 81 Led Duty Cycles. If you wanted a "Refresh Rate" of Xhz, then the Led Duty Cycle = 1/Xhz*Leds. For a 60hz Refresh Rate and 81 Leds we would have an Led Duty Cycle of ~205uS (~5kHz).

    The above is certainly not offered as the "best" solution, just cheap and easy.

    Fish
     
  6. italo

    New Member

    Nov 20, 2005
    205
    1
    I imagine this as a matrix like a core memory matrix where only one point will be active at one time. then the problem driving direct is minimal. However if all can be active or some at the same time then poof. since you have already +5v try using 74ls244 or 245 IC tristate switches more inputs for the buck
     
  7. aradian

    Thread Starter New Member

    Mar 1, 2009
    3
    0
    Well, I have finished building the LED section.

    I been planning on having the uC drive the display in "pages", which would be sent over a serial cable from a computer. Each page would be the state of all display pins at one moment. Software on the computer would generate the pages necessary for a given image, and the uC's task would only be to cycle through the current set of pages as fast as possible.

    One concern I've had with sequencing though each individual LED is that it seems like the display would be 1/81 as bright as if it were full on. Each LED is only on for 1/81 of a refresh cycle. With the above scheme, the worst possible pattern would require 18 pages (9 per color) in a refresh cycle.
    I may just be misunderstanding something, though. I haven't actually tried either one yet.

    From what it looks like so far, an array of transistors would only provide power in one direction, so I can't use that. The bilateral switches mentioned by fish4fun would provide two-directional power, but I'd need 9 switches.
    Since I need to power multiple LEDs simultaneously, could 2 4053s be used to power any x,y grid pair in either direction?
     
  8. fish4fun

    New Member

    Feb 24, 2009
    8
    0
    aradian,
    My solution could be improved on in many ways, but the complexity increases geometrically. For instance, if you had 9 bits to dedicate to each "Column" and 9 bits to dedicate to each "Row" then you could simply use 81 X 4053 circuits (27 x 4053). In this case, the output of each 4053 circuit would be directly connected to a a specific Row, Col and a by selecting 0/1 or 1/0 on any given 4053 circuit you would achieve the assigned color while 0/0 or 1/1 would achieve "off". This is a LOT of support circuitry for a 9x9 display. I would suggest a less intensive approach.

    If you increase the current to the LED's by decreasing the series resistance, you can "pulse" the LED at a substantially higher current than it's "steady state" current rating, increasing the chances the "brightness" willl be adequate. Using this scenario, if you need 9x9 then you would need 4 x 4051 and 1 x 4053. A partial schematic is attached. It only includes one LED chip and assumes you would understand how to use Enable of the 4051's and the other associate logic inputs.

    Fish
     
Loading...