Introduction: Sound Locator
This unique little sound locator has a pac-man like ghost that runs towards the loudest sound detected!
It uses three microphones and an Arduino UNO to plot the direction of sound on a LED matrix and also makes for a fun, interactive effect when using with music.
Step 1: Gather Materials
This instructable uses a low cost clock casing to house the components. Most department stores will have a variety of low cost clocks that would be suitable. Look for something that has a glass front with a depth of at least 4cm. Ideally you are looking for something that is a "shadow box" style enclosure which has a front aperture of at least 8cm x 8cm. The enclosure also needs to be able to be easily dismantled and the internal clock removed.
The electronic components are included in the list above. I tried to minimize the number of the components so went for an Arduino UNO to drive a LED array directly and used 3 Freetronics Microphone Modules which kept things simple.
See the circuit section for further details.
Step 2: Build the Arduino Shield
Arduino Shields are boards that can be plugged on top of the Arduino PCB extending its capabilities.Building this simple shield enables you to connect the Arduino to the LED arrayand other components without having to solder directly to the board.
Using a box cutter cut the shield board to a size of 20x30 holes in order to cover the pins we will use. Cut the header pins to size and push into the Arduino UNO board in the correct position as per the circuit diagram. Then push the header pins into the shield to position the pins in the correct holes as per the picture above. Once you are sure they are in position solder the pins into the shield.
The Arduino UNO has one feature where one row of pins (A0-A5) is not aligned uniformly with the opposite side of the board so you have to become a little creative and bend some of the header pins so they align correctly before soldering them into the shield board.
Step 3: Build the LED Display Board
1. Cardboard Cutout
The Sound Loactor display is made up of an array of 8x8 LEDs that are mounted on a cardboard cutout that fits snuggly into the front of the Clock Case. It is best to use cardboard because it wont melt when you are soldering wires to the LEDs and its easy to work with. Use the dimensions of the aperture of the clock case to trace out the required shape and cut out a piece of 2-4mm thick cardboard.
2. LED Grid
Use the enclosed template file to create 8cm x 8cm grid to position the LEDs on the display board. I found that a spreadsheet programme like LibreOffice Calc is quite useful for getting accurate grids for printing. Enclosed is a template that can be modified and printed out then glued onto the cardboard. I used a free version of a draw program called LibreOffice that you can download from here. LibreOffice The files can be modified and resized using this tool. You can use the export feature to get different formats.
3. Mount the LEDs
In the example I used high intensity white surface mounted LEDs that I cut from a 3v LED strip. The key point is that you join the Cathode (-ve) side of each LED in each horizontal row together on one side of the cardboard. Then pass the anode (+ve) through to the other side of the cardboard through a hole and join each column together on that side. What you end up with is 8 Cathode strips on one side horizontally and 8 Anode strips on the other side vertically.
These are then connected to the Arduino Shield from the previous step as per the circuit diagram.
4. Test the LEDs
I recommend at this point testing all of the LEDs to ensure that there are no faulty devices/connections. To test use a 5v-9v DC power source and place a 2.2K ohm resister in line with the positive supply. Its important to do this to protect the LED from over current and burn out. Connect the negative terminal to the LED Cathode and the positive terminal via the resister to the LED Anode of to test out. (Note ensure the Arduino Board is not connected when you do this). Make sure all the LEDs function and operate at the same brightness.
Step 4: Build the Front Display
1. Build the Baffles
Measure the distance between the LED display board and the case glass. Cut 20 strips of A4 Black cardboard to the dimension of that distance.
2. Cut slots into the Baffles
Stack the strips of cardboard into a flat bundle and use tape to hold them together firmly.
Carefully mark the distance between each square on the top of the bundle. When marked correctly there should be 9 marks with the distance between them aligning to the LED panel.
Using a Band Saw or a Junior Hacksaw cut into the bundle 60% of the way through the mark to ensure there is plenty of overlap when assembling.
3. Assemble the Baffles
Carefully dismantle the bundle and systematically assemble the Baffles as per the pictures. Trim the width of the baffles to fit into the box and ensure there is enough clearance on all sides.
4. Glue the Baffles onto tracing paper
The baffles are glued directly onto an A4 sheet of tracing paper over a stencil (see above). Use five minute two part epoxy glue. Smear on baffle edges and hold in place over tracing paper until glue dries. This ensures the baffles are rigid and ensures that there is no light escaping between each cell when a LED lights.
5. Assemble the Sound Locator Display
Using the template provided get the design printed directly onto tracing paper to the correct dimensions.
The final front panel is made up of the following layers
1. Front panel glass
2. Two layers Smoke Black Plastic Sheet ( cut from "L-shaped" document holders)
3. One layer of blue colored cellophane
4. Two layers tracing paper printed with design
5. Baffles glued to a layer of tracing paper
The final effect should be that when LEDs are off it is difficult to see any of the ghosts through the glass.
Finally take the tracing paper that is glued to the baffles and trim to fit on top of the tracing paper.
Carefully align the baffles on top of the transparencies tape into position making sure all letters have no obstructions or overlap. Hold up to the light to double check any issues and shake out any loose material.
Step 5: Mount Components and Connect Up Circuit
1. Plan the position of components
As with any case its best to plan out the orientation and placement of components carefully before drilling any holes.
Position the three Microphone units in a triangle with the orientation described in the photo.
Connect the Arduino UNO to the LED shield and position in case to mark out the holes for the external Power Supply and USB port.
2. Drill holes in case
Most thin plastic cases will tend to melt when drilling them so I always drill holes a few sizes too small to cater for this. Then use a combination of a craft knife to remove burrs and then a larger drill bit to manually complete the correct hole size.
3. Mounting the Microphones
Use a Hot Glue Gun to fix the final position of the three Microphone units in a triangle with the orientation described in the photo. I mounted them so that the front of the Microphone is flush with the side of the case.
Connect the VCC and GND connections on each Mic together so that you can then connect to the Shield board once. You should end up with five wires to connect to the Shield board -
VCC, GND, Mic 1 SPL, Mic 2 SPL, Mic 3 SPL.
Solder three wires to each Microphone Board (VCC, GND and SPL) with enough length to enable easy connection to the Shield board.
4. Connect LED Board to shield
Connect the LED board to the shield as per the circuit diagram. Cut a square of plastic sheet to provide some insulation between the shield and the back of the LED board to avoid anything shorting out. See photo above.
Step 6: Upload the Arduino Code and Test the Unit
There are no additional libraries required so the upload of the code into the Arduino UNO should be straight forward.
There are three variables I have set to adjust brightness, the sample rate and the noise threshold that are probably worth experimenting with to get different results.
The Microphone with the loudest sound should move the ghost in that direction. If this is not the case check the orientation of setup.
Sound deflections will affect the performance of the direction of sound so if the unit is placed against a wall sound reflections create interesting effects.
Music from speakers is also very directional so you can get some very interesting effects with positioning the unit near a bluetooth boom box.
Participated in the
Homemade Gifts Contest