You may not be the world's best dancer but by the end of this Instructable you'll be able to build a robot that sure can groove.
We will use the Circuit Playground board from Adafruit, a servo motor, and a Neopixel Ring to create a beautifully choreographed display of colors and motion as seen in the above video.
Using the sound sensor in the Circuit Playground, our robot will be able to start dancing once you start playing music.
Here is the list of tools and materials you'll need to get going:
- Adafruit Circuit Playground board
- Adafruit NeoPixel - 12 x 5050 RGBW LEDs w/ Integrated Drivers
- Standard Servo Motor with Servo Horn and screws
- Access to a 3D Printer
- Six M3 nuts and bolts
- Soldering Iron
- 5 volt battery. I used one of those portable cell phone battery chargers.
- Micro usb cable
Download and print the stl files from here. The 3D model was designed in Fusion 360. Watch full video in step 2 for a review of the design.
Step 1: Soldering
The Circuit Playground comes with alligator friendly pins which make it great for quick prototypes but we're going for a more secure and permanent connection so we will solder the wires to the pins instead.
Solder the components based on the image above.
The wiring is as follows:
- VBatt from Circuit Playground connects to 5v DC Power on Neopixel Ring and Power input on Servo Motor
- Ground from Circuit Playground Connects to Ground on Neopixel Ring and Ground wire on Servo Motor
- Pin 9 on Circuit Playground connects to signal wire on Servo Motor
- Pin 12 on Circuit Playground Connects to Data In on Neopixel Ring
Step 2: Assembly
Attach servo motor to the 3D printed frame with the four M3 nuts and bolts. Make sure to not over tighten as this will cause the frame to bow.
Next, attach the servo horn to the 3D printed gear using two small screws. These sometimes come with your servo motors. If not, any small screws that fit in the servo horn holes should work.
Attach the servo horn and gear assembly to the servo motor using the servo motor screw that's attached to your motor.
Complete assembly by attaching springs to the frame using the bushing and pins to secure it to the bottom of the frame and the top rod to secure it to the top of the frame.
Watch between 3:52 and 5:05 of the video below to see how all the parts are assembled.
Step 3: Power
You can power the Circuit Playground from USB, a AAA battery pack, or with a Lipoly battery (for advanced users).
I used a usb cable and a 5V battery charger pack. The ones that are used to charge cell phones on the go.
Step 4: Code
Download the attached Arduino code and upload it to your board.
Make sure to select the Adafruit Circuit Playground as your Board under the tools menu and to install the required libraries. Watch the above video from 13:55 onwards to see a brief explanation of the code and required libraries.
For the first few seconds try not to make any noise as the program will sample the background noise to calculate the average noise level. It then relies on the set threshold to determine whether to start dancing. The threshold is set to 20 in the code below but feel free to experiment with what works best for your environment.