28 March 2012

[NT] So I found this camera on eBay...


I can't wait to take this puppy to Alaska!

22 March 2012

[NT] Really, Engadget?

You couldn't bother to check that you're writing about the Nvidia GeForce GTX 680, not the 580?

Stupid journalists.

And yet I will continue to support your sloppiness by consuming your article. Perhaps I should get my news from forums, say, [H].

20 March 2012

Hacking the Power Mac G4

Author's note: Interesting how time flies -- I did this case mod over a year ago (in fact, this writeup was last modified exactly one year and two days ago) and never got around to finishing or posting it. Well here it is, in its somewhat outdated state as it is no longer in service; I have moved onto a G5 and a much more powerful system.

===

So if y'all remember the nice case my quad core linux box lived in (erm, on?)


No, not that one!11!


Ah, yes, this one.

and if y'all remember my spring cleaning images of the unusually clean fan and GPU, you probably are thinking, ``Man, you need to get a new case with better airflow.'' So from that sentence, I took away two things conveniently highlighted in bold: new case and better airflow. Conveniently, I had a spare Quicksilver Power Mac G4 case that I had found in a (not-so)-secret location at MIT and had been inspired ever since 7th grade by the awesome folks at InsanelyMac (formerly OSx86) to do a case mod. Now that I'm a few years older, more mature, and know a teeny bit more about mechanical engineering and manual labor, I set out to mod the case!



On the surface, the Power Mac G4 cases were relatively compact and had terrible airflow. They were comparable to micro-ATX boxes with four or five PCI slots and had an opening for an ATX-sized power supply vertically slotting next to the ports. Unfortunately, there are no conspicuous openings on the front of the case other than the drive slots (which aren't even open most of the time). As a purist, I decided not to mess with the external structure of the case and figure out an alternative method to deliver fresh air into the case. The back of the case was relatively porous; I decided to use the lower holes to pull air into the take (still have to design an intake chamber out of cardboard) and use the power supply hole to expel hot air.

Another constraint of which I needed to be aware was the location of the power supply. Since I wasn't using the default location for two reasons, (1: my cooler would have been obstructed and 2: hot air needed to be expelled), I mounted the power supply on the top of the flip-down door. Putting it at the bottom (near the hinge) of the door meant obstructing the full-height-ness of the PCIe slot, which would mean not being able to install a full-height graphics card, i.e. the lovely AMD Radeon 6990. In order to mount the PSU, I needed to fabricate an L-shaped bracket to secure the bottom of the PSU to the door (and secure the top by permanent-tieing the wires coming out of the PSU). This design was much simpler to create than MacBane's PSU mounting solution, whose procedure I perused many times in preparation (yes, all 33 pages).



Enough of design constraints vomit. I started modding the case during winter break, which meant trivial progress.

During the week of Martin Luther King Day, I got a lot more done. Notably, I cut out the hole for the IO and tore out the scrap metal previously used for mounting. I also bought a 9" by 12" sheet of plexiglass from Home Depot to cover the leftover space from the IO after the cover has been installed. Unfortunately I didn't have my motherboard with me, so I did not cut out the matching hole. Fortunately this turned out to be a good thing…

Then one weekend in March, I got my act together and cut/drilled holes to install the motherboard (this was also the week when I decided to clean my fans). Unfortunately I did not bring my CPU fan home so I had no idea whether it would fit in my preliminary mod. When I brought the case back to MIT and tried to install everything, the Zalman cooler obstructed the door from closing! I then had to uninstall everything, shift everything down one PCI slot (the Quicksilver Power Mac had five slots), cut through the first PCI slot, redrill all the holes, and remount everything.


The Power Mac G4s are notoriously known for a lack of front-to-back airflow, in stark contrast to the Power Mac G5. I went to MicroCenter and picked up two cheap 92mm fans, which I mounted in the hole left by power supply vacancy. In addition, I drafted up a shroud to route air into the case. The shroud had an L-shape; it used the narrow set of holes below the exhaust for intake and brought air up to approximately where the RAM was when the door was closed using a 120mm fan. It was created using several pieces of 1/8" acrylic cut using a bandsaw. Because it was composed of multiple parts, I chose to assemble the product using superglue (or whatever acrylic glue exists), which turned out to be a horrible idea because it's not strong enough. Epoxy probably would have been a much better choice. Similarly, because of a lack of sufficiently strong adhesive, this shroud has not been installed.

Any self-respecting case modder or computer enthusiast does not deny herself a power button. Since the G4's power button actually stabs a surface-mount button on a PCB with a couple other functions (LED, reset, etc), I soldered some breadboard wires to connect the PCB to some female headers to connect to the motherboard.


And the more or less completed product:




10 March 2012

Scooter: Part I, the Battery and Powertrain

One of my dreams or goals is to design and build wheeled vehicles, and what better way is there to start than to build an electric scooter, especially with the large community of hackers at MITERS? With that being said, I set off to build a scooter about a year ago, with steady progress over the year.

As with any project, I need to elaborate on the goals:
  • Top speed of at least 24kmph
  • Range of at least 8km
  • Weigh under 10kg
and macroscopic design choices:
  • I chose to work on a scooter because it's the smallest easy-to-control conventional vehicle that exists (but rest assured, a go-kart is coming in the near future). 
  • The scooter to be modded is a Razor A5. The gain of a larger frame and ride comfort greatly offsets the cost of an marginal increase in weight and cost.
  • Electricity is ideal because MITERS has an arbitrarily large supply of A123 batteries, which are conveniently donated by an MIT startup. 
  • I chose to go direct drive and build my own hub motor using Charles' excellent write-up, rather than using an indirect drive setup with an off-the-shelf motor, because it would give me a substantial introduction to mechatronics and machining techniques. In addition, direct drive powertrains are simpler because they eliminate the need for anything connecting the motor and the wheel (whether it be a belt, chain, or transmission).
To date, I have completed the battery and some of the powertrain, which I will elaborate below.

Battery

As previously mentioned, the battery pack consists of A123 cells in a 2x10 configuration (that's two parallel groups of 10 cells in series). Each cell has a nominal voltage of 3.3V and a nominal capacity of 2.5Ah, as outlined in the product page. In this setup, the batteries can output a peak of ~5HP (!!); it will also go a long way if I don't constantly floor it. Each of these cells weighs around 125g, so 20 cells will be approximately 2.5kg.

16 of the 20 cells

Next in discussion is the packaging. One critical characteristic of the Razor is that the deck is very low, which I would like to maintain. Thus, the batteries need to be lying on their sides. The scooter deck is wide enough for four cells lying in parallel and long enough for four of those groups, so I'll have 16 cells on the bed of the scooter and four in the steering column.

To build the package for the deck, I worked with the cells upright to simplify the soldering job. I soldered them in pairs on one side using aluminum ribbon. Then I took pairs of pairs and soldered the bottoms of the cells because the cells need to fold out into a flat layer in the end. Finally, the batteries were connected in parallel.

Soldering

Powertrain

The most central part of a hub motor is a stator, which provides some number of legs onto which coil is wound. I'm using a giant stator because the wheels on my scooter are huge -- they're 200mm in diameter. I used a DLRK (distributed LRK)-style winding (I forgot the exact winding). After manipulating 18-gauge wire for an hour, here is the wound stator:

Finished Stator

Next up comes the can and the magnets. The size of the can was chosen to minimize the air gap between the magnets and the stator, which conveniently turned out to be a 5.5" (OD) x 1.5" (thickness) steel can. Before installing the magnets, I had to do whatever mechanical modifications to the can as needed, which was just drilling holes for the endcap screws.

Drilling holes on the mill

Speaking of endcaps, they're not too particularly interesting -- just polycarbonate disks. They're not yet complete because I haven't drilled the holes for securing to the can or have the proper cavity in the center for the bearings.

Choosing magnets was especially tricky because there was no exact formula for calculating sizes. Thus, I had to try different sizes and configurations (16 or 20 are optimal for a 18-tooth stator) while CADding. I settled on a 16-magnet configuration, where each magnet is actually a pair of N45 1" x 1/2" x 1/8" and N42 1" x 1/4" x 1/8"neodymium bar magnets from magnets4less.com, where the N numbers denote the strength of the magnet.

With magnets in hand, I needed some way to secure them to the motor can. I printed a support with notches for each pair of magnets using Makerbot, a 3D printer. Then, for each pair of magnets, I inserted them into the holder, making sure that they were facing the same direction with respect to polarity, and glued them to the stator with superglue. I also made sure that adjacent pairs were oriented with opposite polarities (something which I failed to do the first few times).

Printing the magnet holder

All magnets in place

Unfortunately, the opposing magnetic forces overpower the force of the superglue, thus requiring a stronger compound: epoxy. This wasn't any traditional epoxy; I manually confected the mixture from hardening, resin, and cancer, which is a white powder.

Death

The result was a viscous yellow-green matter, which I hand-applied between and around the magnet pairs on the stator. At one point, one group of magnets overcame the superglue and merged with another group, which was remedied when the great Charles Guan stuck in a ziptie as a separator between the two groups.

The finished product, for now

To be continued!

03 March 2012

It's Here.

I present to you, fellow readers of this blog, the soon-to-be second fastest[1] student owned computer on MIT campus:
The beginning of an ultimate case mod for the ultimate hackintosh

Projected specifications:
  • Two Intel Xeon X5650 @ 4.0GHz
  • 24GiB DDR3-1600 RAM
  • Two AMD Radeon HD 6870
[1] The fastest will most certainly be this baby, if not for beefier GPU hardware then the soon-to-be liquid nitrogen pots sitting on top of the dual hexes. I also need to mention Cyril Lan's rig, which is powered by a 2500K @ 4.8GHz with dual AMD Radeon HD 7970s, but for most nonspecialized applications, CPUs dominate, sadly.

21 February 2012

IAP 2012 Recap

What I actually did:
  1. Run two phenomenal events (in one weekend, no less): Battlecode and Techfair. This really did take huge toll on me: for almost 75% of IAP, I felt that I had little to no time for myself because of all the work I needed to do and that every task was incredibly time-sensitive, which added even more stress. However, in the end, I really do have to say that they were worth every minute of early morning Java and sitting in SAO's office waiting for emails.
  2. Work out. I began my strenuous regime last IAP, having diligently gone to the Z center every morning to run and bicep curl. Unfortunately, I've gotten progressively lazier, so I worked out approximately three times each week. The upside was that I worked out with Jennifer, who taught me how to bench, squat, and deadlift, which turned out to be way shorter and more effective than my tedious routine! I'm extremely pleased at my results after one month.
  3. Move to BigRoom. Essentially I created a giant island in the middle of the room with two rows of desks against each other for maximum desk space for lab work and such. However, three monitors eat up quite a bit of space (and so does my uncased hackintosh).
  4. Mystery Hunt. This year's quest was lame because it was a giant mishmash of puzzles instead of having a unifying plot.
  5. Work on scooter. I finally re-ordered a bunch of parts, mainly for the hub motor, which is partially done, after the gruesome experience of creating a cancerous mixture of epoxy to secure the magnets onto the motor can. More on that in another post.
  6. Work on Power Mac G4 case mod. It's almost done! I'm serious! It just needs some blowing because I was a moron and didn't remove the motherboard when I was dremeling, which is now covered in tiny metallic shards.
What I didn't do:
  1. Power Mac G5 case mod. I'm surprised that my [lack of] self confidence is deterring me from mechanical projects since I'm extremely scared I'll make a mistake. It does make a nice base for my hackintosh, though.
  2. Finish projects. Ever since I read Steve Jobs (an incredible read, by the way), my standards for myself skyrocketed. Thus I now have an even harder time to deem a project finished, since it could always use some finer adjustments. 

18 February 2012

Lion's Terminator, except not really [updated]

Occasionally I've been getting messages from vim such as:

$ vim imageIO.py
Vim: Caught deadly signal ABRT

Vim: Finished.
Abort trap: 6

I thought that was nothing at first, but when it happened again today, I suddenly remembered that Lion will automatically terminate processes to keep memory usage reasonable while assisting having apps open, a lĂ  iOS.

[Update] I looked into Console.app for more details, and voilĂ !

Application Specific Information:
*** error for object 0x73612e312d347865: pointer being freed was not allocated

Said address looks suspiciously like ASCII as pointed out by superstar John Dong. Translating the little endian pointer to ASCII yields

>>> '\x73\x61\x2e\x31\x2d\x34\x78\x65'
'sa.1-4xe'

Additional insight is greatly appreciated.

10 February 2012

24GiB RAM Put to Good Use

And this means I probably will pursue videography / video post-production as hobby. Thanks Apple!

And, for nostalgia, this is the video that got me interested (yep, eight good years ago):


09 February 2012

Using git-svn (and vim) for 6.005


Hey everyone,

I figured that some of you might want to bypass eclipse and using a mouse and use something more user friendly, say, vim. Here's a basic outline of getting it to work on Mac/Linux:

- Install git-svn. Mac users, you'll probably want to get it from macports.
- cd to the dir in which you want the projects to be and run

git svn clone https://svn.csail.mit.edu/6.005/sp12/users/$USER/ps0

replacing $USER with your athena handle (if your username is not the same as the same as your athena handle) and ps0 with the problem set you want

- run through the git-svn prompts. to sanity check: at some point, it should ask for your svn password.

You should be good to go!

As for JUnit tests, you need to first set the $CLASSPATH (preferably in your bashrc),

export CLASSPATH=$JUNIT_HOME/junit.jar:/myproject/classes:/myproject/lib/something.jar

get the JUnit jar(s), and then run

java org.junit.runner.JUnitCore <test class name>

Hope this helps!

Sources: http://junit.sourceforge.net/doc/faq/faq.htm#running_1

30 January 2012

Hackintosh Install Log

I'm rather late to the Hackintosh scene (technically, super early because I hackintoshed while in 7th grade and then took a long break), but since I feel the steps are still ill-documented, despite efforts such as InsanelyMac and other sites, I have decided to write up my comprehensive install log for my system configuration.

System

  • Intel Xeon E5540 2.53GHz @ 3.96GHz, 80W
  • 24GiB DDR3-1600MHz
  • Nvidia 8800GTS 320MB

Prerequisites

  • A bootable flash drive imaged with the Snow Leopard installer and iBoot. 
  • A hard drive just for Mac OS X
  • A working knowledge of Mac OS X and operating systems (good for debugging)

Log

  1. In the BIOS, change the SATA configuration to AHCI and sleep/suspend to S3. Possibly turn off overclocking to eliminate a confounding variable. Change the boot order such that the flash drive is first.
  2. Boot the computer. iBoot should show up with a choice for Install Mac OS X. Select it and press enter.
  3. Go through the installation as you would on a normal Mac. You may have to run Disk Utility and format the disk prior to installing. 
  4. After installing, the system should reboot to the flash drive. Now iBoot should show two options, Macintosh HD and Install Mac OS X. Select the former.
  5. Go through the setup assistant.
  6. Download the Mac OS X 10.6.8 combo updater from Apple's site and MultiBeast from tonymacx86. Run the system update, but do not restart. Then run MultiBeast with the following options selected: EasyBeast and System Utilities. Eject and remove the flash drive installer. Now restart.

    Well, that's unfortunate. Looks like EasyBeast kernel panics when trying to boot. At least it boots with iBoot.
  7. Install custom sound and ethernet drivers according to step 7 in Lifehacker. Reboot.

    Guess what, it hangs again. I rebooted with -v and it stops at USBMSC Identifier... Let's actually partition the disk into two partitions so that we can use one of them as a Time Machine backup so we don't have to reinstall every single time.
  8. To get sound, use the VoodooHDA.kext in the Post Install folder in Lifehacker.
  9. To get graphics, use OSX86Tools to retrieve the hex codes for boot.plist. You'll probably also need to do the same thing for networking (otherwise the App Store does not work), but the process for two devices is different: save the hex codes of each to respective plists and use the built-in utility to merge the plists into the boot.plist
  10. Reboot and voilĂ ! Well sort of; the information in About the Mac is hilariously wrong.


Credits