It’s been a long time since my last blog post. I was a bit busy and wasn’t getting time for blogging. Anyway, I did something cool and thought you people would like it. I’ve been working mostly with webcams over the last couple of months. I wanted to do something different for a little change and found sound a very interesting way of communicating with robots/computers. I created a sound sensor for my Microbric Viper Robot to give it the ability to respond to claps and whistles. I had to work extra hard on this project as things weren’t getting done as quickly as they usually do. The basic idea was that the sensor would send the PIC a logic 1 if the loudness of the sound coming in to the microphone exceeds a certain threshold and 0 otherwise. So, the sensor compares the microphone voltage to a reference voltage, and sends a logic 1 if the microphone output is higher (however, my signal is inverted because of the way I set up the op-amp as a comparator in my circuit). I had to experiment a lot on a breadboard before I had the circuit working perfectly. Here’s the final circuit I ended up with:
Since I didn’t have an oscilloscope at home, I turned my computer into an oscilloscope by using PC-Oscilloscope by Christian Zeitnitz. This software works with a sound card. It doesn’t have a fast sampling rate, but it’s good enough for testing this circuit. Parallel port based oscilloscopes are probably a little faster, but I didn’t have time to make one. In the oscilloscope, the signal from the sensor is a nice series of sharp spikes.
This was a fairly simple project, but it took much longer than usual. Well, I have some more cool ideas for sound sensors. ;) Keep visiting!