• WORK
  • CONTACT
JC Ehle
  • WORK
  • CONTACT

Bee box - audio analysis + wieght sensing

Audio Recording

As I learned from the last test, the mic I was using was adding lots of noise/distortion to the recorded sample so the first step was to try and clear that up by trying a different mic.  I ended up going with the Logitech Labtech 600

mic.jpg

We'll need to find cheaper alternative somewhere down the road but for initial tests this is a good option. As soon as I ran a few tests with this mic through the Pi's sound card I immediately started getting cleaner sounding recordings. 

Audio Analysis

The next step was trying to figure out if there is a easy way on the Pi to run audio analysis on board to save the hassle of uploading audio clips to a server then processing them there.  After looking around I found a neat little C library called aubio that says one of its main functions is pitch detection in audio clips.  In order to test I hacked an openFrameworks app that lets me change the frequency on a tone generator:  

tone-generator.jpg

Once this was up and running, I can play this tone on my laptop, put the mic from the Pi next to the laptop's speakers and record a 5-second sample, then run the pitch detection software on the resulting loop.  After doing several different tests at different frequencies I'm pretty satisfied with the accuracy; here is the result of running the pitch detection on a .wav that was recording a tone at 1218 Hz: 

A recorded 1218Hz sample is detected to be: 1217.92988804 Hz (highlighted yellow) - very accurate!

A recorded 1218Hz sample is detected to be: 1217.92988804 Hz (highlighted yellow) - very accurate!

Weight Sensing

This still needs a bit of work: I've played around with a few different components and finally settled on a few that I think will work.  I still need to get the output of this circuit back into the Pi and write software that will translate the A/D signal into pounds/kilos.  I hope to have some time soon to get to that, but in the meantime here are a couple of shots:

 

Circuit w/ op-amp measuring analog voltage difference on weight sensor

Circuit w/ op-amp measuring analog voltage difference on weight sensor

Circuit with weight sensor on scale to record reference points of analog voltage

Circuit with weight sensor on scale to record reference points of analog voltage

Now the circuit has the A/D converter integrated... need to take output from this back into Pi

Now the circuit has the A/D converter integrated... need to take output from this back into Pi

So that's where we are at for now... hopefully I'll get some time soon to take this further! 

Saturday 09.21.13
Posted by jc ehle
Comments: 1
Newer / Older