Introduction: Robot Voice: How to Make Any Circuit Talk

About: I believe that the purpose of life is to learn how to do our best and not give in to the weaker way.
Using the latest text to speech IC, most circuits can be made to speak the words of your choice. This can be handy for making a talking robot or other talking devices. It can help in  programming a microcontroller, or simply letting you know when something is on or off.

This is mainly a Picaxe project, but Arduino code is also included to allow an Arduino to talk.

The video shows how the two modules work together and some speech examples. The actual speech sounds better than in the video, but it is robotic.




Step 1: How It Works

This project is based on a new text to speech converter IC (pic 1) which allows any microcontroller to serially send text words or sentences to it. The converter chip will then convert the text to a robotic speech. Commands can be sent to the IC to vary its speed, volume and pitch of speech.

There are three methods which can be used to make circuits talk:

1. If your circuit is large enough, you can simply make the Talking Module (pic 2) and interface it to your existing circuit. The Talking Module can also receive commands from a standard universal TV remote control or from the small voice controller.

2. If you are already using a microcontroller: Picaxe or Arduino, you can add the speech converter chip and an amplifier to give your microcontroller speech.

3. If you want to keep it really small, you can also make the Voice Controller module (Pic 3), and add it to your existing circuit. It has an infrared transmitter so that it can send commands from a distance to the Talking Module which will then play the speech.

The Voice controller has inputs that can interface with most circuits to have it play speech when the circuit is turned on or off, when a voltage reaches a certain level, or if it has been touched by a human hand.

Step 2: Materials

SPO-512  Robovoice Text to Speech IC available from: http://www.speechchips.com/shop/item.aspx?itemid=22

Picaxe 08m2 or Arduino Uno. Picaxe from: http://www.phanderson.com/picaxe/index.html#mlx90614

Machined pin sockets (.1"), resistors, capacitors, diodes and LM386 amp from: http://www.mouser.com/

Vishay 38kh infrared receiver. Mouser #782-TSOP2238 from: http://www.mouser.com/

3.3 volt regulator from: http://www.pololu.com/

Fiberglass perf board: http://www.allelectronics.com/make-a-store/item/ECS-4/SOLDERABLE-PERF-BOARD-LINE-PATTERN/1.html

Magnet Wire

8-30 ohm speaker

Step 3: Make the Talking Module

The talking module uses a 08m2 Picaxe microcontroller to send text to the speech converter IC (SPO-512) which then outputs robotic speech to a 386 amplifier. The talking module can be controlled by a universal TV remote that is set for Sony code. Or it can be controlled by the small voice controller which can be attached to the circuit you want to talk.

If you prefer to use Arduino you can make the talking module as a shield.

I made the modules using a fast prototyping technique I explained here: https://www.instructables.com/id/Picaxe-Projects-1-Making-Fast-Printed-Circuit-Mo/

Step 4: Picaxe Code for the Talking Module

Here is the code for the talking module. It is set up to receive infrared Sony code from a universal remote or the voice controller module. It receives a number in Sony code which determines which serial text will be sent to the speech chip which then outputs it as audio synthetic speech.

While the speech chip will accept normal text or even phonemes, it seems to enunciate best if inventive spelling is used. Adding spaces between the text words increases the pauses between words.


             '08m2 text to speech for SPO-512 speechchip
setfreq m16  
high c.4
high c.1
output b.4
pause 5000

loop1:
high c.2
pause 10
SEROUT c.2,T9600_16,(13,13)   'initialize

irin c.3, b1
'debug

if b1 = 0 then speak1 'button1=0
if b1 = 1 then speak2 '2
if b1 = 2 then speak3 '3
if b1 = 3 then speak4 '4
if b1 = 4 then speak5 '5
if b1 = 5 then speak6 '6
if b1 = 6 then speak7 '7
if b1 = 7 then speak8 '8
if b1 = 8 then speak9 '9

if b1 = 14 then guide 'guide
if b1 = 96 then menu 'menu
if b1 = 58 then info 'info

goto loop1


speak1:
SEROUT c.2,T9600_16,("[V14][S3][E2]pro gramm  one",13,13)
pause 10000
goto loop1

speak2:
SEROUT c.2,T9600_16,("[V14][S3][E2]pro gramm  two",13,13)
pause 10000
goto loop1

speak3:
SEROUT c.2,T9600_16,("[V14][S3][E2]pro gramm  three",13,13)
pause 10000
goto loop1

speak4:
SEROUT c.2,T9600_16,("[V14][S4][E2]are you crayzee?",13,13)
pause 10000
goto loop1

speak5:
SEROUT c.2,T9600_16,("[V14][S7][E3]thistoo      will pass",13,13)
pause 10000
goto loop1

speak6:
SEROUT c.2,T9600_16,("[V14][S4][E3]battery is low",13,13)
pause 10000
goto loop1

speak7:
SEROUT c.2,T9600_16,("[V14][S6][E2]no",13,13)
pause 6100
goto loop1

speak8:
SEROUT c.2,T9600_16,("[V14][S6][E2]yes",13,13)
pause 6100
goto loop1

speak9:
SEROUT c.2,T9600_16,("[V14][S4][E3]we have a prob lem",13,13)
pause 7100
goto loop1

guide:     'guide button has been pressed
SEROUT c.2,T9600_16,("[V14][S6][E3]press one   two  or three",13,13)
pause 12100
goto loop1

menu:
SEROUT c.2,T9600_16,("[V14][S5][E3]warn neen    warn neen",13,13)
pause 8100
goto loop1

info:
SEROUT c.2,T9600_16,("[V14][S4][B3]mined    dis naught from matter       matter is from mined",13,13)
pause 25000        '  "Mind is not from matter, matter is from Mind"
goto loop1

Step 5: Make the Picaxe Voice Controller

The voice controller is a small circuit that consists of an 08m2 Picaxe microcontroller that can send infrared signals to the talking module. It can send a number from 0 to 127 so that up to 128 words or phrases can be spoken by the talking module.

The voice controller can be run on a voltage regulator or battery supply of from 3 to 5 volts. If you run it on less than 5 volts you will have to change the led for a resistor to give the infrared led enough current to transmit a reasonable distance.

It has 3 inputs which can be used to determine if a circuit is on or off, or if a human touches it. Or, it can measure voltages to announce battery low, etc.

Step 6: Picaxe Voice Controller Code

The code is set up to monitor 3 inputs for on/off button, voltage, or human touch.
It can then send a number from 0 to 127 to the talking module to have it speak a word or phrase.


          '08m2 voice controller      

pause 200
'input c.4
input c.2

loop1:

touch C.4,b0
'debug b0
pause 44
readadc c.2,b2   'check voltage at pin c.2, b2 is from 0-255
pause 44

if b0>170 then send1                       'check for human touch of wire at pin c.4
if b2 >120 then send2                      'read voltage and set limits
button C.3,1,200,100,b6,1,send3  'test if button at c.3 is pushed, +5v=on
pause 44
goto loop1


send1:
irout c.1,1,0  'send 1, last digit 0-127
pause 40
goto loop1

send2:
irout c.1,1,1  'send 2
pause 40
goto loop1

send3:
irout c.1,1,2  'send 3
pause 40
goto loop1

Step 7: Arduino Code

Here is the code (sketch)  to allow you to directly control the speech chip by sending serial text to it. This sketch is not set up to receive infrared signals from the voice controller, but you can set up the inputs of the Arduino to detect touch or voltages. I haven't had time to try this yet, but it should be enough to get you started.



//Arduino Uno sketch-sending serial text to spo-512

#define txpin 13
#define rxpin 11
softwareserial speak (rxpin, txpin);

void setup()  {
speak.begin(9600);     //set serial speed
delay (1000);

speak.printin();   //setup spo-512
cr)
delay(500);
}

// say are you crazy?
speak.printin();("[V14][S4][E2]are you crayzee?");
delay (3000);

void loop()  {

Step 8: Other Possibilites

Possible Uses
The talking module could be used to create a talking clock, talking thermometer, or even a talking voltmeter. It can also be used to debug a microcontroller program by telling out loud what part of the program it is running while the program is being tested.

It could also be used to create a small medallion or watch that can speak for people who have temporarily or permanently lost their ability to speak.


Higher Quality Voice
The step 8 pic shows a talking tower module that I made a while back that uses a serially controlled mp3 player. It is mounted in an inverted plastic glass. It also can be controlled by an infrared remote. This allows it to play sound files recorded on a micro sd card. So, a human voice or robotic voice can be played back with greater clarity than is possible with the Robovoice IC.

The serially controlled Sparkfun MP3 trigger player is more expensive and much larger than the Robovoice IC. Its use is fairly well documented and available here: https://www.sparkfun.com/products/11029

DIY Audio

Finalist in the
DIY Audio

Hack It! Contest

Participated in the
Hack It! Contest

Instructables Design Competition

Participated in the
Instructables Design Competition