and with a 460ohm resistor from the input to the - in, and a 10k pot to the the output, + in is gndedI had it working(very crudely)
An op-amp needs negative feedback to control/set the gain. A theoretical op-amp has infinite gain. Real op-amps have gain somewhere in the thousands. So, a pair of feedback resistors are used with the gain set by the ratio. With too much gain (or no feedback), you get a full-power square wave (severe distortion). Positive
feedback can cause cause oscillation (like "feedback" in a PA system), and that's usually a bad
thing,.. unless you are trying to build an oscillator.
With a 10K pot on the output, between the LM324 and the speaker, the voltage is going to be divided between the pot (depending on its setting) and the speaker. With a 10k Ohm pot and an 8-Ohm speaker, most of the voltage (signal) is going to be dropped across the pot and you won't hear anything. With a 10k pot cranked to full-volume (minimum resistance), it still
might measure more
than 8-Ohms, since pots are not perfect and relative to 10,000 ohms, 8-ohms is practically zero....
The LM386 has built-in feedback resistors, so you don't need to add them. You may still want a pot on the input.
...to a 8ohm speaker The LM324 is not designed to drive a speaker.
If you use Ohm's Law
to calculate the current through the speaker, you will find that the LM324 is "trying" to put-out about 500mA. It's only rated for 10 or 20 mA. You could fry it!
so I figured id add a voltage offset and just have a capacitor after my transistor to get my nice ac...
...And for audio is it better to get a dual supply somehow and use an according opamp or to use a dc offset until it gets to the output?
You can do it either way. Usually, you are find dual supplies used, except where you are running of a battery. But, I have a 50W power amp that's got a single supply. With a single supply, you need a capacitor on the input & output. On a power amplifier, you need a physically large high-uF, capacitor to get low frequencies (bass) into the speaker. With dual supplies, you can get "bass" down to zero-Hz (DC). Not that you'd want DC actually going to the speaker... And of course, with a dual power supply, you need an extra capacitor in the power supply, so basically with a stereo amp, you can save one large capacitor by using dual supplies.
how can I use the lm324 for a vu meter?
As I mentioned... Op-amps have "infinite gain".
If you run it open loop (maximum gain) the output will be either on or off. If the + input is greater (more positive) than the negative input, the output will go full-positive.
If the +input is less than (or more negative) than the -input, the output will go full-negative.
So, if you put a "reference voltage" on the -input, and put an LED on the output, the LED will come-on whenever the + input goes above the reference. (Or, it will go off if you wire the LED the other way).
This circuit is called a "comparator". With several different reference voltages (or a voltage-divider ladder) and several op-amps wired as comparators, you can make a VU meter!