Beagle Board + Arduino + TLC5940

Hello,

I'm just wondering if the Beagle Board can be used (easily) with the
Arduino that's controlling about 16 TLC5940 chips. The TLC5940 chips
control 16 LEDs each, so that's a total of 256 LEDs and each pin can
have a greyscale value of 0 - 4096, so that it's taking up a lot of
memory per frame of animation. The Arduino only has 32 Kb Flash and 2
Kb SRAM so we're not able to get any interesting light shows out of it
at the moment even with optimizing the way we store the frame states
(after all there's no real difference between 4095 and 4000 in
brightness).

At the moment I'm looking into the possibility of feeding the Arduino
each frame, or a few frames at a time. And leave the processing and
storing of the patterns to the Beagle Board. I also need the ability
to read in analog values from sliding potentiometers (for the speed
for the animations etc.) One scenario is that the Arduino handles the
inputs as well as the outputs to the TLC chips. Arduino -> Beagle
Board -> Arduino -> TLCs

Another is that the Arduino to handle inputs that is then sent to the
Beagle Board. I use level converters to run the patterns directly from
the Beagle Board to the daisy chained TLC chips. I would need to write
myself a new TLC library for the Beagle Board though. Arduino ->
Beagle Board -> TLCs

My experience with Linux is very limited, to say the least. I don't
have the faintest idea how I'd interface the Beagle Board and Arduino
(there are quite a number of choices for OS to run on the
BeagleBoard!) But I am willing to learn and I've heard great things
about the Beagle Board community. Though, my main question is: Are
either of my BB + Arduino + TLC ideas feasible? Is there a better way
to do it.

Thanks,

Nay

Links:
Arduino and TLCs: http://www.arduino.cc/playground/Learning/TLC5940
TLC5940 Datasheet: http://focus.ti.com/lit/ds/symlink/tlc5940.pdf

Nay,

I'm working on something very similar, only with a Linux router rather
than the Beagleboard.

The way I communicate with the Arduino is over a serial port. I'm
pretty sure the Beagleboard would have such a facility; you may need a
TTL converter though because the ATMega chip (168 or 328) on the
Arduino use 3.3v TTL rather than a typical 5v TTL that might come from
a computer over USB or embedded ones such as Beagleboard. The Arduino
can receive these 5v TTL messages FROM the computer correctly, but
would need a TTL converter in between to send TO the computer in its
5v TTL.

So you'd need some conversion to read potentiometer values or whatnot
from the Arduino via serial, which is what I'd recommend for what
you're looking for. Likewise, you could send commands to the Arduino
over serial too.

Just do `echo "serial-command" > /dev/ttyS0` or whatever serial port
might be on the Beagleboard or other Linux computer.

http://www.arduino.cc/en/Serial/Begin here is some more info regarding
serial communication via the Arduino.

-Nemanja

I'm with what nemanja said about using a serial interface from the
Beagleboard to the Arduino. I know the Arduino, with the serial-to-USB
( ftd??) cable works because I use that to develop Arduino on a Ubuntu
Linux based laptop. One option might be as you mentioned, having the
Arduino taking frame information over serial and displaying it but you
could also use the Arduino for inputs from your POTs and send that
back up to the Beagleboard to change the frame rates or patterns.

I know python works on Beagleboard with the Ubuntu installation but
you should figure out what language you want to write your code in and
start with that. Once you know you can get that on the Beagleboard, go
ahead and develop you driving code on a PC running full GUI based
Linux before moving it to the Beagle. It's often easier working off a
full desktop with version control, IDE, etc and then move to the
embedded platform.

I think the first test should be to see you can get enough data over
the RS232 port to the Arduino to be able to offload all command and
control and still get a good frame rate.

Doug

I'm with what nemanja said about using a serial interface from the
Beagleboard to the Arduino. I know the Arduino, with the serial-to-USB
( ftd??) cable works because I use that to develop Arduino on a Ubuntu
Linux based laptop. One option might be as you mentioned, having the
Arduino taking frame information over serial and displaying it but you
could also use the Arduino for inputs from your POTs and send that
back up to the Beagleboard to change the frame rates or patterns.

I know python works on Beagleboard with the Ubuntu installation but
you should figure out what language you want to write your code in and
start with that. Once you know you can get that on the Beagleboard, go
ahead and develop you driving code on a PC running full GUI based
Linux before moving it to the Beagle. It's often easier working off a
full desktop with version control, IDE, etc and then move to the
embedded platform.

'git' and other version control tools run rather well on the
BeagleBoard. Has anyone tried running Eclipse?

No doubt git, svn, and rcs all would work just fine on the BB but the
OP was talking about a headless embedded use of the BB.

As far as Eclipse goes, I sure hope nobody tries this. The BB vBx has
only 128MB of RAM and the Cx has 256MB of RAM and from what I've run
across regarding running Eclipse, you're pushing the lower limit at
512MB and a 1GB desktopPC is more like it. It's what you might call a
very feature "rich" IDE and too resource intensive to run on the BB
comfortably, if at all. Something like Idle would work but do they
really want to do and keep everything on the BB just to do some serial
port development? It's Linux, enjoy the resources of the desktop and
do the final tests on the BB. It's easy enough to remove the SD card,
move an executable or script to it and then test it. Me, I'd use the
Ubuntu build instructions and specify "--seed openssh-server,python-
serial" and either do dev in vi on the BB over ssh or do it on the
desktop and scp the files over for testing. Remember, it's headless.

Doug

Works pretty well… I’ve tried doing lots of stuff on the BB… I’ve even compiled the linux kernel natively on the Beagle… no worries…! The only thing I had a real problem with was compiling Firefox’s XULrunner component… It’s final link step needs about 1Gb of RAM which failed several times until I went mad on giving it enough swap… it worked, but it took about 10 hours… :frowning: