Sunday, October 22, 2017
Home » How To's » Make Your Robonova-1 Speak!

Make Your Robonova-1 Speak!

Make Your Robonova-1 Speak!

Play any sound file—the voice of Homer Simpson or even Captain Picard!

by D.G. Smith d.g.smith@ntlworld.com

Since the age of 10, now some 35 years ago, I have always  dreamt of building robots. Back in those days all I had was lollipop sticks and old radio bits. I would glue and bolt bits together in the hope that somehow, like a Disney Movie, I could magically spark life into my creation. Now we are in the age of the Asimo and Robo-Ones, I can’t help but wonder what Isaac Asimov would have made of  them all.

Anyone with a Robonova or any Robo-One knows that you can draw a crowd just with the robot’s basic acrobatics; however the effect can be multiplied by a factor of ten when the robot speaks to the gathering.

I have been voicing my robots since the very beginning, often giving them speech before sensors, everyone knows it’s fun watching a wheeled robot maneuver around the room bumping into objects and avoiding them but when it comments every time it avoids an object or says Homer Simpson’s “Doh” when it bumps into one, your audience is left transfixed. I learned that people will come miles to see a talking machine back in the late 80s when I got hold of an early speech chip for my BBC micro and taught it to utter profanities at random. I sold more computers based on what I ended up calling “Dirty Girty” than any technical advances.

Figure 1. Quadravox QV306M1 Figure 2. Robonova with circuits in chest cavity

Figure 3. Quadravox programmer

 

 

Over the years I have tried a number of sound solutions for my robots but I keep coming back to chips that will accept sound files; this level of flexibility means you can source files from anywhere. Quadravox have built sound chips for a number of years and my favourite is the QV306M1. It has a small footprint: approximately 1 ½ inches by 1 inch including the connector (Fig. 1), thus making it small enough to fit inside the centre body cavity of the Robonova with a small buddy board, containing the voltage regulator. (Fig. 2).

STEP (1) – BUILDING THE SOUND LIBRARY.

The Quadravox comes with a set of well thought out Wav files including a complete alphabet, numbers and a lot of basic Robot related words like, “whisker”, “left”, “right”, “infrared” etc. It also comes with the  Phonetic alphabet “Alpha”, “Bravo”, “Charlie”, “Papa”, “Foxtrot” etc. and a whole set of home automation sentences, “The air conditioning”, ”Is on”, “Is off”, The alarm”, “The Motion Detector”, Etc. So before you even start visiting  “fan sites” to download your favourite one liners there is a whole ready made list you can use.

The QV306M1 will accept up to 4 minutes of audio files. These can be in varying lengths and can be broken down into up to 240 separate sound bites. Each sound bite is recorded into the chip and automatically numbered sequentially. A free piece of editing software comes with the device and the latest version and a whole series of wav files can be downloaded from the Quadravox site. The only disadvantage is that you need to buy a programming docking station to transfer the files from the PC to the Quadravox so it does bump up the price of your first recorded chip.

The list is made by adding wav files one by one to the software, which keeps track of the total recording time used and the length of each clip. Each file is then displayed in the play order with its number automatically allocated. You can do some basic editing but it is worth planning your files sensibly as this will reduce the number of lines of Robobasic that you will need to write, particularly if you are going to write routines to speak numbers past 20. Zero to nineteen exist as wav files but 21 needs to be made from the two wav files, Twenty and one, spoken without a break. It is only when we exceed 99 that we might need three files spoken sequentially. It is worthwhile spending a little time thinking about the sound layout as it can also help as a software debugging tool.

STEP (2) – PROGRAMMING THE QV306M1

Once you have decided your list it is a simple matter of connecting the programmer to the PC through the COM port and the audio out jack. (Fig. 3). The software will then activate the recording mode on the QV306M1 and play each of the files in order. The previous contents are automatically wiped.

STEP (3) – MOUNTING IN THE ROBONOVA.

Figure 4. Battery circuit

This is where a little electronics is called for.  In reality it is a simple matter of connecting the power and the ERX port to the QV306M1 which can be done with as little as three wires, however if you want a full installation I would recommend the small buddy board be used. I also included the circuitry for battery monitoring on the same board to save space inside the back pack for any later hacks.

Just a brief note on the battery monitor: I tried the online hack with two 51k resistors but discovered that using equal values dropped the sensitivity. So in my circuit I use a 56k and a 43k resistor. This lifts the bridged voltage slightly and helps with calibration. On my Robonova I discovered the new trip out value was now 167 for the NiCad to be on 5.8 volts. See figure 4 for the basic battery monitor circuit.

Because the QV306M1 doesn’t have an onboard crystal if the supply voltage is too high then the chip runs too fast, the result being that on a full battery the QV306M1 plays the same file no matter what command you send, so a small voltage regulator is required. Using the regulated supply from the Robonova seems to make too high a demand on the MRC3024’s chip and I have had the robot suddenly collapse rather worryingly, so I decided to take no chances and regulate my own supply from one of the spare servo connectors. I also added a small 100uF capacitor to smooth out any little demand lumps in the new buddy board supply.

The QV306M1 needs pin one connected to the Robonova ERX Pin, yes the ERX the ETX seems to be the input side of the comm port, RS232 was always an ambiguous specification, If you look at the MR C3024 circuit board the sockets are arranged so that the ground is nearest the outside edge of the motherboard. Then the middle pin of each socket is power, Unregulated on the servo sockets and regulated on 5 volts on the A To D and  Communication sockets. It is worth reminding you not to use power from the Comms or A to D sockets as the QV306M1 draws more power than the onboard regulator can handle and if that burns out the Robonova would be dead, and finally the innermost pin is the action pin, Servo control on the servo sockets, Sensor on the A To D ports and Comms alike.

Figure 5. Strip board layout

Figure 6. Buddy boardBuddy Board With Speaker Attached

Board On Test attached to Robonova with Grasping

Hands

 

To control the baud rate pins BR0 and BR1 on the QV306M1 need connecting to Zero Volts, this sets the baud rate at 2400. This is done on the buddy board by the two connecting wires. You can select other baud rates by connecting the 5v rail to BR0 and or BR1, a table is supplied by the manufacturer.

If the busy wire is to be attached a pull down resistor is necessary to ensure that the A to D converter gets valid readings from the QV306M1.You can see all of these parts on the strip board layout is show in Fig(5).

The actual Buddy board can be seen Fig (6).

Before you mount the buddy board in the body cavity, wrap it in insulation tape to make sure that it doesn’t short out on the Robonova metal body. Also the QV306M1 needs to be kept from touching the casing, A piece of plastic sheet works well, it is wise to leave the QV306M1 bare so that you can see the pin markings. The plugs are best fitted when the board is inside the body, on the one occasion that I did get the plugs out by one pin,  the output amplifier fried and that particular QV306M1 will no longer run a speaker, however to the board’s credit it still gives line output and now sits in a “Meet and Greet” face mask with a separate amplifier.

Placing a speaker will be the next challenge. A conventional moving coil speaker about 8 ohms impedance will do the job, there are some nice ones used in laptops and if you can afford it a flat speaker will fit inside the chest cavity easily. I have used a recovered speaker from a hand held radio in my Robonova. Be careful of placing the speaker next to the processor as the magnetic flux could cause the chip to become erratic.

Finally if you want to detect when a file has finished connecting the busy line to an A to D port will allow you to detect when the QV306M1 is ready to accept another command. If you want to construct sentences from within software then this level of control is essential. The system offers a number of ways that files can be played and has four addressing modes, it is even possible to have the unit record live sound with the addition of a microphone and preamp but for this article I have not explored these options.

STEP (4) – PROGRAMMING THE ROBONOVA

Once the QV306M1 is secreted inside the heart of the Robonova it can be activated with simple instructions.

DIM sy AS BYTE

Sy = 10

ETX  2400, sy

And the unit will play memory file number 10.

If you want to monitor the progress of the QV306M1 then use an AD command to insert the value of your chosen A to D port (I use 5). If the value given is 0 then the QV306M1 is playing files, if the value is 255 then the unit is silent and will accept another command.

It is worth dropping a 10 millisecond delay in before the next command to ensure that the unit is settled and ready.

A simple routine could look like this.

DIM sy AS BYTE

DIM ww AS BYTE

Sy = 10

ETX  2400, sy

Loop:

ww =  AD(O)

if  ww = 0  THEN  loop

However when you get deeper into programming the QV306M1 it makes sense to have the waiting loop as a gosub.

WAITQV:

ww =  AD(0)

if  ww = 0  THEN  WAITQV

RETURN

The routine can be called from anywhere in the program with

GOSUB WAITQV

This will save on program memory used. Eventually you will build a whole series of subroutines to handle multiple voicing events.

This article just scratches the surface of how you can program the QV306M1 but you now have a Walking, Talking Robonova. As a technology teacher I hope that chewing gum is a hack nobody ever does.

In closing Quadravox now has a new chip it is launching called the QV606 which is intended to replace the QV306M1.It is pin for pin compatible and the programming is virtually the same, (Which to me shows the metal of a good company, upwards compatibility is often abandoned by many manufacturers in the pursuit of profits). The 606 will carry up to 14 minutes of audio files and will handle MP3 files with a stereo output.

 

Like this article? Subscribe to Robot nowand get more of the same every month.

Useful Websites :

http://www.tetraphon.com/  (Quadravox)

Have Fun!

Gary Smith, who wrote this article, is a teacher of technology at Trinity Academy (Thorne, Doncaster, United Kingdom). If  you have questions about this article, feel free to contact Gary at d.g.smith@ntlworld.com.

Words by D.G. Smith