ORD Camp Photos and Panoramas

The Whisky fest

The Pig fest

Ord Camp 1

Ord Camp 2

Ord Camp 3

Ord Camp 4

Ord Camp Shop

, , , , ,

1 Comment

Filtering EMI from Switching Power Supplies

For some time now we’ve been experiencing strange problems with the USB system inside the cube.  Somewhere along the USB path something drops the connection, either the Arduino or the Hub or the Linux box. We first tried swapping out USB cables or Hubs. We suspected the Arduinos were drawing more power then the hubs could provide so we separately power them with power supplies. Finally we started suspecting the Dimduino boxes them selves were at fault.

IMG_0196_small

Nothing seemed to provide any particular relief. Oddly the frequency of the disconnections was not isotropic and certain boards tended to cause disconnections much more frequently (every few minutes) then others. Swapping out the dimduino boxes or the arduinos didn’t affect this though, which was suspicious. Finally it dawned on me that the PowerSupplies that power the Lights must be at fault because that was the only element we hadn’t yet tried to change. Sure enough, analysis of the freuquency of the dropped connections with whether or not the lightbox was powered by a new style power supply (an IP67 compliant, waterproof switching powersupply) or an ATX powersupply was conclusive. The new switching powersupplies were in fact at fault. Removing them all and powering everything off ATX PSUs fixed all the disconnection problems overnight.

So far so good. Now, however the cube was running on a single PSU per box, i.e. our redundancy was compromised (we only just had enough ATXes to power each box with one PSU). Thus I’ve been trying to figure out what the issue is with these new PSUs and if there’s a cheap fix.

I hooked them up to my oscilloscope and it was pretty clear that these new power supplies are switching power supplies but it appears of poor quality. Unlike an ATX which gives perfectly smooth power there’s a lot of high frequency noise on the output.

IMG_0192

Measuring Vout and V1 (Fig A) shows some interesting patterns: B) Vout has a 83KHz beat of about 2V magnitude and a faster superimposed frequency in the Mhz range decaying exponentially like a damped oscillator after each 83Khz beat.

C) V1, between 0V output and Ground, is clearly carrying a 60Hz mains hum and a faster ripple on top of that, which resembles the ripple in B). The 60Hz oscillation has a large magnitude (like 60V or so) but clearly very high impedance (you dont get zapped when you touch it and barely any current flows if you connect 0V to Ground, but the 60Hz oscillation on both 0V and 12V disappears completely).

These oscillations make the whole cube circuitry swing like hell, and sends out a ton of EMI and RF everywhere. I can pick up the Mhz signal using just a piece of wire in the air. No wonder the USB was struggling.

diagram1 The two solutions I arrived at, empirically are shown in D) and E).
One involves a resistor and a capacitor and the other has an additional direct resistor.
Both smooth out Vout ( B) ) quite a lot, though not completely and V1 also looks quite a bit better but also not perfect. E) i think works a weeny bit better, but its all comparable. Some spike voltages remain on V1 that I just can’t get rid of it seems. Vout is now pretty smooth. Adding another cap between Out+ and Out- doesnt help to remove any residual noise. Nor does adding Y caps for the +12V line (from +12V to GND ).

emifilter
I found a nice article on Switching PSUs and EMI which suggests a more elaborate but straightforward circuit with additional caps and particularly in-series inductors. Makes sense, the inductors will further resists the AC going forward. I’m tempted to try it but maybe what I cooked up is sufficient (it certainly appears to be, empirically speaking).

Also I talked to a knowledgeable person at ORDcamp this weekend who suggested using higher voltage caps should not only make things safer but also help absorb more of the 60Hz hum and the RF.

If all of this doesn’t help the next step is clearly to add in series inductors but this is a slightly bigger undertaking and begs the question if it wouldn’t be better to just move to a different PSU. Would be a shame though to toss the 14  $70 PSUs that in all other ways are absolutely perfect.

, ,

1 Comment

Creating a Ubuntu LiveCD using VirtualBox and Remastersys

For a project I’m working on I wanted to create a bootable LiveCD that would start X, start Chrome and go to a particular address.

First I playe around a little bit with Slax. Its impressive in terms its ability to create cutom LiveCD .iso files on the fly by cobbling it together from components online and just download an ISO image & done. Its cool, works out of the box and I was able to get X running with Fluxbox and Chrome 12 in a 160MB .iso (!). But Chrome 12 turned out to be buggy, i wanted 16 at least. Slax is based on slackware and thus doest seem to natively support .deb or .rpm packages. You can kind of work around that by using provided tools such as rpm2lzm etc but it seemed hacky. When I tried installing it i ran in to a ton of dependency problems. I also wanted more customability so I looked for a way to set up a linux virtual machine, customize it to my hearts content and then somehow zap the whole thing into a bootable ISO format. This is exactly what Remastersys does.

So what I ended up doing is this:

  1. Start with VirtualBox. It’s a virtual machine tool for MacOS (and others). I’ve not worked much with virtual machines but this absolutely rocks. You just create a virtual machine, tell it how much RAM, HDD, etc you want. You can manipulate all the IO devices easily. Just download an .iso file or link the CDROM drive to the real drive in your computer and off you go.You can also make snapshots of the entire state machine and thus installation and configuration are way easier, if you’re ever unsure. And believe me I made a lot of mistakes along the way.So create a virtual box. Give it +500MB  RAM and 5GB HDD.
  2. Download mini.iso from Ubuntu. Link this file to your virtual CDROM drive and start the machine. Ubuntu will boot a minimal LiveCD system and allow you to install a Ubuntu system on your virtual Drive. Instead of selecting individual packages I chose the “Xubuntu” preconfig.
  3. Remove the virtual CD and reboot. Using Firefox download Chrome 16 (or later). You should download the .deb package since Ubuntu is derived from Debian. Set the user to “username” and give it a password. You’ll need this in the following setup process.
  4. Open a terminal. Navigate to where the .deb file got downloaded to and do:
     sudo dpkg –i google-chrome*.deb

    This will likely throw some unsatisfied dependencies.
    Resolve them by using

    sudo apt-get install [package name ]

    Then re-issue the dpkg command :

    sudo dpkg –i google-chrome*.deb

    Start chrome with

    /opt/google/chrome/chrome

    Set up chrome the way you like. In my case I had to install a plugin and configure it.

  5. Next install remastersys.
    First you need to get a security key from remastersys and then register their site in /etc/apt/sources.list so that apt-get will know where to get it from. Simply do:
    wget http://www.remastersys.com/ubuntu/remastersys.gpg.keysudo apt-key add remastersys.gpg.key Then, add the following line that corresponds to your version of Ubuntu to your /etc/apt/sources.list

    #Remastersys Lucid
    deb http://www.remastersys.com/ubuntu lucid main
    #Remastersys Maverick
    deb http://www.remastersys.com/ubuntu maverick main
    #Remastersys Natty
    deb http://www.remastersys.com/ubuntu natty main
    #Remastersys Oneiric
    deb http://www.remastersys.com/ubuntu oneiric main

    In my case it was the last one.

    Now you just need to do:

    sudo apt-get update
    sudo apt-get install remastersys
  6. Do a ‘df’, and you’ll see your system is currently about 2.2GB (at least it was in my case).  This, compressed, will make an .iso file that is about 750MB, which unfortunately doesn’t fit on a CD. So to get the final LiveCD ISO to be as small as possible we want to loose all the weight we don’t need. This was slightly tricky and required a few attempts to get right. It was important to preserve all Chrome functionality, auto Xstart capability and all sound playing ability. I definitely screwed up each of these at least once.

    So therefore the next step is to

    Make a snapshot of the Virtual Machine using VirtualBox

  7. Now, go and do
    sudo apt-get install aptitude
    sudo aptitude

    I went in an removed a lot of stuff, all window managers, firefox, editors, graphics programs, documentation, etc etc. All sorts of crap you don’t need.

    You need to make sure to not remove anything that what you need is dependent on though! I did this largely by trial and error. I’d choose enough packages to loose about 200MB (Aptitude will tell you in the upper right hand corner how much its removing) and let you know about dependenceies. I’d then hit ‘g’ remove the packages, quit aptitude, reboot the machine (sudo reboot) and see if chrome and X and sound still worked. If so I’d make another snapshot on VirtualBox and continue, if not I’d go back to the last snapshot and try again.

    Apparently I needed to preserve certain parts of Gnome and importantly GDM. Also ALSA sound drivers need to stay obviously. There’s a lot of stuff that seems like it’s not needed but essential parts are dependent on it. Anyway, I managed to reduce the system size to about 1.35 GB, which awesomely reduces down to an .iso of about 450MB!

  8. Ok, so I wanted the system to just boot straight into Chrome running in X, alone, with not window managers, nothing.

    So you need to add these lines to /etc/gdm/custom.conf:

    AutomaticLoginEnable=true
    AutomaticLogin=[username]

    (replacing [username] with your username of course. And to get chrome to start up create a script ~/start_chrome.sh:

    #!/bin/sh
    /opt/google/chrome/chrome http://www.mystartsite.com

    and make it executable:

    chmod 755 ~/start_chrome.sh

    then edit ~/.xsession (or create it if it’s not already there) and add

    #!/bin/sh
    /home/[username]/start_chrome.sh

    Just in case make that file executable too

    chmod 755 ~/.xsession
  9. Ok, you’re set. Reboot. Hopefully you’ll end up in X without any login prompts in chrome loading your favourite page. Now you wont have any menus or whatever – so to break out into a shell press Ctrl+Alt+F1  (add fn if on a Mac). (This always works on X btw). Ok, now back in the shell. Be sure to remove any temporary files which are no longer needed, as space on a CD is limited. A classic example is downloaded package files, which can be cleaned out using:
    sudo aptitude clean
    sudo rm -rf /tmp/* ~/.bash_history
    sudo rm /etc/hosts
    sudo rm /var/lib/dbus/machine-id
  10. Ok, so assuming you’re happy with your setup, to create the actual .iso image, you just have to do:
    sudo remastersys backup livecd.iso

    It should place the file livecd.iso in /home/remastersys/remastersys/

  11. You could try and burn that .iso to a real CDROM by linking up your real drive to the virtual machine with VirtualBox.
    cdrecord dev=/dev/cdrom livecd.iso

    I didn’t try that. Instead, to get that file out of the virtual machine I just used scp and uploaded it to antoher ssh server of mine and then downloaded it back to my Mac and just used DiskUtil to burn the CD. Now that is clearly stupid. A better way might be to mount another, real, drive inside the virtual machine or a USB stick. Again I didn’t try this but it seems very reasonable. Even better would be to have a way to mount the VirtualMachine’s drive (it’s a .vdi file) somehow on the Mac but I wasn’t able to find a way to actually do that. Seems like it should be no brainer. Anyway. You can also test you .iso by creating another virtual machine on VirtualBox and shoving the new .iso in the virtual CD drive. I recommend doing that before burning a physical CD since it will save you time if something messed up. Anyway, all this was a lot of fun and a very neat way to deal with readymade systems.

    Another cool thing would be to burn the iso to a thumbdrive. I had some success in making bootable thumbdrives using a windows machine. I tried doing the same on a Mac and it just would not boot anywhere even though the filesystems etc were set up ok on the drive. Having the bootable system on the drive is superior in the sense that any post-boot changes you make (like cookies etc). will be remembered on the next boot, while they’re totally lost on the CD.

Links:

An alternative way (more manual) to ccreate the .iso:

https://help.ubuntu.com/community/LiveCDCustomization

http://www.remastersys.com/ubuntu.html

, ,

No Comments

Groovik’s Cube Panoramas

Using Photosynth I made some panoramas of the cube, on the inside and the outside :)

, ,

No Comments

Our FoldIt Paper is out in PNAS!

Algorithm discovery by protein folding game players

Abstract:

AlgorithmsFoldit is a multiplayer online game in which players collaborate and compete to create accurate protein structure models. For specific hard problems, Foldit player solutions can in some cases outperform state-of-the-art computational methods. However, very little is known about how collaborative gameplay produces these results and whether Foldit player strategies can be formalized and structured so that they can be used by computers. To determine whether high performing player strategies could be collectively codified, we augmented the Foldit gameplay mechanics with tools for players to encode their folding strategies as “recipes” and to share their recipes with other players, who are able to further modify and redistribute them. Here we describe the rapid social evolution of player-developed folding algorithms that took place in the year following the introduction of these tools. Players developed over 5,400 different recipes, both by creating new algorithms and by modifying and recombining successful recipes developed by other players. The most successful recipes rapidly spread through the Foldit player population, and two of the recipes became particularly dominant. Examination of the algorithms encoded in these two recipes revealed a striking similarity to an unpublished algorithm developed by scientists over the same period. Benchmark calculations show that the new algorithm independently discovered by scientists and by Foldit players outperforms previously published methods. Thus, online scientific game frameworks have the potential not only to solve hard scientific problems, but also to discover and formalize effective new strategies and algorithms.

Fulltext at PNAS (OpenAccess)

No Comments

Beautiful Proteins in Positively Aware!

I few months back i got a request for  a bunch of renderings of HIV proteins for a non-profit magazine called Positively Aware! Now they’ve been printed :)

PositivelyAwareArticlepngPositivelyAwareArticlepng2PositivelyAwareArticlepng3PositivelyAwareArticlepng4

, , ,

No Comments

Steve Jobs’ Stanford commencement speech (2005)

Today Steve Jobs died at 56. Below is a transcript of his 2005 commencement speech. I had heard a number of quotes from this speech but I took the time today to actually read all of it. The man speaks truth. R.I.P. Steve.


I am honored to be with you today at your commencement from one of the finest universities in the world. I never graduated from college. Truth be told, this is the closest I’ve ever gotten to a college graduation. Today I want to tell you three stories from my life. That’s it. No big deal. Just three stories.

The first story is about connecting the dots.

I dropped out of Reed College after the first 6 months, but then stayed around as a drop-in for another 18 months or so before I really quit. So why did I drop out?

It started before I was born. My biological mother was a young, unwed college graduate student, and she decided to put me up for adoption. She felt very strongly that I should be adopted by college graduates, so everything was all set for me to be adopted at birth by a lawyer and his wife. Except that when I popped out they decided at the last minute that they really wanted a girl. So my parents, who were on a waiting list, got a call in the middle of the night asking: “We have an unexpected baby boy; do you want him?” They said: “Of course.” My biological mother later found out that my mother had never graduated from college and that my father had never graduated from high school. She refused to sign the final adoption papers. She only relented a few months later when my parents promised that I would someday go to college.

And 17 years later I did go to college. But I naively chose a college that was almost as expensive as Stanford, and all of my working-class parents’ savings were being spent on my college tuition. After six months, I couldn’t see the value in it. I had no idea what I wanted to do with my life and no idea how college was going to help me figure it out. And here I was spending all of the money my parents had saved their entire life. So I decided to drop out and trust that it would all work out OK. It was pretty scary at the time, but looking back it was one of the best decisions I ever made. The minute I dropped out I could stop taking the required classes that didn’t interest me, and begin dropping in on the ones that looked interesting.

It wasn’t all romantic. I didn’t have a dorm room, so I slept on the floor in friends’ rooms, I returned coke bottles for the 5¢ deposits to buy food with, and I would walk the 7 miles across town every Sunday night to get one good meal a week at the Hare Krishna temple. I loved it. And much of what I stumbled into by following my curiosity and intuition turned out to be priceless later on. Let me give you one example:

Reed College at that time offered perhaps the best calligraphy instruction in the country. Throughout the campus every poster, every label on every drawer, was beautifully hand calligraphed. Because I had dropped out and didn’t have to take the normal classes, I decided to take a calligraphy class to learn how to do this. I learned about serif and san serif typefaces, about varying the amount of space between different letter combinations, about what makes great typography great. It was beautiful, historical, artistically subtle in a way that science can’t capture, and I found it fascinating.

None of this had even a hope of any practical application in my life. But ten years later, when we were designing the first Macintosh computer, it all came back to me. And we designed it all into the Mac. It was the first computer with beautiful typography. If I had never dropped in on that single course in college, the Mac would have never had multiple typefaces or proportionally spaced fonts. And since Windows just copied the Mac, it’s likely that no personal computer would have them. If I had never dropped out, I would have never dropped in on this calligraphy class, and personal computers might not have the wonderful typography that they do. Of course it was impossible to connect the dots looking forward when I was in college. But it was very, very clear looking backwards ten years later.

Again, you can’t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.

My second story is about love and loss.

I was lucky — I found what I loved to do early in life. Woz and I started Apple in my parents garage when I was 20. We worked hard, and in 10 years Apple had grown from just the two of us in a garage into a $2 billion company with over 4000 employees. We had just released our finest creation — the Macintosh — a year earlier, and I had just turned 30. And then I got fired. How can you get fired from a company you started? Well, as Apple grew we hired someone who I thought was very talented to run the company with me, and for the first year or so things went well. But then our visions of the future began to diverge and eventually we had a falling out. When we did, our Board of Directors sided with him. So at 30 I was out. And very publicly out. What had been the focus of my entire adult life was gone, and it was devastating.

I really didn’t know what to do for a few months. I felt that I had let the previous generation of entrepreneurs down – that I had dropped the baton as it was being passed to me. I met with David Packard and Bob Noyce and tried to apologize for screwing up so badly. I was a very public failure, and I even thought about running away from the valley. But something slowly began to dawn on me — I still loved what I did. The turn of events at Apple had not changed that one bit. I had been rejected, but I was still in love. And so I decided to start over.

I didn’t see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.

During the next five years, I started a company named NeXT, another company named Pixar, and fell in love with an amazing woman who would become my wife. Pixar went on to create the worlds first computer animated feature film, Toy Story, and is now the most successful animation studio in the world. In a remarkable turn of events, Apple bought NeXT, I returned to Apple, and the technology we developed at NeXT is at the heart of Apple’s current renaissance. And Laurene and I have a wonderful family together.

I’m pretty sure none of this would have happened if I hadn’t been fired from Apple. It was awful tasting medicine, but I guess the patient needed it. Sometimes life hits you in the head with a brick. Don’t lose faith. I’m convinced that the only thing that kept me going was that I loved what I did. You’ve got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven’t found it yet, keep looking. Don’t settle. As with all matters of the heart, you’ll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don’t settle.

My third story is about death.

When I was 17, I read a quote that went something like: “If you live each day as if it was your last, someday you’ll most certainly be right.” It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself: “If today were the last day of my life, would I want to do what I am about to do today?” And whenever the answer has been “No” for too many days in a row, I know I need to change something.

Remembering that I’ll be dead soon is the most important tool I’ve ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, all fear of embarrassment or failure – these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.

About a year ago I was diagnosed with cancer. I had a scan at 7:30 in the morning, and it clearly showed a tumor on my pancreas. I didn’t even know what a pancreas was. The doctors told me this was almost certainly a type of cancer that is incurable, and that I should expect to live no longer than three to six months. My doctor advised me to go home and get my affairs in order, which is doctor’s code for prepare to die. It means to try to tell your kids everything you thought you’d have the next 10 years to tell them in just a few months. It means to make sure everything is buttoned up so that it will be as easy as possible for your family. It means to say your goodbyes.

I lived with that diagnosis all day. Later that evening I had a biopsy, where they stuck an endoscope down my throat, through my stomach and into my intestines, put a needle into my pancreas and got a few cells from the tumor. I was sedated, but my wife, who was there, told me that when they viewed the cells under a microscope the doctors started crying because it turned out to be a very rare form of pancreatic cancer that is curable with surgery. I had the surgery and I’m fine now.

This was the closest I’ve been to facing death, and I hope it’s the closest I get for a few more decades. Having lived through it, I can now say this to you with a bit more certainty than when death was a useful but purely intellectual concept:

No one wants to die. Even people who want to go to heaven don’t want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Life’s change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.

Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.

When I was young, there was an amazing publication called The Whole Earth Catalog, which was one of the bibles of my generation. It was created by a fellow named Stewart Brand not far from here in Menlo Park, and he brought it to life with his poetic touch. This was in the late 1960’s, before personal computers and desktop publishing, so it was all made with typewriters, scissors, and polaroid cameras. It was sort of like Google in paperback form, 35 years before Google came along: it was idealistic, and overflowing with neat tools and great notions.

Stewart and his team put out several issues of The Whole Earth Catalog, and then when it had run its course, they put out a final issue. It was the mid-1970s, and I was your age. On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath it were the words: “Stay Hungry. Stay Foolish.” It was their farewell message as they signed off. Stay Hungry. Stay Foolish. And I have always wished that for myself. And now, as you graduate to begin anew, I wish that for you.

Stay Hungry. Stay Foolish.

Thank you all very much.

, ,

No Comments

Talk on Grooviks & Copper Sculpture @ DorkBot :)

I’m giving a talk at DorkBot Seattle this Wednesday (October 3rd) on the Grooviks cube and the copper sculpture work i’ve been doing :)

Dorkbot:72 Dorkbot Seattle 0×48 – Things that were small are big, things that were big are small

When:

October 5, 2011 – 7:00pm – 10:00pm
Where:

Jigsaw Renaissance
http://www.jigsawrenaissance.org/
815 Airport Way S
Seattle, WA, 98134
See map: Google Maps
What:

, , ,

No Comments

Groovik’s Cube in the News

Seattle Met Magazine (Nov Issue): http://www.seattlemet.com/groovikscube

On KING5: http://www.king5.com/news/local/Giant-Grooviks-Cube-featured-in-new-Pacific-Science-Center-exhibit-130875678.html

Groovik’s Cube on Q13 FoxNews: http://www.q13fox.com/videogallery/65109801/News/Kaci-Pac-Sci-Center

Seattle Times: http://seattletimes.nwsource.com/html/photogalleries/localnews2016222326/2.html

IO9: http://io9.com/5840738/watch-people-constructing-a-26+foot+high-fully-playable-rubiks-cube

KOMO News: http://queenanne.komonews.com/news/arts-culture/668165-giant-rubiks-cube-arrives-burning-man-frustrate-you

PCWorld: https://www.pcworld.com/article/240168/26foottall_rubiks_cube_is_even_harder_to_solve.html

Seattle PI: http://blog.seattlepi.com/thebigblog/2011/09/13/seattles-giant-rubiks-cube-where-to-see-it/

Seattlest (Blog): http://seattlest.com/2011/09/20/attention_stoners_a_giant_rubiks_cu.php

Opodo: http://news.opodo.co.uk/NewsDetails/2011-09-22/Seattle_s_Pacific_Science_Center_launching_two_new_exhibits

Associated Press: Associated Press (Yahoo news)

TechFlash: http://www.techflash.com/seattle/2011/09/a-giant-grooviks-cube-in-seattle.html

SLOG (Seattle Stranger Blog): http://slog.thestranger.com/slog/archives/2011/09/13/grooviks-cubism-at-pacific-science-center

No Comments

Grooviks Timelapse

YouTube:

Local AVI:

http://www.miketyka.com/data/grooviks_timelapse_highres.mov

,

No Comments