You are on page 1of 15

instructables

Make a Talking Clock

by Gadget Gangster

This clock announces the time using your own voice! First, a little demo, then flip to the next page and I'll
show you how to make it on a breadboard.
I put it together as a tribute to the old Popcorn service
in Northern California. You could dial POPCORN
from any phone, and a recording would tell you the
time of day.
http://vimeo.com/moogaloop.swf?
clip_id=10852914&server=vimeo.com&show_title=0&sh
Originally, I wanted to use Joanne Daniels' voice (she
ow_byline=0&show_portrait=0&color=Fe0000&fullscree
was the voice of Popcorn), but I couldn't get enough
n=1
samples of her saying all the numbers. Pat Fleet (the
lady that says "A, T, and T") actually offers
recordings, but you have to pay for them. So I settled
on using my voice, and it's easy to substitute your
own.

Make a Talking Clock: Page 1


Step 1: FAQ

Q: How does it work? Q: How do I use my voice?


Audio samples are stored on an SD card. The time is You just record your voice and copy to the SD card.
tracked with the DS1307 RTC. The microcontroller I'll show you how in a bit, but it's easy.
polls the RTC every second to update the display and
watches the big red 'announce' button. Once you hit Q: Can I make it do x?
the button, the microcontroller plays the appropriate Probably. You can download the code on the next
samples based on the current time. step - you can poke through it and change things
fairly easily.

Q: What are the technical details? a breadboard.


It's a Parallax Propeller running at 80Mhz connected
http://vimeo.com/moogaloop.swf?
to a DS1307 Real-time clock and an HD44780 8x2
clip_id=10853029&server=vimeo.com&show_title=0&sh
Character LCD (4-bit interface). The Propeller
ow_byline=0&show_portrait=0&color=Fe0000&fullscree
manages everything including audio playback using
n=1
rayman's excellent wav playback objects. 16kHz
mono or stereo wav playback is supported.

Here's a walkthrough of how it works. Note that I'm


using an LCD UI module and Propeller Platform SD,
but this instructable will show you how to build it with

Make a Talking Clock: Page 2


Step 2: Materials

I built my clock with a Propeller Platform SD and an dremel. I'm using a slot from mouser, You can also
LCD UI module. If you've got those, then the only solder to the pads of one of those microSD - SD
thing you'll need is a headphone jack to connect the adapters. I've put mine on a protoboard to make it
clock to speakers. Setup is a little different, and I'll easier to connect.
show you how to do that later.
8x2 Character LCD
First I'll show you how to build your clock on a Displays the time. Sparkfun has a 16x2 LCD that will
breadboard - and here's what you'll need for that; work, too

Code little speaker


Here's the sourcecode. Everything is available under I ripped this out of a little stereo set I had. You can
the MIT license. also use a headphone speaker

SD card slot 3xAA battery box


I mounted mine on a protoboard and cut to size with a Mouser Part#12BH331/CS-GR

Parallax Propeller Mouser Part #511-LD1117V33


Available at Parallax
Around 10 10k ohm Resistors
DS1307 RTC
Mouser Part #700-DS1307N 4x 4.7k ohm Resistors

5Mhz Crystal 3 or 4 .1uF Ceramic Caps


Available at Parallax
3 47uF Electrolytic Caps
32.768 KHz Crystal
Mouser Part #73-XT262 A Prop Plug

32kb EEPROM If you want to add a battery backup to the RTC, you'll
Mouser Part #579-24LC256-I/P need either a 3v battery, or a super cap and diode

10k Pot Breadboard and a bunch of hookup wire.


Available at Parallax
An SD or microSD card.
5x Tactile Switches
Mouser Part #653-B3F-1000

3.3v Voltage Regulator

Make a Talking Clock: Page 3


Make a Talking Clock: Page 4
Step 3: Recording Your Voice

Let's start by capturing your voice samples. If you'd rather skip this, you can use the samples I made (download he
re).

Audacity is a great program for recording audio. You can download Audacity here. When using Audacity, be sure
to set the track properties to 16-bit PCM, 16khz rate. Mono is fine, stereo will work, but I only hooked up a single
speaker (and why does your clock need to be in stereo?).

Each number gets it's own wav. file. You'll need the following samples:

Numbers
Make a Talking Clock: Page 5
00.wav
01.wav
02.wav
03.wav
04.wav
05.wav
06.wav
07.wav
08.wav
09.wav
11.wav
12.wav
13.wav
14.wav
15.wav
16.wav
17.wav
18.wav
19.wav
20.wav
30.wav
40.wav
50.wav

words
am.wav
pm.wav
geve.wav (good evening)
morn.wav (good morning)
anoon.wav (good afternoon)
and.wav (and)
oclock.wav (O'Clock)
secs.wav (seconds)
exact.wav (exactly)
beep.wav, a beep sound
standard.wav (Pacific standard time will be)
dlight.wav (Pacific daylight time will be)

Record each of them as separate files and save to the root directory on your SD card. I recorded all of them as a
single wave, then chopped them up into separate files. It seemed easier to control the volume levels that way.

Also, if you have a laptop, you'll get better results using an external microphone. Depending on your laptop, you
might get some hiss or buzz.

Make a Talking Clock: Page 6


Step 4: Make It: Schematic

First, review the schematic below to understand how everything is connected. The box on the left is the SD card
slot, and the box on top is the Prop Plug. I'll walk through breadboarding it, but the schematic is your best guide. H
ere's a hi-res version, the lo-res version is below.

Make a Talking Clock: Page 7


Step 5: Make It: Power and Propeller

Connect the battery box to the breadboard and build the power stage.

Then add the Prop, connecting Vdd and Vss on both sides of the chip. Notice I've added 2 .1uF Ceramic caps to
each power rail.

Now add the EEPROM and 2 10k resistors, right above the Prop

Finally, add pin headers and wires to connect the headers to RST and P30 and P31.

Make a Talking Clock: Page 8


Step 6: Make It: Testing

Your basic Propeller setup is now complete. Plug your Prop Plug into the headers, connect the usb cable and fire
up the Propeller Tool. Hit F7 and make sure you can communicate with the Prop

Make a Talking Clock: Page 9


Step 7: Make It: RTC

Now, let's add the Propeller's 5Mhz crystal (at Xo and Optionally, you can give the DS1307 a battery
Xi). The Prop needs the crystal to run at 80mhz, backup by either connecting a 3v battery to P3, or
which is required to do wav playback. using a super cap and diode. The super cap will
charge up whenever the power is applied to the
Add the DS1307, connecting it to P29 and P28, the circuit, and the small diode will make sure it only
same pins as the eeprom. Also add the watch crystal discharges to the DS1307 (instead of powering the
to the DS1307's P1 and P2. entire circuit)

Make a Talking Clock: Page 10


Step 8: Make It: SD Card, Speaker, Display

Connect the speaker to the Propeller, then the SD Card. Note that each line on the SD card has a pull-up 10k
resistor.

Connect the LCD Display. This is a complicated connection - refer to the schematic for each pin. Note that DB4-
DB7 go through 4.7k resistors.

Finally add the switches you'll use for input.

Make a Talking Clock: Page 11


Step 9: Make It: Programming

Once you've got everything wired up, download the


sourcecode (here), connect your Prop Plug and
program the Propeller. Here's what it will look like;

http://vimeo.com/moogaloop.swf?
clip_id=11407125&server=vimeo.com&show_title=0&sh
ow_byline=0&show_portrait=0&color=Fe0000&fullscree
n=1

Make a Talking Clock: Page 12


Step 10: Make It: Using the LCD UI and Propeller Platform SD

If you're using the Propeller Platform SD and LCD UI, 4 - You'll need to add a headphone jack or just add
setup is a little different; hookup wire to a small speaker on the LCD UI. You
can see in the photos how I did it.
1 - The Propeller Platform SD is pre-assembled.
That's it! Have fun with your new talking clock!
2 - Follow this instructable to put together the LCD UI.

3 - You don't need a Prop Plug. The Propeller


Platform SD has a bootloader, so you just unzip this fi
le and copy to the root of your SD Card.

Make a Talking Clock: Page 13


its rreally awesome

hi how i can buy the source code in c


u.r
I do not find code that is not
send someone email: zoli73@citromail.hu
How would I program the clock as a voice alarm? I want a specific voice notification in 3 hour
intervals..
Wonderful n helpful info~

How would I make the talking clock to alarm and talk for every 2 hours?
Do I need a timer ? What components that I should add on ?

Really need your guide very much :D


Thank you =)
Was there ever an answer to this question?

Nice instructable!

I was wondering if the propeller can play sounds polyphonically? I'm thinking of building a drum
module, and weighing different microcontrollers. if the prop plays polyphonically then I'm good to
go.

Thanks!
Oh yeah, gonna build this over the weekend. Exactly what I was looking for. Have all the parts at
home waiting to be soldered. My father is blind and although he has plenty of talking clocks, this
one will have his own voice.

Nicely done. Thank you for sharing.


hey please help me on this how did you connect the propeller to the usb port. What is that u have
used
You can use a Prop Plug or a USBthumb - something to convert USB to RS232

i hit f7 and it said that a propell chip has found then what how can i fire up the code in to the chip?

hi, thanks for all the information. What component is the super cap and what type of diode did you
use? Also what happens when you push the button before it finish the time announce ?
could you make me one. ill pay you

can a microsd card be used instead of sd card

Sure - that's what I was using. The newest fsrw libraries let the prop use SD, uSD, and SDHC.

If you could calculate in real time how long the message would take to play (or make it a set time
for each message) then you could have the *beeeep* coincide with the precise time change :D
Yeah, right now I grab the current time, then start playing the audio, i.e.,

If you push the button at 11:10:55, the audio will start playing immediately and announce 11:10:55,
but the tone won't sound until something like 11:11:05.

Make a Talking Clock: Page 14


Having it be correct wouldn't be hard, but it would take a bit more work.

it wouldn't be exact seeing as there are longer sounds than others but you could just change the
time by a few seconds but then i suppose the display would be off oh well. :) cool instructable!
Looks sweet! Though I think an IR motion sensor or something more broad would improve the
design. That way, you could just wave your hand in the general direction to get the time. Thanks
for sharing.
The best feature is the beeeep tone :)

That is great! I'm going to get my Polish girlfriend to do the samples, she loves the sound of her
own voice!
A great idea!
What is the total cost of this project that we can not live without?

Doing it on a breadboard is probably about $40 in parts. You'll also need a Prop plug, which is
$25. With an LCD UI & Prop Platform SD, it's $75, but you don't need a Prop Plug.

Either way, you'll also need a microSD card, a power adapter and an old pair of headphones.
in NYC you dialed NERVOUS for the time!

:)

Jonathan
Nicely done! Somehow I can see some spy stuff in here that when you press at the right time the
person gets a secret message :p
Ha! I found a recording of Jane Barbe saying, "At the tone Pacific Standard Time will be Party
Time!", but I wasn't sure when it should play. It's on Pat Fleet's site, though.
I could have some fun with that.

Make a Talking Clock: Page 15

You might also like