DIY Microprocessor Sound Level Meter Demoed At MIT 81
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!"
from MIT? (Score:5, Insightful)
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?
Oh wait... Advertisements. (Score:5, Insightful)
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?
Re:from MIT? (Score:4, Insightful)
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Funny)
I completely agree. This is a trivial piece of hardware, of which there are millions of examples on the Internet, the majority of which are more interesting than this.
Is this of interest just because someone at MIT was involved? What's next? MIT engineers demonstrate how to drink beer?
Re: (Score:2)
I completely agree. This is a trivial piece of hardware, of which there are millions of examples on the Internet, the majority of which are more interesting than this.
Is this of interest just because someone at MIT was involved? What's next? MIT engineers demonstrate how to drink beer?
Dancing up next [youtube.com]
Re: (Score:2, Funny)
This one measures to 11.
Re: (Score:1)
Re:from MIT? (Score:5, Insightful)
Advertisement? (Score:5, Insightful)
Sound level meter? Did i miss something particularly difficult or innovative about this thing?
Whats the point? Selling MC Kits?
Re: (Score:2)
Re: (Score:2)
iPhone App (Score:2)
Or indeed, a java app for most Symbian phones?
With a full-featured 1/3 octave spectrum analyser as well. Please
Re: (Score:1)
Re: (Score:3, Interesting)
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 r
Re: (Score:2)
With a full-featured 1/3 octave spectrum analyser as well. Please
You aren't actually going to tune a room with that thing are you? Have you any idea how bandy those cellphone microphones are? The only thing a cellphone FFT "frequency analyzer" would be analyzing is it's owners attraction to Teh Blinkie.
Re: (Score:2)
There's a lot to be said for being able to roll up your sleeves and actually do the fiddly bits. It shows you understand the underlying problem instead of just downloading a magic cure that does it for you. (Well, in this case, buy a kit and then assemble it.)
Granted, a lot of people are kvetching that this really isn't that difficult (which I'm not qualified to comment on ;-) -- as much as this might fall into the
Ho-hum (Score:2)
I'm more interested in turning an iPhone / iTouch into a dynomometer for engine performace tuning. Use the accelerometers. You'd need to find some way to enter RPM, probably a passenger hitting the Ks.
Re: (Score:2)
This one is silly -- why not just read the mic directly and apply the relevant digital filtering/transofrmation? RMS at least.
I'm more interested in turning an iPhone / iTouch into a dynomometer for engine performace tuning. Use the accelerometers. You'd need to find some way to enter RPM, probably a passenger hitting the Ks.
I'm not sure if you meant you were interested in a DIY approach or not, but just in case not, such software does already exist.
http://www.dynolicious.com/ [dynolicious.com]
Re:Ho-hum (Score:5, Informative)
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.
Re: (Score:1)
Re: (Score:3, Interesting)
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 educat
Re: (Score:2)
Because the piezo won't generate enough voltage for the micro's ADC to measure on its own. The trivial transistor gain circuit fixes that.
A digital transformation of an input that constantly reads zero is not that helpful..
Re: (Score:2)
You'd need to find some way to enter RPM, probably a passenger hitting the Ks
Use the mike, determine it from the engine note?
Re: (Score:2)
You can use a toroidal transformer, with a split core, and treat one of the spark wires as the primary winding. Then detect the voltage off the secondary. Just be careful about how much voltage the secondary is getting, since the spark wires run between 10k and 100k volts on some vehicles. Save your controller, and have that trigger a flip-flop. Or filter the signal enough to have it trip an interrupt on the uC.
Or you could just check if the OBD-II port has a signal for RPM.
Re: (Score:2)
Yeah, but you've got to get that into the iPhone somehow. It's *easy* if you're just driving a bare microcontroller.
A CPU for this? (Score:5, Informative)
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 [national.com]
Re: (Score:3, Insightful)
"Re-inventing the wheel" can be a good way to learn & understand how something works and why it's built/programmed etc. in a certain way.
Re: (Score:2)
No offense, but I rather invent something just as ingenious but new, on top of those building block, so that future yous can re-invent my wheel. ^^
Based on your theory, one could also argue, that it makes sense, to make your own resistors and transistors, and perhaps also the machines to make them, and the machines to make the components for those machines, and so on... literally re-inventing the wheel in the process. :)
I usually am happy with reading how such stuff works (I actually literally feel the need
Re:A CPU for this? (Score:5, Interesting)
you may not find the lower level components interesting, but some people do. being interested in vintage amplifiers means that i am somewhat interested in what makes various older components sound the way they do. this led me to learn about the different characteristics of varying types of capacitors, which led me to trying to make my own capacitor out of foil and cling wrap. it certainly wasn't anywhere near the quality of a commercial capacitor, and even fell apart after being moved around too much, but it worked and i really enjoyed it and learnt from it. that doesn't mean i would want to try to rebuild a computer mainboard with diy capacitors (although i would certainly tip my hat to someone who pulls that off) but i don't see it as a waste of time in the slightest.
to each their own i guess.
Re: (Score:3, Insightful)
It certainly can. But it can also be a way of teaching students the wrong way to solve a problem. In the "real world" that involves money, you must never ever re-invent anything until you have made completely sure that there is no better alternative. It is far too common that graduates don't realize this when they enter into professional life.
Besides, maybe the a
Re: (Score:2)
Whats so bulldozer about this? A piezo buzzer is used to drive the input of a common emitter BJT amplifier which then feeds a PMC with an ADC. That's hardly worthy of being compared with a bulldozer. This is an advertisement presented as news. It must have slipped by (yea right), a palm was greased or an MIT person with a /. buddy.
BUT, it is a great little tutotrial for beginners who want to take a crack at analog and digital design. The Amplifier math is taught in your into to electronics class during fres
Re: (Score:1)
It's good to see DIY projects that teach people how things work. The tutorial is very well done and applies to a real world project that a beginner can build.
Understanding how to bias a transistor to get the results needed is valuable.
Re: (Score:2)
The datasheet for the purpose-built circuit tells you how to do it the easy way. These guys have learned how to do it the hard way, without the right circuit. If you have the chip, and you have the piezo element, and it will do the job, why not put them together instead of adding another chip to the design?
Re: (Score:3, Insightful)
While there's some truth to what you say, if we all just decided to use off-the-shelf components to do all of this stuff, people would forget how it's done, and then it would be arcanum.
The MIT approach of using a bulldozer to crack a nut usually demonstrates a pretty fine control ov
Get rid of the micro - LM3914 (Score:5, Interesting)
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.
Re: (Score:1, Insightful)
Take a look at the video. The point of the exercise is to show/learn how to measure tiny voltages with a microcontroller. There are ready-made chips for some applications, like a VU meter, but a microcontroller is programmable and therefore much more flexible. It can process, store, and transmit the data it gets from its sensors. (Your single chip VU meter doesn't have a peak indicator? You want your data to be averaged over a second? You want to keep a record of the evening's sound levels on an SD-card? A
Re: (Score:3, Interesting)
You're right, if you want advanced features then you have to include a microcontroller. Although I have used the LM3914 with a CD4538 per line to do peak level indication. If you want to only do peak level indication for the upper few lines then this would be easy enough. However, doing more than a few lines and doing other stuff you mentioned then of course a microcontroller would be easier.
Point is there are many ways to do this simple project, and it is beyond what should be showcased by MIT and here
A little knowledge is a dangerous thing (Score:5, Informative)
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.
Re: (Score:2)
Holy shit. Real
Re: (Score:2)
It's neither "fun" nor "interesting" when your design is 8 times as complicated and expensive as one that works, and yours is neither stable, accurate, hi-fi, or immune to temperature changes, power supply noise or electrical interference.
Yes it's fun to mess around with parts and get them to do something, anything. But this is not an example of any kind of sane engineering. I assume most people going into $95,000 debt to attend MIT intend to try to be useful engineers. This item on your resume is a quic
Re: (Score:2)
Yeah, I'm sure all the students MIT accepts sprung from their mothers' wombs as fully formed engineers. None of them should ever need to learn the basics. If you think the point of the NerdKits is for use by current students of MIT, read the description on the home page [nerdkits.com]:
Re: (Score:1)
It's neither "fun" nor "interesting" when your design is 8 times as complicated and expensive as one that works, and yours is neither stable, accurate, hi-fi, or immune to temperature changes, power supply noise or electrical interference.
Yes it's fun to mess around with parts and get them to do something, anything. But this is not an example of any kind of sane engineering. I assume most people going into $95,000 debt to attend MIT intend to try to be useful engineers. This item on your resume is a quick ticket to Palookaville.
Because, obviously, a company that pays MIT money to have their product advertised to a bunch of high-schoolers visiting MIT must be representative of the actual education MIT students get. MIT wasn't even INVOLVED with the creation of this thing, and they definitely aren't bragging about it -- this is just a great example of a slashvertisement
Re: (Score:2)
Did you hear that sound? That was the fun being sucked out of learning electrical engineering!
Yeah, this is a complicated way to build a sound meter. Yes, it has obvious stability and noise problems and there's certainly a lot left to do. Yes, this is a blatant Slashvertisement. Still, while not news, I think it's both "fun" and "interesting." If the purpose was to build a better, more robust sound meter, yeah, they failed. But it is a cute project you can do to learn something about the CPU and the t
Re: (Score:3, Informative)
The criticism may be blunt, but if students do a cookbook project, they should at least be smart enough to know the errors in their ways.
This project has quite a few major problems in the analog front end. Especially, given the fact that with a micro-controller, you could at least try to fix some of them. The report makes no mention of the fact the students even noticed them. Also, the calculations that they did do, are considerably more complex than necessary. Specifically, the students missed the fac
Re: (Score:2)
Thanks for the backup. A few more things I noticed:
(1) At some bias settings that transistor and its stray lead inductances is likely to act like a VHF oscillator. Don't use this thing to measure noise on a plane! ( Aircraft nav aids and voice comms are in the VHF range.)
(2) Those buzzers seem to be spec'd to operate at particular frequencies, which strongly suggests they're resonant. That will make the frequency response particularly peaked and non-optimal.
(3) Using a device in a way it's not design
Re: (Score:2)
For me, if you are going to teach students how to do something, you might as well teach them how to do it properly. Otherwise, someone may try to copy the circuit and reuse it in a practical application.
I sometimes work with university students. It is a little too obvious how dangerous following simple textbook advice can be. Emergency Stop circuits implemented in Visual Basic are a personal crusade ...
Re: (Score:1)
I expect better from MIT students. (Score:3, Interesting)
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 [reliabilit...tstore.com], that would be useful. Or, for example, they could use the microprocessor to do an integrating dosimeter [noisemeters.com] 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.
Pointless ad for Nerdkits (Score:1)
Nerdkits Ads Strike Slashdot Again! (Score:1, Informative)
Why does slashdot allow garbage like this to be posted time and time again?
Clearly these MIT kids are smart because all they do is get free advertising from slashdot by submitting their stories multiple times...
This is not news. Furthermore, the story isn't even worth of being slashdotted. Just stop already.
Why are you hating on us? (Score:1)
Re: (Score:1, Insightful)
As an EE undergrad who is about to graduate, I wonder what planet you're from suggesting that any self-respecting nerd would use assembly for microcontroller programming.
As an engineer, you need to understand tradeoffs. Assembly allows you a greater measure of control and sometimes speed (it's really difficult to outdo a compiler in optimizations these days). In return, you have longer development times and you're more prone to bugs. In the projects I've worked on, coding in C is sufficient 95% of the time.
Is this the level of knowledge at MIT? (Score:3, Informative)
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...
Re: (Score:2)
To pick one more nit: ;-)
I wasn't correct myself when writing the equations.
It should be
Ic = Is ( exp(Vbe/Vth) - 1 )
In practice, Is is so small that you will not see the difference except for very small collector currents, but it's just bad style to correct errors of others when you are not correct yourself
How about a DIY Breath-Analyzer? (Score:2)
Does this thing even work? (Score:3, Informative)
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.
Re: (Score:1)
I believe 0.33V is the voltage specified in the instructions.
Re: (Score:1)
Assuming I've read the documentation correctly, the capacitor and RM don't form a low-pass filter. They serve to increase the gain of the amplifier at higher frequencies. The capacitive reactance of the capacitor decreases as frequency increases. This reduces the impedance from the emitter of
Re: (Score:2)
Try making the peizo a current source, with almost no parallel resistance. The piezo sensors I use are modeled as charge sources, with no parallel resistance. They generate signal because the mechanical deflection (X) corresponds to a charge (Q). A time changing mechanical deflection (dX/dt) thus generates a current (i=dQ/dt).
This change might better explain what is happening in the circuit. I think you will find that the transistor acts as almost a Class C amplifier, and has large amounts of distortio
This is Sad...Here is something better! (Score:1)
Re: (Score:1)
listening to your CPU (Score:2)
I interpreted the caption that the MIT guys are listening to sounds made by a CPU. They are not, but it reminded me of an interesting phenomenon.
I had a transistor radio pick up signals from the CPU (or some other unidentified hardware component, not sure). I Just tuned the radio to receive static (somewhere in the 80-90Mhz FM range I believe) and depending on how busy the processor was, different squeaky noises could be heard. That was way back in the 386 era, don't know if this trick still works with mode
Just Learning (Score:1)