Our school cafeteria is often a near riot during lunch break. I have been assigned the task of designing a 12' long progress bar with 4" dia. x 10 lights that indicate noise levels. I think there are enough resources to work out the programming but the hardware is another question. The lights must be very bright. Would this application demand 120v or could LED's do the job? If 120v, I assume relays are necessaryt? What about 12v auto lamps? I would much rather work with LED's if possible.
Ah, so the goal of this project is to encourage everyone to be even louder.
I'd use 120V lamps and relays/SSRs, that'll definitely be bright enough and you can swap in CFLs or floodlights or even LED light bulbs as needed.
I think I've seen some surplus LED traffic light modules either in surplus stores (most likely bgmicro.com or goldmine-elec.com, but don't hold me to that) or on ebay. I believe they ran on something like 12 or 24V.
I know I bought some surplus modules from those dot-matrix road signs used for traffic congestion warnings, Amber alerts, etc from BG Micro a few years ago, but I think they've sold out. They were only about 2" in diameter, but were really cheap (on the order of $3-5 apiece). I also found some similar ones on ebay.
So that's where I'd start looking for what you need.
Ran
It would be cool to have some kind of direct reward system. For example, have a TV in the cafeteria, which would be a rare enough privilege in most cases. Then, as the sound level in the room increases, the TV gets darker and darker until no one can see it. Or maybe cumulative noise over a week determines whether they get pizza.
Thanks for the advise. I will look at Ebay. My first choice was a positive reward for quiet but the administration opted for the light meter. I will also have an animated head with smiley/sad face but that is hardly a reward they will work for. The TV is a great idea if we can project to a large screen. Otherwise, the image is too far from most students. I will approach our principal with this possibility. Thanks again.
But what if the noise level goes to eleven or higher? ;D
I would think that the lighting material would be cheaper if you stayed with 120vac lamps using relays to switch on the individual lamps.
The tricky part is the audio amplification/rectification/filtering to get a smooth transition as sound increases or decrease. If it responds to quickly to sharp noise impulse if will just encourage the rug rats to see who can spike the light bar higher.
Lefty
But what if the noise level goes to eleven or higher?
When it gets to 11, you use a servo to fire a starter's pistol
Ran
Or release the sleep-gas.
Gas, pistol? Let's not offer real solutions, please! I will attempt an average over a five or ten second period while collecting data each half second or so.
I will attempt an average over a five or ten second period while collecting data each half second or so.
An audio signal is an AC voltage. How were you planing to precondition the audio signal such that the Arduino analog input pin only sees positive voltages? Applying negative voltages to an Arduino analog input pin could risk damage to the pin.
Also sound level measurement are usually measured on a logarithmic scale as the the dynamic useful range of a 10bit A/D conversion would not span a very wide noise band. I think you will need some analog signal preconditioning/amplification/logarithmic conversion to make for a useful display readout. Just saying.....
Lefty
I am using a pre-amp circuit with an electret mic. Getting no data yet. Do you know of any simple hardware solution?
Getting no data yet. Do you know of any simple hardware solution?
Simple, yes. Cheap, no. This following 8 pin DIP chip is around $15 but it does a tremendous job of taking a AC voltage input and giving a DC measurement value in a 0-5vdc range that represents around 90db of level range. They have a section in the data sheet for handling audio frequency ranges.
Lefty
That site is temporarily down but I will certainly check this chip out. I have ordered a sound sensor breakout board SparkFun Electret Microphone Breakout - BOB-12758 - SparkFun Electronics Will this connect to Arduino for an analog reading?
Will this connect to Arduino for an analog reading?
No it's just a microphone, you also need an amplifier and some form of peak detector like a capacitor and diode. However as said previously this is not a log sensor so will be of limited dynamic range in your application.
If you can talk them down to 10 lights, check out the LM3915. You could use the outputs to drive some sort of transistor/relay circuit to control the lights.
You could also get to 12 lights by having one be a "power on" indicator, and adding a single comparator circuit to drive the 12th when you max out the LM3915.
Ran
I think the power indicator light should simply be a red LED on the side or back...
I ordered LM3915 from Mouser. Looks like just what we need. Thanks for the advise.
here is a nice write up of a 12 light bulb VU meter. he goes into talking about the amplifier, arduino, and the project case. theres a few videos included as well. i imagine you can write some code that would allow a relay (connected to the tv power) on only when the noise level is below a certain level.
http://inventgeek.com/2009-Projects/Giant-Vu-Meter-HV-Controller/OverView.aspx