This is only a preview of the January 2012 issue of Silicon Chip. You can view 26 of the 104 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 "A Stereo Audio Compressor":
Items relevant to "Build A Simple AM Radio":
Articles in this series:
Items relevant to "3-Input Stereo Audio Switcher":
Items relevant to "Playing USB-Stick & SD/MMC Card Music Without A PC":
Purchase a printed copy of this issue for $10.00. |
You don’t have a computer handy . . . so,
How do you play music
tracks on USB Sticks or
SD/MMC Cards?
by Ross Tester
Do you ever wish you could simply play music tracks that you’ve
saved on a USB stick or memory card? We had a particular reason
for developing this project but it could easily be incorporated into
your home hifi system for real convenience!
T
he “Quizzical” game adjudicator (described in SILICON CHIP
in September 2011) included a
module designed to play MP3 music
files – we used it to provide a different
sound for each quiz contestant, one
which could be changed as required.
As often happens, this project started us thinking about another possible
use for the module – that of playing
music files “on demand” from an SD
or MMC card, USB stick, etc, without
resorting to playing them through a PC.
First, a bit of background. The idea
for this came from a colleague who
manages a public hall, often used for
wedding receptions, 21st birthdays and
even corporate and public meetings.
More often than not (especially for
receptions and birthdays) those using
the venue wanted to play music files
through the hall’s PA system.
If they provided them on an MP3
player with headphone output, no
drama – the PA had been rigged with a
“line in” terminated in a 3.5mm plug.
But just as often, someone would
produce a USB stick (or sometimes a
memory card) and ask if they could
play the music they’d stored on those.
The manager usually obliged by
plugging in his laptop computer and
using that to read the stick or card. But
apart from the security risk of leaving
his laptop when he wasn’t there, it
84 Silicon Chip
was a lot of mucking around. It also
meant he couldn’t use his laptop that
day or evening!
He’d seen the Quizzical and asked
if there was some way its MP3 ability could be adapted to provide this
“service”.
And then we thought, why not go
one step further? If you mounted a
plate containing one of these modules
on (or even in) a convenient wall and
connected it to your hifi system or
home theatre amplifier, you’d have
five-second plug-in convenience if
you ever wanted to play music you’d
previously saved on a USB or SD! And
a lot of people want to do exactly that!
Not exactly practical
On closer examination we decided
the module used in the Quizzical, a
TDB380 from Tenda Electronics, was
not really suitable. Sure, it would read
the files stored on an SD card – but it
needed some “smarts” (eg, the rest of
the Quizzical!) in order to select the
right track(s) and so on.
Not only that, it didn’t have other
features that we really wanted: a USB
interface, for instance, nor would it
take an audio input if someone did
bring along their MP3 player (or even
The three USB/SD/Audio modules we
obtained from Tenda Electronics. All have
the same function but the size differs.
siliconchip.com.au
Here’s what we did with two of the three modules. At left,
the TD898 module fitted to a blank power point plate. It has
the advantage of a front-mounted “audio in” socket. The hole in
the plate is for an IR receiver (all come with remote controls). At right
is the TD896 module mounted in a small box – it’s our fully portable
version. We chose this module because of its overall small size.
their own cassette recorder). The
TDB380 would need quite a lot of work
and additional circuitry to bring it up
to the mark. Scratch that idea.
But wait . . . they have more!
Then we found that Tenda Electronics had several other modules
which appeared to do exactly what
we wanted – not only that, these
modules had the “smarts” built in to
select tracks, fast forward and reverse,
play and pause, even volume controls
(handy for selecting different levels for
background music and dance music).
Some also had LCD displays to tell
you what was happening. All even
had small built-in audio amplifiers,
though these would not be needed for
our original application.
Another bonus: they came with
remote controls, although given the
penchant for hall hirers to walk off
with these in their pockets (as they
do with the door keys!), this might be
regarded as a mixed blessing. . .
The best part is the modules were
cheap as chips – the whole module
sold for less than we could have purchased just the USB and card readers
here in Australia.
Oh, did we forget to mention? Tenda
Electronics is, like the vast majority
of electronics suppliers these days, in
China. More on that anon.
siliconchip.com.au
We reasoned that we could not only
provide what was needed pretty-much
“off the shelf” merely by providing
appropriate connections, we might
also have the germ of another simple
SILICON CHIP project – a fully portable
USB/SD/MMC/audio player.
And this could even take advantage
of the inbuilt amplifiers to give either
headphone or speaker outputs.
So this little feature is the outcome.
It’s not a constructional project because 95% of the work is already done
for you. Basically, all we are doing is
showing you how to connect to the
modules and some mounting ideas.
What data?
Unfortunately, the information on
Tenda’s website (like arguably the
majority of Chinese manufacturers!)
leaves a lot to be desired.
Not only is it out of date (there are
differences between the current modules and the website) the information
is scant, to say the least.
Which module?
Not knowing exactly what we wanted, we ordered three different Tenda
modules from the variety on offer. It
appeared to us that any one of them
would be capable of the tasks required
and that proved to be case – although
one proved to be the best of the lot.
The modules we ordered were the
Tenda models TD866, TD896 and
TD898. The first two have the LCD
readouts mentioned earlier; the last
one does not but it does sport a front
panel 3.5mm audio input socket.
While the first two provide audio
inputs on the PCB, they need to be
connected to.
In the end, we decided the TD898
would be the best for the hall, despite
not having an LCD readout. For our
portable player, we decided on the
TD896 – mainly due to its smaller size.
You can order these modules direct
from Tenda (www.tendaelectronics.
com) but they will set you back $50
each by the time you include freight.
Or you can order the TD896 or TD898
modules from SILICON CHIP for $33.00
each plus $10 p&p. Prices include GST.
(parts<at>siliconchip.com.au)
JST connectors
Unfortunately, all three modules use
JST (Japan Solderless Terminals) connectors, which look like a miniature
header socket (see photos). These connectors are often used in computers
and computer peripherals.
The leads which mate to these
connectors might be solderless when
manufactured but we found they
pulled apart too easily when simply
crimped, so we used a “belt’n’braces”
January 2012 85
AUDIO R
GND
OUT L
AUDIO R
GND
IN
L
Here are same-size top
and bottom views of the
TD896 module showing
connections – the top
side if you wish to use
JST connectors and the
bottom side if you wish
RIGHT
SPEAKER to solder direct to the
LEFT
pads underneath.
SPEAKER The speaker
connections can be
ignored if you don’t
want to use headphones
+ DC
or speakers.
AUDIO R
GND
IN
L
AUDIO R
GND
OUT L
– DC
+ IN
RIGHT
SPEAKER
LEFT
SPEAKER
– IN
approach and (carefully!) soldered the
wires after we’d crimped them.
We used strands of ribbon cable
to make up the connectors. Strictly
speaking the audio input and the output to the amplifier should be shielded
cable but for this length, ribbon cable
is OK and a whole lot easier to handle.
We’ve got to say that making up
these connectors has to be one of the
most fiddly tasks ever devised – even
under a large magnifying glass and
bright light it was a real chore. So
much so that with 20/20 hindsight,
we’d either solder direct to the PCB (on
the back of the JST connector) or we’d
buy ready-made JST header leads.
That’s not the easiest thing to do
either – they’re not something you
can walk into your local lolly store
and buy.
It’s also not particularly easy to buy
the bits to make the leads up. So we
have decided to import limited quantities of these and also make them available through the SILICON CHIP parts
shop – the 2-wire JST cables (100mm
long, bare one end) are $3.45 each (inc
GST) and the 3-wire are $4.50 each (inc
GST) – all prices plus postage.
(they seem to be 38 or 45mm deep).
We decided on an Altronics H-0302
Sealed ABS Enclosure which measures 85 (w) x 80 (d) x 55mm (h) – the
width and height are just enough.
We happened to use one with a clear
polycarbonate lid; this is not a requirement and the standard grey lid would
be fine.
The first step in construction was
to mount the module on the lid – this
requires a little surgery to the lid. Exact
position isn’t critical but make sure it
is centred left to right.
We used a small cutting wheel
mounted on a Dremel-type drill – it
might not be the neatest job in history
but if you get it right, the cutout will be
Portable player
Our first “project” using these
modules – actually the TD896 – is a
semi-portable music player. It’s small
enough to go anywhere but needs
a 3.7V (or 5V) DC power supply to
operate.
We considered making it batteryoperated for complete portability but
reasoned that most applications – at
least in our experience – would have
access to power.
First decision was the case into
which we mounted the module. It’s
reasonably small at 75 x 55mm but the
deciding factor is the depth – at 50mm
it’s too deep to fit into most small cases
86 Silicon Chip
completely hidden by the front panel.
Take “baby steps” – keep enlarging the
cutout a millimetre or so at a time until
the module just fits through.
The supplied self-adhesive label
should be left until the very last, just
in case you need to take the module out
again (the label will cover the screws
when secured in place).
Next, drill the holes in the bottom of
the case for your power socket (8mm),
RCA output sockets (9mm each) and
the earphone/speaker 3.5mm socket
(7mm).
We placed the power socket on the
bottom end of the box and the three
output sockets on the top but you can
place them where you want.
Taking note of the polarity of the
power JST connector, solder the power
socket to a 2-pin JST lead, then use two
more 3-pin JST leads to connect to the
audio output sockets (note which pin
is ground on the JST sockets; the two
audio output socket grounds connect
together to this wire).
Finally, connect a 2-pin JST connector to the earphone/speaker socket
(again, centre pin is ground).
Now plug the JST connectors into
their appropriate sockets on the PCB
and you’re just about ready to rock
and roll.
Power supply
And here’s how it fits into the
Altronics H-0302 box. The DC input
socket is in the foreground, while
the audio input (3.5mm socket) and
audio output (2 x RCA sockets) are on
the rear wall. Otherwise everything
mounts onto the front panel.
The Tenda literature says either
3.7V or 5V DC – we’ve taken a punt
on 3.7V because we found a label that
said so! Until proven otherwise, we’ll
stick with that!
Fortunately, 3.7V power supplies
are quite common these days – many
mobile phones use them and given
the fact that there are several million
more mobile phones in Australia than
people, we’re assuming there will be a
fair number of surplus power supplies
as well. Even if you have to buy one,
siliconchip.com.au
AUDIO OUT
R GND L
LEFT
SPEAKER
DC IN
– +
it’s not likely to cost a King’s ransom!
Just watch the polarity when you
connect it up – it’s most usual to
have the centre pin positive but we’ve
certainly seen exceptions. The PCB is
clearly marked.
The original request –
amplifier music input
Connections, JST leads etc are
similar to the portable player, except
that we ignore the on-board stereo
amplifier. Of course, if you want to
use the amplifier for you application,
go right ahead!
After dithering about with various
mounting arrangements for a couple
of weeks, we finally hit on one which
we think makes sense. The difficulty,
once again, was finding something
deep enough which could be mounted
on a wall.
We were restricted in our options
because the unit needed to be mounted
on a solid masonry wall skinned by
Gyprock. Hence the module had to be
mounted proud of the wall with enough
depth to suit. (The Tenda TD898 module requires 43mm clearance).
We actually used two products to
– +
DC IN
RIGHT
SPEAKER
The TD898 module does not have a JST connector on the
front for audio out – you need to solder to the appropriate
pads on the rear of the board. Fortunately, all pads
are quite clearly marked. DC in can be via a front JST
connector or it too can be soldered to the pads.
get the depth needed. First, a standard
37mm-deep power point mounting
block (HPM 140P), on top of which we
mounted an 11mm-deep power point
mounting plate from an HPM XL770/0
plate and cover kit. Together, that gives
us 48mm depth.
We could have mounted the Tenda
module directly on the plate but it
looks rather ugly. So the module itself
mounts on the blank cover plate which
comes with the HPM XL770/0.
The beauty of this particular blank
plate is that it clips onto the mounting
plate – no screws required. (While we
used HPM, there’s nothing to stop you
using an equivalent product in another
brand eg, Clipsal, etc).
Naturally, you’ll require a cutout in
both the mounting plate and the blank
plate to suit the module – our cutout
was 87 x 33mm right in the centre.
This creates something of a problem
– the lugs for screwing the mounting
plate to the block have to be removed
to get the module to fit.
We overcame this by using a couple of self-tapping screws though the
outer pair of holes left after cutting the
lugs out. Again, these are completely
covered once the plate housing the
module is snapped into place.
Termination
As the wires to the JST connectors
are quite flimsy (they’re only ribbon
cable, after all), we wanted to make
a more robust connection for both
power and audio out (to amplifier). To
this end, we cut a scrap of old PCB to
an appropriate shape and mounted a
5-way mini terminal block on it – two
for power, three for audio [L, GND & R).
This arrangement suited us but you
might come up with some other way
of protecting the fine ribbon cable and
connector.
Connecting to your amplifier
If you are running into a stereo
amplifier, simply connect the left and
right “audio out” to an “Aux” input
via twin shielded cable.
If you are running into a PA or similar (mono) power amplifier, you need
to combine the left and right channels
into a single mono input. Ideally, there
should be some resistance – say 1k –
in each line to isolate them from each
other but we’ve never had a problem
shorting left and right to mix them.
Mounting within the wall
The TD898 module mounted on the
wall and ready for action!
siliconchip.com.au
Because we are using standard
power outlet fittings, it follows that
if you have a standard stud/Gyprock
wall, you could mount the module
almost entirely within the wall cavity
for a less obtrusive, much neater finish.
For example, as long as there is sufficient space in the cavity you could
eliminate the 140P mounting block
and simply have the XL770/0 block
fixed to the wall using a power outlet
support clip or plate.
Then your USB/SD module, mounted on its blank plate, would simply
clip into place on that block.
SC
January 2012 87
|