top of page

Multi-Sensor Plush Toy

Introduction

Here's an example of a toy made from the character design of a robot in the game Portal, with a video at the top to show what it looks like: Portal: Turret plushie. Fortunately, this engineer, named Johnathan Guber, shows all the technical details on how he made the electronics.

This project entails picking a character from an existing video game with an existing character design, voice tracks, and high coolness & nerdiness factors.

After examining the extensive behaviors and voice clips for Portal 2 characters, we picked Wheatley, who is a main character for the series, and had many voice tracks to play with an incorporate into behaviors. To learn about Wheatley, here's a video: video

 

Toy Behavior

Below is a state diagram of Wheatley's behaviors:

First, after booting, he sits and randomly talks to himself. Then, when someone passes by, he greets them, and tells them something interesting, as long as they're standing there. If the person leaves, Wheatley will sound disappointed.

If at any point, Wheatley got knocked down, he will want to get back upright again! So, he will cry out for help, for someone to pick him up, and place him upright. If you pass by him in his tilted state, he will ask you to pick him up. Once picked up, he gives a note of thanks.

Below are several behaviors and how they map to sensors:

  • when someone passes by: The ultrasonic sensors detect some object that is closer than last time the sensor checked

  • when someone leaves: The ultrasonic sensors detect some object that is farther than last time the sensor checked

  • tilted/knocked down: the tilt sensor reports that it was tilted, with potential support from the accelerometer

  • picked up: different Z values from gravity from the accelerometer

  • set down: stronger Z values, more than the force of gravity, from the accelerometer

 

 

 

 

Members and Contribution

Anamary: Doll design(4 iterations of the plushie, made a brand new pattern), all sewing, soldering all components of wave shield, character study, developing state diagram for the plushie's behaviors, found sound clips to all states.

Yasmine: Design and build the circuit, test sensors, solder sensors to the wave shield/arduino, develop the code that expresses the state diagram behaviors, and format the sound files so that they can be played by AF wave shield.

 

Electronics Overview

The image here shows the wiring diagram for the electronics. We have the wave shield on top of an arduino uno, with all sensors directly connected to the wave shield/arduino uno.

 

Components for Input

  1. Tilt sensor, bought from http://www.sparkfun.com/products/10289 . Used to detect whether wheatley was knocked down. In order to free digital pins on Arduino board, we connected the tilt sensor to an analog pin. With the analog input, tilt sensor reads values in the range of 0-1023 instead of Low and High values that are read through a digital pin. So, we scaled the analog input values and put a threshold for triggering a tilted state.

  2. PING Ultrasonic range finder. Detect whether someone passed by, and whether they're still there.According to Parallax's datasheet for the PING the speed of sound is 340 m/s or 29 microseconds per centimeter. The ping travels out and back, so to find the distance of the object we take half of the distance traveled.

  3. Accelerometer. Helps detect whether Wheatley has been lifted up. We used a Hitachi Tri-Axis accelerometer from http://www.parallax.com/tabid/768/ProductID/97/Default.aspx We calculated the difference in position with respect to Z axis to determine whether the plushy is lifted.

  4. Bus, made by Blake using this milliner. The bus helped connect all the sensors to power and ground. We began our circuit design by connecting voltage and ground through a bus. It was functioning properly but it had the disadvantage of exposure. So, we substitute the bus by two wires. All voltage ends for circuit components are connected to one wire, which is connected to the voltage pin on Arduino. Same is done with ground ends.

  5. 9V battery connector. This enabled our plushie to be portable, and since the arduino uno has a voltage regulator, the 9V's was shrunk to 5V.

 

 

Output Components

  1. Wave shield, bought from https://www.adafruit.com/products/94 . Plays a number of sound tracks depending on the state. The files that can be played using AF wave shield must have the following properties:uncompressed 22KHz, 12bit, mono Wave (.wav) files We use iTunes to put audio files into this specific format. Wave files are saved on SD memory card, which must be formatted to FAT16. Pins 13, 12, 11 are always used by the SD card (they are the only pins that have a high speed SPI interface). However, by default, the library is configured to use pins 10 (for SD card) and pins 2, 3, 4 and 5 for the DAC. To chanage these pins requires modifying the library - the pins are referenced by their 'hardware' pin names (ie PORTD, etc) not by arduino pins

  2. Multi-color LED

  3. Vibrator motor, bought from https://www.sparkfun.com/products/8449 . This motor was used to give haptic feedback when the plushie was tilted.

 

Libraries used

Arduino AF_Wave library

The latest version can be downloaded from http://www.ladyada.net/media/wavshield/AFWave_18-02-09.zip (currently: Feb 18, 2008 which now supports the 328P and arduino v13 under mac and windows & probably linux

 

Results

The plushie construction have been made, with detail given to the character. Unfortunately, the fabric choice wasn't ideal, as there are a few holes near stitch points. Having sturdier handles would help stabilize the housed sensors more. Having the sensors work together to have clear states, still present as challenge. We wanted to incorporate a multi-color LED, but because the wave shield only allows for ~5 pins, we didn't have enough pins to incorporate it into the design.

 

Conclusions & Future Work

Future work involves incorporating the LED's by changing the wave library to use or free pins, and work on having clear states. Better, more rigid housing could better support the electronics.

Building Wheatley proved to be an excellent learning experience on researching devices, incorporating them together, soldering, wiring, and using the sewing machine.

bottom of page