There are several students at the school I work in who are partially sighted and I wanted to build several instruments that they could use that would allow them to be able to take part in Science experiments. A clock was chosen as a first project as it could be turned into a timer the second project is a talking thermometer and this third project is a talking GPS.
Getting the speech just right:
The biggest problem with getting this project right was to have as natural a voice as possible. I decided to produce a file that contained a range of words and phrases that would be useful in a range of measuring instruments. The result was the Talking Measurements file that contains a wide range of words suitable for a number of measuring instruments from Voltage and Current to GPS and Humidity. There is a list of phrases by measuring instrument in the text file Library List.txt.
This project uses an Arduino UNO, a WT588D -U 32M audio module and an RTC module DS1327. The clock has four connections, Vcc, Gnd, SDA (connected to A4) and SCL connected to A5. A simple push button switch is connected between digital pin 2 and Gnd, this is used to make the clock speak. The WT588D comes in several versions and the pin out for the -U version that has a USB connection is shown below.
Pin connections are looking down on the top of the module. Connect a small 8 ohm speaker to pins 9 and 10 and connect the module via a USB lead to a PC and startup the WT588D VoiceChip software.
If the program starts in Chinese click on the second menu item on the right and select English. Load the talking_measurements_winproj file using the Load a project button. Click on the compile button. Now click on the Options button and select Three Line Mode, PWM, Busy Mode – LOW and finally make sure Pull High Resistor is selected. Click on OK to exit the screen. Now click on the Upload to WT588D button, make sure the WT588D is connected to the PC, but not connected to the Arduino and click on the Connect button, the red light will turn green. To upload the audio to the WT588D click on the OneKeyDownLoad button, the green status bar will move across twice. On the second pass it should cross all the way over, if it stop about three quarters of the way over press the OneKeyDownLoad button again.
Once the audio file has been uploaded then connect the WT588D to the Arduino, the complete connection diagram for the talking GPS is shown below.
The GPS uses TinyGPS++ and the library can be downloaded from here.Most GPS boards will work with this and I used the Adafruit Ultimate GPS. This board is powered by 5 volts and the signal pins (Tx and Rx) are 5 volt tolerant. Check your board it may need to be powered from 3 volts and need a logic level shift board to shift the Arduino pins 5 volts to 3 volts. The UBlox Neo6 is an example that can only work from 3 volts.
The Arduino Mega is not able to use all pins for Software Serial receive and as most of the lower pins are used to communicate with the WT588D -U32M I used pin 10 for Rx and pin 11 for Tx. The GPS Tx is connected to the Arduino Rx pin (pin 10) and the GPS Rx is connected to the Arduino Tx pin (Pin 11). Please note these are not the pins used in the examples provided in the TinyGPS++ library.
Connect the GPS unit and upload the sketch Arduino Talking GPS Using Talking Measurements.ino, once the GPS has a fix press the talk button. If all is well your position in degrees, minutes and seconds for both latitude and longitude will be announced. The number of satellites in view and the current altitude will also be spoken.
It takes several seconds to talk through all the information, so if you are in a moving vehicle be aware that the location is the one at the start of the announcement, which (depending on the speed) may be different from the location at the end of the announcement!
The talking measurements project file for the WT588d has been updated to include more GPS phrases.
Push Button = Arduino pin 2 and Gnd
GPS Module = GPS Gnd to Arduino Gnd, GPS Vcc to either 5v or 3v as required, GPS Tx to Arduino pin 10, GPS Rx to Arduino pin 11.
WT588D -U32M = pin 14 to Arduino Gnd, pin 20 to Arduino 5 volts, pin 7 to Arduino pin 3, pin 21 to Arduino pin 4, pin 18 to Arduino pin 5, pin 17 to Arduino pin 6 and pin 16 to Arduino pin 7.
About Talking Measurements:
The WT588D is controlled using the WT588D Library, but three subroutines are used to make the task of building sentences and speaking numbers easier.
speakPhrase(num) is used for sentance building, where num is the index number of the phrase required. Library List.txt lists the number for each phrase and is divided into measuring instruments. For example speakPhrase(136) will speak the time is.
speakNumber(int) will speak an integer from 0 to 9999
speakDecimal(num) will speak one decimal place from the decimal number num
So if num = 102.3
will speak one hundred and 2 point 3
if hour = 10 and min = 33 and its morning then
speakPhrase(136); // speak the time is
speakPhrase(37); // speak AM
would speak the time is ten thirty three a m