"We're functioning automaticAnd we are dancing mechanic"
Krafwerk, The Robots
It all started with the idea to make a small machine to detect Electronic Music BPMs (beats per minute) for an Arduino book with music related projects. Then I thought it will be more fun to make an animatronic that moves the head to the beat.
For this project I've used an Arduino Nano - any other Arduino will work -, a sound module, which is a small device with a mic and 2 outputs: one analog and one digital. You can configure sensitivity with a small screw and the unit will send to Arduino a HIGH or LOW digital signal when a loud sound is detected. In this case, a kick.Connections
Connections are easy: D2 for the Module, D7 for the servo motor. Then VCC and Ground for both.Animatronic Body and Servo
Without an animatronic body, this project will have no appeal. You can use paper mache or clay for the animatronic figure. Just remember to make the body and place the SG90 Servo motor inside. And then make a separate head that must be plugged to the body/servo.Code
val = digitalRead(sensorPin); // read sound module
if (val == LOW)
// peak detected
myservo.write(100); // move servo motor head to a side
Demo of the dancing head animatronic
Follow me for more projects: