This is my first ever project, I’m trying to make a device that activates an active buzzer when 70db is reached using a sound level sensor, the equipment I have is ELEGOO the most complete starter kit. I need with everything, step by step instructions are appreciated alot. The project is due very soon.
Hello omar12341234
Welcome to the worldbest Arduino forum ever.
Post your sketch, well formated, with well-tempered comments and in
so called code tags "< code >" and schematic to see how we can help.
Have a nice day and enjoy coding in C++.
And consider starting project work in good time. Looming deadlines are not our problem.
It would seem important to place the buzzer some distance away from the sound sensor to avoid a self sustaining loop. If the buzzer is active and consumes less than 20mA you can test it using the blink sketch (program) example in the Arduino development environment. A flyback diode is recommended. What sound level sensor can you use from that kit?
I don’t understand what you’re saying exactly.
image|666x500
That’s the only stuff I have in my kit.
I need someone to explain what I need like I’m 5 years old
Hello omar12341234
This is a nice project to get started.
Keep it simple and stupid firstly.
Follow the example code that comes with the library or
run some tutorials for the hardware selected.
If you are happy with the results of the tutorials you can merge these to your project.
Have a nice day and enjoy coding in C++.
p.s.
This forum isn´t a coding service.
You might drop your request here:
Mb mb I didn’t be clear, so my sound level module isn’t accurate,
This is my code
const int soundSensorPin = A0; // Sound sensor analog input pin
const int buzzerPin = 2; // Buzzer digital output pin
const int threshold = 70; // Sound level threshold in dB
void setup() {
pinMode(buzzerPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(soundSensorPin);
float voltage = sensorValue * (5.0 / 1024.0);
float dB = 20 * log10(voltage);
Serial.print("Sound Level (dB): ");
Serial.println(dB);
if (dB >= threshold) {
digitalWrite(buzzerPin, HIGH); // Turn on the buzzer
} else {
digitalWrite(buzzerPin, LOW); // Turn off the buzzer
}
delay(1000); // Adjust the delay as needed
}
And for some reason it shows me that somehow the noise level is 9db even tho its 50-60db with an actual sound meter, is that an issue on my side?
Also whenever I talk louder there seems to be no effect.
Specify "accurate".
It isn’t accurate in sound level
Check the data sheet of the sound sensor with respect to "Output voltage vs. dB(a)" in order to map the correct ratio in the program.
1. Perform the Experiment of the following link on Sound Level Sensor. This experiment uses the same type of sensor as yours.
2. .... pending
How do I get to that data sheet, sorry guys if I am a pain in the a**.
I’ll try that ty
And then you will get the hints on interfacing buzzer.
Quick question tho I need my units to be in dB idk why it’s saying it’s in the hundreds
I think you would get more help if you won't try to manipulate the forum...
I’m literally new to this type of stuff, it’s my first year in STEM and my teacher isn’t that helpful at all.