Driving RGB matrix - Page 1
Forum section: electronics / projects

author: blueskull
author_rank: Unknown
timestamp: March 29, 2018, 08:33:37 am
content: This sounds like an easy task, but i real world, it proves to be a bit harder than it seems.The goal is to drive a 6*9 RGB matrix (totally 6*9*3=162 LEDs), but with a twist -- LED intensity can't change with regard to number of LEDs turned on in a scan line.The common way to do is to drive scan it in 9*18 format, but this won't work in my case.The blue LED requires 2.95V maximum forward voltage at 18mA, which is the intended peak current I would like to use (I need ~2mA average current per LED, so with x9 scanning, I need 18mA).For the worst case, if all 6 blue LEDs turn on at the same time, I'm looking at (3.3V-2.95V)/18mA/6=3.2R of equivalent dynamic resistance, let along the green and red channels, which will bring the total resistance down to ~1.5R (they have higher series resistance).The best MOSFET I can find that will fit my size requirement and gate charge requirement for driving without external gate driver has 600mR Rdson, therefore the voltage sagging on the MOSFET could be pretty severe, and that causes inter symbolic interference.Hence for this reason, I need a non-scanning way or a clever scanning mechanism to drive those things. Any ideas?I need PWM on all LEDs, so GPIO expanders won't work. Also, I need a fast scanning speed because I want the LED effect to be perfect even on camera.--------------------------------------------------------------One way I can think of is to go stupid and use an FPGA to individually drive all 162 pins, but that requires a 256-pin FPGA with days of routing.Another way I can think of is to scan add a current sensing resistor on each H or V line, then use a precisely timed scanning sample and hold circuit to monitor current then adjust PWM accordingly.Any comments or other ideas? Thanks.

author: Rerouter
author_rank: Super Contributor
timestamp: March 29, 2018, 08:58:37 am
content: Why is scanning out?rearrange it, if 9x18 is a problem, then before you skip to 162, what about 18x9, or 27x3, it is an easier problem to tackle than 162,now my approach to this would likely involve a boost led constant current driver with a PWM enable pin, and when less than the max LED's are on, turn it down to compensate the maximum current. or heck, set it the control current input with a crude R2R dac on 3 pins,

author: firehopper
author_rank: Frequent Contributor
timestamp: March 29, 2018, 01:22:18 pm
content: or get some neopixels and let them handle the driving part? apa102's are supposedly easier to drive, and faster. as for cameras some cameras have a rolling shutter effect and may not capture pwm'd led colors properly. just so your warned.

author: ajb
author_rank: Super Contributor
timestamp: March 29, 2018, 05:15:25 pm
content: Why not use a proper constant current driver to provide voltage sag immunity? Something like the TLC59401 would allow you to drive the array as 6x27 with two ICs, with per-column programmable constant current, PWM up to 12-bits on each column, and everything synchronized to an external clock. 27*18mA*600mR results in a 291mV drop across your row FET, which the TLC59401 will easily handle if you give it a bit of headroom.

author: BrianHG
author_rank: Super Contributor
timestamp: March 29, 2018, 06:01:18 pm
content: Using a 8 or 16 bit PIC, using a complete 8/16 bit port, I've driven 8 or 16 strings of WS2812 neopixels in parallel. IE 1 bit per string, rotating out 8/16 bits in parallel making a 16x speed driver. A simple tight assembly loop embedded in C code fills the strips lightning fast.I don't know the extent of the available bus/port sizes in PIC32s, but, you may be able to shift out up to 32 strings in parallel.Note that the neopixels are super bright and indoors, if you are creating a matrix display, without a diffusion/tinted screen in front, you will be driving them in the first 32-48 shades of 255...Filming neopixels is easy because each RGB LED has a high speed internal PWM driver instead of you scanning a cube directly with super high current pulses.I might cut out strips of 9 pixels and use a bottom end pic to parallel scan 6 rows. You should easily be able to achieve over 100 refreshes/sec (same speed for 16 pixels/string X 8 rows) like this with a simple 32 or 64mhz 8 bit PIC.If you don't need 100fps, then take a look here for 1 super long serial stream:http://www.14core.com/wiring-ws2812-8-bit-rgb-led-strip-with-arduino/Prefab modules:https://www.aliexpress.com/item/WS2812-LED-5050-RGB-8x8-LED-Matrix-for-Arduino-Brand-New-WS2812B-8-8-64-Bit/32671025605.html?spm=2114.10010108.1000014.8.483f3bdaJjllak&traffic_analysisId=recommend_3035_null_null_null&scm=1007.13338.98644.000000000000000&pvid=37d170ed-c421-436d-a71f-be466034e415&tpp=1