Sound Sensor (Visual Ear)

by ali-blackham in Circuits > Sensors

145 Views, 1 Favorites, 0 Comments

Sound Sensor (Visual Ear)

Screenshot 2021-04-21 124947.jpg

The Visual Ear! This project is an easy sound sensor that lights up when it hears loud sounds!

I made this project for my ITLS 4270 Course. Our objective was to solve a problem in our lives. I decided to make this device to help my baby brother visually see the sounds around him, since he's hearing impaired. When there is a loud sound near it, it will light up to tell him.

This project is pretty easy to make, see how below!

Supplies!

instructable ingredients.jpg

What you will need:

- A Circuit Playground Express

- A compatible battery pack

- A data transfer Micro USB cord

- Conductive Thread

- at least 4 AMX3d LED lights

- Printer Paper

- Scotch Tape

- A box to house your device, (anything bigger than the Circuit Playground)

- Xacto Knife (use with parent supervision!)

- Foam Core, any color

-Hot Glue and hot glue gun (optional)

The Coding

Code.jpg
code 2.jpg

To code your Circuit Playground, go to https://makecode.adafruit.com/ and click New Project.

You'll want to set your code up like in the picture above.

The Pink "on loud sound" block decides what the Circuit Playground will do when it hears a loud sound. I have it set to change the variable "Loud Sound" to 1, then light up some of the lights white, pause 400 milliseconds, and then clear the lights. After clearing the lights, the "Loud Sound" variable is set back to 0.

This "Loud Sound" Variable is how we tell the other lights when to turn on.

Next is the Green "Forever" block, which is where you tell the Circuit Playground to forever check if the "Loud Sound" variable is at 1 or 0.

If the "Loud Sound" variable is at 1, then you tell it to "write" each pin to High, which means turn the connected light on. I've spaced the lights turning on with the "pause" blocks to create the effect of the lights turning on in order instead of all at once.

If the "Loud Sound" variable is at 0, then you tell it to "write" each pin to Low, which turns the light off. By doing this, they only light up when there is a loud sound, and turn off when it's not loud anymore.

Hint: The pin you choose to write to depends on which pin you connect to your light on the Circuit Playground, pick A1 through A7. A0 is an input only pin, so it won't light up a light.

Lastly, you can tell it what to do when it boots up with the "On Start" block. I used this as a light animation to show that it's turned on. Make sure at the end of the "On Start" block to use the "clear all" block so it doesn't mess up the other code.

To download your code, plug in the Circuit Playground with a data transferring micro USB cord (most cords for charging phones are not data transferring cords, so make sure it is). Once it's plugged in, the lights around the Circuit Playground should light up green. If they haven't, press the center "Reset" button and that should make it light up green. Once it's lighting up green, it's ready to download the code. Use the download button and save the file in the CPLAYBOOT option on your computer. Your code should be uploaded and ready to use!

Wiring

IMG_20210427_161934480 (1).jpg
Circuit Playground Setup with lights.jpg

Now we are onto wiring! To wire your project, you'll need the conductive thread, the 4 lights, and the scotch tape. If you have a needle, that might make it easier to thread the conductive thread through the pins too.

Your lights have a + and a - on them, the + side needs to connect to one of the A pins on the Circuit Playground, A1 through A7. The - side needs to connect to a Ground pin, labeled GND.

When you attach the thread to the pin, wrap the thread around the pin at least 3 times to make sure you have a good connection. Besides the wrapping on the pins, you don't want your thread to touch any other conductive thread, even itself. That's what the tape is for. I used the tape to keep the strings from touching since they overlap in my set up.

Think about the pins you connect in relation to the placements of the lights, if you plan ahead you'll have less wires overlapping and be able to choose the right pins in your coding.

You can see in the diagram there's only 3 ground pins, but all 4 lights need to be connected to ground. To do this, I connected 2 lights to the same ground, using tape to ensure they weren't touching each other and were wrapped around the pin as far from each other as possible.

Building

IMG_20210427_161934480.jpg
IMG_20210427_161937140.jpg
IMG_20210427_162026104_HDR.jpg

Now we get to build the rest of the box!

You can see in the wiring section that I had the lights and Circuit Playground on a black raised section. This is because I wanted the lights to be closer to the front of the box. I attached this platform with Hot Glue, but you could probably use the scotch tape too.

I made my platform half the depth of the box, putting the lights halfway between the back of the box and the front. I also nested the Battery Pack below that platform. The platform, battery pack, and everything on the back half of the box is on one solid piece of foam core cut to fit snuggly in the box, so you can pull the whole thing out by pulling on the platform.

Then on the front part of the box I made light barriers. These barriers make it so when one of the external lights turn on, it doesn't light up more than it's own section of the icon. The barriers are tall enough that they meet the platform the lights are attached to. The white is a piece of printer paper to help diffuse the lights so the whole shape seems to light up, it also hides all the wire and tape!

The barriers are made of foam core. I used my Xacto knife to make small slits through one side of the foam core, not going through to the other side. This allows it to bend like the curved sound lines. Now each sound line can light up separately!

The last picture shows the back of the box, where I cut a small square out so the On/Off switch on the battery pack is accessible while the box is closed.

Test!

Screenshot 2021-04-21 124947.jpg

Now that your project is coded, wired, and built, you can try it out! I suggest testing it out as you wire and build to make sure it will work correctly, so you don't have to pull it apart after.

If you're having troubles and some of the lights aren't lighting up, check that none of the threads are touching each other or any other metal. You may need to line the bottom of the Circuit Playground board with tape so the bottom metal pins aren't touching the thread too.

After carefully checking that, if they still don't work, you may have a faulty light. Try removing the light and testing it with alligator clips on it and the Circuit Playground clips. Because Alligator Clips are insulated wires, there's no chance it's shorting out by touching other wires.