2

I am using the IO pins of the Pi to drive a speaker and a microphone. The speaker is easy to find, just a cheap one from Cool Components however I am finding it harder to find a suitable microphone.

It just needs to be able to receive sin waves made by the speakers. Any suggestions? It's for a project for school group.

Update

A telephone pickup seems like a cheap, sound receiving option.

2

There is a slight problem with using an sine wave microphone because it is Analog signal. All the GPIO pins on the Pi are digital. So you will have to use a A2D (Analag to Digital) helper.

If there were some Analogue pins then you could use this Arduino project to help you out with the schematic.

enter image description here

In order to use a normal everyday microphone (from an old phone even) you will need to use a A2D processor like the MCP3008 . It gets more complicated though as you need to use SPI to read the values into something sensible. There is an answer this Exchange already talking about how to try and use a microphone with that chip.

The last resort is to buy a USB microphone or sound card instead. You buy one as cheap as £2.50 called the CM802 *REF or a more professional one from for about £20 called the Sound Blaster Play! *REF Once you plug that in you will get new audio input and output in the alsa-mixer utility.

How to use the MCP3008 without bitbanging and using hardware SPI of the Pi

  • It'll be a square wave really. Thanks for the advise on the CM802. I hadn't considered the digital\analogue problem. Do you really think there'll be a problem with a wave at a 50% duty cycle? – BanksySan Nov 10 '13 at 17:33
  • I am not enitrly sure to be honest but it could work if it is a sqaure wave. You might be able to read it as digital data on the GPIO pins but I am not sure what how you going to process that data. You will need the voltage to be 1.7v+ so the PIN reads high with a max of 3.3v - Then you also get the rising and falling edge criteria that are set within the GPIO but that is more important for data and specific BAUD. – Piotr Kula Nov 10 '13 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.