aditya das

Class 07: Electronic Input Devices

3 minute read

For the first part of this assignment I made a microphone that detects volume. This was actually a pain to do, but I didn't realize this when I was making it. I found a video on my computer that played a constant tone, and then downloaded a decibel meter on my phone. I configured the code to print the average input value of the microphone every 1 second, and then recorded the value of the mic input.

For the second part I made a pressure sensor, since I thought that might be useful to include on my robotic arm, since if the human squeezes too tightly on something they won't feel it unless there's a pressure sensor. So I cut out two 5x5cm copper parts and put a piece of foam between them, so that when pressure is applied to the top one it will get closer to the bottom and the voltage will skyrocket. I then calibrated it by stacking cat food on it which weights 85 pounds each (yes, I know it's crazy but I was moving and didn't have anything else measureable). Then, with some calculations, I converted the values recorded to pascals (gram/cm^2)

Because the code for both of these projects are long or annoying, I'll leave the links to download below:
Microphone Code
Pressure Sensor Code

mic setup

Wire setup for the microphone

capacitor setup

Wire setup for the capacitor

phone app

Here's the app I downloaded on my phone to measure db volume

testing

This is almost funny, but here's the cat food being stacked on this poor capacitor

volume graph

Here's the mic graph. It's pretty much exponential.

pressure graph

This graph was difficult to make since I only really had 3 data points but it's pretty linear from the looks of it.