0

I'd like to connect about 6 contact mics to my arduino and receive simultaneous signals to be used in my computer for an art installation.

Nonetheless, I don't know what's the ideal way to go. Shall I use Analog pins or Digital? How should I connect them - what schematics shall I follow? I read that ADC is CPU intensive, but I couldn't really find any viable alternative that explicitly shows the Digital deal.

Can I connect several contact mics to different analog pins and receive their input simultaneously as shown here? If this works, then it's perfect.

https://www.arduino.cc/en/Tutorial/Knock

migrated from electronics.stackexchange.com Dec 29 '16 at 21:04

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • What are you trying to do with the audio? – JRE Dec 28 '16 at 13:55
  • You'd probably damage your Arduino using that method - nothing to stop excess voltage or current from the piezo if hit too hard. – Andy aka Dec 28 '16 at 13:55
  • Thanks for comments! I'm going to create other audio :). So I only need data actually, which in turn I can use to create audio... So should I connect digital pins, or use some different parts in the circuit? Andy, how can I simply connect then? – Emo Dec 28 '16 at 14:17
  • Without a spec for the signals these transducers put out, and what you want to interpret from those signals, there is no question here. – Olin Lathrop Dec 28 '16 at 14:21
  • Just a heads up, processing 6 audio signals and synthesizing other audio is a task unlikely to be able to be performed by the Arduino. Even a single-in, single-out audio is fairly limited, and typical synthesis requires assembly-level optimization. – uint128_t Dec 29 '16 at 0:09
1

schematic

simulate this circuit – Schematic created using CircuitLab

A piezo element can be connected to an analog input (A0 for example) of your microcontroller, but extra resistors are advisable if you wish to have a digital sample that is linearly proportional to the element's alternating voltage.
Andy's caution about over-voltage is relevant too - these elements can produce voltages far greater than your Arduino's DC supply voltage. Such over-voltage can cause damage. Resistor R3 helps limit potential damage.
Each piezo element will require its own set of three resistors (duplicates of R1, R2, R3). Many microcontrollers have multiple analog inputs - you can have as many piezo circuits as there are analog inputs. You cannot sample them all simultaneously, since most microcontrollers usually have only one analog-to-digital converter, which is switched between its various analog inputs by program control. A piezo element would have to be sampled, then switched to the next element for sampling, then the next....etc.
Sampling can be done fast enough that "audio" (however you define it) is fairly represented by the digital sample stream. However, be aware that processing these audio samples may be beyond the speed capability of simple microcontrollers like Arduino. That part is up to you.
Be aware that piezo elements make poor microphones. Units mounted in plastic shells are designed to output audio tones, and have significant resonant peaks. Frequency response is not flat, as required by a proper microphone.

  • You're a GOD. Much more information than I asked, but all needed. Thank you very much! I'll surely give it a try! By the way, it'll be activated with touch, so all I need is just the basic data to when people are touching, and in what degree... So the ideal seems to be to connect to digital pins but not sure how to do that either... But thanks! – Emo Dec 28 '16 at 15:48
  • @Emo , Thought your application was audio, not finger-pushes. Piezo's are sensitive for finger-pushes - a hard push will easily produce full output. With no push, data should eventually settle to half-way. "Release" should yield data opposite a "push". A constant-pressure "push" will also settle to half-way. These piezo elements are very brittle - cannot take much pressure before snapping (but then you have TWO piezos). – glen_geek Dec 28 '16 at 16:06

Your Answer

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