Build and Demonstration Video:
Skeleton
We decided to keep the mechanical movement as simple as possible. After prototyping a solution by utilizing scrap wood we made a more stable and lighter weight skeleton from acrylic. The head and neck had to be mounted to something so a nice sturdy block of wood shaped to the profile of a neck also allowed the whole head structure to be attached to a wall. A temporary frame of scrap wood was perfect to secure everything while constructing the head.
The skull was structured to fit into the mask and act as a base for the rest of the components. Adding some vertical pieces shaped to the mask, helped keep the mask from collapsing and give it some structure. The front piece was shaped to insert into the nose of the mask. The rear was squared off to attach to the neck. For the neck itself we used acrylic again
The rear of the neck attaches to the base board. The neck attaches to the head and base board with heavy duty hinges. There are two pivot points making the movement a little simpler than a full vertebra but still behaving realistically.
There are 3 servos to control the dragon. The first is to turn the head left and right positioned at the base of the head.
The second will adjust the neck orientation left and right and is situated at the base board-neck junction.
For the head to move like a real serpent the neck should follow the head and not vice versa. So after the head turns left the neck should move left as well. More about that when we get to the code. The third servo is for the fire breathing.
A note on the servos - the weight of the head and neck is substantial and so we could not use the normal cheap SG90 servos for RC projects. Something more substantial with extra torque is needed. We settled on 13kg-cm, MG996R servos “featuring metal gear construction”. After destroying 2 of them we discovered one of the gears is metal, the others are all plastic. With a little care they do the job.
Fire Breathing
For real fire to be breathed out of the dragon mouth we needed to build something that is basically a mini flame thrower. No off-the-shelf mini flame throwers are readily available so we opted for a simple but custom solution. A small butane canister used for lighter refueling, ejects a spray of butane gas when the nozzle is depressed. So with a small actuator that pushes the can forward against a stop, it will eject a quick spray. Having a high voltage spark in front of the nozzle will ignite the spray instantly.
This required a platform to be 3D printed that would house the butane canister and servo to move it. By adding a small brass tube onto the nozzle, we extended the nozzle further out of the mouth of the beast. The entire mechanism was mounted onto the wooden skull such that the nozzle is extending out of the back of the throat. Now with the use of a servo, we can activate the spray of butane on demand - short or long blasts .
Another advantage of using a latex mask is that it is very heat resistant. With all that flame it was good to have something protecting the internal electronics, wiring and acrylic.
Electronics
The electronic control system is run with an arduino nano. This is where we control all the servos and other electronics. The servos control the various moving parts and a small mp3 player provides dragon sound effects via a small speaker. The main power supply is a 9v, 2.5A power brick which feeds the Vin of the arduino and a buck converter to give us a high current 5v supply for the servos. It is much safer having this split power source rather than trying to run 5v into the Arduino 5V pin to power it as it is unregulated.
The Fritzing circuit layout is shown below.
In the end we abandoned the jaw movement as it wasn’t really necessary, but left it in the design anyway. The flame servo activates the butane canister by pushing it against the front of the carriage we built to eject a burst of butane. The longer the servo stays on the longer the butane squirts out. We just wanted a short burst.
To ignite the butane we incorporated a 10kv high voltage generator that runs off the 5v power. These are readily available on Amazon and other suppliers. This HV generator draws a solid 1.6A which is why we needed the heavy duty 9v power supply. It was the highest current drawing component of the project. A n-Channel MOSFET turns on the high voltage ignitor which provides plenty of spark for the ignition to occur. The negative of the HV output was connected to the brass tube that extends from the throat, and the positive lead was taped to the tube so it extended just past the end and could arc back to the tube and ignite the butane.
The mp3 player is a YX5200 that accepts a micro SD card with dragon growl sound effect mp3 files. The advantage of this component is that it can play the sound directly through a small speaker. In this case a CQRobot 3 watt, 8 ohm speaker. It has good volume and low power draw. The YX5200 connects to pins 10 and 11 for RX and TX respectively. It uses the 5v power bus from the buck converter that drives the servos.
With all the electronics connected up it was time for some coding.
Code
The main loop of the arduino sketch was to create random head movements and audio files, then sporadically breathe some fire. For the movement to be realistic, we didn’t want to just move the servo from start to end position as it moves way to quickly and the action will be jerky. So we created some timed functions to map degree intervals over a desired time period and this produces a smooth rotation of the head and neck. We toggle the direction flag from left to right each time the loop repeats.
Once the head moves a random number of degrees either left or right, we follow up with a neck move in the same direction. This repeats with varying degrees of motion.
The flame servo had to turn on and off quickly, so we experimented with different angles and timing until we got a quick burst of butane from the nozzle. The timing of the spark had to be just right so the butane ignited upon ejection, so we turned the mosfet on just before moving the servo, and turning the spark off just as the butane stops. This gave the best results.
During the loop we also occasionally triggered one of the mp3 files to randomly play. You have to ensure that a file is not already playing so it doesn’t cut it off. Because the MP3 player is a separate component, the audio file does not need to finish playing before the code resumes. This parallel processing behavior means it can be growling while moving or even breathing fire.
Overall the code is relatively simple, but produces a realistic result with the components.
Caution
Because this project involves the use of highly flammable substances and produces a real flame, extreme care should be used when building, testing and using the dragon head. Do not attempt this project if you are not familiar with hazardous materials and realistic prop making.