Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Bad Munki
Nov 4, 2008

We're all mad here.


It's a 100kΩ resistor. The water, when too low, should indeed be infinite resistance, since the probe will be dry. I feel like the water would be plenty "polluted" since it's got the stump of a slowly dying tree in it.

Bad Munki fucked around with this message at 19:22 on Dec 10, 2012

Adbot
ADBOT LOVES YOU

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

It would help if you explain how it "goes wonky". Does it think there is water there when there is not, or does it think there is no water there when there is, or something else?

Bad Munki
Nov 4, 2008

We're all mad here.


Sorry, it starts reading as dry when it's clearly not. It doesn't do this in a "stable" fashion, though, it'll sort of glitch between the two for a bit and eventually settle on "dry."

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Hey, so I've been messing with microcontroller PWM audio and trying to get a somewhat clean output to a speaker, and it's driving me crazy.

First thing I tried was the schematic from this blog post http://www.msp430launchpad.com/2011/06/simple-launchpad-dac.html

edit: I'm using totally different RC values from that, because the cutoff on that one is ridiculously low. I don't remember the exact values, but I can check when I get home.

Which I naively assumed was adequate for direct audio output without really checking the datasheets. So basically this is only signal level and once you hook to a load like a speaker it distorts back to garbage.

So then from the suggestions of others I decided to hook the output of that opamp filter circuit to LM386 for an amp. I used this simplest lm386 circuit example from the datasheet:

This says it will give 20x gain. This means the multiple of the voltage right? I don't really want a bunch of voltage gain, i just need something that is capable of driving enough current. The PWM signal going in is 3.3V, and the power supply for opamps and lm386 is 5V. So if the gain is any more than 1.5 then it will start to clip, right? So I will need the input pot to be set at nearly the lowest setting, or add another divider resistor in series with the pot? So if I wanted a max gain of just 1, at full "volume" on the pot, then I should put a 190K resistor in series with it, right? Will this end up being too low of a current to drive the lm386 inputs?

I tried this circuit(no 190K series voltage divider resistor et) and i'm just getting really lovely output from it, even at lowest setting on the pot, it sounds distorted, and there is other noise like what I think is 60Hz powerline hum. Any ideas what I can do to get this to work, I'm getting pretty frustrated with all this. My power supply is 5V USB from my laptop.

peepsalot fucked around with this message at 19:40 on Dec 10, 2012

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Bad Munki posted:

Sorry, it starts reading as dry when it's clearly not. It doesn't do this in a "stable" fashion, though, it'll sort of glitch between the two for a bit and eventually settle on "dry."
So measure the wet resistance. Do you have an ohmeter?

Bad Munki
Nov 4, 2008

We're all mad here.


It's all over the place, I don't get it. I just tried sticking the probes from my meter in, and it starts at about 45kΩ and then dances around for a bit, maybe goes up to 120kΩ, then goes to infinity. Pull the probes out, stick 'em back in, 100kΩ, 75kΩ, infinity. Do it again, starts at 50kΩ again, and then slowly climbs to infinity. I'm holding the probes as still as I can, bracing my hand, and not touching the probe ends themselves. I don't know why it would do that. They're not touching anything but the water.

DIY & Hobbies > Learning Electronics Megathread: Debug Water ITT

Bad Munki fucked around with this message at 19:51 on Dec 10, 2012

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Bad Munki posted:

It's all over the place, I don't get it. I just tried sticking the probes from my meter in, and it starts at about 45kΩ and then dances around for a bit, maybe goes up to 120kΩ, then goes to infinity. Pull the probes out, stick 'em back in, 100kΩ, 75kΩ, infinity. Do it again, starts at 50kΩ again, and then slowly climbs to infinity. I'm holding the probes as still as I can, bracing my hand, and not touching the probe ends themselves. I don't know why it would do that. They're not touching anything but the water.
What are your probes made of? The larger surface area the better(uninsulated surface area which is in the water), and you want them as close together as possible without touching. Rig up some kind of spacer to keep them in place close together.

Bad Munki
Nov 4, 2008

We're all mad here.


The ones I was measuring with just now were the probes from the multimeter, no clue what they're made of but I'm sure it's reasonably conductive.

The probe my project was using it just a twisted pair. I can strip some more insulation off the end. They're pretty close together, around a couple millimeters. When I measured with the multimeter, of course, its probes were much further apart.

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

Bad Munki posted:

It's all over the place, I don't get it. I just tried sticking the probes from my meter in, and it starts at about 45kΩ and then dances around for a bit, maybe goes up to 120kΩ, then goes to infinity. Pull the probes out, stick 'em back in, 100kΩ, 75kΩ, infinity. Do it again, starts at 50kΩ again, and then slowly climbs to infinity. I'm holding the probes as still as I can, bracing my hand, and not touching the probe ends themselves. I don't know why it would do that. They're not touching anything but the water.

DIY & Hobbies > Learning Electronics Megathread: Debug Water ITT

What kind of water is this? How pure?

Bad Munki
Nov 4, 2008

We're all mad here.


Municipal tap water, with a dirty ol' tree in it. My understanding is that it should conduct well enough for my purposes.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Bad Munki posted:

The ones I was measuring with just now were the probes from the multimeter, no clue what they're made of but I'm sure it's reasonably conductive.

The probe my project was using it just a twisted pair. I can strip some more insulation off the end. They're pretty close together, around a couple millimeters. When I measured with the multimeter, of course, its probes were much further apart.
why would you measure the resistance of your multimeter probes in the water and not the probes that you are using in the actual project. cmon man

Bad Munki
Nov 4, 2008

We're all mad here.


Because my neck is hosed up today and getting under the tree to play with this thing isn't easy...if I pull the device out and play with it elsewhere, then it's just as "inauthentic" because it'd be a different water chemistry. :/

Although I suppose I could take a sample of the tree water for testing purposes.

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
Minimize your variables first, get readings off the actual probe you're using, not the multimeter leads.

You could also consider using a float switch. http://www.amazon.com/Liquid-Water-Horizontal-Switch-Aquarium/dp/B0056EWADA/ref=sr_1_1?ie=UTF8&qid=1355167348&sr=8-1&keywords=float+switch

A local aquarium shop should have one for less than 10bux, and it'll be a simple, no-fiddling setup, open or closed.

Bad Munki
Nov 4, 2008

We're all mad here.


The only problem with that is that I think it might be too large. The reservoir this thing is in isn't very deep, and if it needs, say, 3" to work in, I'm not sure that'll work.

I'll pull the whole thing out and take a sample of tree water at some point, and play with it from there. Thanks thus far. :)

csammis
Aug 26, 2003

Mental Institution

Bad Munki posted:

The only problem with that is that I think it might be too large. The reservoir this thing is in isn't very deep, and if it needs, say, 3" to work in, I'm not sure that'll work.

I'll pull the whole thing out and take a sample of tree water at some point, and play with it from there. Thanks thus far. :)

I use these switches for aquarium level sensing and they definitely don't require three inches to work. Fill the water to where you want the LOW level to be, run a battery and an LED through the switch, and mount it exactly at the point where the LED goes on (or off depending on how you have the switch set up). Then fill up the reservoir and you're good to go. They're fairly sensitive little guys.

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮
You could probably compensate in software as well, as long as you definitely have infinite resistance when the probes are dry. All you'd have to do is set a flag if the circuit detects water, and only clear it if it detects no water at all over several seconds.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Can anyone comment on my audio cicuit shenanigans?

Delta-Wye
Sep 29, 2005
Voltage/resistance measuring is for noobs. All the :coal: kids are doing capacitive sensing now!



Bring the output pin low->high, and see how long the input pin takes to change states. It should vary depending on the water level, as that would chance the capacitance. Whether that variance is significant enough to register, I don't know.

You can also probably do this with one pin and just switch it from output high to input and see how long it takes to start reading as a low. This technique would work on a microcontroller with low-level hardware control (most changes are reflected on the pin within an instruction or two) but not sure about Arduino.

EDIT: Apparently yes? http://arduino.cc/forum/index.php/topic,8609.0.html

EDIT2: ^^ What is your PWM frequency? What do you get when you run at 50% duty cycle? (Should be no output I'm guessing?) Do you have any additional filtering? I haven't built that exact thing before, but I would expect you need a pretty hefty lowpass filter to remove the PWM noise and get a nice audio waveform out of it. Do you have this? What is the cutoff frequency?

EDIT3: Reading your link, nvm. It contains a lot of the details I was curious about.

Delta-Wye fucked around with this message at 21:40 on Dec 10, 2012

longview
Dec 25, 2006

heh.

peepsalot posted:

Can anyone comment on my audio cicuit shenanigans?

I'm not sure how that's supposed to work without distortion off a single supply like that, it has no feedback so it'll be running at around 90 dB gain.

I think you would be best off just putting in a series capacitor (100-470µF) on the output of your original filter and connecting some headphones directly to it, possibly put some series resistance.
If you're running it off 5V single supply then your "0" output will be around 2.5V DC so if you connected speakers directly to that then obviously the amplifier will essentially be overloaded before you even begin to supply a signal.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

peepsalot posted:

Hey, so I've been messing with microcontroller PWM audio and trying to get a somewhat clean output to a speaker, and it's driving me crazy.
...

So then from the suggestions of others I decided to hook the output of that opamp filter circuit to LM386 for an amp. I used this simplest lm386 circuit example from the datasheet:

...

My power supply is 5V USB from my laptop.

How opposed would you be to using a lower gain amp, eg. an AD823?

Delta-Wye
Sep 29, 2005

peepsalot posted:

Can anyone comment on my audio cicuit shenanigans?

With two opamps, I'm wondering why they stuck with two first-order filters. With a few more parts, you could easily control the filtering with a steeper rolloff and configurable gain in the passband.

http://www.electronics-tutorials.ws/filter/filter_5.html

Delta-Wye
Sep 29, 2005
Okay, plan B. Let's complicated this bitch :ohdear:

How about a ring oscillator that uses the water level to either vary a capacitance value. Not sure the best way to form the capacitor, though. I was thinking a ghetto parallel plate cap that is either air-gapped or water-gapped depending on the water level. As it lowers, you should see a shift in the oscillation frequency. Whether you can form a cap that has a measurable period, and whether that period will shift enough for easy measurement, I'm not sure.


or


Using something like this:
http://tushev.org/articles/electronics/43-measuring-frequency-with-arduino
or
http://interface.khm.de/index.php/lab/experiments/arduino-frequency-counter-library/
for the measurement.

SnoPuppy
Jun 15, 2005

longview posted:

I'm not sure how that's supposed to work without distortion off a single supply like that, it has no feedback so it'll be running at around 90 dB gain.

LM386 has internal feedback setting the gain at 26 dB. This can be overridden with the gain pin on the part.

peepsalot posted:

Can anyone comment on my audio cicuit shenanigans?

The PWM output must be filtered before it gets driven to the speakers. The LM386 is good for driving a speaker, but the standard gain is much too high for a 3.3V PWM output.

You generally want your output filter for the PWM to be well below the PWM switching frequency, to provide adequate reconstruction of the analog output. You probably want to shoot for at least 60 dB of attenuation at your switching frequency, probably more if it's anywhere near your output band.

Generally, a class D amplifier will have a PWM frequency in the hundreds of KHz and will use an LC filter that has a cuttoff right above 20 KHz.

SnoPuppy fucked around with this message at 22:56 on Dec 10, 2012

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

SnoPuppy posted:

The PWM output must be filtered before it gets driven to the speakers. The LM386 is good for driving a speaker, but the standard gain is much too high for a 3.3V PWM output.

You generally want your output filter for the PWM to be well below the PWM switching frequency, to provide adequate reconstruction of the analog output.

How did you miss the whole part about the dual opamp/rc filter circuit that is feeding the lm386?

SnoPuppy
Jun 15, 2005

peepsalot posted:

How did you miss the whole part about the dual opamp/rc filter circuit that is feeding the lm386?

I didn't. That's why I said adequate reconstruction.

You're getting some filtering with the RC, but it sounds like it's not enough. You need to either increase your PWM frequency, or increase your filter roll off.

For more info:
An RC filter will have a roll off of ~-6 dB/octave or ~-20 dB/decade. If I assume you're running your MSP430 at 16 MHz, and your PWM at 1/256th of that, this gives a PWM frequency of 62.5 KHz.

If you set your RC at something like 4KHz, this is only
log2(62.5/4) = ~4 octaves
away from your pass band.

Thus, at your PWM frequency, you only have
-6*4 dB = -24 dB
of attenuation. This is nowhere near enough for an audio application.

SnoPuppy fucked around with this message at 23:16 on Dec 10, 2012

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

How do I increase filter rolloff. Should I be trying to build a class d amp straight off the PWM pin(it's just a mosfet and an LC circuit right?)? Is that more effective than RC filter at the signal level? I'm just looking for the simplest overall circuit I can use that won't sound like total poo poo. My PWM frequency is 31250Hz and unfortunately I don't think I can go much higher because my microcontroller won't be able to keep up. My RC cutoff frequency is somewhere around 8-10Khz if i remember correctly.

peepsalot fucked around with this message at 23:13 on Dec 10, 2012

SnoPuppy
Jun 15, 2005

peepsalot posted:

How do I increase filter rolloff. Should I be trying to build a class d amp straight off the PWM pin(it's just a mosfet and an LC circuit right?)? Is that more effective than RC filter at the signal level? I'm just looking for the simplest overall circuit I can use that won't sound like total poo poo. My PWM frequency is 31250Hz and unfortunately I don't think I can go much higher because my microcontroller won't be able to keep up. My RC cutoff frequency is somewhere around 8-10Khz if i remember correctly.

Check my edit.

You already have a class D - the output from the micro controller is already the output from some FETs. All you need is the proper reconstruction filter.

It's likely that you will need to increase your PWM frequency, if possible, or drop your filter cutoff. A 10 KHz cuttoff with a 31.25 KHz PWM isn't going to work very well, unless you have a very aggressive filter. Especially in the audio band.

You're only about half a decade away, so to get to a reasonable cutoff you will need something like -100 dB/decade at the minimum. This would require at least a 5th order filter, and you would probably want to use LCs to avoid having too many stages.

Even then, it might not be enough because your PWM frequency is already very close to the audio band.

I would look up L-C filters, both butterworth and chebyshev style, as well as the Sallen-Key topology for op-amps.
TI also has a free design tool, but I haven't used it:
http://www.ti.com/tool/filterpro

Delta-Wye
Sep 29, 2005
It might be worth noting that switching noise that is nigh-impossible to pick out on the oscope display can show up upon listening. The human ear can be pretty good at picking out noise. It's too bad the article didn't include a spectrum analyzer screenshot. It looks like a pretty clean sine-wave, but I bet there is a bunch of higher frequency noise mixed in the example project too.

Shame Boy
Mar 2, 2010

Delta-Wye posted:

Okay, plan B. Let's complicated this bitch :ohdear:

How about a ring oscillator that uses the water level to either vary a capacitance value. Not sure the best way to form the capacitor, though. I was thinking a ghetto parallel plate cap that is either air-gapped or water-gapped depending on the water level. As it lowers, you should see a shift in the oscillation frequency. Whether you can form a cap that has a measurable period, and whether that period will shift enough for easy measurement, I'm not sure.


or


Using something like this:
http://tushev.org/articles/electronics/43-measuring-frequency-with-arduino
or
http://interface.khm.de/index.php/lab/experiments/arduino-frequency-counter-library/
for the measurement.

You know, they could just dump an assload of salt in the water to raise the conductance. Plus this would probably kill the tree, and then they wouldn't have a dirty-rear end tree ruining their perfectly good water sensing apparatus :science:

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

SnoPuppy posted:

You already have a class D - the output from the micro controller is already the output from some FETs. All you need is the proper reconstruction filter.
Except its a msp430 and can only output 6ma on a pin before the voltage starts to drop. So I need something capable of a bit more current I think, in addition to filtering. All this filter stuff makes my head hurt, this project is just turning into a nightmare to me. Is there any prepackaged super simple filter on a chip with awesome rolloff that i could just plug and play. I'm tired of trying and failing to design analog poo poo.

ANIME AKBAR
Jan 25, 2007

afu~

Bad Munki posted:

Sorry, it starts reading as dry when it's clearly not. It doesn't do this in a "stable" fashion, though, it'll sort of glitch between the two for a bit and eventually settle on "dry."

It's possible that the DC voltage is causing the ions in the water to separate, which gradually decreases its conductivity significantly. The typical solution to this is to measure resistance with an alternating current (so the ions don't see any net drift).

Surprised no one else mentioned this yet. Though using a capacitance sensor is probably good too. Get an old school tunable radio capacitor, seal it in tape, and dunk it in. I've used this successfully in the past to measure the proof of liquor.

Bad Munki
Nov 4, 2008

We're all mad here.


Well, I went ahead and ordered a couple float switches anyhow. They're probably more reliable/easier to work with in hardware & software, and they were cheap and available through amazon prime, so I'll have them Wednesday morning. I only need the one, but I ordered two because they seem like something that could be fun in a number of projects. :)

Boy With Stick
Aug 14, 2004
Between here or there is better than either here or there.

peepsalot posted:

Hey, so I've been messing with microcontroller PWM audio and trying to get a somewhat clean output to a speaker, and it's driving me crazy.

First thing I tried was the schematic from this blog post http://www.msp430launchpad.com/2011/06/simple-launchpad-dac.html

edit: I'm using totally different RC values from that, because the cutoff on that one is ridiculously low. I don't remember the exact values, but I can check when I get home.

Which I naively assumed was adequate for direct audio output without really checking the datasheets. So basically this is only signal level and once you hook to a load like a speaker it distorts back to garbage.

This might be a really stupid question, but with the first circuit did you insert a series DC-blocking capacitor when you attempted to drive the speaker?

Boy With Stick fucked around with this message at 02:16 on Dec 11, 2012

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Boy With Stick posted:

This might be a really stupid question, but with the first circuit did you insert a series DC-blocking capacitor when you attempted to drive the speaker?
No. I have no idea what I'm doing. Would that have made it usable?

I don't understand a ton about opamps but when I look at the datasheet the main thing I can see as far as current capability it this:
Short-Circuit Current ISC +30/–50 mA

Which i'm guessing is saying that's the most current it's gonna put out.

At 3.3V and 16 Ohm speaker, it would need ~200mA though as far as I can tell.


How do you determine how big the dc blocking cap needs to be?

edit: sorry this is like my 5th edit or something.

Is it possible the opamps are damaged from not having a blocking cap or drawing too much current? The datasheet also says "Output Short-Circuit: Continuous" which I interpreted to say that it's fine?

peepsalot fucked around with this message at 02:43 on Dec 11, 2012

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Otto Skorzeny posted:

How opposed would you be to using a lower gain amp, eg. an AD823?

The datasheet i looked at for this said "output current 16mA". Seems not very good for driving a speaker?

Delta-Wye
Sep 29, 2005

Boy With Stick posted:

This might be a really stupid question, but with the first circuit did you insert a series DC-blocking capacitor when you attempted to drive the speaker?

I was thinking about the bypass cap, but I don't think it really matters here. He's generating a +vcc to 0V signal, and carrying it through the entire circuit positive biased.

Question though, what did you change the values to?

quote:

edit: I'm using totally different RC values from that, because the cutoff on that one is ridiculously low. I don't remember the exact values, but I can check when I get home.
The cutoff frequency is pretty low because fpwm is ridiculously low as well. If you're not successfully filtering off the PWM its going to sound like garbage because their PWM frequency is so low, any chance you can increase that? Their interrupt overhead is going to give you a ceiling.

EDIT: Clever utilization of the timer hardware may allow you to use DMA. I should be going home, but a quick review of the datasheet indicates that DMA in repeated single transfer mode w/ increments should be able to walk the array and copy it into the timer register. Put TimerA into up/down or continuous mode, TACCR0 will store the max, and TACCR1 will store your PWM duty cycle. TACCR1 can be put into toggle/set mode. Set DMA to fire every time TAIFG fires, then turn on timerA. Put the CPU to sleep and bam, you're done. 100% hardware, and ought to be able to run at a MUCH higher frequency than the current solution.

I think. I wouldn't be 100% sure until I actually crank out the code and test it, but that is the approach I would use. If you can get fpwm into the MHz range, filtering becomes pretty easy.

Delta-Wye fucked around with this message at 04:08 on Dec 11, 2012

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

10kOhm and 2nF for ~8Khz cutoff

Delta-Wye
Sep 29, 2005

peepsalot posted:

10kOhm and 2nF for ~8Khz cutoff

128Hz x 32 samples indicates that fpwm is ~4KHz. Unless you've changed more than just those values, you aren't even close to removing the switching noise. The article aimed for a cutoff of 160Hz, and even that is probably insufficient due to the filters being nonideal.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Delta-Wye posted:

128Hz x 32 samples indicates that fpwm is ~4KHz. Unless you've changed more than just those values, you aren't even close to removing the switching noise. The article aimed for a cutoff of 160Hz, and even that is probably insufficient due to the filters being nonideal.
my pwm sample rate is 31250 samples/sec

Adbot
ADBOT LOVES YOU

Boy With Stick
Aug 14, 2004
Between here or there is better than either here or there.

peepsalot posted:

No. I have no idea what I'm doing. Would that have made it usable?

I don't understand a ton about opamps but when I look at the datasheet the main thing I can see as far as current capability it this:
Short-Circuit Current ISC +30/–50 mA

Which i'm guessing is saying that's the most current it's gonna put out.

At 3.3V and 16 Ohm speaker, it would need ~200mA though as far as I can tell.


How do you determine how big the dc blocking cap needs to be?

edit: sorry this is like my 5th edit or something.

Is it possible the opamps are damaged from not having a blocking cap or drawing too much current? The datasheet also says "Output Short-Circuit: Continuous" which I interpreted to say that it's fine?

With your circuit arrangement right now you are outputting from your amplifier a sine wave on top of a DC bias - the average value of the waveform, in this case 1/2 the microcontroller's Vcc. In addition to not conveying useful audio information, this DC voltage can also adversely affect your amplifier and speaker performance. In most typical cases a speaker with DC voltage applied to its terminals will more easily distort (due to the driver statically deflecting from its center) and worst-case self-destruct due to the coil overheating.

With regards to your amplifier: in addition to having to source actual signal current it also now has to provide DC current equal to the bias voltage divided by the speaker resistance (different from the rated impedance, usually lower!). In this setup that current is at least 2.5V/16Ohms = ~156mA, which as you rightly surmised is in excess of of the amplifier's current rating. You will definitely experience amplifier-induced distortion due to the output over-current protection clipping the waveform.

The job of the DC blocking cap is to prevent any DC current flow while at the same time behaving as a "short" to AC current at the frequencies of interest. The value you select will depend of the impedance of the speaker and what your minimum frequency is. The lower either of those parameters go, the bigger the cap you will need. For low-power audio applications this will typically be a fairly high value: in the LM386 example you posted it's 250uF.

Speaking frankly it's going to very difficult to find an op-amp that works well with a very low rail voltage and with such a low-impedance load. I would recommend looking at alternative speakers, particularly high-impedance piezoelectrics.

Boy With Stick fucked around with this message at 04:38 on Dec 11, 2012

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply