Monday, May 14, 2012

LED Matrices

       My first semester sophomore year I decided to buy an arduino microcontroller so I could play around with it and learn how to use it. In order to teach myself the basics of the arduino language and microcontroller I gave myself a project and started googling everything I could about it. I wanted to change the color of an RGB LED depending on the music coming out of my iPhone. I used an audio jack and its breakout board that I stole borrowed from 2.s994 (Electronics for Mechanical Engineers). I connected two of these audio jacks so I could listen to my iPhone's music while the arduino sensed it. Before I got my hands on an RGB led I tried to "make" my own RGB LED by sticking a blue, red, and green LED inside a ping pong ball. The ping pong ball would diffuse the different lights from the three LED's.  This way I could use PWM to display other colors besides red, green, and blue. Sadly, I don't think I have any pictures of this project since my computer was stolen when I went back home for Christmas break. It was stolen within the first three hours I got home :/ but that's a story for another day.

       Throughout that semester I kept nagging my curly-haired Salvadorean roommate Roberto Melendez to help me make an LED matrix. He's a meche but (unlike most meche's) he knows a lot about electrical engineering. The Sunday after the first week of classes I was really bored (I didn't want to start my homework) so I (once again) asked him to help me make an LED matrix. He must have been having a bad day because he yelled at me, "just do it yourself!" So I did. Thanks Roberto!

Ghetto-engineering ftw!
      The first thing I had to do was to find a suitable frame for the LED's. I was going to use cardboard at first but I decided it was too frail so instead, I got a hammer and broke open an old speaker we had in our room. I drilled twenty-five holes (mainly because something larger than a 5x5 would end up being way too much soldering) that had a slightly smaller diameter than the LED's diameter. The most time-consuming part of this project was soldering the LED's together. To do this I completely stripped off some 5'' jumper wires and connected the LEDs' cathodes in rows and the anodes in columns. This way I could control each LED independently. For example, if I wanted to light up the center LED I would supply 5 volts on the third cathode and ground the third row, thereby lighting up the (3,3) LED. Problems arose when I tried to light up the 3x3 central square without the center square. In other words, the (2,2), (2,3), (2,4), (3,2), (3,4), (4,2), (4,3), and (4,4) LED's.
Arduino Uno
       To bypass this problem I took advantage of the persistence of vision phenomenon. I used an arduino to light up one row at a time very quickly. It "waves" through the five columns so quickly that the human eye can't notice it and it appears to be one 5x5 image.

matrix displaying TDC
     Now that I had a working prototype I wanted to build something better. Mainly bigger and prettier. So the week before Science Extravaganza, a statewide educational outreach event that MAES hosts here at MIT, I decided to make a new LED matrix. The architecture lab had given the MAES exec-board temporary access to their laser cutters so that we could laser cut 200 "Aurora Domealis" for the middle-school students coming to Science Extavaganza. Credit for this LED boxes goes to Adrian Tanner; I made very minor changes to his design and added the eagle on the front.
Aurora Domealis
I'll probably write a post about Science Extravaganza later on, but the point of this was that I had one week left before I got my laser-cutter access taken away, so I HAD to taken advantage of this and laser cut something cool. I had also recently learned about t-bolt slots and how useful they are. Both Charles and Candace used them in their 2.007 robot designs, so I thought this would be a good use of the laser cutter.

laser cutted frame
First, I designed the LED matrix frame in solidWorks. I made the top have 64 holes that have diameters that are 1mm less than the LEDs' diameters. One of the sides have two holes so I can connect the arduino to my computer and/or a power supply without unscrewing the hole frame. I was going to add a mount and some holes to screw the arduino on the frame but my laser cutter access could be taken away any day so I decided not to. 

LED matrix soldered, time to start coding
 I learned several things from making the 5x5 prototype, but the biggest thing I learned was that I needed to figure out an easier way of soldering the LED's together. On the 5x5 I used stripped jumper wires and soldered all the rows close to the frame and all the columns in the air on top of the rows. Soldering the jumper wires in the air made it really annoying and it took me several hours to finish soldering everything together. That was 25 LED's connected directly to the jumper wires. There are two connections per LED which means I had to solder 50 connections. On the 8x8 I'm soldering a resistor to each LED so that means 3 connections per LED making a total of 192 connections. There was no way I was ever going to finish if I tried using jumper wires again to solder all of those LED's. Instead I bought copper tape online and then used electrical tape to insulate the intersections between the rows and the columns. Soldering all the connections still took a really long time but it is nowhere near what it would have taken me to solder all LED's using jumper wires.
Working on the matrix while drinking on the second deck of TDC
Hi Haley :)
Now that the frame was done I just needed to worry about coding the matrix. I couldn't use the same code I used for the 5x5 matrix because the arduino doesn't have enough pins to power every column and row. To get around this I needed shift registers. Perfect excuse to read and teach myself how to use this integrated circuits (IC's). I used two 74HC595 chips which, if connected in series, will take up three pins on the arduino, but allow me to control 16 LED's or in this case, 16 rows and columns of LED's. If you want to learn how to use shift registers I highly recommend that you read this tutorial on the Arduino website. Anyway, it's almost 7am and I should probably start studying for my finals....
It works!

Monday, May 7, 2012


This semester I decided to be a hipster 2.007 and opted out of the mainstream 2.007 robot competition. Instead, I enrolled in the Electric Vehicle (EV) section of 2.007. In this section, led by Charles GuanShane Colton, and Eli Davis, each student had to come up with an idea for an electric vehicle. Any electric vehicle, from a go-kart to an electric kid-tricycle. We would then get to design, machine, race, and keep our vehicles! Deciding what vehicle to make was a tough decision between practicality and novelty. But in the end, I decided I would make a scooter because it was something that I could actually use to commute across campus.
$40 A3 scooter from Amazon
The first item I bought was an actual scooter. To make my life easier, I decided to use the scooter's pole and folding mechanism. This meant I had to design and machine a new frame and fork for mine.

Noobishly printed the parts from solidworks
I then bought a large 1/4'' aluminum plate from McMaster-Carr (amazon prime for Meche's) which I used to machine the new fork for my scooter. My initial plan was to print out the shapes from SolidWorks and then trace them on the plate to accurately cut it with a bandsaw. Unfortunately, I somewhere in between the transition from SolidWorks to printer to paper, the ratio between the solidworks sheet and the physical sheet stopped being 1:1. So I ended up with a fork that was larger than I had originally accounted for. Fortunately, I realized this before drilling the holes and assembling the fork.
my decapitated scooter :(
With the drive train done and the fork assembled, I was around a third of the way done with my scooter. But I still had to figure out a way to attach the handle to the frame of the scooter, attach the latch and poly-carbonate cover, and finally, wire the whole thing together.
Playing the sensor game
 After finally finishing the mechanical frame, I got to the tedious and annoying find-the-correct-combination-of-wires game. There are 12 combinations: 6 from the three motor wires times 2 from the ABC sensor wires.
the latch works :D

Awesome pcb sensor mounts designed by Charles G.
Charles made our life way easier by designing and ordering some circuit boards that would hold the sensors and make it easier to slide them on the motor in order to find the right position for them. This is important because the position of the sensors will affect the amount the current the motor pulls from the controller.
Finally found the correct combination
 I got lucky and found the wire combination pretty quickly but I got stuck a really long while finding the right position for the sensors.

My scooter works!
WUUUUUUWWWWW!!!!! It works!!! Sadly, in an event that reminds me of Charles' reverse polarity battery connection before the 2.007 competition. As I was riding my scooter from N52 towards TDC I decided to go full throttle on Mass Ave and over the railroad tracks.... Needless to say, I flipped over and went flying around 15mph and fell on my left arm. A car, a bicycle, and several bystanders stopped to ask me if I was ok as I stood up, picked up my scooter and the broken fork from the ground and sadly carried my scooter back home :(

This occurred less than twelve hours before the EV Race :(

In memory of the obvious event, I christened my scooter, "RailScooter". :D

Yay! No broken bones.
Things I learned this semester:
  • Use a mill whenever you can! I had so many problems making a fork for my scooter because I would try to use my calipers to make aligning holes on two pieces and failed every time. The main problem was that I had band-sawed all the pieces for my fork so they were not exactly.. straight. This meant that measuring the proper positions for the holes was very difficult. Finally, I should have used more center point drill bits to make sure that I drilled the holes in the (already inaccurate measured) positions I had chosen.
  • Very important! Use at least THREE screws (on each side) in the plate that holds the shock absorber. Most of the torque caused by your weight and by going over bumps (and conveniently, railroad tracks) acts on this plate. The problem with screws is that their threads weaken the material and make it very susceptible to shearing. This is why in my new (very hastily built) fork, I made sure that the plate was sitting on the 1/4'' aluminum fork side AND then screwed together. This way the aluminum would have to break before the screws are sheared off. My new fork will probably be waterjetted since I've already made the design in solidworks. It will use t-bolt slots and be substantially prettier and sturdier than my current fork.
  • In retrospect, I should've done more research on the other scooters that other students had built because, honestly, I did not know what I was doing 80% of the time. Most of my time went into fixing slight misalignments and other errors I made. 

My injured wrist,  RailScooter, and me.

Friday, May 4, 2012

Personal Arc Reactor

It's 9am, I haven't slept, and I haven't started my 5 page paper due at 5pm... But I finished my Iron Man Arc Reactor!

Hello World!

Hi my name is Victor Rodriguez and I'm a sophomore at MIT. This semester I took 2.007 and I think the greatest lesson I learned from it is that I like to build things. Unlike most people, I don't know what I want to do with my life. I came to MIT solely on the basis that I like math. Which is also how I decided I wanted to be an engineer. However, once I got to MIT I realized I would have to narrow my interests down to one major. But after taking the GIR's I decided I wanted to be Course 2 or 6 (2 = Mechanical and 6 = Computer Science and Electrical Engineering). So as of now, I'm finding a compromise between the two majors. I'm Course 2a, which is Mechanical Engineering with a concentration in Computer Science.

tl;dr: I'm an MIT meche student who likes buildng things (and sometimes coding).