Share this:

At BeatBots, we believe that dancing is one of the most worthwhile occupations a robot can have. We like making cute characters move in interesting ways, and as you’ll see, this doesn’t require expensive components or complicated programming. For Spazzi here, we decided to forego the rotational motors (servos and steppers) that many robots use. Instead, we went with solenoids, for movement that is fast, linear, and percussive.

We designed our popular teleoperated robot Keepon for research and the rigors of a child-filled playroom, so he’s made from high-end components and custom-machined metal parts. (A toy version, My Keepon, comes out later this year, and a portion of sales will subsidize the distribution of research robots to autism therapy practitioners.)

We designed Spazzi as a bouncy and easy to build robotic character that achieves the same adorable bounciness as Keepon through a simpler mechanism: solenoids and springs controlled by an Arduino microcontroller connected to a computer.

A solenoid is an electromagnet that pulls a rod (or “plunger”) inside its coil when current is passed through. Spazzi’s physical form is extremely simple; for his lower half, 3 solenoids stand parallel to form a triangle sandwiched between 2 plastic parts — a base and a waist. The plungers run up through the top of the waist and hold up the robot’s plastic head, extended by compression springs.

The 3 plastic body parts are based on the Reuleaux triangle — a shape with various interesting properties and uses (search online for more info). I made these parts on a 3D printer, but you could improvise your own body and head parts from any material, including cardboard. The core of the robot is just its assembly of solenoids and springs.

Solenoids are binary: assuming they can draw sufficient power, they are either fully compressed or fully extended. A transistor connected to a digital pin on the Arduino drives each solenoid by supplying 12V from the power supply when its pin is set HIGH. The front solenoid makes the head nod up and down, and the 2 rear solenoids make it lean back to the left or right.

With its 3 solenoids, Spazzi can move to just 8 different positions. But this limited repertoire produces surprisingly rich and varied movement when the activation and frequency of the solenoids are varied over time. This is performed by Max/MSP or Pure Data (PD) software on a computer, which sends on/off commands to the Arduino over a USB/serial port in response to music or other inputs.

Make Spazzi dance with the parts and code listed here, and then after that, you can choreograph his moves however you want!

3D-printed ABS body parts (3) and eyes (optional, 2) (1)3D files for these plastic parts can be downloaded from the project’s page at http://thingiverse.com/thing:8909. Use a 3D printer to print them out, or send the files to a 3D printing service such as Shapeways, Ponoko, or i.materialise.

Step #2:

Jumper each transistor’s collector lead to its own rail on the other side of the breadboard. Insert the anode of each 1N4004 diode in one of the collector rails, and the cathode (marked with a band) into a new rail on the breadboard. Jumper the shared cathode rail to the Arduino’s V-in pin and to a new rail on the breadboard.

Connect one lead from each solenoid into a collector/anode rail. Connect the other leads into the new cathode rail.

Step #3:

Using a 3D printer, print the 3 body parts: base, waist, and head. Download parts files (zip file). These took about 45 minutes each on a Thing-O-Matic. If you don’t have access to a 3D printer, get creative! You can use found objects, wood, ShapeLock, or even cardboard.

Insert the 2 rear solenoids into the base so that their leads run out through the channel. Insert the final solenoid in front, so that its leads run over the 2 rear solenoids’ leads and out the back.

Step #4:

Remove the nuts and washers from the solenoids and fit the waist part over them. Reinstall the washers and nuts.

Remove the plungers from the solenoids and loosely tie a cable tie through the hole of each.

Cut three 22mm lengths of compression spring (approximately 6 coils each). With each plunger, thread the pointy end into a spring and rotate the spring until one turn passes under the cable tie at the back end of the plunger. Tighten the cable tie to hold this single turn of the spring snugly against the plunger.

Step #5:

Cut the heads off 3 more cable ties and slide them over the cable tie ends in the robot’s head. Slide them down so there is no slack in the cable ties, but not too tight, and snip off the cable tie ends.

Attach the head assembly to the body so that the eyes are opposite the wires.

Step #6:

Cut six 40mm lengths of rubber cord. I chose this material because it looks similar to the wires in Spazzi’s “tail,” but you can use anything to make the decorative antennae.

Insert 3 lengths of rubber cord into each of the 2 holes atop the robot head. If they are too loose, cut a few millimeters of the discarded cable tie and wedge it in with the cord.

Using a 3D printer, print the supplied pupil models out of black ABS plastic and affix them to the eye sockets with hot glue. If you don’t have black ABS, you can also color the pupils using paint, marker, or circles cut from electrical tape.

Step #7:

Connect the 12V power supply to the Arduino, and connect the Arduino to a computer with a USB cable.

If you’re an experienced Arduino programmer, you can probably take it from here — setting pins D5, D6, and D7 to HIGH and LOW will activate and deactivate the solenoids.

Otherwise, upload the provided Spazzi.pde patch to the Arduino, then set the baud rate to 38,400 in the Serial Monitor. Entering the letters a, s, and d will activate the solenoids, while q, w, and e, respectively, will deactivate them. You can make Spazzi dance by using the keyboard like this; now you just need an application that sends these characters over the serial port!

Step #8: Application

We like using Max/MSP to control our robots. It’s a visual programming language in which data flows between objects — switches, mathematical operators, filters, etc. — over virtual patch cables. Download a trial version at http://cycling74.com or the free variant PD at http://puredata.info

Download the demo patcher (the name of a Max/MSP document) Spazzi.maxpat (zip file) and open it in Max/ MSP. The serial object at the bottom opens your Arduino’s port. Click the 120 BPM rhythm checkbox (or set your own rhythm with the Beats button), and Spazzi will start dancing. His style will change every 4 beats, based on randomly deciding, for each solenoid, whether it is down or up; whether it’s bouncing; and whether it makes 1 or 2 bounces per beat. See a video at the URL above.

A more advanced challenge is to do the audio processing directly on the Arduino. You’ll be constrained by its more limited processing power, but wouldn’t it be great to liberate this robot from its tether to the computer?

Next step: Customize! Make Spazzi your own. Use other colors, different antennae and other appendages; even put him on a mobile base! And, most importantly, make videos — who knows, perhaps your dancing robot video will go viral!

Conclusion

Spazzi and its appearance are trademarks of BeatBots, but anyone is free to make the robot for personal or nonprofit use.

Dr. Marek Michalowski is a roboticist living and working in San Francisco. He co-founded BeatBots with Dr. Hideki Kozima (designer of Keepon). See more at beatbots.net.

Goli Mohammadi

Hi M G,

Spazzi uses the Arduino, which originated in Italy. The Italian word “spazzi” is a reference to sweeping, which is suggestive of the arrangement/movement of the antennae/eyebrows atop Spazzi’s head. Hope you enjoy the project!

Eric Chu

The Arduino code is at the bottom of the introduction which is a bit hidden. I’ll add it to step 8. Thanks for pointing this out Isaac!

Goli Mohammadi

Hi Chris,
Thanks for bringing this to our attention. The project in the print version of MAKE Volume 27 had all the materials list details, but they somehow got dropped when we entered it, so I just added them all back in. Please see the list above for details on the solenoids and an updated parts list. Happy building! We’d love to see your version when you’re done. Cheers!

Yahya Khateeb

I found this one on the McMaster website. Looks like it has a different part number for the 12V model: 69905K22 Sealed Linear Solenoid Continuous, Pull, 12 VDC, 3/4″ Stroke, 4 oz Force