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.
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.
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.
After 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!
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.







