Archive for January, 2011

My weekend project: Maneki Neko ‘bot stares at you, absorbs your wealth

Monday, January 31st, 2011

I moved to Hong Kong two months ago, and I haven’t built a single robot since I moved here.  Clearly, this had to change.  I do my best work when I’m constantly building–I keep my hands busy, get to play creatively, and I come up with cooler ideas when I’m spending my nights building rather than hanging out in bars in Lan Kwai Fong.  So, last Friday, I went down to the Jordan night market with my friend Keting to buy a Maneki Neko (a Japanese lucky cat) that I could hack into something awesome.

First, a note on Maneki Nekos.  I didn’t know what these were called before I started on this project.  I just thought of them as Chinese lucky cats.  They’re in every shop in hong kong–a little golden cat that waves its arm back and forth.  I’d heard something about how they bring good luck to a business, but I didn’t know much else about them.  I did some digging, and the first thing I found out is that they’re actually a Japanese creation.  The cat is all about collecting and guarding wealth.  The left hand waves in the air, accumulating wealth,and the right hand guards the wealth that it collects.  Sometimes, you see two cats side by side, one waving its hand to acquire the wealth, the other waving its other hand to ward away thieves.  One of my favorite things to see in the hong kong markets is a giant tray of a couple hundred cats, all waving out of sync like a grotesque field of cilia.  I knew I had to have one.

So I walked up and down the Jordan night market, Keting helping interpret when my broken Cantonese wasn’t up to the task.  I asked shopkeeper to show me the biggest cat they had, and finally walked away with a foot-tall Maneki Neko and a growing sense of excitement.  As an aside, these are incredibly cheap.  The most I could spend on a cat was $38 Hong Kong, or about five US dollars.

IMG_0368

I had a general idea that I wanted to put a servo on the waving arm and control it with an arduino, so I could make the cat wave in response to things happening around it.  The cats kind of look like they’re waving goodbye, so I thought it might be cute to have one track motion and distance to a person, and wave hello or goodbye when someone walks into a room.  I took a quick trip to Sham Shui Po market, Hong Kong’s version of a RadioShack, to pick up some components and inspiration.  And then I got to hacking.

The first thing I did was to rip the guts out of my cat.  There’s a very clever, very cheap mechanism inside the cat that uses infinitesimal amounts of energy to keep the arm waving.  I butchered that and hot-glued my own servo mechanism inside.  The best thing I ever learned at MIT was to use hot glue for prototypes.  It’s the quickest way to a proof of concept, and if you spend all your time making perfect joints and fittings, you’ll probably get bored and do something else before your project is near completion.  Hot glue is the prototyper’s equivalent of php.  Not elegant, but good enough for a MVP.  This is nothing less than a revelation, and I have Mike Short to thank for showing me the light.

IMG_0369

IMG_0377

So, that stayed on the desk for a day and amused my roommates, but Sunday night I was antsy and wanted to try something else.  I’d written a processing program a while ago that used OpenCV to find faces in a video steam and superimposed giant smiley faces over people’s heads.  I thought it would be neat to motorize Maneki’s head, stuff a webcam into one of her eyes, and make an eye tracker.  So I got out the lobotomy equipment and chopped off her head.

IMG_0404After some quality time with a hot glue gun, I got the webcam and servo stuffed into Maneki, and by three in the morning, an unnerving number of wires was trailing from her torso and heading towards my macbook.  I wrote a quick arduino program that enslaved the arduino to processing, listening for serial commands and moving servos accordingly, and then I wrote some simple logic on top of my face recognition program to tell a servo to move so that it always keeps the average coordinates of all the faces it sees in the center of the frame.  The webcam’s refresh rate is slow enough that Maneki is slightly unstable, always shaking her head back and forth trying to center faces, but it was good enough to call it a night.  Here’s Maneki watching me as I move my head around:

Next steps on Maneki–I’m not quite sure.  Basically, I want this bot to be cute, funny, and slightly gruesome.  I’m thinking of making a couple maneki’s wave at eachother when they get close, or making maneki fire lasers from her eye when she locks onto a face.  I need to tie together the waving arm and the facetracking, and I’d like to throw in a couple other sensors to make her more interactive–either touch, distance or motion sensors.  And then it’s on to the next ‘bot!

 

IMG_0406

I’ll post the (uncommented, unwarrantied) code for the processing facetracker and arduino controls in a github repo later tonight. More build photos (for an eventual instructable) are here.

Here comes the party

Thursday, January 27th, 2011

For Chinese new year, I’m working on a cute little hack with the lucky cats you see in every business in Hong Kong.  Here’s my first video of a lucky cat fitted with a servo so that I can control the arm’s motion with an arduino.  There finished project is more elaborate, but that is after the first night of cat-buying and hacking.

Hong Kong Photo

Wednesday, January 26th, 2011

IMG_0275

If you need it, you can buy it in Sham Shui Po

How I keep track of people I meet

Monday, January 24th, 2011

Since I’ve moved to Hong Kong, I’ve been meeting people at a fever pace.  For the past month, I’ve eaten just about every lunch and dinner with a new person, and it’s awesome.  This kind of hypersocializing helps me feel at home in Hong Kong, and I’m also getting very well connected in the city with people I want to work with and with new friends.  The only bummer is keeping track of everyone.

I’m terrible at staying organized, and I also have an awful memory for new faces.  Once I started coming home with my pockets overflowing with business cards, I started looking seriously for a way to keep track of everyone, and one that a lazy person who hates busywork (like myself) could actually follow.  And I found it with business card scanners and evernote.

First off, the card scanner.  I just found out about this amazing piece of technology a few months ago, and it’s one of the handiest things I’ve ever bought.  I highly recommend the IrisCard scanner over the other options out there.  It’s a small, battery-powered, portable scanner.  You feed something through it–business cards, receipts, basically anything less than 5″ wide, and it sucks it through the machine and stores a jpg of the scan onto an SD card.  I charge it up over USB once a week, and it’s good to go.  Scans are fast, and it takes me just a minute or to to scan all the receipts and cards from the day.  For someone like me, who constantly loses receipts, this is a lifesaver.  I scan my hardcopies and then basically forget about them, throwing them into a big tub, but I might as well throw them out–I never think about them again.  The scanner comes with some OCR and contact management software, but it’s crap.  Don’t waste your time with it–there’s a much better alternative.

cardscanner

The second part of the puzzle is keeping the data organized and accessible.  This is where Evernote shines.  Evernote is like a giant bucket for all your files.  It stores and indexes pretty much anything you throw at it, including pictures, pdfs, word docs, text notes, and probably a ton of other stuff.  It also has a good over-the-air sync utility and an iPad app, which lets me get to my data on my two computers and iPad.  The true beauty of evernote is subtle–it comes out in the search.  Evernote automatically processes your images, looking for text and tagging the images with that text.  Say I just met someone for lunch–after lunch, I scan her business card and send it to evernote, and the next day, if I’m trying to send her an email, I type her name, company, or anything I remember about her that’s on her card into evernote, and it magically shows me her card.

evernote

There’s plenty of fancy contact-management stuff that my approach doesn’t cover.  For example, the first time I get in touch with a guy I met, I still have to type his email address manually into my mail program or enter his number into my phone.  Frankly, this doesn’t bother me.  Having someone’s contact info indexed by name isn’t even that useful, seeing as how I forget names as soon as I learn them.  I like being able to type whatever scrap of information is significant to me, and find the guy’s name and contact info.

The added bonus of evernote and the scanner is keeping track of receipts.  I didn’t expect this to be so useful, but it’s frickin indispensable now.  Without it, I easily would have lost track of receipts that cost me more than the $150 scanner.

It’s not often that I’m proud of an organization method I come up with (and it’s not often that I come up with an organization method), but this one just has an elegance to it, and I’m thrilled with how well my system works.

 

Hong Kong Photo

Saturday, January 22nd, 2011

I’m no marketing expert, but this isn’t the brand I’d choose to sell toilet parts…

whoops