Simple Animatronic Mouth Using 3D Printing Arduino
Simple Animatronic Mouth Using 3D Printing Arduino
by Ikkalebob
Inspired by Disney's Shaman Animatronic, as well as 3D printed designs by WillettFX and TheDutchEdition, I
recently decided to build a 3D printed animatronic mouth design. Although the mechanics of the design are very
simpli ed compared to the other projects I mentioned, I wanted to add a tongue to my design as it's a big
component in realistic looking lip-synchronisation. Also, I developed a few di erent control methods including a
program which takes a sentence as an input and converts it into a sequence of visemes (mouth-positions), and
another which uses real-time input from a microphone.
This project is a nice introduction to animatronic mouths, but there's a lot of room for better control methods and
more complex mechanics. I can't wait to see what the community can come up with!
Supplies:
M e cha nics
Te e t h/To ng ue
Teeth (optional)
FIMO Translucent White https://amzn.to/2YdoI5G
FIMO Sahara https://amzn.to/3cYzbGt
Pictured Gums
Super Sculpey Beige https://amzn.to/2YdCLsa
FIMO Cherry Red https://amzn.to/3eZr8Lm
Co nt ro l
OR
I have another instructable about a 16-channel servo above, and you can use the program in conjunction
tester I built. This was instrumental in assembling the with the Arduino IDE serial monitor to set the servo
mouth and nding positions of the motors in di erent positions.
mouth-positions. I'd recommend you build one for
yourself as it has many uses beyond this particular NOTE: If you are using my servo tester and you want
project, but if you don't fancy it, I have an alternative. to use it while connected to your PC serial connection
(for the text-to-animation program I describe later
In the download pack you should nd an Arduino on), its strongly advised that you disconnect the
program called Servo_Tester_Alternative. This is a connection from the PWM driver board's V+ pin to the
simple alternative that will allow you to control four Vin pin of the Arduino, since the USB provides power
servos at once using four potentiometers. Simply to the Arduino.
upload the code to the Arduino and wire as shown
ht t ps://www.yout ube.com/embed/lY83q531gHk
There aren't any speci c requirements for the 3D printing, pretty much everything was printed at a layer height of
around 0.25mm for my model, but you may want to go lower just for aesthetics! I have built-in allowances for the
di erent types of t amongst the screws in the model, but since there can be quite a lot of variation between the
output of di erent 3D printers, it may be necessary to use a small drill to make some holes bigger.
When everything's printed and ready to be put together, be sure to refer closely to the diagrams and video to
ensure it goes together correctly!
1. Pre pa ring t he ba s e
Depending on your application, you will need a base for the mouth to attach to. Its
designed to clamp on to a 1 inch or ~25mm diameter tube, so the simplest solution is
just to attach a 1 inch tube to a piece of wood to make a solid base.
2. Build t he m a in s e rv o blo ck
Starting with the two pairs of MG90s servos, use the "Top Under Bracket" component to
link them together, this may be a bit ddly and will require you to hold the two servos
in position while you screw in the M2 x 8mm-12mm screw. Refer to the diagrams to
make sure you have them facing the right way, and have the correct servo on top of the
other.
Set these aside and screw a pair of MG996R servos to the "Servo Block" using 4 M3 x
6mm-10mm screws, also attach the "Servo Block Top" using 3 M3 x 6mm-10mm screws,
which will allow you to further secure the MG996Rs with two more M3 screws.
Combine these three elements by screwing the MG90s' you combined in the rst step
Simple Animatronic Mouth Using 3D Printing, Arduino and Python: Page 6
Combine these three elements by screwing the MG90s' you combined in the rst step
to the "Servo Block" using 4 M2 x 6mm-12mm screws.
4. Build t he t o p ha lf
Firstly the teeth will need screwing to the top base component - the screws at the back
of the teeth (the ones which have recessed holes for the bolt head) can be simply
screwed in with M2 x 6mm screws. The front two screws also hold the top lip base
assembly in place, so take the top lip assembly you built in the last step and screw it
through the top base, into the teeth using M2 x 6mm screws.
You can let the servo dangle as you screw the teeth in, but once they're in you can
screw the servo to the top base using M2 x 6mm screws. You'll only be able to get to the
rear hole, don't worry about that right now.
You can also put in a redundant servo into the other side - I had a dead servo so I
popped it in there so the assembly would be more symmetrical :).
Use 4 M2 x 6mm screws to attach the main servo block from the rst step to the top
half through the "top under" brackets as shown.
Complete the top half by screwing on the "Over Top Support" components, starting
with the two M2 x 6mm screws at the front, then the four M3 x 6/10mm screws at the
rear. Depending on a ton of di erent factors you might have di culty screwing the M3
screws in, but just ex the whole thing until the holes line up.
Its a good idea to use super glue to x the wires that hang from the bottom of the top
half to the clamp at the back as shown.
5. Build t he bo t t o m ha lf
Start by making the jaw linkages. The MG996R servos come with a circular attachment,
Simple Animatronic Mouth Using 3D Printing, Arduino and Python: Page 7
Start by making the jaw linkages. The MG996R servos come with a circular attachment,
use four M2 x 6mm screws per side to hold the jaw linkages against the servo wheels.
Note that the attachment tting on the servo wheel faces away from the linkage.
Attach both jaw linkages to the bottom base with M3 x 5mm screws (you could
probably get away with anything up to 10mm screws actually).
Attach the tongue assembly. I recommend you start by attaching the "Tongue sLink" to
the rear tongue linkage with an M2 x 8mm screw, and attach the other end to a servo
horn on the third hole from the centre. Then you can screw the tongue assembly into
the bottom base with two M2 x 10mm screws. Make sure it moves smoothly as it will be
di cult to adjust later.
Attach the bottom teeth with M2 x 6mm screws up through the bottom of the bottom
base.
Unlike the lips, you can reach the tongue servo to screw in the horn even after the
servo has been screwed into the bottom base, which means that it's easier to calibrate
the servo's position. Screw the servo in without its servo horn.
Using my servo tester as mentioned, set the tongue servo to a pulsewidth of 340, which
corresponds to the tongue in a relaxed position. Connect and screw in the servo horn
such that the tongue is as far back as it can comfortably go. If you test the servo using
the servo tester, it should be at its range of motion should go between 340 and 495.
Attach the bottom lip assembly by simply screwing in the three M2 x 6mm screws and
xing the servo in position.
6. At t a ching ja w a nd che e ks
Plug in the two MG996R servos to the servo tester, check the images so you know which
is 0 and which is 1. Set servo 0 (the right side if looking at the mouth head-on) to 400,
and servo 1 to 350 - this should be the position of the mouth with the jaw shut, so clip
the jaw on to the MG996Rs in a position such that the mouth is shut. Use M3 x 5mm
screws to connect the jaw to the servos.
You can now attach the mouth to your base, using M3 x 20mm screws to form the
clamp.
Make up the cheek assemblies by screwing an M3 x 5mm screw through the "lower
cheek" component (and into the recessed hole) and screw into the "upper cheek". Then
attach servo horns on the nal hole to both the upper and lower cheeks.
Set all cheek servos to 350 (servos 2 - 5) and attach the servo horns to the servos so
they face straight up and down - perpendicular to the ground.
In speech, a phoneme can be described as a unit of the results produced by this method won’t be very
sound that makes up a word. A viseme on the other realistic. It’s a good way to see if everything’s working
hand is the way the mouth looks when certain though and if you spell words phonetically then it can
phonemes are being made. The control methods I’ve work fairly well. To use it, upload the
used thus far focus on nding a phonetic translation Mouth_Basic_Phoneme.ino to the servo tester, and
of a sentence and translating this into a sequence of keep the Arduino connected to your computer while
phonemes, which are sent to the animatronic mouth you use it. Using the Arduino serial monitor (Arduino
and expressed as a sequence of mouth poses. IDE > Tools > Serial Monitor), you can simply type in a
sentence and the mouth will move through the
S e t up sequence of visemes in the sentence, at a speed
de ned by the "int pause" variable.
In order to set up the control of the mouth, I started
by using my servo tester to pose the mouth into Us ing Py t ho n f o r be t t e r t ra ns la t io ns
di erent positions (visemes) which corresponded to
di erent phonemes (positions of the mouth during A Much better way of nding a phoneme sequence is
certain sounds). I wanted to be conservative about to look up words in a phonetic dictionary. I wrote a
how many phonemes I used in order to keep the code python program which uses the NLTK library (which
simple so the sounds I stuck to were A, O, B, G, S, Th, L stands for natural language toolkit). The user enters a
and F. Within these phonemes, many di erent sounds sentence, which is separated into each individual
can be made with virtually the same mouth position - word and the spaces are discarded. Each individual
for instance, in my program I use the "S" phoneme for word is processed by the NLTK library, which looks up
letters C, D, N, S, T, Z, K and Q! Using the readout on the words in the CMU pronouncing dictionary. The
the screen of my servo tester, I noted down the output this gives is phonemes in ARPAbet format - a
positions of all the servos in the various mouth set of phonetic transcription codes for American
positions into arrays in my Arduino program English which is much more condensed than the IPA
(Mouth_Basic_Phoneme.ino). Also note that its which you might have seen before.
possible to modify the code to add many more.
The words come out as a string of one to three
At this stage the simplest possible form of speech character strings – 1 or 2 characters for the sound and
synthesis is possible – using my program you could sometimes a number to indicate the stress per
simply tell the mouth to pose for speci c phonemes phoneme. This is then printed to the serial port, with a
using the phonemePose() function, queue a few of period in between each phoneme and a dollar symbol
these poses up according to a sentence you have in to indicate the end of the phrase. The Arduino looks at
mind and add a delay between each pose. This is of each incoming character, and matches it to one of the
course quite time-consuming. phonemes we de ned earlier.
S e que ncing Vis e m e s f ro m us e r input I’ve just been running the program in Visual Studio
Code – starting by plugging in the Arduino through
The rst method I used to speed up the process of USB, then the servo driver power, then running the
sequencing visemes was to use the Arduino serial python program. This was my rst time using Python
monitor as an input for a user’s sentence. I then wrote so I’m sure there’s lots that could be improved with it.
some simple code that separates the sentence into Note that you will need to install the pyserial and nltk
each letter using the phonemeMatch() function. This libraries.
method is pretty kak because as we know, words are
never really spelled to be spoken letter-by-letter, so