December 2011

Dancing Android Toy

I was trying to come up with an idea for a present one day and thought - why not make it an electronics project too? That's how I got started on this. I went scouring the internet for some cute little robot project that I could follow, and discovered that the Android toys were quite popular as a mini-robot choice. Perfect for me!

First step is to gather the required materials. It's especially important to choose the correct-sized servos, otherwise they won't be able to fit nicely in the body. Try to get nano-sized servos if possible. I ended up with 2 nano-sized and 2 micro-sized, which is why the head doesn't fit quite right on the body.

Item Quantity Unit Price
Android toy 1 $9.00
Radioshack Mini-speaker 1 $4.00
CSRC-35 Servo 4 $8.00
Total Price: $45

Next, it's time to dissect the Android! I forgot to take pictures during this process, but it's relatively straightforward. You want to detach the hands, head and legs from the body, while not destroying any other part of the toy. I used an Exacto knife and a hand-drill to get the job done, though there are probably more suitable tools (which I lack, unfortunately). The instructables referenced below have plenty of pictures on dissection and arrangement, so I won't go into too much detail. Just make sure to attach one servo each to the hands, head, and legs, making 4 moving parts in total (since the leg is stationary, the body moves instead).

I created the music using the python script from here and a midi file of my choosing. If you're lazy, you can just use the Sorry Sorry header file, down in the files section. The rest of the code is also quite straightforward, just calling functions from a servo library and the music library. The notable thing is the choreography, which is entirely in the dance.cpp file.

All code was compiled using AVR Studio, which is now replaced by Atmel Studio.


Choreography and main file: dance.cpp

Sorry Sorry XML: sorry.h

Servo control library: Servo8Bit.cpp, Servo8Bit.h

Music-playing library: playtune.cpp, playtune.h


Instructables steps

Another Instructables

ATTiny85 Datasheet