Help with the consept and electronics

Hello there,
I'm not yet an owner of arduino (Although planning on buying Arduino Mega). I myself am not an electrician - more of a programmer/artist. I'm trying to make a light curtain made of leds. It's made of strings that has 8 leds on each (wraped in ping-pong balls). One curtain consists of 8x16 leds and there is 16 doors (14 on the sides and 2 in the front and back). What I want to achieve is continuous animation/pattern playing through all of the curtains, making a flowing effect (leds working as pixels of the screen).
Here's a simple illustration of one door:

I figure I'd need to use Arduino Mega (cause it has more pins) and some Led drivers (if the term is right). What I'm asking is - is this possible, and what do I need (what do you recommend).

Right now I'm about to buy the 2048 leds needed, same amount of ping-pong balls, Arduino MEGA board, and some stuff wor wiring. But there my knowledge ends :slight_smile:
I'm good at programming, but as I told before, I'm bad in electronics, so if you can give me some pointers, I'd be very grateful.

Do you need to control the brightness of each LED? If so it makes it more complex. You need in effect 14 of 16 by 8 matrices. That makes conventional matrix multiplexing not very practical.

This is a very big project and you will need hands on help on the ground not just over the net.

I would recommend that you look into having one mega controlling just one door and synchronising the change in patterns by sending a common clock pulse to the arduinos.

What sort of frame rate do you need? Also the length (number of frames) will be limited by the arduino's memory. If it is just 1 bit per LED (just on or off) then you will require 256 bytes of storage for each frame, a frame defining every door. If you have these playing at say 5 per second and you have them stored in flash, assuming you leave 28K for all coding this leaves you with 100K to store frames in. That means about 80 seconds of animation.
However that drops dramatically if you want brightness control.

What are your time scales for this? You need to start learning fast.

I would definitely go read up on shift registers.

There might be others here who have more experience with large cascades of shift registers. In theory, one output per door, and you just keep adding shift registers for each strand of LEDs. So, sixteen 8-bit shift registers per door or better yet try the STP16C596 which has sixteen outputs and doesn't need current limiting resistors.

Read the tutorial, sketch out an idea, then come back with some more specific questions.

Hey, thanks for fast response.
The deadline would be the new year of 2010/2011 (so I have a year).
About the animation - I was thinkig of streaming it straight from PC to Arduino - that's why I want it all be controlled by one chip. Each curtain can be autonomous system that is controlled by arduino (maybe some other cheap microcontrollers?) It would be great if I could use the dimming of each LED, but the bitmap solution could work too (dimmed would look smoother though :stuck_out_tongue: ). The budget for this project is around 1000 Euros.

The idea behind is that this should work as screen/curtains, and when you're in the corridor you can see this big flow of images going around. First thought was to use RGB LEDs, but then I saw their cost and my fantasies had to be cropped :smiley:

I created this thread to find out the possibilities, and to consult before buying stuff :slight_smile:

Your major problem as I see it (although you have lots) will be how to wire up all those LEDs to a single arduino. There is a lot of wire involved and normal logic signals don't travel well over 2 or 3 meters. Streaming images from a PC is quite tricky because that is a lot of data you need to transfer and if you are multiplexing too you just won't have the bandwidth.
The time scale is reasonable but your budget is a bit small. I would recommend that you start off by making a small fixed matrix so that you get the hang of both programming and construction. Have you seen monomes? These are a matrix with a switch and light.
My own project:- Econo Monome
Might be a good starting point but there are plenty of others, look at http://monome.org/ as a jumping off point.
Most of these use a scanning multiplex way of lighting the LEDs. I think ultimately you will have to opt for something a bit more hardware intensive like an off board multiplexer something like the MAX7219 although these are pricey they will keep the bulk of the wiring close to the individual sheets.
As I say you problem might then be connecting them together from only one controller.

I wonder how the big LED screens work? They have a resolution of 320x240, four leds (Red, green, blue and white) for each pixel, that makes 307200 LEDs. If arduino would only work as streaming data station, would it be enough bandwith? Say, each curtain has its own separate microcontroller with two Led drivers (8x8 x 2) then I could only send the data from main arduino board to each of the curtains via "shifting registers", and they would do the led lighting by themselves?
As for the brightness control - I don't need it to be full range of 256, 5 brightness ranges would be more than enough, so that would make one pixel need 3 bytes.

I wonder how the big LED screens work?

They have dedicated hardware multiplexing and a much more powerful processor then the little Arduino.

one pixel need 3 bytes.

I think you mean three bits. That does not fill in well with 8 bits in a byte, but then nothing in colour does. With 3 bits you would have 8 levels of brightness.
Making stuff fit multiples of 8 maximises the efficiency. So for colour three bits red, three green and two blue is the better bet as the eye is slightly less sensitive to blue and there is less blue in real images.

each curtain has its own separate microcontroller

I think that is the way I would try and design it. There are still problems with linking them together but I think it is much more manageable like this and the problems are more easily overcome.

As an aside, given your name and slogan have you seen my 3D photographic site?
http://www.thebox.myzen.co.uk/Steroscopic_Site/Welcome.html

[Offtopic]
Nice website, Grumpy_Mike, although I have to point out one mistake - your split images (stereopairs) are showed in wrong order (left image should be on the right).

Original:

Edited copy:

Same with other two split images :slight_smile:
[/Offtopic]

I won't be doing color as it would cost too much, so I can stay with 3 bits per led (8 brightness levels)... In that case one curtain frame (8*16) would need 384 bits (48 bytes), and for all 16 of them I'd need to send 768 bytes per frame. I wonder what the optimal framerate would be? I need to came up with some theoretical model for it so I'd know what tools/electronic parts I need to buy. Ofcoiurse for starters I'll be making only one curtain, but from the beginning I need it to have option to be extendable with other curtains :slight_smile:

EDIT: Also it was mentioned before that logic signals doesn't work too well in longer distances. Maybe I could use simple LED matrices and connect the End Glow Fibers to transfer the lights to the ping-pong balls? Has anyone tried doing anything with optic fibers? If they transfer enough light, this whole thing would become much more easier (I think)...

(left image should be on the right).

That is only if you are viewing with the cross eyed method. These are designed to be viewed by the parallel method using viewing aids like this http://www.3dstereo.com/viewmaster/amz-crd.html either on the screen or printed out. My software, on the site, allows you to choose which order you print them in.

Anyway the problem with fibre optics is that the light is very much concentrated and it is difficult to diffuse, you would probably need something else in the ping pong ball.

It's not so much the signals to light LEDs that don't travel but the ones that need to be received by chips at the far end. So if you distribute the frame information between arduinos then you would use a voltage driver like a RS232 or better yet and RS485.

I wonder what the optimal framerate would be?

I would have thought as fast as you can get it, anything over 18 frames a second will look like continuous movement, over 32 and it stops looking flickery. However, if you use the MAX7219 there is no provision for altering the brightness of individual LEDs and the project gets much bigger again. The TLC5940 will give you 16 brightness controllable LEDs, and you can multiplex them like in my mini monome. I wouldn't recommend multiplexing them any thing bigger than four times but that means you could have two to control your curtain. The hardware is capable of 4096 brightness levels but there is no need to use all those. For 3 bits just use the 3 most significant bits in the brightness field.

Looked for TLC5940 in my local shops and that's what I've got Lemona. Any idea which one should I choose?

For now I'll order the Arduino Mega and a starter kit with bread proto board and make some tests. Will try making at least one curtain working, hopefully by the time I'm done I'll have an idea of how to make more of them working :slight_smile:

If you'll have any ideas or comments on this matter, please share in this thread :slight_smile:

EDIT: http://www.robot-italy.com/product_info.php?cPath=59_62&products_id=1232
This is meant for controlling LCD's, maybe it could work for screen made out of leds too?

The different versions of this chip are in different types of packages. Most are surface mount versions but the NTG4 variant is the through hole version. That's the one you want.

There are huge differences between LCD drivers and LED drivers. Basically LCD requires a complex sequence of voltages between the segments and the back plane, these normally involve voltages at at least 4 voltage levels, that is it's not just a logical signal. Also LDCs require virtually no current to drive them where as LEDs require a simple on off voltage with the capability of a reasonably high current drive.

This chip is an 8X8 matrix driver that might do. I have not studied the data sheet yet but have a look: http://uk.farnell.com/maxim-integrated-products/max6961ath/ic-led-driver-4-wire-8x8-matrix/dp/1552884

While waiting for my Seeeduino Mega I'm doing some research and learning :slight_smile: While going through the web I stumbled across this driver: GM6486 - HTTP 301 This page has been moved
if it can run 33 leds at a time, then using multiplex I'd need 3 of those to control 64x32? And it can use separate power supply. And then again, since it'd go blinking each led separately, it would lose brightness...

Grumpy_Mike, your suggested max6961 looks promising. To tell the truth, I think the max6960 would be even cooler - I could drive one 8x16 curtain with one driver. The brightness would be only 2 bits, but I think it's more than enough :slight_smile:

I made something kind of like this with some RGB LED modules I make and sell. However they are probably way outside your budget. Actually it looks like about 7 times your budget, for three times the amount of LEDs.

I do have a different idea though....

Use something like the TLC5940. You would need 128 of them, comes out to about $340. This will give you 2048 channels of 12-bit brightness control.

Now, each string is made from a piece of 10-conductor ribbon cable. To make each pixel, you use a 2x5 IDC connector and crimp it at the correct location. Then you plug the LED into the correct pin and positive voltage. This will let you control individual LEDs down the chain. At the top of the chain, you attach two ribbons to each TLC5940. You'll definitely need more than one microcontroller to run all of those TLC5940 chips, I'd figure one per door.

It's probably going to be impossible to get the system you want for the budget you stated, but you might be able to get close...only two or three times your budget.

Good idea macegr, I did say the budget was tight at the start.
I have had a look at the GM6486 data sheet, it looks OK but only gives you on / off control, and there is no built in multiplexing.

The other concern is how available is it. Non of my stockiest carry it and there isn't a company name on the data sheet (never a good sign as this sort of implies it is ripped off). It appearers to be from HYUNDAI who are respectable enough. But what is the price of this chip?

I had a chat with few people and one of them suggested using FPGA. He told that it would be possible to drive twice as many leds with better transfer rates. Every two curtains would be controlled by one microcontroller, and all 16 microcontrollers would be simultaneously controlled by the FPGA. He even told that FPGA could manipulate graphics in real time on the flow.

Don't know how much of it is true, anyone have any experience with it?

There's a demo driver for 64x32 bi-color led displays
LINK: http://www.sureelectronics.net/goods.php?id=676
User manual: http://www.sure-electronics.net/download/down.php?name=DE-DD103_Ver1.0_EN.pdf

I wonder if that can be ported to arduino?