My NXT Says Numbers Out Aloud!    Send article as PDF   

Update on NXT Sound:

Dexter Industries have taken on my suggestion of using a “Quadravox QV606M1 Sound Module” for an add-on Audio solution for the LEGO Mindstorms NXT kit!
I’ve been working on a project where I was working with lots of numbers as part of controlling the Robot. The routine below is used in conjunction with keyboard shown below. keyboard Inputs are totaled, to give the distance a motor should move.

Ordering System Keyboard

Keyboard using my Homebrew NXT I²C RCX-TouchMux

The Keyboard uses 6x RCX type Touch switches connected to ports 1-6 of my I²C RCX-TouchMux, Sensor Multiplexer. The remaining two ports will be used as limit switches for the motor. The large red button is to cancel your total, and the large white button is to enter your final amount to move the motor. The small keys are for the numbers 1-4, which are added to a running total.

To make the keyboard calculator more user friendly, I decided to add audible output for the ‘Running Totals’ from the keyboard. The routine below has the LEGO Mindstorms NXT Saying the Number Out Aloud, as well as displaying the number on the NXT’s LCD Screen!

The “SayNumber” Routine CODE, takes a number and brakes it down too units, tens and hundreds (Thousands & 10′ Thousands). By doing this you don’t need to have a “.RSO” sound file for every number in your chosen range. For example ‘122‘ is converted to individual sound files ‘One.rso‘ + ‘Hundred.rso‘ + ‘And.rso‘ + ‘Twenty.rso‘ + ‘Two.rso‘. Similarity, ‘117‘ is just ‘One.rso‘ + ‘Hundred.rso‘ + ‘And.rso‘ + ‘Seventeen.rso‘    Visually it looks long winded, but when it comes to saving valuable memory it is great.

NXC Source Code:

Download: Sound Files to use with Code.


Further Thoughts on NXT Sound:

The biggest draw back is the Mindstorms NXT’s Memory size. Sound Files have a tendency to consume memory very quickly. It’s the old storey, as with all computing devices, ‘the storage seems to dissipate exponentially’!

I came across the PCF8570, a 256 x 8-bit static low-voltage RAM with I²C-bus interface which may be a solution for the NXT Memory wows.

PCF8570, a 256 x 8-bit static low-voltage RAM with I2C-bus interface

Addresses and data are transferred serially via a two-line bidirectional bus (I²C-bus). The built-in word address register is incremented automatically after each written or read data byte. Three address pins, A0, A1 and A2 are used to define the hardware address, allowing the use of up to 8 devices connected to the bus without additional hardware.

Another possible sound solutions for NXT based robots, are 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, such as the QV606M1 shown below. It has a small footprint: approximately 40mm by 25mm, including the connector, thus making it small enough to fit with the existing range of sensors.

Quadravox QV606M1 Sound Module

Quadravox QV606M1 Sound Module

The QV606m1 module provides a simple method of adding voice and sound to your system. It comprises a controller, MP3 decoder, serial flash memory, and mono audio amplifier. In standard form, it contains two control algorithms with the selection made in the configuration section of the data. One option is a simple two-wire RS232 (I²C-bus) connection and the other is six-wire parallel control.


  • standard model QV606m1(-16) has approximately 14 minutes capacity at a 20kbps coding rate suitable for voice.
  • up to 240 messages
  • four addressing modes
  • low power dissipation: <2mA at 5V, less than 1uA in power down mode
  • single 3.6-5.5V supply (3V is generated on-board)
  • separate amplifier power control and busy functions
  • digitally controlled volume control (64 levels)
  • 1.3W class-D BTL amplifier
  • built-in directory for sounds
  • free recording software (QV600s) from our website
  • programmed via the QV460P USB programmer or QV430P RS232 programmer
  • for use with simple RXD/TXD RS232 controls


Previous Post

Quad Track: IR-Ball Seeking Crane

This is my LEGO Mindstorms NXT Quad Caterpillar Track Crane, which uses my 'Ultimate Grab' to pick-up and retrieve a Hitechnic Infra-Red Electronic Ball. The Chassis houses 2x NXT Motors ... Read more

Next Post

My NXTLOG 'Crazy Contraption' Entry

Many robots are designed to do simple tasks in an efficient way to make our lives easier. But what if robotic machines did simple tasks in an over-complicated way? This ... Read more

Short URL:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Do NOT follow this link or you will be banned from the site!