LED-Peak(Hold)Meter based on Atmel microprocessor

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

matthias

Well-known member
Joined
Jun 4, 2004
Messages
768
Location
germany / frankfurt
Hello,

I just found this nice project.

http://www.mcselec.com/index.php?option=com_content&task=view&id=71&Itemid=57

I already built something like that using the Sanyo LB1412 IC
but this part has become obsolete... (there's only a smd version available but it's obviously very hard to get)
so I think it's better to look for another design.
I don't want to use the lm391xseries because they don't have this nice peak hold feature.

I'm not so familiar with atmel based designs, so I've got a few questions.

What extra circuitry is needed to get it work? I think I'll need a 10mhz crystal and +5V power supply... is that all...??

I think I have to rectify the audio signal before I apply it to the input of the microprocessor. Should I use a half wave or full wave rectifier...?



thanks,
matthias
 
The Atmel AT90S2313-10 used in the design in your link is now obsolete, replaced by the ATtiny2313. These parts are not that simple to get working for an application like this.

I think you would be better off with a PIC microcontroller on one of the many low-cost evaluation/prototyping boards that you can buy. You can get them already built with a row of 8 LEDs, crystal resonator, power regulator and serial line programming ability for around £20 ($35).

The AT90S2313 C code would not work directly, but the principles behind it would remain the same.
 
Hi there!

Its a bit of an overkill to use an uC for these applications.
But if you like it´s easy to make it do more things than just one channel mesuring.
It shuld be possible to make four chanel mesuring with some clever code
And perhaps some analyzing features (but slowly) using goetzel algorithms.

First, are you familiar with uC designs?
In that case what language?
(The code in the example is Bascom AVR Basic)

I made a dB meter with a PIC a couple of years ago. It worked great!
Signalsource was an electret mic amped 1:100 then rectified and bufferd in to the 18F452 ADC.
The PIC carried out the nessary math and showed the result on an LCD.
There was still uC power to carry out some excess (spelling?) calculations like avragevalues and nice graphics on the LCD.

/Hampus
 
hi

Its a bit of an overkill to use an uC for these applications.

I don't think so...

the AT90S2313 or AT-Tiny2313 uCs are very cheap, cheaper than a lm391x
and you need only minimal additional circuitry to get a led meter (with peak-hold!!) running.

regarding this project, http://www.mcselec.com/index.php?option=com_content&task=view&id=71&Itemid=57

beside the use of a buffer, do you think I need to rectify the signal, or is the adc of the Uc fast enough to handle the audio signal??
 
Hi

The project you linked to uses a comparator to obtain a sample every 4mS.
If you intend to use the onboard ADC you need to rectify it and buffer it.
I recomend this approach since it has the highest acuracy.
Keep in mind to calculate the rectifier capacitor dischargetime to fit ADC accusition.

"or is the adc of the Uc fast enough to handle the audio signal??"
The audio signal is AC so you need to rectify it.

I´m not shure but in the comparator version I think the rectifier can be omitted.
Perhaps just a buffering.

/Hampus
 
thanks... I'll just try it out...

regarding the lm391x: I've also find a design with peakhold, but it was a bit more complicated, there were two lm's needed, one for peak-value (bar mode) and one for the hold (dot mode) but when the peak mode lights up a led that is already used by the "hold" - lm, the led lights with double intensity... / I think that's not so perfect..
 
a lot of "Fuel/air" ratio meters for cars use the LM39XX series for the LED drivers. A lot of them have a peak hold. There are a few schemos around i remember.
 
[quote author="matthias"]hi

Its a bit of an overkill to use an uC for these applications.

I don't think so...
[/quote]
Neither do I . The PIC12F675 makes a dandy flying dot VU meter with 12 dots (It only has 8 pins - with todays high efficiency LEDs and time division, bargraph and peak hold oughtta be do-able as well. The chips cost about a buck.
picvumeter.jpg

M
 
[quote author="peterc"]Mobyd

Tell us more! Where did you get the pic from? Have you built it?

Thx
Peter[/quote]

I've built hundreds of them for audio distribution amps etc.
There are exactly 12 ways you can connect a led across 4 pins
of a micro. (The pins on a pic can be driven high, driven low or
tristated). Another pin is an A/D input, Vdd,Vss and one spare pin.
The 675 has an internal oscillator. I buy the PICs from "Microchip
Direct". Arrow also have them.
The converter runs continuously. When the end of conversion flag
is waved, you compare the result with your breakpoint table and
drive one pin high, one low and tristate the other two. Clear flag,
repeat ad infinitum. You can put the breakpoints anywhere you want
in the [0..255] range.
M
 
i'm very intrested too !! can we have more info..

i have a stupid question too...
the ADC in the pic is max 5V ?
How did you make to have a max at 16 dbu?
 

Latest posts

Back
Top