e015020.PDF
(
97 KB
)
Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
READERS’
CORNER
P.O.Box 190
We can only answer questions or remarks of general interest to our readers, concerning projects not older than two
years and published in
Elektor Electronics
. In view of the amount of post and email received, it is not possible to
answer all correspondence, and we are unable to respond to individual wishes and requests for modifications to,
or additional information about,
Elektor Electronics
projects.
How much current
from the USB?
USB port is 500 mA, and no fur-
ther devices may be powered
once this current is reached.
Depending on their current
requirement, USB devices fall
into one of three classes:
1. low bus powered
2. high bus powered
3. self powered
Devices from the first two
classes draw all necessary cur-
rent from the USB port. Self pow-
ered devices, on the other hand,
have an internal power supply
and require little or no power
from the USB. A unit load of
100 mA has been defined for the
USB. Devices from the first class
(low bus powered) are only
allowed to draw one unit, i.e.,
100 mA. The same goes for high
bus powered devices (class 2)
when in the pre-configuration
state. Up to 5 load units are
allowed in class 2 devices when
configured.
The amount of current an USB
device is allowed to draw from a
port depends on five factors:
A. Device status
– power-on: max. 1 load unit
– configured: 1 load unit
(100 mA) for low-power
devices, or up to 5 load units
(500 mA) for high power
devices provided they have
been allowed to do so by the
OS
– suspended: not exceeding
500 mA including current
through pull-up to D+ or D–.
signal of a CD player playing
Jean Michel Jarre’s ‘Oxygen 7-
13’. It was clear that the peaks
of the waveform were flat where
the signal was greater than
what could be reproduced by the
CD. This is also known as clip-
ping.
Using an oscilloscope in this way
can’t really tell us how much the
CD player affects the signal qual-
ity. Between the CD and oscillo-
scope will be an oversampling
digital filter, a digital-to-analogue
converter and finally an ana-
logue filter. The most accurate
way to check a CD is to extract
the track digitally and store it as
a WAV file. This will be an exact
digital copy of the CD, assuming
there were no read errors. The
creation of the WAV file shouldn’t
be a problem since it is a func-
tion that is found in most cur-
rent CD ‘rippers’. A computer
program can then be used to
analyse the contents of this WAV
file.
A WAV file consists of a header
followed by the thousands of
samples that make up the digi-
tised sound. The 16-bit format
used on CDs gives these samples
a range from -32768 to 32767. In
order to have a closer look at
these WAV files I have written a
program that can analyse them.
As the first step, the program
creates a histogram of the WAV
file. This counts how often each
sample value occurs in the WAV
file, and gives a display as shown
in Figure 1.
The values near zero occur most
often; the more you go to the
extremes of –32768 and 32767,
the less often they occur. If there
was any clipping at the record-
ing stage, all strong signals will
be rounded to the extremes of -
32768 and 32767, which results
in two peaks at the ends of the
histogram. This way you can see
if there is any clipping present
and at what level (it is possible
Dear Sir — in the article ‘USB
Audio-DAC’ (December 2000),
you state on page 45 that the
current consumption of the cir-
cuit (60 mA), is such that it was
not considered appropriate to
power it from the USB port,
which has a maximum spec of
100 mA in this respect. Accord-
ing to information I have avail-
able, a USB device may draw up
to 500 mA. For example, the
Canon CanoScan N650U gets its
complete power requirement of
2.5 watts (500 mA x 5 V) from a
USB port. This works just fine,
even if an additional USB camera
is connected. I would therefore
be interested to know where you
got the 100 mA spec from?
M. Radde (by email)
B. Hub type used to connect the
device. Up to 500 mA allowed
using a hub with internal power
supply. If the hub is bus pow-
ered, this is reduced to 100 mA.
A hub is a PC is normally con-
sidered self-powered, while a
hub in a portable device is bus
powered. When a device draws
to much current, it may happen
that the USB goes along by sup-
plying more current than is
strictly allowed. None the less, it
is recommended to provide for
an internal power supply.
C. Configured and running: cur-
rent consumption should not
exceed the level reported by the
device (by means of the enumer-
ation in the configuration
descriptor) during the configura-
tion phase.
The specification ‘100 mA’ is the
current a USB port is always
capable of supplying. During ini-
tialisation, a higher current is
allowed. Once initialised, a USB
device requiring more current
may draw more current after
reporting its requirement to the
operating system. The limit of an
The same restrictions in respect
of current demand apply to
devices with an internal pow-
ered supply (self powered). Good
separation is essential between
the USB and the external power
supply. In the event of the inter-
nal supply failing, the device
may not present a heavier load
the USB than ‘promised’ during
configuration (i.e., not more than
one load unit of 100 mA when
configured as self-powered or
low power bus powered).
CORRECTIONS
&UPDATES
Free Downloads
now supplied as zip files
MCS BASIC-52 V1.3
On page 22 of the article, the
sentence ‘The PROG commands
are also redundant, so they
have been deleted’ should read
‘The FPROG commands…’
Having obtained a licence to
distribute .zip files via the Free
Downloads section of the Elek-
tor Electronics website, we are
pleased to announce that all
previously supplied .exe self-
extracting archive files have
been replaced by .zip equiva-
lents. The program needed to
unpack these files is called
Winzip and may be downloaded
free
MIDI Lights & Slide Control
The SAB80C535 used in this
project may is not easily
obtainable and may be replaced
by the more commonly avail-
able and fully compatible type
SAB80C515-N.
CD Recording Quality
Dear Editor — roughly a year
ago you had an article in Elektor
Electronics about CDs that were
supposedly recorded with over-
driven signals. An oscilloscope
was used to look at the output
of
charge
from
http://www.winzip.com
.
20
Elektor Electronics
5/2001
READERS’
CORNER
From this I conclude that the
original mix, which was recorded
perfectly, was remixed with an
amplification of 1.5, causing clip-
ping in the new recording.
The track “Gloria, lonely boy” on
the CD “Metamorphose” by Jean
Michel Jarre was then analysed,
in order to see if his latest CD
had signs of clipping. Here too it
seemed that the recording was
overdriven. But once more it was
the histogram that returned
some fascinating information
(Figure 3).
The smallest and largest sam-
ples found in the recording were
-32022 and 32021 respectively
(0.977 of the maximum range).
These were also the levels at
which clipping occurred. From
the histogram it can be seen
that every fortieth value is twice
as large as its neighbours are.
From these observations you can
conclude that this CD is a remix
of an original CD recording. The
samples have been multiplied by
0.977 before being converted
back into CD format.
This raises the question why this
meaningless conversion was car-
ried out on the recording. The
only reason I can think of is that
the remix was made to hide the
fact that the recording was over-
driven. Anybody who uses an
oscilloscope to look for clipping
would set the trigger level at the
largest possible signal level,
about 99.9% of the maximum
signal possible. The remix would
cause the signal to remain below
this level so the oscilloscope
would never trigger and the clip-
ping would remain undetected.
The person making the remix
would have known that clipping
occurred and was determined to
hide this fact. The correct proce-
dure would have been to make a
slightly softer remix from the
master tape and avoid any clip-
ping that way.
The record industry is currently
promoting the new Super Audio
CD (SACD), which has an
improved quality. They would be
better off stopping the messing
around with the recordings.
These fudges also sound bad in
SACD format and making careful
recordings in CD format will
result in bigger improvements
than the change to SACD format.
A. Kappert, Netherlands
1
2
We’ve said it before and we’ll
say it again: We think that the
price of a CD is high enough to
expect the best quality record-
ings. Initiatives such as these by
quality conscious music lovers
should therefore be applauded.
Mr. Kappert has been kind
enough to make his analyser
program available to Elektor
Electronics readers free of
charge. The program can be
downloaded from our website at
www.elektor-electronics.co.uk
. It
can be found as ‘CD-analyser’
on the Free Downloads page,
May 2001 items.
3
for it to occur at different values
than -32768 and 32767, due to
badly set up A/D converters).
Next, the program displays the
actual waveform stored in the
WAV file. This window has a
search facility that searches for
clipping values, as determined by
the previous histogram function.
I have used this program to
analyse the track “...Baby One
More Time” by Britney Spears,
from her CD “...baby one more
time”. It was obvious that there
was a lot of clipping in this
track, but the display returned
by the histogram was the most
surprising.
This is shown in Figure 2. It con-
tains the number of occurrences
in the WAV file for samples with
values from 4 to 515. After every
two values that occur over a
1000 times, there follows a value
that rarely or never occurs at
all. You could only get such a his-
togram when a 16-bit recording
is re-recorded after amplification
by a factor of 1.5. Samples with
values of 1, 2, 3, 4, 5, 6, 7 etc.
are multiplied by 1.5 to give 1.5,
3.0, 4.5, 6.0, 7.5, 9.0, 10.5 etc.
These values then have to be
rounded to integers before being
written to the CD. This gives the
result 2, 3, 5, 6, 8, 9, 11 etc.
You’ll see that every third value
is missing from this series of
numbers. By looking at the wave-
form where clipping occurs, it is
possible to deduce by how much
the recording of the CD was over-
driven. I estimate this to be a
factor of about 1.5.
5/2001
Elektor Electronics
21
Plik z chomika:
gasma
Inne pliki z tego folderu:
bge.jpg
(26 KB)
detail1.htm
(5 KB)
detail2.htm
(4 KB)
detail3.htm
(4 KB)
detail4.htm
(6 KB)
Inne foldery tego chomika:
1974
1975
1976
1977
1978
Zgłoś jeśli
naruszono regulamin