Introduction: Animatronic Skull With Arduino

Hey guys! My name is Patrícia and I live in Brazil, and I'm excited to share my first project with you all. I may not be fluent in English, but I will do my best with the help of Google Translate, and don't hesitate to ask any question in any language, I will do my best to answer! In this post, I want to introduce you to a fun and interactive project, an Arduino-powered animatronic skull. This skull can perform eye and jaw movements, making it a fascinating and immersive piece of electronic art.


Project Overview:

This animatronic skull consists of two 5mm red LEDs for the eyes and three micro servo motors for eye and jaw movements, creating realistic expressions. But what makes this skull truly special is its ability to react to its environment. It is equipped with an ultrasonic sensor (HC-SR04) that detects the proximity of objects, allowing the skull to react differently when someone approaches or moves away. Eye and mouth animations vary in speed and intensity, providing an interactive and immersive experience for anyone nearby.


How to calculate the required current:


LEDs: Total current for LEDs is 0.04A (40mA).

LED current = 2 * (0.02A) = 0.04A (or 40mA)

Servos: Total current for servos is 1.65A (1650mA).

Servo current = 3 * (0.22A) * 2.5 = 1.65A (or 1650mA)

Ultrasonic Sensor: The sensor consumes approximately 15mA.

Sensor current = 0.015A (or 15mA)

Arduino Uno: The Arduino consumes around 50mA.


Now add up all the currents:

Total current required = 0.04A (LEDs) + 1.65A (servos) + 0.015A (sensor) + 0.05A (Arduino) = 1.755A (or 1755mA)

In extreme cases, the total current required is 1.755A (1755mA), but 1A should be sufficient for most situations.


Important notes:

About servants:

When controlling servo motors, it is preferable to use a PWM (Pulse Width Modulation) pin, as it allows for smoother and more precise movements. Although it is possible to control servomotors using non-PWM digital pins, this may require more effort and programming skills. Therefore, whenever possible, opt for PWM pins for servo motor control.


About the Sensor:

The HC-SR04 ultrasonic distance sensor should not be connected to the Arduino PWM pins because it relies on a simple pulse protocol to measure distance, while the PWM pins generate pulsed signals with variable pulse width. This incompatibility can cause interference and inaccuracies in measurements. For reliable and accurate communication, connect the sensor to your Arduino's non-PWM digital pins.


Conclusion:

Creating an animatronic skull is a unique and exciting project that combines electronics and art. The Arduino-powered skull's ability to react to its environment adds an extra layer of interactivity. If you're a fan of DIY electronics and want to try something creative, I hope this project inspires you. Remember, I'm here to help with any questions or clarifications, regardless of your preferred language. Have fun building your animatronic skull for Halloween! 😊🤖💀

Supplies

Necessary materials:


  • An ancient skull from National Geographic's "The Human Body" collection
  • Arduino Uno or similar (I used the Uno and then put the chip in the Standalone/Zatino)
  • Electrolytic capacitor 1000uF 16V
  • 2x 5mm red LEDs
  • 2x 330r resistors
  • 3x SG90 9g micro servos
  • Ultrasonic Sensor HC-SR04
  • Flexible Wires/Jumpers
  • Thin Heat Shrink Tubing
  • Quick Glue
  • hot glue
  • Seals ("mother-in-law's tongue")
  • Black Bidim Blanket
  • Rigid wire
  • Perforated Printed Circuit Board (PCB) to facilitate assembly of the skull's internal circuit
  • Pliers, scissors, micro grinder (ideal)
  • Cellular Source 5V and at least 1A.

Step 1: Eyes

1 - Make the holes for the eyes, using the micro-grinder.

NOTE: The size of the hole must be sufficient to fit the servo motor shaft so that it does not lock/lock in the hole to prevent the motor from burning;

2 - Cut the "flap" of the servomotor to fit the skull (see photo);

3 - Glue the servomotor with hot glue;

4 - Cut the eye socket and discard;

5 - Cut the plastic "arm" of the servo motor to place the round part with quick glue on the top of the eye;

6 - Fit the eye onto the servo motor.

Step 2: Testing the Angle of the Eyes

Place your eyes in the right position, with the central axis being "looking straight ahead at 90º";

Looking in and out: 50º or 130º

Step 3: Hole for Passing Wires

Drill the hole in the skull to pass the rigid jaw wire through.

Step 4: Jaw

1 - Cut the 2 locks on the Jaw;

2 - Make a hole on the side of the jaw to fit the rigid wire;

3 - Glue the jaw servo motor to the skull (see photo);

4 - Take a stiff wire and bend a small piece of the end, leaving it in an L shape, to fit into the hole in the jaw and the other end of the wire to pass through the hole made in step 2.

5 - The jaw servo motor also contains a piece of wire with the tip bent, to fit the wire coming from the jaw.

OBS: The angle of the jaw servo, I put it as follows:

mouth closed: 140º

semi-open mouth: 110º and 90º

mouth open: 70º

Step 5: Connections

1 - Make the connections as shown in the diagram;

2 - Make another hole at the bottom of the skull to pass the servo motor signal wires (orange wires) along with the live and neutral wires that go on the printed circuit board.

OBS: Use Arduino Uno or another one of your choice.

Step 6: Ultrasonic Sensor HC-SR04 and Final Assembly

1 - Place the ultrasound sensor in front of the skull, as close as possible to the eyes, to simulate that the skull will look cross-eyed when it is in front of the eyes;

2 - Make a wooden support like mine or anything else to hold the skull, use your creativity.

3 - Cover the entire electronic part with a bidim blanket or another dark cloth to hide the electronic part (except the sensor).

Step 7: SKETCH

// MOUTH:
int fechada = 140;
const int abertura1 = 110;
const int abertura2 = 90;
const int abertura3 = 70; // Abertura máxima para não forçar o servo

// EYES:
const int olhoEsquerdoFora = 50;
const int olhoEsquerdoDentro = 130;
int olhoEsquerdoFrente = 90;

const int olhoDireitoFora = 130;
const int olhoDireitoDentro = 50;
int olhoDireitoFrente = 90;

// SENSOR PINS:
const int trigPin = 8; // Pino de saída do sensor ultrassônico (trigger)
const int echoPin = 7; // Pino de entrada do sensor ultrassônico (echo)

// SERVO PINS:
const int olhoEsquerdoPin = 3; // Pino digital com PWM para o servo do olho esquerdo
const int olhoDireitoPin = 5; // Pino digital com PWM para o servo do olho direito
const int mandibulaPin = 11; // Pino digital com PWM para o servo da mandíbula
const int enderecoOlhos = 0; // Endereço na EEPROM para armazenar a posição dos olhos
const int enderecoMandibula = 2; // Endereço na EEPROM para armazenar a posição da mandíbula

// Define as distâncias de controle das animações.
const int distanciaLonge = 50; // Acima de 50 centímetros
const int distanciaMedia = 30; // Entre 30 e 50 centímetros
const int distanciaPerto = 15; // Menor ou igual a 15 centímetros
Halloween Contest

Runner Up in the
Halloween Contest