Introduction: Shhh…(ut-up)
Whispering “Shhhhhh” is not the most effective way to get people to shut up. Especially in public spaces, and especially in public libraries.
So, let’s shut their mouth with a sense of guilt. This light is installed in the library. It detects noise, and as the noise increases, the luminance decreases. If you’re speaking too loud in the library, the room gets darker and darker. Eventually, everyone in the room won’t be able to read. Is that what you expected? Probably not, And because you are now unexpectedly the center of attention in this darkening room, pieced of hundreds of readers’ eyes filled with fire, your sense of guilt will skyrocket and you’ll definitely shut up. After the room becomes silent, the light will turn back on. Then, everyone can read in silence, and everyone wins :))))))))
Shopping List:
Arduino
3D-building software
3D printing machine
Electret Microphone Amplifier
super bright LEDs
Step 1: Build It and Print It
Build a 3D model first.
Make sure the size of the model can fit all your Arduino
Step 2: Assemble Your Material
Step 3: Arduino
Coding:
const int sampleWindow = 50; // Sample window width in mS (50 mS = 20Hz)
unsigned int sample; int brightness = 255; int led[] = {2,4,7,8,12,13}; void setup() { Serial.begin(9600); } void loop() { unsigned long startMillis= millis(); // Start of sample window unsigned int peakToPeak = 0; // peak-to-peak level unsigned int signalMax = 0; unsigned int signalMin = 1024; // collect data for 50 mS while (millis() - startMillis < sampleWindow) { sample = analogRead(0); if (sample < 1024) // toss out spurious readings { if (sample > signalMax) { signalMax = sample; // save just the max levels } else if (sample < signalMin) { signalMin = sample; // save just the min levels } } } peakToPeak = signalMax - signalMin; // max - min = peak-peak amplitude double volts = (peakToPeak * 5.0) / 1024; // convert to volts brightness = map(volts, 0.3, 5, 255, 0); for(int i = 0; i < 6; i ++){ analogWrite(led[i], brightness); } Serial.println(volts); }
13 Comments
4 years ago
please help, I want a full instruction how to build this kind of project. Thank you!
Reply 4 years ago
I've already put all the steps up there, how can I help you specificly?
Reply 4 years ago
The 'Assemble' part. I can't see how did you do the connection of those stuffs.
Reply 4 years ago
The connection of wires to the breadboard and into the arduino. Thank you :D
4 years ago
Clever! Saw a similar concept in the critical care section of a hospital, where a series of red lights got brighter if staff were talking too loud in the hall.
Reply 4 years ago
Thanks for the comment!! Could you please also give me the link of the hospital light?
Thank you!
Reply 4 years ago
This is the one I saw in use. https://www.noisemeters.com/product/soundear/classic/hospital.asp
Reply 4 years ago
Amazing! Thank you so much!
4 years ago
great idea! good job!!!
Reply 4 years ago
Thank you so much!!!
4 years ago
I need one of these for my house sometimes! XD
Reply 4 years ago
Haha, glad you like it! Really appreciate it!!
4 years ago
Please help, I want a full instruction of this project on how to build it and the all materials needed. Thank you so much! :)