Showing posts with label 74hc165. Show all posts
Showing posts with label 74hc165. Show all posts

Saturday, March 29, 2014

More LED Matrix shenanigans!

It's been about two weeks since my last post.   It took a few nights to wire the sparkfun button pads, and a few more days for various parts, but "we have lift-off"!!   The wiring really got stupid, fortunately I had a ton of leftover cuttoff wire from 3d printers! I used some protoboard which connects to the button pads via header / connector, then i wired up R/G/B/Row/Button connectors.   This literally took me 3 sessions of 2-3 hours each.    be patient, tin EVERY wire and double check each joint!



After wiring it all up, I realized I didn't have anything to connect this to my breadboard!  So i ordered some pre-wired 8 pin connectors, and after a few hours of tinkering (mostly trying different wiring schemes mentioned in the code), I had a few blinky lights!













I'd originally encountered the "Demystifying the TLC5940" ebook and code which got me pretty close, but my row scanning setup was slightly different.   A little more googling lead me to nearly exactly what i needed!
https://github.com/jblang/tlc5940demystified

This guy is using a similar shift register setup to select rows.   He's using a shift register / transistor in one combo device.   I'm using 74HC164 which allows you to shift out w/out the use of a latch pin, and that powers TLC59213 to source the current for the LED's.     I ran the clock of the 164 to the clock of the 59213, adjusted some pins in the code and got what you see above!

Now, this is certainly progress, but its not entirely correct. First off, he's only using a Red/Green matrix, I need one more color!   From what I can tell, in his wiring, he's doing R-G-R-G, etc.   He's also only using 1 TLC5940.  On mine, I'm doing 1-TLC5940 for each color - RRRRRRRRRRRRRRRGGGGGGGGGGGGGGGBBBBBBBBBBBBBB..   I found getting this sorted was just a matter of changing some of the math that selects the pins.   A few more quick changes, and I had both his Plasma and Scoll functions working well!

I've made a fork of the above project on GitHub which can be found here:
https://github.com/billieblaze/tlc5940demystified

Next, I'll be adding some of the Adafruit GFX library functionality and integrating my button row scanning!

Wednesday, March 5, 2014

Arduino SuperUI interface board design alpha

The first module in my Ardmos (http://github.com/billieblaze/ardmos) will be a ui controller for both buttons / leds and my sparkfun RGB button pad.  It will use an atmega328p like the arduino uno and provide a serial interface for:
- up to 384 Mono LEDs **OR**  8x16 RGB LEDs
- 128 buttons multiplexed **OR**  8x16 button matrix
- Further expandable off-board

In a previous article, I showed how I used TLC5940 to control 16 LED's with 12bit PWM across them.   Delving deeper into the associated arduino library, I did some basic experiments with the row switching and updated my schematic accordingly.  

Rows will be scanned with a 595 Shift Register driving a TLC59213 "8-Bit Parallel In/Out Darlington Source Driver With Latch" (http://www.ti.com/product/tlc59213).  Looks simple enough, send in bits, latch, get up to 500ma out!  

I plan to use the row driver to scan the buttons as well, adding 2 x 74HC165 ties up the input side of things nicely.  

Overall, the 328p looks pretty full pin-wise but should offer plenty of power here.    Here's the initial schematic, any feedback on it is appreciated! Also, I REALLY need to learn to use the net / bus thing in eaglecad better!