chicken 630 Posted June 23, 2015 Share Posted June 23, 2015 Monday Night Project (MNP) is my attempt to have a regular rhythm to work on a project from start to finish. Each Monday night, between 8ish and 10ish I will work a bit on the project, and post a write-up about my progress to keep some public pressure up to actually follow through .On to my first MNP! Our local watering hole has a deck overlooking a pond and parts of the community. In winter people usually just go out for a quick smoke, but in summer its rather pleasant to stay out there and banter away, increasing in volume as the night wears on and alcohol gets into heads. Obviously there are complaints .One night, after a few beers too many, the idea came up of having an electronic minder, that shushes people when it gets too loud. As with every beer idea, you're surprised to find that there's actually already a product or two or three that one could buy. But where's the fun in that?So here we go: The "Think of your neighbors", or Toyn, as I like acronyms.A microphone picks up sound which is converted to a digital value by an ADC. Some magic determines what's acceptable, tolerable, or too loud. The magic device then drives a sign with RGB blinkenlights to indicate when it's time to tone it down. For A/D conversion and magic I will use a MSP430G2553 on a rev 1.5 LaunchPad. 6 analog outputs should be perfect to drive the LEDs. Programmed with Energia to keep things simple.For the microphone, I ordered a breakout board from SparkFun that also includes an amplifier. While I was at it, I also included 6 N-channel MOSFETs to drive the sign, which I expect to be constructed from 1 or 2 non-addressable RGB strips. The parts from SparkFun arrived today, as usual including a convenient red project box.I haven't ordered the LEDs yet (probably some cheap LED strips from eBay). For prototyping, a few random RGB LEDs from the chunk bin will do SteveR, bluehash, cubeberg and 3 others 6 Quote Link to post Share on other sites
bluehash 1,581 Posted June 23, 2015 Share Posted June 23, 2015 Subscribed! If you need FFT, there are a couple of implementations here as well as in TI's knowledge base on the MSP. Quote Link to post Share on other sites
cubeberg 540 Posted June 23, 2015 Share Posted June 23, 2015 Subscribed! If you need FFT, there are a couple of implementations here as well as in TI's knowledge base on the MSP. I know @@simpleavr had an FFT project for the 430g as well http://www.simpleavr.com/msp430-projects/8-bit-fft-spectrum-analyzer Quote Link to post Share on other sites
chicken 630 Posted June 23, 2015 Author Share Posted June 23, 2015 Thanks for your input, but I hope to keep it more basic than that, i.e. a basic peak detection with delayed decay. If there's frequency based filtering required, I'd probably try to accomplish that with a few passives before the ADC. Quote Link to post Share on other sites
abecedarian 330 Posted June 23, 2015 Share Posted June 23, 2015 Interesting project. You might consider looking around at various sound pressure level schematics. Here's one on Instructables- http://www.instructables.com/id/Sound-Pressure-sensor-and-Mike-pre-amp-for-Arduino/ Other uses could be as or coupled with a baby monitor, as an alarm that signals when the noise in the baby's room goes above some decibel level, or even as a safety device to signal to people entering an area that hearing protection should be used. chicken 1 Quote Link to post Share on other sites
bluehash 1,581 Posted June 25, 2015 Share Posted June 25, 2015 Thanks for your input, but I hope to keep it more basic than that, i.e. a basic peak detection with delayed decay. If there's frequency based filtering required, I'd probably try to accomplish that with a few passives before the ADC. Yes.. KISS - Keep it Simple Quote Link to post Share on other sites
Fmilburn 445 Posted June 26, 2015 Share Posted June 26, 2015 @chicken One of the issues I am sure you have thought about is placement of your sensor. The placement problem is exaggerated if the source is not a point source and the sound emits from various changing locations within it - even worse if your sensor is inside the source! Some time back I worked on a project with multiple gas turbines and machinery where there were regulatory requirements and concerns about noise at the fence line. The placement problem is solved by putting the sensors on the fence line. If this turns out to be a problem you may consider running wire, or maybe even using a radio, to place the sensor away from the source and near the neighbors. Another problem is calibration. There are some free apps out there now, I have one on my iPad. It may be a starting place if you don't have anything better. I have a project with some similarities to yours where I'm planning a simple LED light show based on a sound envelope. In doing so, I've noticed that the perceived quality of the display is dependent on the sampling interval length and whether I smooth it over time. Perhaps surprisingly it looks better up to a point if the interval is longer. Too short and the highs and lows flash by too quickly. Too long or oversmoothed and it is a big smudge. Your idea of peak detection with delayed decay is a somewhat different approach and something I will try. Thanks for posting this - you have motivated me to get going on my project again... chicken 1 Quote Link to post Share on other sites
chicken 630 Posted June 26, 2015 Author Share Posted June 26, 2015 @@Fmilburn Yes, placement of the microphone will be critical to get relevant input. The current plan is to put it up on the far end of the deck, which thanks to the elongated shape is between the noise source and the closest neighbors. I definitely want to avoid separating sign and microphone, to be able to stick with the KISS principle mentioned above. Sluggish is good for my use case. I don't want it to react on short, isolated peaks. I'm envisioning a gradually intensifying reminder, only going flashing crazy when things get out of hand for a few minutes Quote Link to post Share on other sites
igor 163 Posted June 27, 2015 Share Posted June 27, 2015 This reminds me of a sketch on the radio show "I'm Sorry I'll Read that Again." It dealt with warning messages being installed in various lamp posts to remind motorists of various conditions - e.g. "Oy, One Way Street" The final warning had a recording of all sorts of noises (symphony orchestra, crashing sounds, explosions, a chorus singing Gilbert and Sullivan) which concluded with the sedate warning "shh, you engine is making too much noise." So why go LED for the reminder, how about using a speaker. spirilis 1 Quote Link to post Share on other sites
chicken 630 Posted June 27, 2015 Author Share Posted June 27, 2015 You mean "SHUT UP! GOD DAMN IT!!"? Quote Link to post Share on other sites
Fmilburn 445 Posted June 27, 2015 Share Posted June 27, 2015 @@chicken What kind of power supply are you thinking of using for the LED strip? There are versions shipped with a power supply but also some bad reviews - e.g. "started on fire" - don't need that.... Quote Link to post Share on other sites
chicken 630 Posted June 30, 2015 Author Share Posted June 30, 2015 I didn't already lapse in my 2nd week in, but 43oh was down when I wanted to post yesterday night. That being said, I didn't do much yesterday. It's way too hot to think! Soldered pin headers onto the microphone breakout, put it on a breadboard, hooked it up to 3.3V, and looked at the analog output on the oscilloscope. This is Siri talking loudly at about 5 inches from the microphone: From across the room (15ft) there's a lot less amplitude, obviously: I fear at the planned 50-60ft distance, power supply noise will be an important parameter to control.. Plan B is a cone to gather more sound waves, which probably would also help directionality. Plan C would be taking an iron hot air gun to the amplifier and modifying the 1M / 10K resistor ratio (R5/R4) that sets the 100x amplification. [schematic] As to the question about power supply: Going up in flames would be bad, very bad as the sign would hang on a wooden wall. I was thinking about using an old laptop power supply from my junk bin. I also don't expect the sign to require the whole 5 meters of LED.. probably closer to 2 meters. Quote Link to post Share on other sites
dubnet 238 Posted June 30, 2015 Share Posted June 30, 2015 @chicken How about a parabolic setup for the microphone? This would give you both gain and directionality. Quote Link to post Share on other sites
Fmilburn 445 Posted June 30, 2015 Share Posted June 30, 2015 @chicken , let me be the first to say that I would find Siri speaking in a loud voice at 5" irritating . Also, my immediate reaction on reading this was to think that if it is so quiet that the power supply noise will overwhelm the mic then perhaps you have a much more reserved bar crowd in Redmond than we do over here in West Seattle and if so the neighbors should be grateful . Be that as it may, here is a data point that might be useful. My little mic on a breakout board is different than yours but has similarities. One difference - you can adjust the gain from 25x to 125x. When cranked up I have found it can detect a soft voice in a quiet room at several feet and easily differentiates that from a normal voice. If so, I speculate it should be capable of differentiating normal voices from a rowdy crowd at 60 feet. Not very scientific, but perhaps this won't be too big an issue for you. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.