Searching \ for 'Looking Signal Peak detect circuit for use with PI' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=looking+signal+peak
Search entire site for: 'Looking Signal Peak detect circuit for use with PI'.

Truncated match.
PICList Thread
'Looking Signal Peak detect circuit for use with PI'
1996\06\09@174347 by NEIL GANDLER

flavicon
face
Using a PIC A/D I would like to monitor the output waveform of
an audio power amplifier. Since it is for a subwoofer, the frequency
range would be from 20-150hz. I want to detect the signal peaks. Based
on peaks, the PIC would send the digital value through a serial
port to a VU meter at a regular interval. It will also determine if the peak
was high enough to shut down the amplifier (by controlling a relay). When
the signal peaks are low, it will send a command to lower the speed of
a cooling fan. I need an idea for a circuit that would hold and track the
peaks of the waveform, so as to reduce the sampling rate required to
track the signal. A typical peak detector can be too slow to react to
the dynamic qualities of audio signals. My goal is keep to a minimium the
the processor time required to sample the signal, a peak detector and hold
circuit seems like it could help. I would appreciate any advice.

               Neil Gandler

1996\06\11@224329 by Steve Hardy

flavicon
face
> From: NEIL GANDLER <spam_OUTV064MB9KTakeThisOuTspamUBVMS.CC.BUFFALO.EDU>
>
>  Using a PIC A/D I would like to monitor the output waveform of
> an audio power amplifier. Since it is for a subwoofer, the frequency
> range would be from 20-150hz. I want to detect the signal peaks. Based
> on peaks, the PIC would send the digital value through a serial
> port to a VU meter at a regular interval. It will also determine if the peak
> was high enough to shut down the amplifier (by controlling a relay). When
> the signal peaks are low, it will send a command to lower the speed of
> a cooling fan. I need an idea for a circuit that would hold and track the
> peaks of the waveform, so as to reduce the sampling rate required to
> track the signal. A typical peak detector can be too slow to react to
> the dynamic qualities of audio signals. My goal is keep to a minimium the
     ^^^^
I wouldn't exactly call 150Hz 'dynamic'...

> the processor time required to sample the signal, a peak detector and hold
> circuit seems like it could help. I would appreciate any advice.
>
>                 Neil Gandler
>

How slow are you running your PIC?  If the signal is so bandwidth limited
(150Hz) then the PIC will have no trouble at all keeping up with the
peaks so long as you are using a reasonable clock rate.

Also, by 'serial port to a VU meter' I presume you mean using the PWM
module to send an 'analogue' signal to the meter.  Using an SPI/I2C/RS232
meter would be a bit of overkill, wouldn't it?

Anyhow, regarding a peak detector that won't bring your A/D converter to its
knees: I would use a precision full-wave rectifier (i.e. 2 op-amps and
a couple of R's and diodes) with additional reset circuitry.  Basically,
a peak detector charges a capacitor quickly but discharges it much more
slowly.  Assuming that you _really_ need to measure peak-by-peak, add a
capacitor reset circuit driven from a spare port pin.  This would be
two R's plus an NPN (assuming the cap is referenced to ground).  The PIC
would be programmed to reset the cap every few ms.  This would allow the
greatest peak since the last reset to be measured.

Since your application is audio, I don't think your subwoofer will mind
even a gross overload so long as it is not sustained for more than a
few 10's of ms.  Even the most sluggardly PIC will keep up with that.
With all due respect, there are heaps of circuits which do what you
want (speaker protect, fan control, VU drive) without using an expensive
and somewhat inconvenient device like a microcontroller.

Regards,
SJH

More... (looser matching)
- Last day of these posts
- In 1996 , 1997 only
- Today
- New search...