Searching \ for '[PIC] VU meter using micro' 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/microchip/devices.htm?key=pic
Search entire site for: 'VU meter using micro'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] VU meter using micro'
2009\09\14@230535 by David Duffy (AVD)

flavicon
face
Has anyone here coded a VU meter on a PIC ? I'm designing a product that
has three (for 2.1 output) 10 segment LED bars.

I could go done the old LM3915 route, but thought a micro with
multiplexed output would be better in terms of ease of scale /  response
customisation.
David...

--
___________________________________________
David Duffy        Audio Visual Devices P/L
Unit 8, 10 Hook St, Capalaba 4157 Australia
Ph: +61 7 38235717      Fax: +61 7 38234717
Our Web Site: http://www.audiovisualdevices.com.au
___________________________________________

2009\09\15@004619 by Jesse Lackey

flavicon
face
Hi, I did this with an AVR a year and a half ago.  There are some
niggles.  Depending on how accurate you'd like to be, how fast you can
sample, and the voltage range of the incoming signal, how accurate you
need to be for 100Hz vs. 1Khz vs. 10Khz frequencies, you may or may not
need to:

1. amplify or cut incoming signal to scale to the A/D range
2. use a peak detector.  I used the precision half-wave rectifier sample
circuit from the National Semi LM3916 datasheet.
3. calibrate for unit-to-unit variation in peak detector output for a
given input signal level
4. do some tweaking of averaging of samples to get a
reasonably-responsive VU display

The device this was for had small size and power consumption as critical
parameters, and I decided to do it in firmware.  The original plan was
to sample the internal digital audio stream (it is a mic pre with A/D, a
specialty portable pro audio thing) but the AVR couldn't do it for 96Khz
or 192Khz audio sample rates, a mistake I made from not reading the AVR
datasheet closely enough and no space/time for a CPLD or other external
helper digital logic.  So this was all something of a (successful) hack,
unfortunately.

I am able to get -30db (relative to about 2.5Vpp fullscale input)
reliably.  But each unit requires calibration, a hassle.

Cheers,
J





David Duffy (AVD) wrote:
> Has anyone here coded a VU meter on a PIC ? I'm designing a product that
> has three (for 2.1 output) 10 segment LED bars.
>
> I could go done the old LM3915 route, but thought a micro with
> multiplexed output would be better in terms of ease of scale /  response
> customisation.
> David...
>

2009\09\15@005958 by David Duffy (AVD)

flavicon
face
Thanks for the reply Jesse. I'm intrigued by the calibration requirement
though. Was the variation in the AVR or the analogue circuitry? Was it
due to the lack of resolution in the A2D?
David...

Jesse Lackey wrote:
{Quote hidden}

--

___________________________________________
David Duffy        Audio Visual Devices P/L
Unit 8, 10 Hook St, Capalaba 4157 Australia
Ph: +61 7 38235717      Fax: +61 7 38234717
Our Web Site: http://www.audiovisualdevices.com.au
___________________________________________

2009\09\15@012610 by Jesse Lackey

flavicon
face
Hi - I believe it is primarily due to the peak detector.  For other
reasons, I have to use the AVR's A/D with its built-in 1.1 volt
reference instead of the 3.3V rail, which would affect accuracy (a
little anyway).  I also use the A/D on the AVR to read a volume control
pot and two different input power voltages, and I have noticed the input
power voltage readings are pretty consistent (but not dead on) unit to
unit, so I attribute the errors to the peak detector.  I haven't looked
at it in detail though.  Next version will either have automated
calibration or (preferably) a respin with a CPLD.

And note the peak detect output for a 100hz, 1Khz, 10Khz sinewaves of
equal amplitude is not the same.  The attack/release of the detector
affects everything.

I do suggest prototyping this before committing to this design path...
make several of the peak detect circuits and see if variability will
require calibration for your needs.  It just wasn't as simple as it
first seemed for my requirements, alas.

Good lucks!
J


David Duffy (AVD) wrote:
{Quote hidden}

2009\09\16@081308 by Lee Jones

flavicon
face
> Has anyone here coded a VU meter on a PIC ? I'm designing a product
> that has three (for 2.1 output) 10 segment LED bars.

I happened to be doing some filing and noticed that the March 2009
issue of Everyday Practical Electronics (EPE) has a project on how
to build a PIC 16F controlled VU meter with LCD bargraphs.  Online
issue has the article; I assume it's in the paper version too.

Their site is http://www.epemag3.com .

                                               Lee Jones

2009\09\16@104615 by M.L.

flavicon
face

On Mon, Sep 14, 2009 at 11:05 PM, David Duffy (AVD)
<spam_OUTdavidTakeThisOuTspamaudiovisualdevices.com.au> wrote:
> Has anyone here coded a VU meter on a PIC ? I'm designing a product that
> has three (for 2.1 output) 10 segment LED bars.
>
> I could go done the old LM3915 route, but thought a micro with
> multiplexed output would be better in terms of ease of scale /  response
> customisation.
> David...
>

I just designed a 'VU' meter for an ultrasound application (40kHz)
The signal chain is basically this:

--
Microphone
Bandpass filter (w/gain)
Opamp full-wave rectifier
R/C lowpass filter
More gain
sigma-delta ADC (22 bits)
PIC
LCD bargraph + numeric value
--

The bargraph is log base 2 (no math necessary)

The numeric output is linear. Decibels not really needed for this app. (yet)

--
Martin K.

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