Microphone Array

by The5Horsemen in Circuits > Arduino

385 Views, 0 Favorites, 0 Comments

Microphone Array

IMG_6488.jpg

Is it possible to direct a “beam” of sound with the use of an acoustic phased array?


Yes! This project uses a phased array to send sound waves further, and keep a cleaner airspace. This project is split into two teams: one team that creates the array of acoustic transmitters that will direct sound waves, and another team that wires and codes an array of acoustic sensors to detect whether the sound waves have been successfully directed in the expected angle. 


This instructable will cover the sound detection task, which will involve creating a sound dampened room for testing, and an arduino-based system to detect the angle of the sound “beam”.

Supplies

Summary Video

The Construction of An Arduino-Based Microphone Array

Here is a summary video of our project!

Theory

Screen Shot 2024-03-14 at 2.45.37 PM.png

In this project, we will be building a grid of sensors to detect and calculate the angle of waves emitted from the phase delayed speakers. This is achieved by detecting which microphone on the grid has the highest decibel reading then converted to degrees by the microcontroller.

Creating an effective sensor array relies on understanding the basic principles of sound waves and how it affects the microphones. It’s important to learn how to measure sound levels and intensity with acoustic waves, and examine the interactions that occur when waves meet barriers, restrictions, changes to the medium, and other waves.

Building a sound room is essential to dampen and minimize any reflections of interfering waves that can hinder the accuracy and reliability of the data from the sound array. Ensuring that the environment of the microphone is quiet allows us to minimize sources of error for sound waves to travel from the speaker to the sound array and ensure proper detection.

Quiet Chamber

For the microphone array to work properly, it is essential to have a quiet space. If you have a small corner or area that you can block off to isolate from any background noise; try to follow this guide to get a relatively isolated environment.

Sound Room: Find a Quiet Place

Screen Shot 2024-03-13 at 1.16.38 PM.png
  • A space of your choosing with 3 walls
  • Build a 4th wall with cardboard leaving about a foot wide gap for entrance
  • Find space with minimum ambient noise
  • Measure environment to estimate amount of panels needed (one panel for every square foot of space on the walls)


Sound Damping Room Planning

Screen Shot 2024-03-12 at 2.20.20 PM.png
Screen Shot 2024-03-12 at 2.20.33 PM.png
Screen Shot 2024-03-12 at 2.24.10 PM.png

Our Sound Damping Room consists of 72 foam sound panels with a blanket on top with a width of 1.39m and a length of 1.16m.

Prepare Sound Panels

  • Prep Sound Panels
  • Remove panels from packaging and soak in water to inflate
  • Allow Panels to dry
  • Use what you can to secure your sound panels to the walls of your chamber (tape won't work directly on the sound panels)
  • We hot glued cardboard to the panels so that tape would stick to them

Build Sound Room

Screen Shot 2024-03-13 at 1.21.08 PM.png
  • Lay out sound dampening blankets draped over the roof and layed out across the floor
  • Secure panels to the wall


Building the "Quiet" Room

431C6A4D-F903-40FE-8DC7-BC9B8C71A288.JPG

Drape curtain over the chamber entrance and it's complete!


Circuit Diagram

Screen Shot 2024-03-13 at 1.14.52 PM.png

You will numerous microphones connected to an Arduino Mega microcontroller as shown in the schematic diagram (we used 10 for higher accuracy).

The microphones are connected to the Arduino Mega's analog inputs A0 through A9. The Arduino Mega is responsible for reading the analog signals from the microphones and converting them into digital signals that can be processed.

The Arduino Mega is connected to a computer via a USB cable.

The computer is used to control the Arduino Mega and to display the data from the microphones.

Code

Screen Shot 2024-03-13 at 1.45.37 PM.png

The code works by taking the analog values from the sensors and calibrating them so that it gives a rough estimate of decibels. It uses the dimensions of the array to then estimate the angle from which the sound is coming from. If you know the angle and distance between your sensors, you can do the necessary math to make your code output the angle of sound in degrees.


Using the real-world data known about your sensor array, you can calibrate the array to give you an estimated angle from where the sound is coming from.

Coding

Screen Shot 2024-03-13 at 12.26.21 PM.png

The code stores the analog readings it receives from the sensors as an array with all the datapoints and then prints them all to the serial monitor where they can be recorded.

Code

Screen Shot 2024-03-13 at 12.27.16 PM.png

It uses a predetermined algorithm with minimum and maximum values to estimate intensity of sound detected by the microphones in decibels.

To eliminate outliers, the code also prints the average of the last five values, rather than just the most recent one.

Build Array Stand

IMG_6489.jpg
  • Gather material to build Array (we used scrap wood).
  • Cut wood with a rounded shape depending on the angles you'll be measuring.
  • Find the radius of the shape you cut out. That's the place your speaker should be put.
  • Mount wooden studs  to the top of the array spaced out at the angles you want.

Mount Circuit to Array Stand

IMG_6490.jpg
  • Used double sided tape to secure the breadboards with the microphones to the Wooden studs.
  • Ensure that the microphones are all mounted so that they would all be pointing at the center of your circle where you measured the radius to be.

Testing

The Construction of An Arduino-Based Microphone Array

Now it's time to test your microphone array!