The Sound Module


The Board

the board

The Board contains a ChipCorder IC from Winbond (ISD5116) and a microcontroler . The microcontroler contains firmware (written by Martin) to make the ChipCorder easy to control using a serial link and a set of simple commands.

The schematic is a modified version of this one. A smaller microcontroller was used (the PIC 16F88), and a simple pre-amp was added to the input.


The Sounds

The sounds are wave files downloaded from the internet. There's currently 115 sounds loaded into the ChipCorder. Half of them are characters and sound effects from movies and tv, and the others are custom words and phrases generated by the AT&T Labs Text To Speech website


Getting the sounds into the chip

The sound module is connected to a laptop with 2 cables. One to COM1, the other to the headphone jack. ISD2.exe handles the loading process. It generates an index file and header file to be included with the robot's program.

screenshot


Playing the Sounds

Once the sounds are loaded into the device, there are 3 way to play them:

Using ISD3.exe

All the sounds are listed on the screen. Clicking on the sound names plays the sound

Using a terminal program (Hypertext, Telix, etc.):

Look up the starting address of the desired sound in the index (created by ISD2.exe during recording), type it, then type "p"

A33e0 p

Using the robots microcontroller:

  #include "sounds.h" 
  

say(OH_BROTHER); //------------------------------------------- void say(int address) // plays a recorded sound starting at the specified address { sprintf(string, "sA%4xp", address); send_string_to_sound_module(string); // } //------------------------------------------- void send_string_to_sound_module(unsigned char *string) { unsigned char i; for (i = 0; string[i] != '\0'; i++) { send_to_sound_module ( string[i] ); pause(30); } } //---------------------------------------------- void send_to_sound_module(char a){ char n, b; TMOD &= 0xf0; TMOD |= 0x01; // set up timer // send start bit SOUND_MODULE = 0; WAIT_96 // send 8 data bits for(n=1; n<=8; n++){ b = a & 0x01; // b is the rightmost bit of a if (b == 1) {SOUND_MODULE = 1;} else {SOUND_MODULE = 0;} WAIT_96 a >>= 1; // next bit } // end for loop // send stop bit SOUND_MODULE = 1; WAIT_96 }


Back to my robot

free counter from digits.com