Coff-E Table


The school year is just around the corner so I wanted to make something cool for my suite. So here is the build of my interactive coffee table I call COFF-E (Pixar don’t hate me, I love Wall-E, that’s why I’m borrowing from your design).

First I actually assembled the table. Most of the wood came from a scenery from a show I worked on in high school. I save some of the nicer pieces of wood from the dumpster. The smaller pieces I found in my garage.


After cutting the pieces down to a size that worked, I screwed it all together. I am no perfectionist, so I didn’t care if everything fit together just right. It just needed to work enough. I found some spare screws and voila, we have a table.


I added a few coatings of a base color and then splatter painted it. It gave it a really cool look and not a lot of work. For the splatter paint I used some plastic forks so I could really fling the paint at the table (and apparently my hands). All of the paint I found around the house, so I still haven’t bought anything for this project.


Now onto the part I find especially interesting, the electronics. Warning: the following get’s a bit technical. Inside the table there are 40 LEDs. It’s set up in an 8 x 5 matrix. All of the cathodes are connected in each column, and each anode is connected in each row. My arduino doesn’t have 40 output pins, so using this method I can greatly reduce the required pins. The idea is the arduino only lights up one row at a time. In that row it lights up every column it’s programmed to, turns them off and goes to the next row. This process happens for every row. This process happens so fast that because of persistence of vision, it looks like all 40 of the LEDs are lit up at once.


So far we need at least 12 pins in order to light up these LEDs (the arduino uno only has 13 digital outputs). To free up more pins, I used a shift register on the columns (so now 3 digital pins can control 8 LED columns. 3 column control and 5 row control now leads me to only need 8 pins. I could add another shift register for the rows, but to keep parts and programming easy I decided I reduced the number of pins enough.


I plugged it into the Arduino and within minutes, I have all of the LEDs light up. There was a couple mistakes. Two solder blobs combined and so column 2 and 3 were working together. A little desoldering fixed that all up. Secondly, I originally used resistors on all of the columns of LEDs (which I originally did to protect the LEDs). This reduced the brightness greatly, and the LEDs don’t get overpowered by the Arduino without them, so I ended up bypassing them. (This step may have caused the slight dimming in third to last column, which became more and more dim as the table lived on).

Glowing dots is all cool, but I wanted them to look more like square pixels. To accomplish this I used some foam board I picked up from Dollar Tree and made a grid.



To further diffuse the LEDs, I added a little dot of hot glue to the top of every LED, and then cut apart grocery bags and put a layer of that plastic across them.


Without plastic bag diffusion

With plastic bag diffusion

With plastic bag diffusion

This method was okay, but since I was using the foam board as a diffuser for the top, I lost a considerable amount of light. I acquired some textured plastic from some scrap at a hardware store for free: score! The result is just what I was looking for.


I added the controls to the table on a hinging spot I added to the table. The controls are two potentiometers, a select button, and a reset button. I decided to leave the wires exposed because I thought it gave the table a cool look.


I wrote the code for the table from scratch. The basic idea behind the code is you send a two dimensional boolean array to the make() method and tell it how long to display it. Right now it has 6 modes. In the first mode it cycles through all of the LEDs (really good for trouble-shooting).


In the second mode it randomly lights up different LEDs.


Third is a predefined animation.


Fourth is super low resolution two player pong.


Fifth is etch-a-sketch mode.


Sixth is a spin the bottle mode. You can adjust the speed and press the button to stop at any time.


Lastly: here we have a short making of video


Improvements for next coffee table:

  • Definitely more LEDs. 16×8 Matrix for a total of 128 LEDs (thats 320% more LEDs)
  • Attempt to get more uniform illumination from LEDs
  • More games. Research into low graphic games. Possibly create new game
  • Secret compartment(s)



Digit Displays Using Shift Registers

As part of a larger project, I needed some 7-segmented digit displays.


I had some cheap ones lying around, and I forgot where I bought them. Thankfully, I found the data sheet here. Since running 16 lines from an Arduino would be quite wasteful, I designed them to be controlled by two shift registers. Here is the information I used to wire it all up. Shift register wiring can be found here.


Note that since I was soldering to the back, I flipped the pinout of the digit displays. One shift register controls each digit, and the first shift register passes information to the second.

For code I used the shiftOut function. That turns on the LED’s with a binary number, so it comes down to seeing which binary number creates what displayed number. I made a table to figure it out. So now all you have to do is send a number between 0 and 99 to the displayDigit function.



Pixel Strand Light Show

With all the snow we got last night I had plenty of time to write some code in peace. I just received my RGB LED strand with the WS2811 drivers built right in and I just had to play with them.


I gotta say, these LEDs with the drivers built in them are way cool. The circuitry and programming is way easier. And it’s very economic. I got this strand of 60 LEDs for $20 including shipping.


Circuity is dead simple. All the strand needs is 5V, Gnd, and Data. Since the strand isn’t too long, I just used the 5v from my arduino. If I had a longer strand or more strands I would have used a separate power source. IMG_3842

After I had some fun playing with the NeoPixel Library from adafruit making rainbows and such, I needed to take it to the next step: music controlled.

The circuit required for music control isn’t as simple, but it’s still not a heck of a lot when it comes to component count or cost.

  • 33 pF cap
  • 100 nF cap (2)
  • 10 nF cap
  • 200 K resistor
  • MSGEQ7 Chip


From there it’s all programming. I made a few different modes, and I currently have it so it cycles through all the modes. The code is here, free to download.

I won’t go into the specifics of the program , but the basics of the code is reading in the values of the MSGEQ7 chip in the readAudio() method and then using that data to create fancy blinking lights on the strand.

Videos of it in action are at the bottom. I apologize for the horrendous quality: I used that particular speaker since it didn’t need any amplification or additional circuitry, and who would have guessed phone camera’s aren’t particularly good at capturing blinking LEDs.  Guess you’ll have to build one yourself to see how it looks!

Christmas Puzzle Box

As a running gag within my family, I make my sister’s Christmas presents rather difficult to open. Usually this just consists of taping the entirety of the box in packing tape. Last year, my sister PJ did me one better, and wrapped twenty $1 bills, all in separate boxes. This year I thought I would get her back, with a box that has to be solved before it will open. And since I had a gy-521 chip lying around, hey why not?

IMG_3633 IMG_3631

The box is an old cigar box, loaded up with an Arduino, a servo, LEGOs, a few LEDs, and a gyroscope.


In order for the box to open, it must be rotated in a specific pattern

int puzzle[5][3] = {{0, 0, 90, },{90, 0, 0 }, {-90, 0, 0 }, {-180, 0, 0 }, {-180, 90, 0 }};

which is predefined by an array at the top of the program [complete program at bottom of post].

The build is very rough, as it is made for a one time use, and I didn’t really want to nail anything down or permanently alter anything.

First I focused on the code. I looked up the gy-521 and found some very helpful code here. It gave me a great starting point, as I would have no idea how to get data from the chip.


I created a method that takes the angular velocity and makes approximations of how the chip has been turned.

From there I created a puzzle. The puzzle has 5 “frames” or stages. The puzzle allows you up to 30 degrees of error on any particular frame, and tells you on which axis the box must be rotated.  Once you are within the frame, it tells you by blinking a green led, and then loads the next frame. Once all frames are complete, it turns on the green light indefinitely, and tells the servo to move to 90 degrees.

There is a challenge, as you only have a certain amount of time to pass any frame. If the time is exceeded, the green light blinks repeatedly, and you have to turn the box off and on again and start the whole puzzle over.


The hardware is all rather simple, and since I didn’t want to make anything permanent, I just stuck a mini breadboard in the box. Here is the pin layout


  • SDA to A4
  • SCL to A5
  • VCC to 5v
  • Gnd to Gnd


  • data to D9
  • pos to 5v
  • Gnd to Gnd


  • Green to D13
  • Blue to D4
  • White to D5
  • Red to D6



  • Red to VCC
  • GND to switch to GND

The only tricky part from there is making the angular motion of the servo control a lock. I used some LEGOs and a cup hook to get the job done fast and relatively easy. Wrap some wire to the servo and LEGO actuator arm and looky here we got a lock!



That’s about it. Here is the code!

Star Wars Picture Frame

My Secret Santa this year is a huge star wars fan. Since I already bought her something else, and I wanted to keep everything under budget, I decided to make this.


A Star Wars picture frame. Operation is simple: it works like a night light. When the photoresistor receives less light, the LEDs glow brighter. So it acts as a nightlight at night, and can be turned on by just covering up the photoresistor at any time.

This can be built quickly, cheaply, and I didn’t have to buy anything since I had this kind of stuff laying around.


  • Green LED
  • Blue LED
  • Resistors (values:
  • NPN Transistor (2N2222 was used)
  • 9V battery and holder
  • Picture frame
  • Drinking straw
  • Wire


  • Hot Glue Gun
  • Soldering Iron


Prototype the following circuit to make sure everything works.



I based the circuit on a basic not gate (pic for reference).


Now that the LEDs light up when you turn the lights around it off, it’s time to solder it all together.


Attach the circuit to the frame.


Wrap and give away. Merry Christmas 😀

Here’s a video of the build. As you can see, I was definitely riding the struggle bus. I didn’t have the right resistors on hand so I tried a bunch of equivalent resistor calculations and ended up giving up and stealing some from another lab. I also saw that the AA’s I was using were going to be too big for the back of a frame, so I went with a 9V. If I were to do the whole thing again I could probably do it in about in hour. You learn more from failures anyway, right?

Good Old Fashioned Mixtape


This is something I think my generation is missing: mixtapes made by friends. You can show friends new music, or show someone you care. Anyhow, my girlfriend and I are really big fans of Perks of Being a Flower, and in there Ponytale Derek gives a mixtape, so I thought I would make a modern version of this.

IMG_2026[1] IMG_2027[1]

Hardware for this one was pretty easy. Components include an old cassette tape and an old flash drive. Remove the flash drive from its housing. Measure it, and file away a spot for it on the cassette tape. Taking apart the cassette tape is easy, its just four screws located on each corner, and one screw in the middle. Just be careful, there’s a lot of little parts that you can accidentally lose and the cassette tape won’t look right upon reassembly.

Bonus points for adding a personal engraved message. I wrote it backwards on the inside so it looks nicer and feels smooth on the outside.


As for making an actual mixtape, I used Audacity and imported some of my favorite songs and recorded some commentary from me. And since a flash drive (mine was a 4gb) can hold a lot more than a cassette tape, I included the original audio files, some pictures, and a movie.