This is only a preview of the November 2001 issue of Silicon Chip. You can view 29 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "100W RMS/Channel Stereo Amplifier; Pt.1":
Items relevant to "A Neon Tube Modulator For Cars":
Articles in this series:
Items relevant to "A Low-Cost Audio/Video Distribution Amplifier":
Items relevant to "Short Message Recorder & Player":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
Download WAV files from your PC and play them at will!
short Message
RECORDER AND
Player
by Leon Williams
Got a need for a short audio message player? Been tempted to build or
buy a voice recorder? Well, here’s a voice recorder with a muchimproved recording technique. No longer limited by the shortcomings of
built in microphones, you edit and enhance your messages as WAVE files
on your PC and then download them direct to the Message Player.
64 Silicon Chip
www.siliconchip.com.au
W
to-female 25-way cable. The download
used in PCs and the Internet because
hile there have been many
software is started and the required file
there is plenty of software to generate
projects for voice recorder/
opened, the shunt on the PC board is
and play them. They don’t employ
playback boards, they all
moved from PLAY to PROGRAM and
complicated compression algorithms
suffer from one major drawback.
the file is then downloaded. It is very
but instead just have a header block
They can only record and playeasy and takes about 15 seconds to
followed by the raw audio data.
back sounds (usually voice) that are
complete.
recorded by a little onboard electret
WAVE files come in a number of
microphone. You push a button and
The message player is built on a
formats providing varying levels of
speak into the microphone and that’s
single-sided PC board, with all the
sound quality from basic to CD qualabout all you can do. You can’t really
components on-board except for the
ity.
add any exciting sound effects or enloudspeaker and the power and D
To keep the Message Player inexhance your voice in any way.
connectors.
pensive, it has been designed to only
With the Message Player all that’s
All the components are standard
work with 8-bit mono 8kHz files.
changed. Now you can record, mix
types available from most electronThis means that we don’t need a lot
and edit sophisticated sound files
ics shops. The exception may be the
of memory to hold the files and so
with your PC and download them to
SRAM chip. These have been used by
we can get away with a single SRAM
be played when and where you want.
the millions over the years, so you may
chip.
be able to locate one from a disposal
OK, so where would you use the
While the Message Player sound
source. Failing this, you can get them
Message Player? The answer is any
output is not exactly hifi, it is entirely
new from places like Farnell and RS
place that you want short audible
adequate for the purpose.
messages to be heard.
Let’s have a closer look at the WAVE
What about a personfile format we are
alised front door bell or a
using.
warm message to welcome
The start of the
Stores standard WAVE
(.WAV) file format
shoppers, or maybe a talk-
file contains a header
Battery back-up for me
ing car alarm to tell you
block, a block of data
mory
Quick PC file downloa
your lights are on?
that provides inford
A unique application
mation about the file
Simple logic control int
erfacing
could be to replace your
including things such
Built in 250mW audio
telephone ring sound with
as the sampling rate
amplifier
a voice message like “Hey
and the size of the file.
Easy to use companion
software
you, answer the phone”!
We won’t go into
Runs from 9V plug pa
All you would need to do
it
in
depth here but if
ck at low power
is detect the ring signal
you are interested, a
and trigger the Message
search on the Internet
Player to play the message.
will uncover plenty of
Components.
The Message Player has a replay
information about the
While a 62256 is specified for the
time of four seconds and in replay
different WAVE file formats, including
storage SRAM, manufacturers somemode has only two controls. These are
full descriptions of the header block.
times use different labelling, such as
a logic level negative pulse to start the
Mono obviously refers to the fact
43256. This should be fine, rememreplay (“GO”) and a similar pulse to
that there is only one channel of aubering that the majority of 32K SRAM
stop the replay (“STOP”).
dio, hence the reason we only use one
chips have the same pin outs and funcIf the message is not stopped
speaker! The frequency of 8kHz refers
tionality. Don’t worry about the access
during the four seconds it will stop
to the rate at which each byte of data is
time, usually written as a couple of
automatically at the end. If you want
converted from digital to analog to prodigits at the end of the part number,
the message to continue, it’s simply a
duce sound. At 8kHz (8000 bytes per
perhaps preceded with a dash.
matter of holding the GO input low
second), we can reproduce voice quite
This is not a critical issue with the
until you want it to stop.
well but reproducing high frequencies
Message Player, so if you are purchassuch as 15kHz is not possible. At this
These pulses can be derived from
ing a new one, select the slowest to
rate we can get four seconds of replay
simple pushbutton switches or other
save some money.
from a 32Kbyte file.
more elaborate interfacing circuits.
The Message Player is housed in a
Each byte of audio data is held as
If you think that the Message Player
plastic case but there is no reason why
eight bits, which gives us a maximum
memory is not big enough, just time
it couldn’t go into an existing piece
of 256 different bit combinations. The
yourself speaking for four seconds and
of equipment if you have the space.
reproduced audio waveform is comyou will see that you can get a lot said
The normal power supply would be
prised of 255 equal voltage steps and
in that time. The Message Player is
a 9V plugpack but any regulated DC
will be at minimum amplitude when
only intended for short message applisource between 8V and 12V will also
all the bits are zero (00 Hex) and at
cations and anyway, who needs a 60
be suitable.
maximum amplitude when all the
second message every time a wanted
bits are a one (FF Hex). A feature of
event happens?
Wave files
the WAVE format is that when there
To download the sound files into
WAVE (“.WAV”) files are probably
is silence (no sound), the amplitude
the player, you connect it up to your
the most common audio file format
rests at midway (7F Hex).
PC printer port with a standard male-
MESSAGE PLAYER F
EATURES
www.siliconchip.com.au
November 2001 65
66 Silicon Chip
www.siliconchip.com.au
Fig.1: it might look complicated but in
reality there’s not much to the circuit. Its operation is described in the
text. Note that the two jumpers were
brought out to a DPDT slide switch in
our final prototype.
Perhaps a more correct way of looking at a WAVE file is that it swings
negative and positive about a central
resting point.
Circuit description
The circuit is shown in Fig.1. The
audio file is stored in IC1 which is
a 32K (32768) by 8-bit wide SRAM
(Static Random Access Memory) chip.
As this is the heart of the design, let’s
have a close look at how it operates.
An SRAM chip looks like any other
logic chip with a black plastic body
and pins. The difference is that it
can hold lots and lots of bytes (eight
bits) of data, which can be entered
(written), stored and read back very
quickly.
Each location (memory cell) within
the SRAM is selected by the bit pattern
on the address pins. When all the address lines are low we select the first
memory cell. As they increment in
binary they select the next byte and
so on, until they are all high when the
last memory cell is selected.
The SRAM chip we are using is a
62256, where the sequence 256 refers
to the fact that it can store 32K x 8 bits
(32 x 8 = 256). A 6264 would store 8K
x 8 bits, etc. Our chip has 15 address
lines to address a maximum of 32,768
locations, and eight data lines.
Those who have access to a 32K
SRAM data sheet will notice that
the address and data line labelling
is different to that shown in Fig.1.
This was changed in this instance to
simplify the PC board layout, however
changing the notations does not cause
a problem.
The term random in SRAM refers to
the fact that any memory cell within
the chip can be accessed (written or
read) in any sequence.
The data lines can also be interchanged, as long as we read and write
the data with the same bit pattern. That
is, if we write a bit to a line we label
D7, then we must also read back the
bit as D7.
Because we do not need to access
the memory cells in any particular
sequence and because all the data bits
can be treated equally, we can label
the address and data lines as we wish.
As well as the address and data
lines, the SRAM has three control
lines that must be used correctly to
write and read the SRAM. Pin 27 is
the Write (WR) pin and is normally
high. It is taken low when writing
www.siliconchip.com.au
This shot of the inside of the message recorder was taken before we decided to
add the two pushbuttons switches (“GO” and “STOP”) on the end panel, as well
as bringing the “PROGRAM” and “PLAY” headers out to a slider switch on the
front panel. These switches make the unit much easier to use: you don’t have to
whip the front panel off every time you want to change the message!
eight bits of data into a cell selected
by the address lines. To read data
back from the chip, the write line
must be high.
Pin 22 is the Output Enable (OE)
pin and controls the output buffers.
When high the output is disabled
and placed in a high impedance state,
while taking it low enables the output buffers.
Pin 20 is the Chip Select (CS) input
and when it is high the chip is de-selected. In this state, read and write
requests are ignored and the chip is
placed in standby mode. When the
chip select pin is low, the chip operates normally and data can be read
and written.
In contrast to memory devices such
as EPROMs and EEPROMs, IC1 is a
volatile memory. This means that it
will only hold the data in its memory
cells while power is applied.
Luckily, the memory can be maintained when the main power is removed, through a secondary battery
backup, as long as pin 20 is held high.
The backup supply can be as low as
2V, needing a current of only a few
microamps.
This can be easily supplied by a
couple of AA cells which under these
conditions should last a long time,
probably as long as they would left
on the shelf.
Addressing and control
IC2, a 4040 12-stage binary counter,
is used to address the first eight lines
of the SRAM. The clock input is on
pin 10 of IC2, and a high on pin 11
resets all outputs to zero. IC3, a 4024
7-stage binary counter, addresses the
remaining seven lines of the SRAM
and is clocked when pin 13 of IC2
goes low.
The reset line of IC3 is connected to
the reset line of IC2, so that both are
reset simultaneously.
IC4d is configured as a Schmitt trigger clock oscillator with a frequency of
8kHz, set by the .022µF capacitor and
VR1. With the clock operating at 8kHz,
we address 8000 memory locations
per second.
The memory size is 32,768 bytes,
so the time taken to address all the
memory, and hence the replay time is
32,768/8000 = 4.096 seconds.
The clock is enabled when pin 13
November 2001 67
Fig.2: almost all the
components mount
on one PC board,
as shown here. The
two “jumpers” (for
programming and
playing) can be
moved to a front
panel DPDT switch to
save opening the case
every time you want
to change the message. Likewise, the
“GO” and “STOP” PC
stakes can be brought
outside the case.
is taken high and stops when pin 13
is low. Pin 8 of IC4c is normally held
high by a 10kΩ resistor, so clock pulses
can pass through via pin 9 and onto
the address counters.
When the clock is stopped, IC4d pin
11 is forced high, which allows the
write pulses through IC4c in program
mode. More on this later.
Starting and stopping of the clock
and hence the replay is controlled by
IC4a and IC4b. This crossover configuration is called a set-reset flipflop,
and toggles between two states. Pin 1
of IC4a and pin 6 of IC4b are normally
held high by 100kΩ resistors.
Assuming pin 3 of IC4a is low, pin
4 of IC4b and hence pin 2 of IC4a
will be high. When the GO input is
pulled low, pin 1 of IC4a is pulled low,
forcing pin 3 to go high. This enables
the clock and forces pin 4 of IC4b to
go low. Even when the GO input is
taken high again, the flipflop stays in
Compare this picture with
the component overlay
above when assembling
the PC board and you
shouldn’t have any problems.
68 Silicon Chip
www.siliconchip.com.au
Parts List – Message Player
1 PC board, code 01111011
1 plastic case, 197mm x 113mm x 63mm (Jaycar HB6012 or equivalent)
19 PC board stakes
2 2-pin headers with shunts, OR
1 DPDT mini slider switch
1 2-pin header shunt
1 25-pin male D connector with mounting hardware
1 76mm 8Ω speaker
1 DC panel-mount socket to match plug pack
1 28-pin IC socket
1 Twin AA battery holder
4 12mm x 3mm screws and nuts
4 Self adhesive feet
Light duty hook up wire, tinned copper wire,10-way ribbon cable
Double-sided tape pads (for securing battery holder)
Fig.3: here’s how to wire the 25-pin
“D” socket which connects to your PC
via a standard parallel cable. Pins
18-25 would normally be soldered together with a straight length of tinned
copper wire.
the same state. The flipflop will only
change state when pin 6 of IC4b is
pulled low. This can occur in one of
two ways:
(1) by pulling the STOP input low;
pin 3 of IC4a then goes low, disabling
the clock and forcing pin 4 of IC4b
high.
(2) when pin 6 is pulled momentarily
low by the negative pulse generated
after the last memory cell has been
addressed. This is accomplished by
differentiating the negative edge of
IC3 pin 3 with a .01µF capacitor and
a 100kΩ resistor.
In a similar way, the rising edge of
IC4b pin 4 is differentiated by a .01µF
capacitor and a 100kΩ resistor, creating a high-going pulse to reset the address counters. Diode D5 is employed
to limit negative spikes which could
damage the ICs when IC4b switches
from high to low.
Because the GO and STOP inputs
may be controlled from external control circuits, diodes D1-D4 and the
10kΩ resistors are included to protect
the inputs from excessive current and
voltages.
In summary, the start/stop operation
works like this. Pulsing the GO line
low starts the clock and the replay.
www.siliconchip.com.au
Semiconductors
1 32K x 8 SRAM 62256 or equivalent (IC1)
1 4040 12-stage binary counter (IC2)
1 4024 7-stage binary counter (IC3)
1 4093 quad NAND gate (IC4)
1 LM358 dual opamp (IC5)
1 LM386 audio power amp (IC6)
1 BC547 NPN transistor (Q1)
5 1N4148 signal diodes (D1-D5)
3 1N4004 power diodes (D6-D8)
1 1N5819 Schottky diode (D9)
1 7805 positive 5V regulator (REG1)
Capacitors
2 470µF 25VW PC electrolytic
1 470µF 16VW PC electrolytic
1 100µF 16VW PC electrolytic
1 10µF 16VW PC electrolytic
5 0.1µF MKT polyester
1 .047µF MKT polyester
1 .022µF MKT polyester
4 .010µF MKT polyester
1 .0022µF MKT polyester
Resistors (0.5W, 1%)
1 4.7Ω
1 10Ω
9 1kΩ
1 5.1kΩ 1 6.2kΩ
1 12kΩ 7 15kΩ
10 30kΩ
3 100kΩ
2 20kΩ horizontal trimpots (VR1, VR2)
Pulsing the STOP input low during
a replay will stop the clock and the
replay. Replay will also stop automatically when the last address line goes
from high to low.
It is also possible to replay continuously by holding the GO input permanently low. In this case, there will be a
small gap in the replay as the address
counters go from maximum count to
zero at the end of the message but it
is hardly noticeable.
Sound generation
To read data from the SRAM, the
6 10kΩ
shunt must be in the Play position.
As each memory cell is addressed,
the respective data will appear at the
data pins.
The array of 15kΩ and 30kΩ resistors connected to the data pins
forms what is referred to as an R/2R
digital-to-analog converter. This type
was chosen because it is much cheaper
than a dedicated D-to-A converter IC,
and in any case does an excellent job
in this circuit.
The voltage at the D-to-A output is
buffered and appears at pin 1 of IC5a.
It has a resolution of 256 equal steps
November 2001 69
ranging from around 0V to 5V. 0V
represents the minimum level of the
audio waveform and 5V the maximum
of the audio waveform, while 2.5V is
the rest or silence level.
IC5a is wired as a non-inverting
buffer and has a very high input
impedance. This is necessary to stop
the low impedance of the following
circuits loading the D-to-A converter
and reducing its accuracy.
Due to the low sampling rate used
(8kHz), the audio waveform needs to
be low-pass filtered to remove high
frequency components and improve
the listening quality.
IC5b is configured as a 2-pole lowpass filter with a cut-off frequency of
4kHz. The output level is quite high at
this point, so a 10kΩ resistor is included between the output of IC5b and the
volume control to avoid overloading
the audio power amp stage.
The signal from the volume control
is capacitively coupled to the audio
power amp IC6. This is a well-proven
circuit using an LM386 in its basic
form, driving an 8Ω speaker.
A 4.7Ω resistor and a 470µF capacitor provide supply decoupling, while
the .047µF capacitor and 10Ω resistor
connected to pin 5 help to prevent
instability in the output stage.
Power supply
The power supply is a standard
7805 3-terminal voltage regulator fed
from a 9V plugpack. The circuit draws
minimal current, so one rated at say,
150-300mA, will be ample.
Avoid using a plugpack with a higher voltage rating, because the LM386
is not designed to withstand a supply
voltage much greater than 12V. Of
course, you can use a 9V regulated
supply if you prefer.
Diode D6 is used to prevent damage
to the circuit from supplies connected with reverse polarity and a 470µF
capacitor smoothes the usually unregulated plugpack output.
The regulator is ‘jacked up’ with a
diode (D7) in the ground lead, giving
an output voltage of 5.6V. A 0.1µF
capacitor is included at the output of
REG1 to help prevent instability.
The output voltage is reduced back
to 5V by diode D8 which feeds the
main circuit. The audio sections are
powered from the unregulated supply
and consequently do not operate when
the main DC power is removed.
When the main power is disconnected and the output of the regulator
goes below 4V, Q1 turns off and CS
is pulled high. When CS is high the
SRAM is placed in standby mode and
consumes very little power. The CS
lead must be high before the battery
backup supply switches in otherwise
the data retention will not work.
The keen-eyed will notice that
the battery backup supply is also
connected to the remainder of the
logic ICs. These are CMOS chips with
minimal current drain and so do not
significantly degrade the expected battery life.
Battery backup
Programming
Diode D9 is used to connect the
battery backup supply when the main
supply is removed. With the main
supply connected, D9 is reverse-biased
because the cathode is more positive
than the anode, so no current flows
from the batteries.
However, when the main supply is
missing, D9 conducts and the batteries
supply power to the SRAM.
D9 is a Schottky diode, which has
a much lower forward voltage drop
(about 0.3V) than a normal diode and
is used to maximise the SRAM data
retention time as the battery ages.
A typical SRAM will hold its memory with a supply as low as 2V. With 3V
or more from a pair of new AA cells,
minus the 0.3V drop in the Schottky
diode (D9), around 2.7V is available
for the SRAM.
Transistor Q1 is normally biased
on due to the base resistor connected
to the output of REG1. The collector
of Q1 is connected to the Chip Select
line of IC1, s o when main power is
connected, CS is pulled low, enabling
normal chip operation.
Programming is done by connecting
to the 25-pin parallel or printer port of
a PC operating under DOS or a DOS
box in Windows 95 or Windows 98
(Windows NT, Me and 2000 use the
parallel port differently and may not
work properly).
The data to be programmed into the
SRAM is output in parallel on pins 2-9,
and the negative going programming
clock pulses are output on pin 1. The
ground connection is made through
paralleled pins 18-25.
To place the board into program
mode, the shunt must be moved from
the Play header onto the Program
header pins. This causes pin 22 (Output Enable) to go high, disabling the
output buffers, and connects the PC
clock signal to IC4c and pin 27 (Write)
of IC1.
Before programming starts, the
replay must be stopped so that the address counters are reset and addressing
the first memory location. The 1kΩ
resistors couple the data leads from
the PC into the data pins of IC1 and
also protect the inputs from damage
from surge currents. The resistors associated with the D-to-A converter are
much higher in value than 1kΩ and so
do not interfere with the programming
process.
A 1kΩ resistor and a .01µF capacitor
Table 1: RESISTOR COLOUR CODES
No.
3
10
7
1
6
1
1
9
1
1
Value
100kΩ
30kΩ
15kΩ
12kΩ
10kΩ
6.2kΩ
5.1kΩ
1kΩ
10Ω
4.7Ω
70 Silicon Chip
4-Band Code (1%)
brown black yellow brown
orange black orange brown
brown green orange brown
brown red orange brown
brown black orange brown
blue red red brown
green brown red brown
brown black red brown
brown black black brown
yellow violet gold brown
5-Band Code (1%)
brown black black orange brown
orange black black red brown
brown green black red brown
brown red black red brown
brown black black red brown
blue red black brown brown
green brown black brown brown
brown black black brown brown
brown black black gold brown
yellow violet black silver brown
Table 2: CAPACITOR CODES
Value
IEC code
EIA code
0.1µF 100n 104
.047µF 47n 473
.022µF 22n 223
.01µF 10n 103
.0022µF 2n2 222
www.siliconchip.com.au
Fig.4: the full-size PC
board pattern, ready
for you to make your
own or to check
commercial boards
for any defects. This
pattern can also be
downloaded from the
SILICON CHIP website.
filter the programming clock input,
to eliminate unwanted noise from
providing false write pulses. Before
programming starts, pin 9 of IC4c will
be high and as the programming pulse
is also high, pin 10 of IC4c will be low.
Programming starts with the PC
outputting eight bits of data onto the
data leads. The programming clock
line is pulsed low, pulling the Write
pin of IC1 low and writing the data into
the addressed memory cell. When the
programming pulse goes high again,
pin 10 of IC4c goes low, clocking
the address counters onto the next
location.
It is important when programming
memory that the address and data
lines are steady while the Write line
is pulsed low and returns high. At
first glance, the circuit may seem at
odds to this requirement. However,
the address counters will not change
state until well after the Write line has
been taken high due to the propagation
delay in IC4c, IC2 and IC3.
The software repeats this process
until all the memory locations have
been programmed. The rate that the
programming pulses are generated
and hence the total programming
time could have been much faster but
it has been purposely slowed down.
This has been done to avoid any problems that might arise with long cable
lengths and different PC printer ports.
In any case, the whole process only
takes about 15 seconds on an average
PC.
www.siliconchip.com.au
At the conclusion of programming
the shunt is moved back to the Play
position. A 10kΩ resistor holds the
Write pin high when the shunt is
removed, avoiding unwanted writes
to the SRAM.
Construction
Start construction by assembling
the PC board. There are seven wire
links to be installed, so do these first.
Ensure they are straight and lay flat
on the PC board. Follow this with the
smaller components, such as the PC
stakes, IC socket, trimpots, resistors
and diodes.
Next, install the capacitors, ensuring
that the electrolytics are installed with
correct polarity. Follow this with the
transistor and ICs but leave the SRAM
chip until later. Note that not all the
ICs face the same way, so check the
component overlay diagram before
soldering them in.
Take care with the CMOS chips,
by trying to avoid touching the pins,
earthing yourself before holding them
and soldering the power supply pins
first. The 5V regulator (REG1) is installed with its metal tab facing into
the PC board. It runs cool and won’t
need a heatsink.
Once the PC board is loaded you
can prepare the case which needs to
have a number of holes made in it. See
the photographs as a guide. Start with
a hole to mount the DC socket at the
righthand end of the case.
The D connector is mounted on the
side of the case near the programming
PC stakes. The rectangular cutout for
the D connector is easily made by
drilling a number of large holes and
finishing to shape with a small file.
You will also need to drill two holes
on either side of the cutout to secure
the connector with the mounting
hardware.
Place the PC board on the bottom
of the case, locating it so that there
is enough room at the lefthand end
to sit the battery holder. Mark the
positions of the holes, remove the PC
board and drill with a 3mm drill. Drill
a pattern of holes in the middle of the
lid to allow sound to escape from the
speaker. If you use the specified case
you’ll find dimples on the underside
of the lid which make drilling neat,
evenly-spaced holes relatively easy.
Once the case has been prepared,
install the DC socket and D connector
and mount the PC board in the case
with 3mm screws and nuts. An extra
nut is placed on each screw between
the case and the PC board to act as a
spacer.
Mount the speaker on the inside of
the lid with a bead of silicone adhesive
placed around the edge and leave to
cure.
The DC socket and the speaker are
wired to the PC board stakes with
hookup wire. Ensure that the speaker
wires are long enough to allow the lid
to be removed and placed alongside
the case. The D connector is wired
to the PC board using a short length
November 2001 71
MESSAGE RECORDER/PLAYER
9V DC
PLAY
SILICON
CHIP
GO
www.siliconchip.com.au
PROGRAM
STOP
PC PARALLEL PORT
Fig. 5: here’s the full-size artwork for the front panel. You can photocopy this or if you want it in colour, download it from
www.siliconchip.com.au. As you can see, this panel incorporates a switch for the Play/Program function and also brings
the “GO” and “STOP” pins outside the case. Exactly how you do this is up to you!
of multi-coloured ribbon cable, with
pins 18-25 of the D connector soldered
together with a piece of bare tinned
copper wire.
The battery holder is placed at the
end of the case and soldered to the
battery PC stakes using the wires that
come with the holder.
Apply four self-adhesive feet to the
bottom of the case when finished.
Initial testing
Once construction is complete,
check your component placement and
soldering carefully. Remember that
the SRAM chip should not be in place
yet.
If all appears OK, connect the plug
pack to the DC socket and measure
the voltage at the power supply socket
with a multimeter.
This should be somewhere around
9-12V, depending on the plugpack
used. Next, measure the voltage at
REG1’s input, which should be around
0.6V less.
Then check the voltage at the
junction of D8 and D9, which should
be close to 5V. If not, disconnect
power quickly and look for errors,
especially with the power wiring
72 Silicon Chip
and the installation of the polarised components.
When you are satisfied that the
power supply is working, remove the
supply and adjust the two trimpots
to mid-position. Now plug the SRAM
chip into its socket (with pin 1 closest
to IC2) and place the shunt in the Play
position.
Apply power again, and briefly
ground the GO input. A raucous
noise should come from the speaker
for about four seconds as the SRAM
outputs its random data. Ground the
GO input again and then momentarily
ground the STOP input to check that
the replay stops before the 4-second
period elapses.
Now permanently ground the GO
input and measure the frequency of
the clock at pin 11 of IC4d. Adjust
VR1 until it is as close as you can get
to 8kHz.
In the unlikely event that no sound
comes out, check firstly that VR2 is
turned from the ground position. If
this appears OK then you will have
to check out the other parts of the
circuit, such as the oscillator and the
audio stages.
Fault finding will be a lot easier if
you have access to an oscilloscope,
however with the foregoing description of the circuit you should be able
to find most problems with just a multimeter and monitor amplifier.
The software
To download files into your Message Player, you will need to load the
companion software file called MSGPLAY.EXE. This is available from the
SILICON CHIP website and comes as a
zipped up file.
Once you have downloaded the file,
unzip it using WinZip and copy it to a
new folder on your PC. Use this folder
to store all your generated sound files,
as it makes them easier to find if they
are all together.
MSGPLAY is a DOS program, and
is obviously designed to work with
a PC running DOS. However, it runs
quite happily in a DOS window under
Win95 or Win98.
As previously mentioned, Win
NT, Me and 2000 operate differently and will not work properly with
MSGPLAY. (Everything appears to
be working but the WAV file doesn’t
download).
When you run MSGPLAY you will
www.siliconchip.com.au
be greeted with an opening menu
screen. On this menu you have four
options, which you highlight with the
Up and Down arrows keys and then
choose by pressing Enter.
The program is easy to drive and
provides lots of on-screen messages
to help you through. The Open file
menu allows you to enter a file name
for opening, the Download menu steps
you through the download process and
choosing the final option exits you
from the program.
The Setup menu is the third option
and allows you to select the printer
port that you have the board connected
to (usually LPT1) and also provides
two test files for downloading. These
files can be used if you think you
have troubles with the hardware, or
you simply can’t wait to hear something other than noise come out the
speaker.
The first file is four seconds of
1000Hz sinewave, which you can use
to test that the whole board and the
PC connection is working. The second
test file is a 31Hz sawtooth wave with
256 steps. If you download this file
and run it, you will be able to check
the linearity of the D-to-A converter
with an oscilloscope connected to pin
1 of IC5a.
Making files and downloading
Producing your own WAVE files is
quite easy. Every PC that has a sound
card and a sound recorder program can
make WAVE files. To make advanced
ones, through editing, mixing and
adding special effects, you really need
a special sound file editor.
Don’t think that you have to rush
out and spend a fortune on software,
because you can download shareware
or freeware from the Internet. They
may not give you all the features of
a professional sound file editing program but you’ll still be able to produce
exciting results.
Just get on the Internet, use your
favourite search engine and start
searching.
The file that you create must be
mono, 8kHz and 8-bit. If you have
created it under another format, you
need to convert it first. Just to make
sure, the download software inspects
the file when it is opened and informs
you if it is not suitable.
If your final file is large, you will
only be able to store the first 32KB.
If your file is smaller than 32KB,
the download software will fill the
remainder of the SRAM with silence
(7F Hex).
So let’s download and play a file.
Firstly, run the download program,
select the Setup option and choose
the connected printer port. Then select
the File open option and enter the file
name. Select the Download option
and follow the instructions. Place the
shunt in the Program position and
connect the cable.
Start the download and you will
see the counter showing you the progressive count as the bytes are written
to the SRAM. You will also notice, as
the download is progressing, that you
can hear in slow time the file that you
have created.
This is quite normal as the data being downloaded to the SRAM is also
fed to the D-to-A converter and audio
amplifier but at a much slower rate
than normal.
Once the downloading is finished,
move the shunt to the Play position
and disconnect the cable.
Pulse the GO input low (eg, short it
to 0V) and you will hear your creation
being played. To change the playback
volume, adjust volume trimpot VR2
with a small screwdriver.
Now is a good time to check the
battery backup operation. Insert two
new AA cells into the battery holder
and disconnect the plugpack. Wait a
few minutes and then re-connect the
plugpack.
Ground the GO input and if the file
is still in the SRAM, you will hear it
being played. If not, it may be that
the batteries are in the wrong way or
that diode D9 was installed with the
incorrect polarity. Or the batteries
could be flat!
Interfacing
The Message Player requires inputs
to start and stop the replay. We’ll leave
it up to you to work out an interface
for your particular application.
The robust GO and STOP input
circuits allow a wide range of control
possibilities.
The simplest way is to use two
pushbutton switches wired between
the inputs and ground for manual
control.
However, if you have external
inputs they can be either 5V negative-going pulses from logic circuits
or a set of normally-open relay contacts or even open-collector transistor
switches.
Remember that the GO input must
be normally high and grounded momentarily to start replay but you only
need a similar STOP pulse if you don’t
want the full 4-second replay.
If you build a small interface board,
you’ll find plenty of space within the
case to mount it and you’ll probably
be able to power it from the existing
plugpack supply as well.
SC
K&W HEATSINK EXTRUSION. SEE OUR WEBSITE FOR
THE COMPLETE OFF THE SHELF RANGE.
www.siliconchip.com.au
November 2001 73
|