Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

VU Meter with MCU

Status
Not open for further replies.

Suraj143

Active Member
I like to build a VU meter from a PIC micro.Just searched on net & I found couple of projects. Basically I need to show the sound level on 10 to 16 LEDs.

I have some doubts regarding the hardware interface to PIC ADC.The below project used a signal diode and a filter cap feeding to ADC.

My questions are
*If we feed the audio input from a pre amp output it will not scale to 5V ADC because line out voltages has something like 200-300mV. How is he scaling?
*Does one half wave is it enough?
*How often do I have to read ADC?
 

Attachments

  • VU.JPG
    VU.JPG
    100.7 KB · Views: 776
I like to build a VU meter from a PIC micro.Just searched on net & I found couple of projects. Basically I need to show the sound level on 10 to 16 LEDs.

I have some doubts regarding the hardware interface to PIC ADC.The below project used a signal diode and a filter cap feeding to ADC.

My questions are
*If we feed the audio input from a pre amp output it will not scale to 5V ADC because line out voltages has something like 200-300mV. How is he scaling?

Presumably by amplifying the signal first?, or attenuating it if it's a speaker signal - although the +ve reference is adjustable with a pot (but you can't vary it down really low).

*Does one half wave is it enough?

Yes, it's quite normal on VU meters.

*How often do I have to read ADC?

As often as you want, bear in mind you can only see changes up to a certain speed anyway.
 
ok thanks I understood.

One more question. Isn't that Audio feeding diode (BAT85) drop the 300mV audio signal (Pre Amp Signal).Because diode has a forward voltage drop...!!
 
ok thanks I understood.

One more question. Isn't that Audio feeding diode (BAT85) drop the 300mV audio signal (Pre Amp Signal).Because diode has a forward voltage drop...!!

Yes it will, that's why they use a BAT85 rather than a IN4148 (0.7V drop).

A germanium diode would be even less, but as you're providing a high enough signal it doesn't matter.
 
Yes it will, that's why they use a BAT85 rather than a IN4148 (0.7V drop
With an active Rectifier ( Operation Amp + Diode ) the Drop Voltage doesnt matter.
When You need a peak signalling You can install a sample an hold cicuit after the Rectifier an connect it to an additional A/D Converter.
The Values can then be shown as a one led Value on the Display.
With an little FET the S/H Stage can be discharged by the Controller.

A long time ago I've seen such a Thing with an LM 3914. The Source is not in my Mind.
 
The pic might not (unless its very quick) repsond quick enough to the audio peaks, so the meter would probably work better if you implemented a peak picker circuit.
I think thats what Nige was implying further up.
 
A long time ago I've seen such a Thing with an LM 3914. The Source is not in my Mind.
An LM3914 is a linear voltmeter. An LM3915 was an audio logarithmic sound or light level indicator.
I have an LM3915 circuit showing audio sound levels in my living room. For 14 years it has shown peak sound levels and when they are loud it shifts down 20dB to show the loud levels. Therefore it is very sensitive to low sound levels. Its peak detector circuit responds very fast but holds the peak levels for a moment so you can see them. I have a rechargeable 9V battery in it that I use occasionally.
 

Attachments

  • Sound Level Indicator 1.jpg
    Sound Level Indicator 1.jpg
    28.4 KB · Views: 298
  • Sound Level Indicator schematic rev1.PNG
    Sound Level Indicator schematic rev1.PNG
    66.4 KB · Views: 369
An LM3914 is a linear voltmeter. An LM3915 was an audio logarithmic sound or light level indicator.
In the schematic I remember there was a C-MOS Switch that switches fast between DOT an BAR Displaying of the LM391x.
And the Input would be switched too.
So You get a VU Meter with peak displaying by dot.

With an Microcontroller You can make that very better looking.
( You can program how long the last peak will be displayed and when it will fall down )
The logarithmic scale, or any other could be done by an Lookup table there.
 
Mine uses a simple peak detector circuit with its peak lasting for about 30ms so it can be seen.
The LM3915 logarithmic level LED driver is not made anymore so I guess a microcontroller must be used today if you want those features.
 
Or, you could use an LM3916 -
Unlike LM3915 which have 3dB step between voltage levels, the LM3916 have nonlinear steps: -20, -10, -7, -5, -3, -1, 0, +1, +2, +3db, just like old school analog VU meters. I think it is out of production but there are still huge inventories of old-stock at various distributors around the world with surprisingly old date codes.

 
I really don't like the idea of a diode in the middle of audio which could be very small.
The Response Time of a VU meter is important. See link.
1579369835814.png

I wanted to have a meter that tracked what your ears hear and also have a peak response that is very different.
I AC couples the audio. (capacitor) Added two resistors of equal value to set the no signal point at 1/2 supply. Set VREFF+ to supply. This way I can measure both the + and - levels.
Software: Absolute value function causes a full wave rectification. Then I make "dsp" type filters with rise and fall times that are adjustable. (fall time =300mS)
I can not remember but I think the peak filter has a rise time of less than 1mS and a fall time of 2S.
1579369662844.png

The sampling rate needs to be very fast. I found that if you miss some of the audio the LEDs display is OK.
 
The LM3916 is also not made anymore like the LM3915. But the LM3914 is still made but only in a surface-mount package.
Amazon sells cheap clothing and shoes. Why would anybody buy a fake discontinued IC there?
 
The LM3916 is also not made anymore like the LM3915. But the LM3914 is still made but only in a surface-mount package.
Amazon sells cheap clothing and shoes. Why would anybody buy a fake discontinued IC there?

I think you need to look a little more closely at Amazon's offerings. They've grown beyond books, shoes and t-shirts.
 
But it's fun to roll your own VU meter with a micro, and what more incentive if the LM3914 is being phased out?

Here is a Project I did for a client where i had to roll my own VU in a microcontroller because of the space requirement. I used a method called Charlieplexing to drive 8 LED's along a narrow 1/4 inch wide PCB. Note: The built-in microphone is at the VERY top of the structure my daughter is demoing, so that also had to convey along the 1/4 inch wide PCB.


Another example of LED Charlieplexing in a VU style arrangement using a 12 segment LED bargraph


The only real trick I did with the audio was to "normalize" the level to 1/2 of the micro voltage (1/2 Vdd = 2.5V) before feeding it to the micro's ADC.
The magnitude was determined by how far away from the normalized center the audio signal was. As a method mentioned earlier, I used a lookup table to display Linear, Log, and Exponential. Somewhere in my searches for the LM3914, I came across the internal resister divider network for Linear, Log, and Exp.... I simply incorporated those same levels based on a percentage of +/- 2.5V and created my lookup table. Other features included DOT/BAR as well as Peak and Decay settings.
 
Last edited:
I notice that the charlieplexing VU meter does not detect high sound frequencies, only spoken low frequency vowels, and its rise time is slow, therefore it misses peak levels.
 
I notice that the charlieplexing VU meter does not detect high sound frequencies, only spoken low frequency vowels, and its rise time is slow, therefore it misses peak levels.

.... Maybe ... the VocalZ was designed with the intention of "voice" more than music ... the lag, could have been my phone video camera conversion to Youtube. I've noticed that before.

NASHVILLE UNSIGNED SUMMER NAMM 2018 VOCALZ VU
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top