Impedance, AC to DC, Microphone Input

Hey folks.

Does anyone know what the analog and digital I/O pins are rated at in terms of impedance or power? Of course, I wouldn’t send them anything over 5 volts, and if I know either their impedance or the wattage at which they’d blow, I can scale my inputs so as to not destroy anything.

In particular, I’m wondering if I need to worry about taking the output directly from this (AA-1D: Electronic Rainbow : Super Snooper Big Ear Audio Amplifier Kit : Electronic Kits & Projects) little audio kit. (It’s spec/assembly sheet is here: I’d imagine it spits out around 3V maximum (AC!), but I need to know that it won’t blow the analog inputs as soon as I plug it in, as I would’ve wasted $100 for nothing. (I’m buying things by the 10s, as I’m building 8 identical objects and want a couple spares of everything in case something goes wrong.)

Also, how would I go about converting the AC to DC? Do I need to do that via components, or can I just perform some math at the software side of things? I don’t care if I lost the bottom half (negative voltage) of the waveform, so hopefully I can just deal with this AC in the code.

Anyway, I’m just trying to get a low-quality audio input into the board (I only need to take amplitude values, so the sound quality isn’t important at all). What’s the SIMPLEST circuit I can do this with? Daniel sent me here (, but this doesn’t seem to be working, even after decoupling the RadioShack electrets I have. The 1Mohm pot in that circuit also doesn’t make a 3rd connection; what gives? I suppose it’s also possible I haven’t got the software right, but that leads to another problem…

In short, has anyone built a working audio input circuit and patch that they can share with me? I need both the schematic/image of the circuit and the proper code, as it’s impossible for one to know if one’s hardware, software, or both aren’t right when something’s not working; one has to be 100% on either one’s circuit or one’s code to know that the other is wrong.

Thanks in advance.



just to answer a few of your questions, in no particular order:

The input resistance of the Atmega’s input pins is in the megaohms… so the input current is in microamperes.
The only worries you will have with hurting the input pins is if you exceed 5V. Try powering your amp with 5V.

A common interfacing trick is to run your amp into a voltage divider. Adjusting the values of the divider will bring down the voltage range of the aplifier’s output.

Your amp will need a load to make it happy: replacing its speaker with something like 220 or 100 ohms should do it.

A .1Uf capacitor is a good way to block DC voltages between circuits, and to pass only the AC. In the case of the Arduino, you need to be sure that those AC voltages are within the Atmega’s acceptable range.


PS: in the circuit you mention, the 1M pot has three connection, with the wiper connected to one of its ends. they do this to make a variable resistance for the feedback circuit of the op-amp… which controls the gain. If you can’t get the schematic that I pointed you to in the last post working, the amp module that you are planning to use is a good substitute. It’s pretty much the same circuit as the diagram, but in prepackaged form.

I was just going to do something similar as what Todbot recommends for his Piezo Knocker:
From the outputs of that amp kit ( I’ll put a 5.1V zener diode and a 1Mohm resistor in parallel, with the end of their shared negative lead going to ground, and the end of their shared positive lead going to an analog input. This way, I won’t be permanently dropping the voltages thru dividing (as this would be bad for quiet sources), but am instead placing a hard-limiter (in the form of the zener diode) in between the amp and the inputs.

What exactly IS the acceptible AC range of the ATMega chips?

There’s no speaker in this circuit, so I’m not sure what you mean by “replacing” it. Isn’t the current being sucked out by the Arduino enough of a load? Do I need to piss more current away with resistors / as heat?

Do you have any code that you’ve made work with such a mic input? If so, I’d LOVE to see it.

Thanks again,


What do you all think of this really simple microphone:


Both come from this page (Microphone design) on how to build a simple and cheap mic to listen birds’ songs. Apparently, this system must work well, as its designer/the site’s admin has been using it on his roof to track fall migrations since 1991.

Thoughts? Will this work for my purposes? If I had a mic element with 2 instead of 3 output pins, could I just split the + pin to both V+ and thru a resistor to the output (like a voltage divider, I guess)?




those amp modules are not a bad solution, as they reduce some complexity by putting the connection on a stable piece of pcb… less to worry about.

re: ac input levels, there aren’t specs for that.

analogRead is always just an instantaneous read of the voltage present at the input. The acceptable DC input levels are 0 to 5V, or pretty close.

What you are trying to do just requires a little experimentation… someone might have some code and schematics, but you don’t really need them, you are very close. You simply need an audio signal between 0 and 5V at the Analog in pin, and then an analogRead command.

Here is a quick solution. Looking at your Jameco module, you could tap off an audio directly to the Arduino from pin 3 of U2. Be sure to also connect ground to the Arduino, as well as +5V (instead of +9) to the audio module. You don’t even need U2 actually, as it is just there to bring things up to speaker level. The potentiometer R7 would allow you to vary the level going to the Arduino.


nice research… I think this circuit would work perfectly when powered on 5V, you would not even need a voltage divider at the output:

You might need a 10K or 33k resistor across the output to ground, just to give the mic a load.

Sorry to have to ask, but when you say “You might need a 10K or 33k resistor across the output to ground, just to give the mic a load,” do you mean the 3-pin (+, -, out) mic from RadioShack as in the picture on, or the 2-pin (+, -) element I was talking about? As I’m sure you know, it makes no sense to buy quantities from RadioShack, so I order thru Jameco usually, but all of their mic elements are the 2-pin type.

What’s the difference between the 2- and 3-pin’ers? I’d imagine that there’s just like one or two added components inside the 3-pin body which lead to that 3rd pin, but other than that they’re the same. Is this so? Of course, if it is, I can just drop those couple components into the circuit myself. I’m kind of counting on it.

Also, with regard to the resistive load across the output to ground, can I use a pot there to act as a rudimentary trim? I was thinking 10kohm for the pot. Is that about right? If I wanted to put a pot trim into this, the circuit, is this how to do it? If not, how and where?

Thanks again. The quick replies are a HUGE time- and stress-saver.


P.S. I think I read a post by you (Daniel) somewhere that says you teach. What and where?