Coff-E Table

Coff-E

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.

IMG_2541IMG_2546

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.

IMG_2548IMG_2562

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.

IMG_2596IMG_2602IMG_2608IMG_2614IMG_2617

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.

IMG_2569

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.

IMG_2577IMG_2578

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.

IMG_2560IMG_2561

IMG_2586

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.

IMG_2588

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.

IMG_4908

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.

IMG_4907IMG_4906

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).

komedi_1396928389550_816

In the second mode it randomly lights up different LEDs.

randomlighttest

Third is a predefined animation.

animation

Fourth is super low resolution two player pong.

pong

Fifth is etch-a-sketch mode.

etch-a-sketch

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

spin

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)

 

Advertisements

Digit Displays Using Shift Registers

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

IMG_3936

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.

IMG_3933IMG_3934IMG_3935

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.

IMG_3937

ledcounter

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.

IMG_3839IMG_3860[1]

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.

IMG_3846

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

IMG_3843IMG_3844IMG_3845

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!

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.

IMG_3511IMG_3512

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.

Parts:

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

Tools:

  • Hot Glue Gun
  • Soldering Iron

Build:

Prototype the following circuit to make sure everything works.

IMG_3510

IMG_3504

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

20131206-095935.jpg

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

IMG_3506IMG_3507

Attach the circuit to the frame.

IMG_3513

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?

Tina’s Sign

My sister Tina’s birthday is in a couple days so I thought I would make something for her.

IMG_2129

It’s pretty simple, just a sign made of cardboard, duct tape, hot glue, and LEDs.

IMG_2112 IMG_2113 IMG_2114

I cut out a piece of cardboard (it’s weird cardboard, almost wood. I forget the name for it), and wrote my sisters name backwards (since this is the back, and I want it to be forwards on the front!)

IMG_2116 IMG_2117 IMG_2118

Then I drilled two holes for place I wanted an LED.

IMG_2119 IMG_2120

Covered the front in decorative duct tape. She likes pink and I thought the checkerboard design would give it some flair.

IMG_2121 IMG_2122

I re-poked the wholes with what I like to call pointy thing (it’s actually a soldering assist tool).

IMG_2124IMG_2125

I then placed the LED leads in their respective wholes and bent the LEDs 90 degrees so they face each-other.

IMG_2126

Then I actually soldered the LEDs together. I decided to power the device from four AA’s (since I had a 4 AA holder sitting around). Since that is 6V, and each LED needs about 3 volts, I wired two LEDs in series (whichever LEDs were facing each other) and then wired all of those sets of two in parallel. Here’s a video of me doing all of the soldering and gluing (and yes, I do move that fast in real life).

As for the method where I use hot glue to, here’s a video of me doing part of the T.

IMG_2128

Finally I added the battery holder and a slide switched and glued it all on there. Looks pretty neat in the dark. Hope she likes it!

IMG_2130

Recycled Electronics Flower

I have a lot of old and now useless electronics. It seems sad that all of this stuff just ends up in a landfill. So recently I took apart a few things and found pretty parts.

IMG_2020[1] IMG_2021[1]

The outer rings are from in between hard drive disks, superglued together. The ring just inner of that is part of the stepper motor that spins the disk. The innermost ring is what I believe to be a filter from an old printer power supply. The stem is a thick wire I had sitting around, and the colorful wires around that are from an Ethernet cable.

IMG_2022[1]

Then to make it really pretty I added some color changing LEDs. They are just hot-glued in, but that seems to hold them well. These are really great because they don’t require any microcontroller, just apply 3V and they change colors. The large solid wire I used for ground, and the spiraling green wire I used for 3+ volts. Right now I’m just using a battery, but I’m hoping to make it work off of old solar cells from broken outdoor solar lights.

flowerLED