A Sound Level Meter, also known as a decibel meter, is a device used to measure the intensity of sound in an environment. This tool is essential for monitoring noise levels in various settings, such as homes, workplaces, and public spaces. In this project, we'll create a simple sound level meter using TinkerCAD, where we’ll use a microphone sensor to detect sound levels and display them using LEDs. This project is a great way to learn about analog sensors, microcontroller inputs, and visual data representation.
Components Required for Sound Level Meter
To build this project in TinkerCAD, you’ll need the following components:
Breadboard (Small)
Arduino Uno R3
Microphone Sound Sensor
3 LEDs (to represent different sound levels)
3 Resistors (220-ohm each)
Jumper wires
Building the Sound Level Meter Project
Step 1: Setting Up the Breadboard and Arduino
Open TinkerCAD: Log in to your TinkerCAD account and navigate to the "Circuits" section.
Create a New Circuit: Click "Create new Circuit" to open the workspace where you’ll build the sound level meter.
Place the Breadboard and Arduino: Drag a small breadboard and an Arduino Uno R3 onto the workspace. Position them next to each other for easy wiring.
Step 2: Connecting the Microphone Sound Sensor
Place the Microphone Sensor: Drag a microphone sound sensor onto the workspace. The sensor typically has three pins: VCC, GND, and an Analog output (A0).
Connect Power and Ground: Connect the VCC pin of the sensor to the 5V rail on the breadboard and the GND pin to the ground (GND) rail.
Connect the Analog Output: Connect the analog output pin (A0) of the sensor to the analog input pin A0 on the Arduino using a jumper wire. This connection allows the Arduino to read the sound levels.
Step 3: Connecting the LEDs for Visual Indication
Place the LEDs: Place three LEDs on the breadboard, with each LED representing a different sound level (low, medium, high). Connect the longer leg (anode) of each LED to an empty row, and the shorter leg (cathode) to the ground rail.
Add Resistors: Connect a 220-ohm resistor in series with each LED’s anode. The other end of each resistor should be connected to digital pins 8, 9, and 10 on the Arduino, respectively.
Connect Ground: Use a jumper wire to connect the ground (GND) rail of the breadboard to one of the GND pins on the Arduino.
Step 4: Writing the Code
Open the Code Editor: Click on the "Code" button at the top right of the TinkerCAD interface to open the code editor.
Choose Text-Based Coding: Switch to "Text" mode to write code in Arduino’s C/C++ language.
Write the Code:
int sensorPin = A0; // Microphone sensor connected to A0
int ledPin1 = 8; // LED 1 connected to pin 8 (low level)
int ledPin2 = 9; // LED 2 connected to pin 9 (medium level)
int ledPin3 = 10; // LED 3 connected to pin 10 (high level)
int sensorValue = 0; // Variable to store sensor value
void setup() {
pinMode(ledPin1, OUTPUT); // Set LED pins as outputs
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
Serial.begin(9600); // Start serial communication for debugging
}
void loop() {
sensorValue = analogRead(sensorPin); // Read the microphone sensor value
// Print the sensor value to the Serial Monitor
Serial.print("Sound Level: ");
Serial.println(sensorValue);
// Turn on LEDs based on sound level
if (sensorValue < 200) {
digitalWrite(ledPin1, HIGH); // Low sound level
digitalWrite(ledPin2, LOW);
digitalWrite(ledPin3, LOW);
} else if (sensorValue < 500) {
digitalWrite(ledPin1, HIGH);
digitalWrite(ledPin2, HIGH); // Medium sound level
digitalWrite(ledPin3, LOW);
} else {
digitalWrite(ledPin1, HIGH);
digitalWrite(ledPin2, HIGH);
digitalWrite(ledPin3, HIGH); // High sound level
}
delay(100); // Short delay before next reading
}
This code reads the sound level from the microphone sensor and lights up different LEDs based on the intensity of the sound. The sensor value is also printed to the Serial Monitor for real-time monitoring.
Step 5: Simulating the Circuit
Start Simulation: Click on the "Start Simulation" button to test your sound level meter. In the Serial Monitor, you can see the real-time sound levels. As the sound intensity changes, different combinations of LEDs will light up to indicate low, medium, or high sound levels.
Testing Sound Levels: Adjust the sound levels in your environment to see how the LEDs respond. You can also manually adjust the sensor value in the Serial Monitor to simulate different sound levels.
Step 6: Interpreting the Results
Sound Levels: The sensor value ranges from 0 to 1023, with higher values indicating louder sounds.
LED Indication: The LEDs provide a visual representation of the sound levels. You can adjust the thresholds in the code to change how sensitive the system is to different sound levels.
Troubleshooting Tips
LEDs Not Lighting Up? Double-check your wiring, especially the connections to the Arduino pins and the ground rail. Ensure the LEDs are correctly oriented, with the longer leg connected to the positive side.
Incorrect Sensor Readings? Verify the connections to the microphone sensor and ensure that the analog pin is correctly reading the sensor’s output. Adjust the thresholds in the code if needed.
Simulation Issues? Ensure all components are placed correctly in TinkerCAD and that there are no loose or incorrect connections.
Conclusion
Congratulations! You’ve successfully built a simple sound level meter using TinkerCAD. This project introduced you to key concepts such as using analog sensors to measure environmental data, processing sensor data with a microcontroller, and displaying results using LEDs. These principles are foundational for creating more advanced projects, such as real-time monitoring systems and interactive audio devices.
TinkerCAD’s easy-to-use interface allows you to experiment with different components and configurations, making it a valuable tool for both learning and prototyping.
With this basic setup, you can expand your project by adding more LEDs for finer sound level granularity, integrating a display for numerical sound levels, or even connecting the system to a smartphone for remote monitoring.
Happy tinkering!
Order Electronics Projects
Want us to guide you through your project or make the project for you? Click on the button below or reach out to us via Call/WhatsApp at (+91) - 7600948607
You can -
Order Basic Electronics Projects
Order Embedded Systems Projects
Order IoT Projects
Order FPGA Projects
Order VLSI Projects
Order Image Processing Projects
Order Matlab Projects
Order TinkerCAD Projects
Order Proteus Projects
Click on the button below to fill out the project inquiry form -
Create Various Projects
Check out our Free Arduino Projects Playlist - Arduino Projects
Check out our Free Raspberry Pi Projects Playlist - Raspberry Pi Projects
Check out our Free TinkerCAD Projects Playlist - TinkerCAD Projects
Check out our Free IoT Projects Playlist - IoT Projects
Check out our Free Home Automation Projects Playlist - Home Automation Projects
Check out our Free NodeMCu Projects Playlist - NodeMCu Projects
Follow us -
Please do follow us i.e. #learnelectronicsindia to get daily updates about new blogs, videos, courses, products, offers, competitions, quizzes, and Internship Opportunities.
Comments