Chris Lloyd

MAS.863/4.140/6.943
How To Make (almost) Anything
2019

output devices

This week, I decided to make an LED array that I can use to light my final project. Charlieplexing is a method of creating a display with relatively few microcontroller pins. Essentially we want to take advantage of every possible combination of your limited pins being on/off. I got some help from Harrison Allen on how to map out the LEDs, which is pretty straight forward. I chose to do 12 LEDs using 4 pins, which is demonstrated below.

To organize the cluster f$*% of the charlieplex, I used the name feature in my Eagle schematic. It was pretty easy to line up the pins and LEDs. I modified Neil's hello.array board to model my board.

I was interested in creating a circular array for my project, which could be used to diffuse light. I also was interested in potentially creating a clock with the 12 LEDs. Eagle has a nice feature in the board tool to make this arrangement.

Tools > Element Array Placement > Circular Array [Tab]

The Element Array Placement tool allows you to choose the number of elements, the radius of the circular placement, as well as the angle of rotation of the element (in my case, I wanted them all be pointed towards the center of the circle.

Next, it was time to create a board. It turns out that creating a one-sided charlieplex board is quite challenging to do without 0 ohm step overs. I ended up having to use one resistor to step over.

Here are the resulting trace and outline. As I mentioned, I wanted to be able to have a ring of light and house the rest of the components outside of the ring.

Next, I was time to mill my board, which was quite large. It took up almost the entire surface area of a 4x5 inch board. This is not an efficient use of material, but I was able to save the octagon in the center for the array ring re-use.

The components for the board included are pictured below. The board needs a 5v resistor because it will be powered by batter.

No it was time to upload code the board!

Hello.array.c

hello.array.44.make

I used the following commands

lsusb

(to ensure it was connected)

sudo make -f hello.array.44.make

(to create the hex code)

Sudo make -f hello.array.44.make program-ice

(I used program-ice because the architecture shop uses AVRdude uploader. If you are using a different uploader, look at the makefile to see which command to use).

At first, it was a little funky, and then I realized my pins were one off from Neil’s template code. So I re-coded the hello.array.c file to have the right pins… and it worked!!!

There is one LED that seems to be having issues, I will try to re-solder to see if that helps. I also plan to do more updates to the code to try different array movements. Overall, I wish I had put more lights for each array to make it a bit brighter. I could have stacked multiple LEDs for each arrangement. Next time!