Saturday, October 31, 2015

Physical Computing Projects

This semester, I am taking Introduction to Physical Computing (60-223). It has been a blast, and I have been able to work on some really cool projects. These are the first two. I'll post links to the final two projects later this year.

A Sensory So Long:

A Sensory So long consists of two conductive tubes which map position in space to position in a song. The each tube allows the viewer to play a different version of the classic "So Long, Farewell" song. For this project, I had to figure out how to use the conductive tube to determine position along the tube. Additionally, I got the arduino to communicate to Pure Data running on a laptop using the Firmata firmware.
http://courses.ideate.cmu.edu/physcomp/f15/60-223/one-in-one-out-a-sensory-so-long/

Explorers:

Explorers consists of two mobile robots that explore their environment and slowly learn to respect it. For this project, I designed, modeled, laser cut and assembled the enclosures for the Pololu 3pi robots that were the core of this project. 


Monday, January 19, 2015

The Alarm Clock is Done (mostly)!!!

Wow, it has been a while since I last posted.... So, last semester was pretty crazy and prevented me from working on any projects, but I had plenty of time over break to make stuff. My main accomplishment was the completion (I will get to why I said "mostly" in a bit) of my alarm clock. Unfortunately, I forgot about pictures until I was done, so this post will be a bit light on the pictures, but at least its something, right?

When I last showed you the alarm clock, I had just gotten it to display the time and hadn't thought of a way to make a menu. However, that was last summer when I did not have the coding skills that I have now (go 15-112!!). With my new-found programming skills, I created a menu system using Model View Controller which made things much simpler.
The RTC ready to be soldered

Once I got the code working, I had to build an Arduino on a breadboard, upload the boot loader, and then upload the sketch. With the help of some well timed resets to the chip, I finally got the code onto a breadboard Arduino.

After that, I started moving the components over to some perfboard to figure out how to lay them out. I then started to solder everything together. This is where I ran into a continuing problem (why it is "mostly" done): the Arduino sometimes spazzes when it is plugged in. If I cycle the power a couple of times it usually works, but this is not ideal. I think it is a bad solder joint, possibly around the crystal, but re-soldering the joints on the crystal didn't help. Here I also ran into a second problem: my nice RGB LCD screen died. While unfortunate, I was lucky in that I had a spare one color LCD that fit as well. The LCD isn't soldered in, so eventually I will replace it with a new RGB one.
The Arduino and LCD prepared

Once everything was soldered, I had to mount it in the enclosure I had picked. This involved a trip to the hardware store to attempt to find thin enough screws that were also long enough. The only ones I could find were brass screws, but I think they made the alarm clock look cooler, so no complaints about that.


The final features are:

  • The RTC and the Arduino's EEPROM allow the alarm clock to be unplugged without loosing any settings, alarms, or time on the clock. Everything is ready to go when you plug it in again.
  • The LCD back light can be adjusted to any color (if I had the RGB LCD). 
  • Using a power switch tail connected to an old audio jack, the clock can control a light to turn on before the alarm goes off.
  • The snooze length is adjustable
  • When the alarm goes off it can be snoozed by clicking the rotary encoder, but to completely turn it off, you must line up the cursor on the LCD with a moving target (to hopefully prevent the alarm from being turned off in a half awake state).
  • Alarms can be set to only go off on certain days.

    The final project

Saturday, October 4, 2014

Hack CMU: SnailEMail

Wow, it has been a while. Since I last posted I have started college at Carnegie Mellon University. There have been lots of awesome clubs and activities and classes that have been going on since I started, but today I wanted to talk about Hack CMU.

Hack CMU is CMU's internal hackathon. If you have never heard of a hackathon, today is your lucky day! Hackathons are events where teams work on a project (usually tech based) for 24-48 hours straight. They are crazy and awesome and sleep deprived. Hack CMU is a 24 hour beginner friendly hackathon put on every year by ACM (the Association for Computing Machinery). One of the great parts about Hack CMU is the fact that upperclassmen, grad students, and reps from tech companies are available to help mentor teams. This was very helpful for our team, because we needed a lot of help at times.

Front of the Mailbox
For this year's Hack CMU, I was on a team with 3 other freshmen (in total we had 3 CS majors and a physics major). Our project was SnailEMail, an automatic email notification for snail mail sent to our university mailboxes. At the end of the 24 hours, we had a working prototype and a website that could in theory accept subscriptions to our  service. I got to work mainly on the back end side of things, getting the email notifications to work. To sense the mail being placed in the mailbox, we used a PIR sensor (as well as a micro switch to determine if the door was open). These sensors then connected to a raspberry pi which interpreted the sensor input and sent emails to the owner of our "mailbox" (aka a very hacked together cardboard box).

Back of the Maibox
The hackathon was super fun. It was really fun going from idea to real thing in 24 hours (with lots of help from our mentors). Plus, we also won Google's prize (each of 5 companies chose a winner), which was a very pleasant surprise.

Hopefully, I get the chance to go to more hackathon's in the future. Also, I will hopefully have more to post here before another 2 months goes by....

Saturday, July 19, 2014

Alarm Clock: Current Progress

For a long time (longer than I would like to admit...), I have been working on an arduino alarm clock. However, I really want to finish it as soon as possible (preferably before I go off to college), so I have been making a push to finish it. This post will be about my earlier design as well as my current progress.

My first drawing for the alarm clock. There is a row of toggle
switches at the top, the control pad on the left, and assorted
encoders and potentiometers in the bottom right.
My original motivation was to make an alarm clock that would trigger the lamp next to my bed and make it easier to wake up. I planned to use an arduino for the main processor, a real time clock to keep track of the time even when the clock was unplugged, a 16x2 LCD screen for the display, and the power switch tail to control the light. Beyond that, my design was rather over complicated. I wanted the clock to look like a control panel. It would have buttons in a standard up/down/left/right/select configuration and each day would have a separate toggle switch to turn the alarm on or off. After thinking a lot about the menus and interface (and even getting some of the parts I would need), I realized I was getting hung up on the control panel look. It was making my design over complicated and bloated. So, I decided to redesign
the entire alarm clock.

The ipod nano box I am planning on using for an enclosure
My final design is fairly minimalist (if you ignore the fact that an arduino is being used for a simple alarm clock). I kept the basic components, but I ditched the toggle switches and buttons. Everything will now be controlled with a single rotary encoder with a push button built in. This allowed me to shrink the size of my enclosure as well. I now plan to house the alarm clock in an old ipod nano box (to make it fit I will have to build my own arduino from the free plans on the arduino website).

The current state of my alarm clock
Currently, I have all of the components bread boarded and working together. I have written some basic code as well. I can scroll through a list of strings (the beginnings of the menu) and also display the main screen with the time, date, light control (the L in the top left), and the link to the menu (the M in the top right). Eventually, I hope to have alarms stored in the arduino's flash memory, options for the time/date display, control of the LCD's RGB back light, and lots of nice options for the alarms. Currently, I am working on figuring out a menu system that is easy to traverse and display.

I will be posting more updates on this project as I make progress.

UPDATE: The wrong date and time is from the battery being unplugged from the RTC for a while last week.

Tuesday, July 15, 2014

Pencil Lead Case Flash Drive (Part 2)

We find the jump drive where we left it last: shaved down and ready for its new case. 
Once I had a the slots cut in the case and the drive shaved down, I needed a way to extend and retract the drive. While thinking about the design, I originally thought that I could put some sugru in the bottom of the case that would push the drive. It would be wrapped in wax paper to reduce friction, and I would insert some sort of tab into the sugru so it could be moved. The hardest part of this design was coming up with tabs of some sort that I could stick into the sugru that would also be flat on the top so that they could be easily moved. I eventually decided to make them out of metal strips that I would bend into a T-shape. After I began working on the metal pieces however, I realized that the sugru block was far too complicated and the problem could be solved with the tabs alone.

I made one metal tab for each side of the jump drive. One tab is pointed while the other is indented. This allows the two pieces to mesh easier when they are glued together. The metal pieces are actually just 1 cm x 3 cm pieces cut from an aluminum (or aluminium) ruler.  I also filed down the green anodizing from the ruler and added hatching with a hacksaw on the top of the tabs. Once folded into the T-shapes I glued the two pieces together through a slot cut in either side of the case. I also hot glued small pieces of zip ties to the joint between the two tabs to increase its strength. This contact point is between the tabs/zip ties is also reinforced with hot glue so that the drive can be pulled back in with the tabs (although this is not recommended). At some point I may have to replace the zip ties and the hot glue connections as they wear. However,
I am hoping that the metal tabs and the super glue joint between them stays strong for a long time. 

Friday, July 11, 2014

Pencil Lead Case Flash Drive (Part 1)


Last fall I got a flash drive from a college. Since it was free and I didn't really care for the case, I stripped it down to it's circuit board and used it that way for months (I even used it to install Debian on my new laptop, but that's for another post). At some point I realized it needed an actual case and started glancing looking around my basement for possibilities. After throwing around a few ideas (AA, candy/gum case, etc) I decided on the humble mechanical pencil lead case.

After thinking about how I would actually modify the case, I realized I would have to overcome two main problems:
  1. Fitting the wide jump drive in the case
  2. Making the drive slide in and out (I decided on this design because there was too much lost space in the case if the drive was always sticking out. Plus, that would be too easy :)) 
I would also have to make sure my solutions avoided unnecessary damage to the flash drive and the lead case.

Flash drive at the beginning of modifications (with only a bit shaved off):


In order to fit the drive in the case I first looked at how much I could shave from the circuit board edges. However, even shaving the board to the edge of the components would not be enough to make it fit. Thus, I had to shave out grooves in the case for the board.

Flash drive with the edges shaved off:

I originally thought I might be able to use heavy grit sand paper to cut the grooves. I glued a strip of sand paper around a zip tie and started sanding away on one case to see what happened. My perpetual overestimation of sand paper's ability to remove material combined with the fact that the heaviest sand paper I had was 320 grit quickly doomed this plan. Next I thought about using the file on my leatherman. It was long, straight, and better at removing material than the zip tie. it was even thin enough to produce channels that were only a bit thicker than the circuit board. I put masking tape on the sides of the file so that it would dig channels in the middle of the case. This seemed to be working quite well. Unfortunately, when I tried to fit the shaved drive into the case, it didn't it. The grooves were deeper near mouth of the case. In a last ditch effort (at this point I had already shaved the circuit board down) I grabbed a drill and started working down the sides of the case with a small bit. This worked surprising well considering the fact that it was probably not correct drill technique :/ . If I were to ever repeat this project, I would prefer to use a drill press and see if I could  cut away a half cylinder without having to misuse a drill.

The case with the grooves cut:


I will leave solving problem number two for another post. 

Tuesday, July 8, 2014

First Post! (Fanfare...?)

Hello! This is a blog where I will be going over projects I am working on / have completed. I want to get better at documenting the projects I am working on so that I (and others) can use the documentation when similar issues are encountered later. I also want to use this blog to keep track of non-project things I do so that I am better able to track what I accomplish and improve my productivity. I don't know how well I will be able to keep this blog going in the fall, but I will try. So, off on an adventure! (Oh, there will probably be lots of xkcd links as well, and the views expressed in the xkcd comics linked to from this blog do not necessarily express the views of the person mindlessly hitting small buttons on a black box to change the pattern of lights on a screen attached to the black box).