From: jbuck@forney.berkeley.edu (Joe Buck)
Newsgroups: ba.general,sci.electronics
Subject: Re: Need help designing simple circuit (will pay $)
Date: 16 Sep 92 03:55:02 GMT
Organization: U. C. Berkeley
NNTP-Posting-Host: forney.berkeley.edu


In article <-8zn#6f.friday@netcom.com> friday@netcom.com (Carol Anne Ogdin) writes:
>>Would someone design a circuit for me?  I want to speak
>>into a microphone, and then hear my voice in headphones
>>1/20 of a second later.  How difficult would this be to
>>design?  If you can do a schematic for me, I can buy the
>>parts and assemble the device.

In article <1992Sep16.021101.16279@udel.edu> weigand@pecan.cns.udel.edu (Steve Weigand) writes:
>
>Well... I remember posing this problem to a friend of mine once. He said
>that there are analog devices that do this sort of thing. The principle
>is to delay the output of the signal whilst not distorting it. It's tricky,
>but it can be done.
>
>He mentioned the use of a "barrel" chip... I think that's what he called
>it. It involved a few thousand operational amplifiers on one IC that were
>in saturation mode for the slightest input... all of their inputs were 
>linked to the previous one's output. So with each one requiring about
>10 nanoseconds delay, multiply that time by 3000 op-amps, and you've got a
>30 microsecond delay. Not too much, huh? I'm sure there are better ways
>to do this, and they may even have a chip already created to do this.

I'm sure it would be much cheaper to do it digitally.  Pure delay is much
easier to do digitally than with an analog system.  It's just memory.  

You need an A/D converter, a D/A converter, a cheap microprocessor, and
enough memory to hold 1/20 sec of speech.  The memory stores a circular
buffer -- you just read samples into one end and play them out from the
other end.  For telephone bandwidth, there are some really cheap codec
chips you can use (mu-law compression, 8000 samples per second, 400 bytes
is enough to hold your delayed voice), but I doubt if that will do; for
music applications, you'd want 16-bit samples, and would want to sample at
over 40 K samples/sec (CD's sample at 44.1 KHz, digital audio tape at 48
Khz).  You also need anti-alias filtering; the best way to do this is to
over-sample (run the A/Ds at a higher sampling rate) and do the filtering
and downsampling digitally.  You might be able to get application notes
from Motorola or Texas Instruments on how to build one of these with their
DSP (digital signal processing) chips.  This'll be cheaper and easier than
trying to use 3000 op-amps.  There are even versions of DSP chips with
D/A and A/D converters and memory on board (though not enough memory
for your job, I think).

If you use a DSP chip for the microprocessor you can also implement
fancy effects: filtering, distortion, reverb, etc.  Digital delays
are sold to do this kind of thing, and that's how they're built.
You sound like you want to do it yourself, but you could just buy one.

Are you sure that 1/20 sec is enough, though?  That's 50 msec, and the
telephone industry uses a 40 msec delay as the rule of thumb for where
you have to add echo cancellation, because most people hear an echo shorter
than that as sidetone (you hear yourself talking but it doesn't
interfere), not echo.



--
Joe Buck	jbuck@ohm.berkeley.edu
Xref: sparky ba.general:3746 rec.games.misc:17349