Log in

No account? Create an account
brad's life [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

breadboard UARTs. Help? [Nov. 25th, 2003|05:41 pm]
Brad Fitzpatrick
I want to build a grid of christmas lights for the roof of my house where I can control each light (pixel) independently, and do a big video wall type thing.

My dad proposed a grid with shift elements along two edges.

Somehow I need to interface to a serial/parallel port and send along a few commands:

Shift 1 left
Shift 0 left
Shift 1 up
Shift 0 up
Light on
Light off

And hell, as long as I'm being lazy and fitting the commands into a byte, got plenty of room for other commands... maybe dimming commands to vary the voltage and fade things in and out?

If my display is 14 feet by 10 feet tall, and I do one pixel per 3" square, that's a resolution of 56 x 40.... I just brought that up in gimp and it's plenty of space to work with to do cheesy christmas animations.

Okay, so to refresh the display it'd take 1 + 56 + 40 + 1 = 98 commands... off, program horizontal, program vertical, on. 98 bytes (lazy encoding) = 882 bits, or 992 bits with a serial port adding a stop bit in 8-N-1 mode. With a 57.6kbps serial line I could do 60 fps, but that's overkill.... I'd hit problems with the lights fading out too slowly.

So, the real question: how do I interface hardware with a serial line? Can I buy a UART chip with a simple interface? What I think I need is some chip that gives me 9 pins: 8 data bits, and a "new byte ready" pin.

Help? (I'm such a LiveJournal question whore.)

I found these MAX RS232 parts. Maybe what I need?

From: spider280
2003-11-25 05:51 pm (UTC)
up, up, down, down, left, right, left, right, b, a, b, a, START
(Reply) (Thread)
[User Picture]From: greg
2003-11-25 06:04 pm (UTC)

No answer for you but damn, 14 feet by 10 feet? You trying to make sure Santa finds your house?
(Reply) (Thread)
[User Picture]From: brad
2003-11-25 06:10 pm (UTC)
That might even be small.

I wanted to cover my roof, but my roof has no good rectangular sections, so I'll just have to pick some section and put it there.
(Reply) (Parent) (Thread)
[User Picture]From: hellarad
2003-11-25 06:06 pm (UTC)

lj question whore.

it's waaay better than being a lj cam whore.
(Reply) (Thread)
From: thp
2003-11-25 06:35 pm (UTC)
I've been trying to figure out the same problem (interfacing a circuit practically with the serial port, though my project is slightly less ambitious than the wall-o-lights) for some time. I found those parts too, but I've never been able to determine to my satisfaction whether or not those are exactly what I need, so I'm far too timid to buy any. I've pretty much settled on a fairly simple circuit diagram I found somewhere that reads off the serial port into a shift register somewhere, but it's saved on my desktop, which is in pieces in the other room. I'm hoping to get it all hooked up tomorrow or friday, in which case I'll toss the diagram your way and hope it helps.
(Reply) (Thread)
[User Picture]From: brad
2003-11-25 07:34 pm (UTC)
Cool, thanks!
(Reply) (Parent) (Thread)
[User Picture]From: mart
2003-11-25 06:54 pm (UTC)

Wow… cool project!

I wish I knew about electronics and hardware. I wouldn't know where to start with the stuff you're planning to do.

If you do get it dimming the pixels, maybe after Christmas is over an interesting project would be decoding video to it — in greyscale obviously — and using it as a hacky video wall…

In fact, if you could get that to work you could use regular video for the Christmas animations! :)

(Reply) (Thread)
[User Picture]From: krow
2003-11-25 07:07 pm (UTC)

parallel all the way

Parallel ports are easy to program. Serial on the other hand is an incredible pain in the ass.

Go with the parallel port :)
(Reply) (Thread)
[User Picture]From: brad
2003-11-25 07:35 pm (UTC)

Re: parallel all the way

I started to look into it but stopped after figuring serial might not be too bad. If my Mini-ITX has parallel I'll look into it more.
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: folkmote2
2003-11-25 07:10 pm (UTC)


Why do you feel the need to increase your electric bill and waste power?
(Reply) (Thread)
[User Picture]From: brad
2003-11-25 07:36 pm (UTC)

Re: Why?

Um, that's what people do at Christmas.

These are low voltage lights, anyway... won't be much power.
(Reply) (Parent) (Thread) (Expand)
(Deleted comment)
[User Picture]From: brad
2003-11-25 07:36 pm (UTC)
Just what I need: fat cleavage dithered down to 1 bit on my roof, for the whole neighborhood to see. :-)
(Reply) (Parent) (Thread)
(Deleted comment)
[User Picture]From: supersat
2003-11-25 07:29 pm (UTC)
The MAX232 series chips just convert from RS232 to TTL-level signals. They don't do any processing/buffering/etc.

Using a parallel port would probably be easiest.
(Reply) (Thread)
[User Picture]From: kagekonjou
2003-11-25 07:35 pm (UTC)
Agreed, parallel is a lot easier, plus you can find tutorials out the anus about how to do things with the parallel port (Google is your friend, Brad *nod*).

You ought to leave the lights up all year and have them say different things. Even better, once you learn how, program pixels of three lights (red/green/blue) to send messages (Ex. scrolling: "Bob, give me back my fucking lawn gnome"). Hell, you could even interface them with a whole home control unit ported into your computer so when you come home, it'll say beautifully, "Welcome home, Brad," or if attatched to an alarm system, scroll, "Fuck off, asshole, don't be touchin' my stash." Ooh, the ideas.

P.S.: Brad, I've officially determined you have no life. XD
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: supersat
2003-11-25 07:32 pm (UTC)
There are so many cool additions to this project you could do. For example, you could set up a restricted WiFi hotspot and allow people to access some web site that allowed them to control the display for a bit. Hell, you could even hook it up to a gameboy emulator or something, and let people control the game over WiFi. Using it as a visualization for christmas music playing outside would also be cool.
(Reply) (Thread)
[User Picture]From: brad
2003-11-25 07:37 pm (UTC)
I was going to just show snowflakes and elves and santa and sleighs most the time... and occasional "HO HO HO" messages, but then also bust into a stock ticker display sometimes as a joke.

The gameboy emu might also be nice. :-)
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: ch
2003-11-25 07:55 pm (UTC)
i'd recommend scanning the raster, just like a tv. it'll take less hardware.

do you want to drive standard 120V lights? if so, you'll need some scr's or triacs. if you run high-intensity LED's, FET's will do.

i'd probably use a Atmel AVR uP, but you could certainly do it off a pc on a parallel port with a shift register, a counter and some glue.


(Reply) (Thread)
[User Picture]From: way2tired
2003-11-25 08:44 pm (UTC)
Dude, you come up with some of the craziest, coolest ideas, but I'm so happy I'm not your neighbor.
(Reply) (Thread)
From: (Anonymous)
2003-11-25 08:55 pm (UTC)

use PIC chips

this guy (http://www.owenthegreat.com/computer/othermods/cpuloadledmeter/smli/) knows how to use a PIC microcontroller to interpret serial data and output to a LED array. You can write assembly to make bits addressable instead of the meter thing.
(Reply) (Thread)
[User Picture]From: edm
2003-11-26 12:33 am (UTC)
Possibly one of these:

Brown University Technology House Building Sized Tetris

Chaos Computer Club Blinkenlights display

Might help. Although in neither case have I been able to find a (direct) URL to anything on how they interfaced to it. If you're going with the serial route, however, you will need some sort of microcontroller/PIC/whatever to decode the commands and Do The Right Thing (tm) with the various lamp control lines. In addition to the line level converters (RS232 to TTL), UARTs (serial encoding/decoding), etc of course. AFAIK there's not COTS (== commercial off the shelf) part that you send it serial commands and it does all the rasterising, lamp control, etc for you -- although I guess it's not impossible someone makes one for a price. There are enough flip-the-pixels signs around after all.

Sounds like a fun "holiday" project though.

(Reply) (Thread)
[User Picture]From: atomic_seamonki
2003-11-26 06:44 am (UTC)
Only you, Brad. Only you. ;)
(Reply) (Thread)