Introduction: Mr. Wallplate Can Speak

Mr. Wallplate’s face is made from common items that would not normally be seen in a robot: a toggle/duplex wallplate for the face, ½ pingpong balls for the eyes, and a ponytail holder for the lips. The eyes seem to follow a person moving around the room, but it’s an optical illusion. Mr.Wallplate’s speaking is controlled by a TV remote control. The brain is an Arduino microcontroller with a sensor to catch signals from a TV remote and a servo motor to move the lips in sync with the spoken words.

Supplies

PARTS FOR THE FACE

  1. 1 toggle/duplex wallplate
  2. 3 bolts, #6, 1½ inches (about 4 cm) long
  3. 7 nuts for the bolts
  4. 1 pingpong ball with no writing on it, or 2 balls if there is writing
  5. 2 round, dark, stickers about the size of the iris of an eye (about 7/16 inches or 1.1 cm). I used brown screw-head trim-buttons, which are meant to cover screws in furniture
  6. About 4 inches (10 cm) of clear tape
  7. 1 red ponytail holder
  8. Red thread of the same shade as the ponytail holder
  9. Stiff cardboard, about 1”x3” (2½x8 cm) or a bit larger
  10.  2 small pieces of wood, about ½”x ⅝”x ¾” (1.2x1.6x1.9 cm)
  11.  2 bolts and nuts, #2, ¼” long (6 mm)
  12.  1 servo, such as Solarbotics HXT900 Micro Servo
  13.  1 paper clip


TOOLS FOR THE FACE

  1. Screwdriver
  2. Needle-nose pliers
  3. Drill and drill bits
  4. Ruler
  5. Pencil
  6. Scissors
  7. Utility knife


PARTS FOR THE BACK COVER

  1. 1 clear plastic container such as a fruit-juice bottle, about 4”x3½” (10x8½ cm) or slightly larger, and tall enough to cut down to 4¾” (12 cm)
  2. 2 small magnets, such as from fridge magnets
  3. 2 screws, #4, about ⅜” long (1cm), to attach the cover to the face
  4. 2 bolts and nuts, #4, ⅝” long (1.6 cm), to attach the breadboard to the cover
  5. 3 or 4 bolts and nuts, #4, ½” long (1.2 cm), to attach the Arduino to the cover
  6. 4 small, self-adhesive vinyl bumpers or felt pads 
  7. 1 Audio jack, 3.5 mm female


TOOLS FOR THE BACK COVER

  1. Screwdriver
  2. Needle-nose pliers
  3. Drill and drill bits
  4. Marker for plastic
  5. Scissors
  6. Saw with small teeth, to cut the bottom of the plastic container
  7. Rubbing alcohol and paper towel, for cleaning any glue off the plastic container
  8. Glue gun
  9. Cling-wrap to cover the open back of the plastic container, when finished
  10. Soldering iron and solder, to connect 2 jumper cables to the audio jack


PARTS FOR THE ARDUINO

  1. 1 Arduino Uno
  2. 1 1 USB cable for the Arduino
  3. 1 Breadboard
  4. Jumper wires 
  5. 1 IR receiver, such as Whadda 1838 IR Infrared 37.9 KHz receiver
  6. 1 10 nF capacitor
  7. 1 100 nF (0.1 uF) capacitor
  8. 1 10 K resistor
  9. 1 Powered audio amplifier, such as Anker SoundCore mini Model A3101
  10. 1 Audio cable, 3.5 mm male connectors 

Step 1: Attach Bolts to the Wallplate

Put 1 bolt thru the hole between the “eyes” and fasten with a nut. 

Twist a nut on each of the other 2 bolts and put them thru the other 2 holes in the wallplate. Fasten another nut on each of these bolts, behind the wallplate, as shown in the photo. The space between the bolt head and the nut, on the front of the wallplate, is just wide enough to accommodate the ponytail holder.

Step 2: Make the Lips

My ponytail holders are just slightly too large, and the “lips” aren’t closed when placed on the “face.” I used red thread to make 2 loops about ⅜ inch (1 cm) in diameter. It helps to have a round item such as a pencil of the proper diameter. Slide the thread loops onto the ends of the ponytail holder, about ⅜ inches (1 cm) from the end. Push the ponytail holder onto the bolts as shown in the photo.

Step 3: Attach the Eyes

Cut the pingpong ball in half along the seam if possible. I used a utility knife for part of the cut and small scissors to finish it.

Stick the round stickers in the middle of the inside of the pingpong ball halves.

Use clear tape to attach the ½-pingpong balls to the back of the wallplate.

Step 4: Attach the Servo to the Face

Bend one of the paper clips to the shape shown in the photo. The ends will fit into the arm of the servo and will move the lips when the servo turns. The small bends that are close to the ends, are needed to allow the paperclip to turn freely in the rectangular hole in the wallplate. The U-shaped bends will hold the “lips”.

The 2 small pieces of wood need 5/32” holes, to fit onto the bolts in the wallplate.

The cardboard needs a rectangular hole for the servo, 3/32” holes for the bolts for the servo, and 5/32” holes for the bolts in the wallplate. Careful measurement is important before cutting and drilling. And as you can see in the second photo, I drilled the cardboard 5/32” holes in the wrong place at first because I had not noticed that the shaft of the server was not in the middle of the servo. I even measured twice before cutting and drilling.

After assembling the pieces, the cardboard should be trimmed to the edge of the wood pieces at the top and sides, as shown in the third photo. Also, 2 small 1/16” holes should be drilled in the top of the wood pieces, as shown, to be pilot holes for screws that will hold the back cover.

Step 5: Make the Back Cover

The IR signals must be able to go thru the back cover to reach the IR receiver. A clear plastic bottle is a good choice for the back cover. As shown in the photo, half of the bottom should be cut away. The bottom is surprisingly thick, and so a saw is needed for that.

The bottle should be cut 4¾” (12 cm) from the bottom. A utility knife and/or scissors can do this job.

Magnets will hold the back cover onto the wallplate. They should be glued at the top of the uncut part of the bottom of the bottle, as shown in the photo, leaving the open part free. 

Next, the breadboard needs 2 holes, ⅛”, near the ends of the slit. This is for attaching the breadboard to the cover. 

To make marks for drilling the back cover, the safest way is to make a mark for one hole in each item (breadboard, Arduino, wood pieces attached to the wallplate), drill those holes (⅛”), attach an item thru that hole, make marks for the other holes, and then drill those holes.

A slit should be cut in the back part of the cover, to make room for the Arduino’s USB cable.

Also, a ¼” hole should be drilled in the side wall, near the back, near the top. This is for the audio jack. Before mounting the jack into the hole, solder the green jumper wire to both the left channel and right channel tabs of the jack, and solder the black jumper wire to the ground tab. Now, mount the jack into the hole. Don’t mount the jack and then solder, because the soldering might melt the plastic.

Step 6: The Arduino Circuit

The circuit is quite simple. 

A black ground wire and red 5-volt wire go from the Arduino to the corresponding places on the breadboard.

A yellow signal wire for the servo goes from pin 9 to the yellow on the servo. There is a black wire from the breadboard’s ground to the servo’s brown and a red wire from the breadboard’s 5-volt to the servo’s orange.

An orange signal wire from the right pin of the IR receiver goes to pin 2 on the Arduino. A red wire goes from the middle pin to 5-volt on the breadboard. A black wire goes from the left pin to ground.

To avoid clicks during the speaking, a low pass filter connects the power amplifier. The circuit is in the photo.

Step 7: Find the Codes for the Signals From a TV Remote Control

The IRremote library must be installed before an Arduino is able to recognize the signals from a TV remote control. The steps to make it happen are as follows: 

  1. Plug the Arduino into one of the USB ports of your computer.
  2. Open the Arduino app on the computer. A blank sketch appears. In the bottom right corner, the sketch should show the model of the Arduino board and the port it’s plugged into. If the info isn’t there, click “Tools” (it’s in the top left corner of the computer screen), then move the cursor to “Boards” (in the list that appears), click “Arduino AVR Boards” and click the model of Arduino you are using. And then choose the port by clicking “Port” just below “Boards”, and click the port name, which probably has “usbmodem” in the name.
  3. Click “Tools” (it’s in the top left corner of the computer screen).
  4. Click “Manage Libraries...” (in the list that appears).
  5. Wait a few seconds until a blinking vertical line appears in the top area of the Library Manager. Then type IRremote. After a few seconds, the info appears. 
  6. Click inside the “Select version” box to choose a version. I used the most recent one, which was 4.2.1.
  7. Click “Install”.

Here are the steps to find the codes for your TV remote:

  1. Download the 2 files needed for my project sketch and save them in a new folder named "Mr-Wallplate-can-speak". The links are below.
  2. Open it in the Arduino app.
  3. In the definitions of the protocols of the TV remote, near the beginning of the sketch, make a comment of the SAMSUNG protocol by adding “//” at the beginning, and remove the “//” for your TV remote.
  4. Click “Verify” (the tick-mark at the top left of the sketch). No errors (in red color) should show at the bottom.. But you may have to install the Talkie library (see step #8) before continuing.
  5. Click “Upload” (the right arrow at top left, beside “Verify”).
  6. Turn on the Serial Monitor (click “Tools” and then click “Serial Monitor”).

To see the signal codes of the TV remote control, point the TV remote at the IR sensor and press a key. The data for that key should appear on the Serial Monitor. The photo is a screen-shot of the Serial Monitor, showing the codes for keys 1 to 5 of my Samsung TV remote control.

“Command” is the signal code. The codes for my Samsung TV remote are shown below:

  • TV  Signal
  • Key Code
  • 1       0x4
  • 2       0x5
  • 3       0x6
  • 4       0x8
  • 5       0x9
  • 6       0xA
  • 7       0xC
  • 8       0xD
  • 9       0xE

After you have the signal codes for your TV remote, the project sketch needs to be changed to use those codes instead of the Samsung codes. 

Step 8: Make the Arduino Talk

For this project I decided to use the Talkie speech library. It’s included in the Arduino’s Library Manager, is easy to use, and contains more than 1,000 words. It’s possible to create additional words, and instructions are provided in the info about the library, but it looks complicated. 

The Talkie library would be installed using the same steps as described previously for the IRremote library. I used the most recent version, which was 1.3.2.

After changing the signal codes for your TV remote and installing the Talkie library, the sketch is ready to use. Click Verify and Upload, and use your remote.

If you want to try using Talkie separately from my sketch, there are examples in the library. An example can be accessed as shown below:

  1. Click “File” (it’s in the top left corner of the computer screen).
  2. Move the cursor down to “Examples” and then to the right.
  3. Move the cursor down to “Talkie” (it’s near the end of the list) and to the right again.
  4. Click “Getting_Started”. The example sketch appears.
  5. Click “Verify” (the tick-mark at the top left of the sketch). 
  6. Click “Upload” (the right arrow at top left, beside “Verify”).

If you are interested, there are other methods of generating speech using an Arduino, and they are described in several projects in https://www.instructables.com. These other methods could also produce music and special sounds such as may be interesting for Hallowe’en projects.

Step 9: (Optional): Change Some of the Spoken Words

If you want to, you could easily change the spoken words in my project sketch. To find the proper format for the words to be used, it’s necessary to look at the list of words in the library.

  1. In the Arduino app on your computer, go to “Talkie” in the Library Manager (Tools > Manage Libraries > type Talkie).
  2. Click ”More info” (At bottom left).
  3. A window appears in the browser, containing info about Talkie in github.com. There is plenty of info there, but we are interested in only the “Predefined vocabulary”, which is almost half-way down all the info. Instructions to create additional words are in the very next topic, titled “Own vocabulary”.
  4. In the “Predefined vocabulary” paragraph, click “Vocab_*.h” files. In the new webpage, it’s necessary to sign in or sign up, in order for the info appear. After signing in, a list of files appears. Each file whose name begins with “Vocab” and ends with “.h” contains a list of words. To view the words in a file, click on the name (not on the folder icon) in the right-hand list. 

For my project, “Vocab_US_TI99.h” is the best list. It has about 360 words. The words can be copied or typed into an Arduino sketch. But only part of the line is needed. For example, the list shows “extern const uint8_t spt_HELLO[]  PROGMEM;” but the only part needed is “spt_HELLO’. 

If you use words from a list other than “Vocab_US_TI99.h”, a statement needs to be added to include that list in the project sketch. It should be inserted just before or just after the #include "Vocab_US_TI99.h" statement in the project sketch.