Introduction: Talking Skull
This talking skull says whatever you want (you record a message) and it
starts talking when the camera sees a certain color (you program the color).
An Arduino converts speech (on the fly) to servo movements for the jaw. A Pixy camera detects color (you choose the color) and activates the skull when the color comes into the camera's view.
You will need:
Recording Module Radio Shack #276-1323
HiTec HS 311 Servo motor (or similar)
Pixy Camera (Amazon.com)
5 Volt relay
3d Printed Parts:
If you don't have a printer, try 3dhubs.com for someone local to print the 3d files.
Attach the servo horn to the lower jaw.
Add the servo and jaw to the base.
Install the switch in the base box.
Record your message, then remove the playback button.
Solder wire wrap wires to the traces that the playback button used to bridge.
Use tape to hold the module in the module holder. This is used to reduce the chance of the module making electrical contact with other components.
Wire according to the schematic shown in the earlier step. Program the Arduino with the "sketch mouth" and add the two batteries.
Close the top and you should be ready to operate.
To program the Pixy, Press the little white button on top of the Pixy and hold until the front LED turns red. Release. Place an item of chosen color in front of the Pixy. The LED should turn approximately the color of the item. Press and release the little white button (like a mouse click). The Pixy LED should flash a couple of times. It is now programmed to the color desired.
In the Arduino sketch, the value for "number" determines how much volume must be seen before the servo starts moving--the higher the number, the greater the volume.
If you try to use one power supply instead of two, continuous spikes (as seen on an oscilloscope) will prevent the Arduino from decoding the sound. For me, it was more simple to use two supplies rather than figure out how to kill this noise.
If you use a sound source other than the Radio Shack module (like a speaker attached through an amplifier to a microphone), remember that the Arduino wants no more than 5 volts on the input (A3 in this example). If you have more power, put two resistors in series across the speaker output (like 1K and 2K), then tie one end of the 1K to Arduino ground and the other end of the 1K to A3 on the Arduino--this will drop 2/3 of the voltage.