Close

And I'll form the Head!

A project log for Interactive Color LED grid with IR touch sensing

My wife wanted some hardware to program with processing. I wanted to design some PCBs

engunneerengunneer 07/10/2016 at 01:050 Comments

(January 2016)

Progress! Each board was tested, debugged, repaired, and marked. I put together a new piece of test code that can handle multiple panels at a time, and started connecting the boards together.

I designed them to be joined together with solid wire along 3 bridges on each edge. These are also connected to the power planes, so acts as power distribution. Early in the design process, I thought I'd be clever and come up with a series or solder jumpers and traces going to all four edges to make all the signals be passed along. Certain combinations of settings in the Adafruit NeoMatrix library would have lent to solving some of the routing problems, but in the end it was just making work. I used some old ribbon cable strips to join the boards together instead.

I plan to 3D print connector pieces to hold them together at the corners, but for now, I'm using standoffs and being careful not to flex the assembly at the solder joints.

At this point, I have basic functionality using an Arduino. Erica also gave me a Processing script that generates some test patterns for the array, so I could start on getting the serial interface working (on both sides). I started with the easier part, which is getting color data from processing to the Arduino, which then feeds it into the NeoMatrix library. I settled with a relatively simple format of a 6 byte message (X, Y, R, G, B, [255]). I ensure on the processing side that any color that wants to use [255] actually sends [254] instead, so that [255] can be my end of message byte.

It became pretty clear that 115200 baud was not going to cut it long term. Assuming 10 bits per byte (which includes time for the stop bits, etc), that works out to 1920 pixel packets per second . At 225 pixels per frame, the max refresh rate is only 8.5fps. 230kbaud is also not out of the question, but 17fps is still pretty pokey. I did also consider a format where the colors are just streamed without coordinates, and using the stop byte of [255] to return to (0,0), which is another effective doubling of the data rate (3 bytes per pixel instead of 6). I felt keeping the coordinate in the message would be useful in the long term, and left open the possibility of creating a command structure.

The longer term solution is to increase the bandwidth, and a Teensy 3.0 that I had on hand seemed like it would fit the bill. Not only does it have more CPU speed, it also had a nifty side feature that the "serial port" it opens will always run at 12Mbps even if you only ask for 9600bps. That's 100x faster than the 115200baud on the Arduino.

Discussions