Would you like to build a simple and cheap dancing robot? Using 3D printing technology and Arduino makes it possible!
It contains just a few hardware components:
- Arduino Nano
- 4x simple SG90 micro servos by Tower Pro commonly used in RC models
- Ultrasonic Sensor HC-SR04 as eyes – not connected, used only for design purpose (so if you don’t have one, feel free to use anything else)
- Batteries (I recommend 1x 9V for Arduino and 4x AA for servos) or AC adapter and cables.
- 3D printer – if buying one is an overkill for you 🙂 then a good alternative is to use a friend’s printer or 3Dhubs.com
You can find original 3D design files (.stl) in the note at the bottom of the post. I have modified the head to simplify the inner structure, use less filament and accomodate a battery pack. For the robot base I adjusted the space for servos, so they hold better in place. You can download my design files in STL format here:
You can print the parts on any common home 3D printer using standard materials like ABS or PLA. The resolution 0.2 mm is fine and no rafts or supports are required. In my case the robot was printed on Prusa i3 with PLA.
This code will make the robot dance on Smooth Criminal song by Michael Jackson. It is based on the original Dancing Bob (BiPed) code on GitHub:
Do not forget to define pin numbers where servos are connected. Use the following scheme and constants:
--------------- | | | | | | YR ==>| | <== YL --------------- ||| ||| ||| ||| |o| |o| RR ==> ----- ----- <== RL ----- ----- #define PIN_YR ? #define PIN_YL ? #define PIN_RR ? #define PIN_RL ?