Close

Audio input

A project log for Classroom music teaching aid

An interactive device for helping a kindergarten class learn to play harmonica.

shlonkinshlonkin 02/18/2016 at 01:180 Comments

The second challenge to take on is audio input. Once again Adafruit covered a relevant topic in their video 7, analog input. As mentioned in the video, the Pi Zero has no ADC( no analog inputs) and the amplified signal from an microphone cannot take advantage of the easy RC ADC technique they talked about.

In the video they used an ADC chip, MCP3008, but I'm going to take it a step further. I'm going to use an ATtiny85 to do the analog to digital conversion, frequency detection, and sample buffering for recording. Since the Pi Zero doesn't use a real time OS, I don't know how well it would work for things like frequency detection and sampling at a reliable rate. It might be fine, I don't know. Anyway, communication will be via SPI.

There are several examples of audio input for Arduino. With very slight modification they can be used for an ATtiny85. One that I particularly like is Amanda Ghassaei's instructable which covers both audio input and frequency detection. I'll be using her technique and I've borrowed and modified one of her schematics. I hope she doesn't mind.

Now I need to find the time to sit down and code it up. Let me know if you see any glaring faults in this approach. I've never worked with audio input before, so I could be missing something important.

Discussions