DIY Microprocessor Sound Level Meter Demoed At MIT
An anonymous reader writes "A Piezoelectric Sound Level Meter was demoed at MIT's Battle of the Bands last month, borrowing its display from the do-it-yourself USB LED marquee that was the subject of a previous Slashdot story. This video tutorial describes in detail both the analog electronics plus the C code that runs the system. If this is your first experience at the intersection of digital and analog systems, don't be scared!"
ok so pretty cool, but can someone explain how hooking a mic up to an ADC is worthy of a mention for MIT? It sounds more like a high school project at face value, what am I missing?
It IS a high school project at face value. The kit can be yours for only $80!
Shouldn't ads like this be paid for?
Sound level meter? Did i miss something particularly difficult or innovative about this thing?
Whats the point? Selling MC Kits?
Just goes to show ya that MIT guys will crack a nut using a bulldozer. There's plenty of dedicated level-meter chips around which cost next to nothing and provide a better, logarithmic response, which is what you want for sound.
The LM3915 is an oldie but a goodie, you can even daisy-chain them.
See http://www.national.com/mpf/LM/LM3915.html
LM3914 can handle 10 LED's per chip and can be cascaded for more. Add an amp for signal conditioning on the front end, and then hookup lots of LED's per line if you use a transistor to drive a bank of LED's.
They need a micro because their display is too complex for the job. But, make the display simple and you can make the whole design simple. Yet, since this is MIT's it has to be complex for some reason.
This project is an excellent example of how having a little theoretical knowledge is a bad thing.
They have just enough knowledge to get into complicated and pointless gain calculations, but they miss most of the really important things. Here's a few:
(1) A piezo buzzer is not designed for any kind of flat frequency response. Which is a basic requirement for a sound-level meter. Major fail from the get-go.
(2) We're going on 60 years of having a spec for sound meter weighing curves and envelope filtering characteristics. Yet no mention of that in the article. A randomly designed meter is useless.
(3) They go on and on about calculating the gain of the amplifier stage, and they do it incorrectly. We care not one whit about the DC gain. The AC gain is dependent on the AC impedance of the source and load. Even the DC gain they calculate is useless as those transistors have a huge range of gains. And no analysis of the DC stability, which is harder to get right. Gain just happens, stability has to be designed in.
(4) Biasing the base from a pot in that fashion is never done in practice. A better design would use two resistors and avoid the cost and impedance variations of the one pot "design".
(5) A real design would have the +5 volt line decoupled and filtered to keep microprocessor switching noise out.
----
In summary these designers should wait until they get past the first chapter of their transistor class before going out and trying to design anything. Good design requires more than slavish focusing on one small area. An engineer has to have a broad view.
Many of the cheap micro-controllers have ADC's that won't do the job well, at least not well enough to get any kind of dynamic range out of the circuit.
A bigger problem with the MIT design, is that it uses a Piezo-Buzzer for a microphone. This will give a wickedly non-linear frequency response curve. Piezo-Buzzers are designed to have a narrow range of frequencies in which they operate effectively.
The MIT design also uses a single transistor amplifier circuit. It wouldn't surprise me if the harmonics on the output are poor. Specifically, with this circuit, the average sound level can be determined by simply averaging the output of the transistor amplifier. Essentially, the average voltage on both the collector and emitter of the transistor should change if an AC signal is applied to the base. If this average is read with a DC voltmeter, then it should give an approximation of the sound-level, subject to the microphones frequency response curve.
I am not clear why anyone would build a sound level meter without using either a proper microphone or an effective amplifier circuit. A quad op-amp IC, and a few circuits from the web, should give you the average sound level over an extended frequency and amplitude range. It is even possible to do RMS to DC, peak-level to DC, and log-linear conversions in analog. For a retro-look, an old-fashioned voltmeter or amp-meter can be used for a display. For a more modern look, it is possible to use a cheap micro-controller with a slow ADC (or an LM3914) for the analog to digital conversion. Historically, this was the way it was done in many stereos, and the same circuit is probably still in use in many professional recording labs.
The advantage of implementing a proper micro-phone is the much flatter frequency response curve. The advantage of the log-linear conversion, is that most sound meters read in dB, which is a logarithmic scale. It takes a very good linear ADC to implement the same conversion digitally. A 5-bit (32 count) ADC reading a log input has more dynamic range than a 24-bit ADC reading a linear input (2^32 >> 2^24). Although in practice, I wouldn't recommend using less than an 8-bit ADC on an analog circuit.
Yes. These are MIT students, remember. Now, if they designed something simple that got the same results as a properly calibrated A-law sound level meter, that would be useful. Or, for example, they could use the microprocessor to do an integrating dosimeter calculation, so you know when you've overdosed on live music. That would be useful to do cheaply, because noise dosimeters are still expensive, over $1000.
I really like the simplicity of the circuit, and the way they try to explain the basics of transistor design. Nowadays, there is an integrated circuit for about anything, but just using that doesn't make you learn anything, and - in my opinion - takes away the fun of creating something from scratch.
But am I the only one to see the huge error in the equations they are using? ;-)
They state
Ic = Ib * beta
Ib = Is exp(Vbe/Vth)
where it should be
Ic = Is exp(Vbe/Vth)
Ib = Ic / beta
or, their equations are off by a factor of beta!
That does not seem too important, it appears you could compensate for this in Is, but in practice, that is not so straightforward.
The exponential relation between Ic and Vbe holds over many decades, whereas beta is not nearly as constant as we sould like.
So, if these are really MIT students, I'd like a word with their professors...
That would have to be the easiest thing in the world to compensate for!
There might be firm limits to the top and bottom of frequency response set intentionally to limit the bandwidth intentionally (wide bandwidth is not good for telephony), but I expect these to be done in software to guarantee sharp cutoff.
I had in mind a recording RTA application. Sound techician could compare acoustics of different locations/PA rig setups/EQ settings,
Being able to e-mail a recorded sound spectrum to the lab for interpretation might be useful to all manner of people. (Cant reveal more - they might shoot me!)
Sent from my ASR33 using ASCII
Well, you should go one step further and ask, why build something like this at all when you can buy a finished product for less, if you count your time worth anything?
The reason to use the piezo buzzer is simple: you've got one in your parts box and you're curious what you could do with it besides make a buzzing sound. It's like what somebody said about dogs who've been trained to walk: it's not that they do it well, it's that they do it at all.
With respect to the use of a single transistor, that's educational. Yeah, you can get a better IC amp, but then you can buy a better finished device. You learn something different by using discrete components. Of course, you could do a more elaborate discrete amplifier, but then you put off the satisfaction of seeing the blinken' lights that much longer.
Years and years ago when I was at MIT, there was a kid who commuted to campus in a homemade electric car. It wasn't a very good car. For the money and effort he put into it, he could have bought a cheap gasoline car and tinkered with that. For that matter, I don't think his car was much better than a bike. The same kind of arguments you are making could apply to that.
When, other than when you are learning, can you do something differently than by the book, just for the fun of seeing it work?
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
I built up the circuit as a SPICE model, and while it amplifies, it doesn't filter much. That weird filtering circuit in the emitter leg doesn't seem to accomplish anything. Treating the piezo microphone as a voltage source with a 1K resistance, generating a 1KHz input signal at 0.005V (based on a Murata piezo buzzer data sheet), what comes out is a voltage swing of about 0.6V at 1KHz, with a DC offset of 2.8V. The filtering seems to be insensitive to RM; changing RM from 10 ohms to 10 megohms doesn't do much to the output waveform. The 100K pot was adjusted until the voltage across RE was 3.3V, as specified. (This happens with the top end of the pot at 4.4K).
Why didn't they just put a nice simple low-pass filter on the output, instead of trying to get cute and put it in the emitter lead? And shouldn't there be a diode in there somewhere, to extract the waveform's envelope?
I actually built something like this in my teenage years, and had it hooked up to a surplus chart recorder (mirror galvanometer, phototube, relays, and motors, a mechanized Wheatstone bridge). (This dates me.) Mine worked.