Saturday, December 19, 2009


To celebrate the end of finals and the end of fall semester, I felt like a quick and easy electronics project was in order. The Drawdio delivered. It took about five minutes to assemble the easy-to-find parts, and the result promises to amuse me for hours, at the least.

I prototyped it on a breadboard and will fit it onto a pencil tomorrow. I used the Adafruit design but without buying the PCB or the kit, these are not necessary. Radioshack and a Veroboard/Stripboard will do just fine.

Again, everything you need to know about the Drawdio is explained here.

And yes, I am the kind of person who, when first introduced to the theremin, thought it was the coolest thing ever and dreamed of getting one and playing the Legend Of Zelda theme on it. Ergo, I love the Drawdio, and I will soon be trying to draw a keyboard with the right resistivity between the points so I can play music on an instrument I drew on paper. TOTALLY AWESOME

Now that I have tons of time, I think I'll be getting back to the rest of that Pacman assignment from last post.

Wednesday, December 2, 2009


Been a bit busy (and lazy) recently...

Winter break is almost here and as soon as finals are over DIY gift-making will follow.

For now though I've been trying to pick up the introductory topics of AI. With some help and a borrowed copy of Artificial Intelligence: A Modern Approach I'm getting started. The project files are part of an assignment from a course whose resources I got access to.

The project is Pacman. The first problem is to help Pacman find the single food dot. The highlighted paths indicated nodes explored by the AI. The nodes that are most red are the nodes explored earliest. Once a path to the goal state is found, Pacman begins to move, and moves only along that path.

Depth First Search: Pacman searches along one path until he reaches a dead end before going down a branching path. Uses the Stack data structure (LIFO: last in, first out).

Breadth First Search: Pacman searches in layers--first he looks at nodes one step away from his starting position, then at nodes two steps away, and so on. This uses the Queue data structure (FIFO: first in, first out).

I have to take a break from this to study for finals, but there's a lot more of the assignment to complete, involving mazes where Pacman must avoid the ghosts, find all the food dots in a maze, so on...

Happy holidays! Those are coming up, aren't they...

Saturday, October 10, 2009

FingerPaint: Thought Process

This is one of the first real drawings I made with the FingerPaint application I'm working on. After some practice, I can draw rather comfortably with it. I'm definitely not able to use my trackpad or mouse this well.

I've recently ditched post-its and switched to spherical clay balls mounted on the end of pencils. This allows the user to use rotation of the wrist which is more precise than movement from the shoulder.

This means that FingerPaint is now more of a pen and tablet without the tablet.

Saturday, October 3, 2009

Long time no post

Hey guys, this is one of those long time no post entries.

In the works:
-Swervy Jr. Jr, aka Minty (he smells good because of mint flavored floss holding his axle to his body)
-FingerPaint, an OpenCV application that allows you to draw (MS Paint style) by taping a neon post-it to your finger and moving it around in front of the webcam.

Here's a photo of my desk, with the guts of the solar engine and of Minty strewn across it.

Minty has just been outfitted with two US Digital 250 quadrature encoders (one for each powered wheel). They were a pain to mount but I'm glad to have finally used them for something.

Thursday, July 16, 2009

Automatic Dark Detecting Joule Thief Nighlight

I was shopping at Wacko's for toys to fit electronics into, and the Munny was pretty much the only thing I found that was big enough, hollow enough, cheap enough, and made of vinyl (pliable enough). For about $10 it made an affordable and fashionable chassis for this project.

After decorating it with various electronic components, I set to work on the insides.

Part 1: The dark detecting circuit. I found these schematics on Watson's Blog, but since I couldn't find the mosfet required for Watson's modified circuit, I used the EvilMadScientist original circuit. I added one more LED in parallel (total 2). I also replaced the 1kohm resistor for two resistors totaling ~30kohm, which decreased the sensitivity. A note: this also seemed to dull the maximum brightness the LEDs can attain, but at 30kohm they still shine pretty bright.

Part 2: The Supercharged Joule Thief. I used my favorite schematic (Fig. 2, w/o the button cell) also from Watson's Blog for this one.

Part 3: putting it together (EDIT): I just kind of mashed the two circuits together. It was guesswork, and while it worked, I'm pretty sure it didn't work well. Mainly, I was hoping to find a design that would be very efficient so that I could leave it on all the time, and in this sense it did not work at all (the battery only lasted a few days). So I guess just have to read my physics book, do some calculations, and redesign...

I had planned to do this with the standard AA battery, but the holder wasn't going to fit in the doll very nicely. So I swapped that for an AAA battery, which works just fine as well. I improvised my own holder by cutting a piece of tube from the center of a CD holder (the kind blank CDs come on, when you buy them in gigantic packs at costco). I improved terminals at the top and bottom with aluminum foil, and then stuck the whole tube into Munny's lower torso (his head pops on and off for easy battery replacement). I'm not entirely happy with it, but it is easy to replace and if I ever find a thin single AAA battery holder, I will swap it in.

Result: in daylight (even indoors, with closed shutters) the light is off. And at night:

Thursday, July 9, 2009


I'm still enamored with the Joule thief idea, but more importantly, I have a goal: to get the most out of this bucket of old batteries (pictured below) before the batteries start to leak (or before I amass any more of them).

I'm not too fond of flashlights anymore, because I can't make them small enough to be keyring friendly, and because most people don't use flashlights that frequently. So I've switched to mini LED trees (mini tree, not mini LED), like this one I gave to my sister to liven up her dorm room desk:

But making LED trees can get boring, so enter the brushbot:

The brushbot isn't a very good roomba substitute. He's useless on rugs and he tends to just circle in one place. But he could be useful in polishing stuff, and besides, he makes a mean zen garden.

By the way, the brushbot does NOT run on wheels! He just vibrates his way across a surface, like a cell phone or rumble-equipped controller left on a table. Brushbot is made of two red LEDs, a motor with an asymmetric thingamabob attached to it, and a joule thief per this schematic (Fig. 2) from "Waston's eBlog."

Saturday, June 20, 2009

LED Tree

It isn't too bright (I used a 4 AA battery supply, so about 6V, and there are 52 LEDs in parallel on the tree), but it does provide a nice ambient kind of glow to a dark room (you almost can't see it in the light). That was the goal, I guess, and I put in a Joule thief circuit in hopes that it would extend the battery life a little, though I'm not feeling up to actually testing it.

Though this one was a bit of a pain, I have some ideas on how to improve on the design and I'm definitely going to make some more similar LED artstuffs in the future.

EDIT: So like I thought, it is pretty much for certain that the Joule thief is kind of silly in this circuit, because it doesn't seem to actually be doing anything useful. Also, the lifetime on the lamp isn't too great. It'll last through a whole night, I guess, but come up kind of dim in the morning. If you turn it off for a bit it gets brighter again, but near the end of the battery life that extra brightness doesn't last long. One day in the future, when I have completed a number of EE and physics courses and have hopefully gained some understanding of what it is I'm trying to do, I will redesign the guts of this tree.

Thursday, June 11, 2009

Joule Thief + Another Fridge Magnet

So the main, big project I'm working on now is getting kind of frustrating, and I thought I'd take a break tonight with a few quick projects.

I started with a empty box of chocolates from Trader Joe's. It had an adorable design with a porthole in the middle, and I had to use it somehow. Using a dremel I cut the bottom of the box off, and then I glued on three magnets with super glue. The top fits snugly onto the bottom, so all that was left was to find a picture for my picture frame.

Big Daddy character copyright 2k, of course.

Anyhow, since that project had just about two steps, I needed something else to do. Half an hour on instructables (an amazing site, by the way) reminded me that I had always wanted to build a Joule Thief. It is a remarkably simple project, but I still feel proud of myself.

You basically need an NPN transistor (2N3904), an LED, an old battery, a small toroid magnet, a 1kohm resistor, and thin wire. Optionally, you'll want a AA battery holder and a switch. I already had everything except the toroid.

Of course, the Radioshack store people had no idea what I was talking about when I asked for the toroidal magnet thing, so I found the part number myself. If you have to go to Radioshack and pay their inflated prices, here it is. Note you can probably try to use the 273-108 if you can't find the 273-109 in stock.

The 2 AA battery case leaves plenty of room to house the battery and the innards (in the second battery's place). It is a little black and boxy, but you can decorate it with stickers and such.


Thursday, June 4, 2009

Mobile Robots

And now, for robots! To start, we have a basic obstacle-avoiding, color-detecting robot. He was the final project for my ENGR 150 class, a basic intro to robotics class that was definitely worth taking. He navigates with a SICK LMS 200 laser rangefinder, and sees color with a basic webcam. His brain is a laptop, and his body is a Pioneer. Oh, and we used whatever sound files we found already on the laptop (from somebody else's project), hence the robot's lingual confusion. (Also, sorry that it is unedited...I ripped these from facebook, and I couldn't get them to import into iMovie.)

And finally, more robots! This is a robot from the lab where I work, a CREATE roomba from iRobot with a webcam and a Netbook. A quick google search shows that this is getting to be quite a popular robot setup: relatively cheap, very easy to use, and versatile. This guy also hooks up to a Garmin GPS, not shown. (There's no sound in the video, by the way).

So yeah, I that's all I have for now, but there is some pretty awesome stuff in the works, which I hope to show you soon!

Friday, May 22, 2009


Introducing...Swervy! Swervy is a robot that Allen and I built this last semester. On occasion, I also call him Screwy and Scurvy. Here are some tech specs for his current configuration:

-Limit switches (2)
-Power Wheels gearboxes and motors (Fisher Price, 2)
-Power Wheels battery
-The Arduino Diecimila
-IR Receiver (from the First Robotics Kit, 2008)
-Victor 884 motor controllers (2)
-7.2V Ni-Cd rechargeable battery pack

Here's a short video demonstrating Swervy's current capabilities.

Finally, while we're already talking 'bout robots, here is a photo of the LAGR from Carnegie Mellon, which I was working with last semester.

Next up on the list of things to hasten the coming of the robot revolution: networked roombas.

Monday, May 4, 2009

FIRST Robotics Team 1836, Pt. 2

It isn't easy to describe the FIRST National Championships in Atlanta, Georgia on account of that event's scope and size, so I'm going to start with a few things in list form.

-Four divisions with 87 teams each (total 348 teams)
-The Georgia Dome is humongous
-Both flights and the our hotel were full of FIRST teams

We did exceptionally well, ranking 23rd of 86 teams in our division. You can see our videos, as usual, at (scroll down to "Galileo Division"). It was a complete turnaround from the Los Angeles Regionals, and we even installed a shooter and scored a few balls.

And now I will bombard you with photos:

The man in the center around which we are crowding is Dean Kamen, who among a great many other things invented the Segway. His company, Deka, recently developed a highly complex prosthetic arm.

I'm still at a loss of how to sum this up, so I'm just going to leave you with this: FIRST is a great experience, and to anybody interested in robotics who isn't already involved with FIRST, I encourage you to become involved, whether as a mentor or as a student. There isn't anything quite like it.

Sunday, April 26, 2009

Googly Eye'd

Somebody is making rounds about campus, spreading unwarranted amounts of hilarity. The list of victims is long; the list of suspects, short. Who is this vandal? Who dares add character to miscellaneous objects in our surroundings? Nobody knows when we will come face to face (or eye to googly-eye) with the Googly Eye'd Bandit...

On a completely different note, here is our president, looking surprised.

Finally I'd like to give you a preview of what Allen and I are rushing to finish before the end of the semester (click to view in full size):

Thursday, April 9, 2009

FIRST Robotics Team 1836, Pt. I

An Introduction...
Last year, I joined my high school's FIRST Robotics team as a senior. This year I have returned to serve as a college mentor, because FIRST is the most awesome competition I have ever participated in.

In the way of our wins to losses ratio, we may leave something to be desired. But in our defense, we're entirely student-led (the force behind many high ranking teams are professional, adult mentors) and our funding and facilities are limited (we own a drill press and table saw, while some teams own a warehouse and their own CNC). In any case, FIRST makes it very clear that FIRST is not about points, but rather, gracious professionalism. The key thing, I guess, is that our team is all about the hands-on experience and having a lot of fun.

FIRST 2008: Overdrive
The point of last year's competition was to zoom around a track whilst herding and throwing large (think pilates +) balls. We aimed for just the first goal with a tiny, ~50lb robot called the "Rapid Rabbit Robot" that reached speeds of about 13 mph. It turned out to be a bit difficult to control on the field, but was great as a motorized chair to ride around campus. You can see videos of us at the 2008 LA Regional at (I'd suggest Qualifications 36).

Our major success of 2008 was a giant castle set piece that framed our pit area. To complete the theme, we introduced our team mascot (the knight) and distributed inflatable plastic swords. As a result we won the Spirit Award, and began our team tradition of winning something in a category unrelated to robot performance.

FIRST 2009: Lunacy
This year's competition is defined by low friction wheels and a low friction playing field. Robots drag trailers behind them, and points are scored when balls (whether launched by a human player or robot) are scored in the opponent's trailers. We decided to aim for a full-fledged robot this year (with a manipulator and all) as illustrated in this beautiful CAD drawing by our very own Ryan Abrams (who is off to UC Berkeley next year!).

Here are some (slightly blurry) photos:

Unfortunately, we never really got the manipulator working. And we came in 20lbs overweight, AND we didn't bother weighing it until Robot Inspection and Check-in Day...You can see our scoring breakdown for the LA Regionals here, though no video is up yet. The bottom line is that the one match our alliance won is the match for which we were busy fixing up our 'bot (so they set up a dummy wheel to hold up the trailer instead). To go into some detail, we didn't even move for about half the matches.

On a brighter note, Eli won the Animation Award (a FIRST-related competition) for his 30 second piece envisioning a new kind of wall.

Atlanta, Georgia
Since the National competitions are usually underpopulated, it is possible to get in by lottery. As luck would have it, we got that privilege this year, and so portion of Team 1836 is flying out to Atlanta next Wednesday (myself included). It'll be a challenge, considering we need to install and test a replacement manipulator mechanism, do routine maintenance, and leave time for the programmer to calibrate her code (and I'm talking about a first-time calibration, not a fine-tuning calibration; the camera mount angle, motor values, color threshold definitions, and other such constants are are based on my best estimates). Oh well, I guess I like the adrenaline rush. Definitely better than spending my week falling asleep in lecture!

Some more team info...
As listed on our snazzy red coveralls, our current team sponsors include:
-The Mitchell Academy of Science and Technology and the Leslie Zola Science Scholarship, who graciously provide us with funding
-The wonderful Findlay's Machine Shop, where we get our parts cut and drilled
-Z Manufacturing Inc., where the amazing Stephen Ziolkowski welds our 'bot together
-Perceptronics Solutions, for whom I now work (with special thanks Onur Sert, our first adult mentor)
-And finally the Orthopaedic Hospital of Los Angeles, who have provided us with additional access to machining facilities

Finally, because I unfortunately have no better photos or footage of this year's robot in action, here's a video I made of our prototype-bot, which basically served to confirm that a 4WD would be more than enough to drive on the playing field. Special thanks goes to Valve, makers of the beyond-awesome Team Fortress 2, who incidentally own the music accompanying this non-profit, educational-use video.

Tuesday, March 31, 2009

A Widget

I decided to try my hand at Widget development recently, and the result was this (here featured next to my favorite widget):

It doesn't do much, besides prove that I can access the command line from a widget and that I have some basic dynamic html skills. To be more precise, it runs "id -un" and "uname -n" and refreshes with a click of the refresh icon. So if you're connected to the internet through some network, it'll show that address instead of the local address (like,

Anyhow, I'm making it available here. Maybe you'll come across it, and it will be just perfect because you were just thinking of how handy it would be to have a widget like this. Or maybe you'll download it for kicks, and it will prove itself useful beyond your wildest widgety dreams.

Download the "Name and Location" widget

Monday, March 9, 2009

Triple Booting on a Mac

When I first got my Macbook Pro, I was not exactly computer savvy, but in the spirit of forwarding that goal I decided that I needed my computer to have a Mac, Windows, and Linux OS. And I wanted native booting, not virtual machines. The process of triple booting on a Mac is not that hard if you know what you are doing, but as I had no idea what I was doing, it took me a while to figure out. I cobbled together numerous tutorials and help pages and I am posting my version here so that others might make use of it.

This isn't exactly something I built, but I think it is in the spirit of 'Building Stuff, Makin' Friends' (though I guess I pretty much decide the spirit of this place anyway). So, without further ado, the tutorial.

A summary first:
This tutorial assumes you have a Mac, with the Mac OS already installed. It also assumes no prior partitions on your drive. Furthermore, it assumes that your Windows install CD is exactly that--a SINGLE install CD (you won't be able to eject during the install process because you don't have the drivers for that installed!).

What you will essentially do is this: Install the rEFIt boot Menu, use Mac to make your partitions, install Windows first, install Linux second. The rest is just details.

What you need:
Mac install CDs (I have Leopard)
Windows install CD (I have XP)
Ubuntu (I used 8.10, the 64-bit version. The download is free. Burn it to CD with Disk Utility)

Download and install rEFIt.

Use the terminal (Applications->Utilities->Terminal) to write partitions. This assumes no previous partitions. (Type the stuff in italics. Be warned! This stuff can be dangerous. If you are not sure of what you're doing, back up your data, and maybe read up on these commands before executing them.)

sudo diskutil resizeVolume disk0s2 249G "HFS+" "Linux" 17G "MS-DOS FAT32" "Windows" 32G

Disk0s2 should be the Mac volume. I wanted to leave 249 GB to it, and put 17GB aside for Linux and 32 for Windows. The three sizes must add up to less than your total available space on the drive. The command
diskutil list will show you the partitions you have set up.

Windows will have to reformat the partition it will be using, otherwise it will install but not boot. I did this to get the installer to give me that option:

sudo dd if=/dev/zero of=/dev/rdisk0s4 bs=1m count=100

That writes over the metadata for that partition, making it Unknown Format to the installer. Alternatively, it seems like you can also just delete and recreate the partition in the Windows Installer instead of using the partition you created with the Mac OS. I prefer the former, though, because I know it worked for me.

Install Windows by putting in the CD and restarting with key C held. After setup, choose the right partition to install to. It will restart a few times, so make sure to boot into Windows to complete the process. After it is done, use the Mac OS install CD to install the drivers for Windows (for older Macbooks it may be necessary to find these drivers in BootCamp and burn them to a CD).

Next, put in the Ubuntu CD and boot it as a live CD. Open up the terminal. Back up the MBR (Master Boot Record). I don't remember if you need to use sudo to get this to work. If permissions are denied, just add it in.

dd if=/dev/sda of=/tmp/sda.mbr bs=512 count=1

Run the installer (it is sitting on the desktop). Choose to partition manually. Select the right partition (sda3 should be it) and press Edit partition. Choose to mount to '/', to format it, and to use ext3. Go to next and ignore the error message about swap. When offered the install summary, look at the advanced options (important!). Install the boot loader on sda3 (your Linux partition) and not on the default (that will make Windows unbootable and none of the fixes I found actually worked without jeopardizing the rest of my systems).

Restore the mbr. I'm not sure exactly when this is supposed to be done but I did it after hitting install and it worked fine. Again, in the terminal:

dd if=/tmp/sda.mbr of=/dev/sda

Wait for the installer to finish. Restart as necessary. Actually, try to shut down instead of restart, because at this point there's a bug that I experienced where restarting freezes my computer on the restart part. Shuts down works fine though, so shut down and press the power button.

Update the MBR by using the Partitioning Tool in rEFIt. When prompted, choose Yes to update. Boot Linux. I had to try booting it twice, but that seems to just be a fluke. I had a lot of those during this process, actually. Make sure all problems are real problems by checking if they happen at least twice.

Finally in Linux open the terminal to make a swap space. Use sudo when permissions are denied.

dd if=/dev/zero of=/swap bs=1024 count=1048576
mkswap /swap
swapon /swap
chmod 600 /swap

Now check all your systems to see if they boot properly.

An afterword: who needs that many operating systems anyway?
Well, I do. Since installing all three operating systems, I have found that I use them pretty equally. I use Linux for certain robotics and programming projects, Windows for gaming and other programming projects, and Mac just because it works best with this particular machine and also for programming certain things, like Widgets. There are a lot of things I wouldn't have tried if I didn't have the right OS, but now I can run just about anything. And now that I created a 32-bit environment in my Ubuntu for compiling 32-bit code, I can really run just about anything.

Hope this helps you out!

Monday, March 2, 2009

Robot Windchime

It took me much longer than I would have liked, and didn't come out as I initially imagined, and my room is now a mess (and my laundry is still wet, since I forgot to put it in the dryer). Oh well...the creative process can be distracting...

A word about the process: Bass wood and brass tubing, a part from an old hard drive, beads. A bunch of pissed off room- & suite- mates, even though I put away the circle saw at 10:30 when they all went to sleep. I also managed to cut my finger with the regular, manual saw I had to use as a replacement. And, since I insisted on finishing it tonight, I only have seven hours until my first class.

It does sound surprisingly nice for total guesswork though. So I have only few regrets.

Saturday, February 28, 2009

Feedback Machine + Reading Magnetic fields

Allen was the brains behind this. We used this schematic and he added in an LED and a rheostat to control gain.

Because it has a magnet in it, the speaker conveniently sticks to the altoids tin while still being detachable. The indicator LED is inside (the red dot on the right).

The point of building this pocket amplifier was to listen to the output of a coil of thin gauge wire--ie, read magnetic fields. However, we built it kind of messily and it turned out to be more of a feedback machine. I did get some interesting results though, especially when holding it up to chargers and then unplugging them.

Later on, I found the following bit of treasure in a dumpster near the old Lucas building. It is a piece of old recording equipment, basically a magnetic tape reader attached to a 1/4" audio plug. I plugged it into my real amplifier, and achieved my original goal with much less extra noise.

I imagine it as a stethoscope for my computer.

Sunday, February 22, 2009

Solar Powered iPod Redux

Here is an older project of mine to set this blog in motion.

Summary of parts:
I am using the little printed circuit board that came with the garden light that came with the solar panel. It does what I need and was easy to hook up so I haven't bothered diagramming it. If I was a more dedicated person, I'd figure out the layout and share it online. But, I am not!

New iPods are more finicky than old iPods! Older iPods only need the input and the ground (+ and -, red and black, whatever). Many (storebought or homemade) cheap/old chargers work like this. They won't charge your new iPods though! New iPods (like my 80GB Classic) need their data lines hooked up too (the green and white ones if your cable is colored according to standards). Follow this diagram (which I found here).

Technically, I am supposed to use a 5v regulator (like the 7805). But when I hooked it up, I was only getting like 4.18v to my iPod across the + and - terminals. I took it out and I'm getting 5.09v (.09 too many) but I don't think my iPod is hurting too badly.

Other notes:
Rechargeable (as opposed to regular) AA batteries are 1.2v, not 1.5v. Four of those arranged in series supposedly make 4.8v, but I get 5.09 volts out for some reason. Works for me though!

Anyway guys I think this is pretty sweet! Sunlight streams into my device and at the other end I hear music.

Epilogue: Later, while attempting to add an LED to the mix, two wires touched and I shorted something on the circuit board by mistake, having once again forgotten to remove the batteries before soldering. I believe it was either the PNP or NPN transistor...but when I looked into replacing them I realized the circuit board had taken too much abuse already, and was falling apart. I plan to figure out (or find somebody who can figure out) how it worked and build a replacement someday.