audio and opamp basics

Thread Starter

Simon Larsen

Joined Feb 22, 2015
31
I have a simple circuit. An audio signal is generated by atmega328p (arduino nano). The signal is PWM at 62.5kHz. In the other end I have a headphone socket and my ear plugs connected.

I have now made the following observations:

1) connecting the PWM signal directly to the headphone socket: Sound is good and loud!

2) connecting the PWM signal via 220 ohm to the headphone socket: Sound is good and now volume is decreased.

3) connecting the PWM signal to a voltage follower and the opamp output to the headphone socket: No sound!

4) connecting the PWM signal to a voltage follower and the opamp output to a 220 ohm resistor and then to headphone socket: Sound "seems like it has passed a low pass filter" and volume is decreased (compared to bullet 1)!

My opamp is TS922 and VCC is connected to 6V and -VCC to 0V (same 0V as headphones).

I need some help about what is going on. Here is my own thoughts:

reg. 1) -> I guess the mechanics in the speaker "evens out" the pwm signal. It sounds like it is not necessary with a low pass filter to smooth the signal at all (that actually surprised me!).

reg 2) -> Intuitively I guess it makes sense that the voltage is decrease since the current is limited by the resistor - but to be honest I am not quite sure whats going on.

reg 3) -> This one I simply does not understand. I would have expected same result as in 1)

reg 4) -> Totally confused. Why does adding a 220 ohm resistor suddenly produce sound!?

I hope some of you can help me out :) thanks.
 

Thread Starter

Simon Larsen

Joined Feb 22, 2015
31
this is my circuit(s) and yes - I am a beginner with this stuff :)

The circuit without the opamp (TS922) is sounding clear and crisp and is also louder than...

...the other circuit with the opamp.

That surprises me because I thought that the output of the voltage follower would be the same as the input.
 

Attachments

WBahn

Joined Mar 31, 2012
29,979
Does this opamp have more than one amp in the same package? If so, what are you doing with the other amp? Be sure to not leave it's inputs floating (but do leave it's output unconnected). Or one simple thing would be to configure it as a voltage follower and tie the non-inverting input to one of the supplies.
 

Thread Starter

Simon Larsen

Joined Feb 22, 2015
31
Does this opamp have more than one amp in the same package? If so, what are you doing with the other amp? Be sure to not leave it's inputs floating (but do leave it's output unconnected). Or one simple thing would be to configure it as a voltage follower and tie the non-inverting input to one of the supplies.
it has two op amps - and they were floating. Your suggestion did not work though (but I've kept it like you suggested: non-inverted to ground and inverted and output connected).

I have changed the setup slightly... before it was all powered by the usb port on my pc (I don't know how much current it can supply). Now it is powered by a battery pack. But it did not change anything - same issue

I have attached my breadboard. Maybe there is something obvious that I don't see.
 

Attachments

Thread Starter

Simon Larsen

Joined Feb 22, 2015
31
it has two op amps - and they were floating. Your suggestion did not work though (but I've kept it like you suggested: non-inverted to ground and inverted and output connected).

I have changed the setup slightly... before it was all powered by the usb port on my pc (I don't know how much current it can supply). Now it is powered by a battery pack. But it did not change anything - same issue

I have attached my breadboard. Maybe there is something obvious that I don't see.
jpg with comments
 

Attachments

Thread Starter

Simon Larsen

Joined Feb 22, 2015
31
the op amps was ordered online (aliexpress/china-thingy). I think it was 10 units I bought in total. All have similar behavior. Since this is a new hobby for me I am not sure if that might be an error-source? (I mean damaged components).
 

KLillie

Joined May 31, 2014
137
1. Arduino is capable of decent small signal output
2. The resistor in series would lower your voltage, parallel-your current.
3. Not sure why you are using a voltage follower.
For the unused op-amp, look at this - http://www.electronicproducts.com/A...rs/Properly_terminating_an_unused_op_amp.aspx
4. To not have sound in 3., add a resistor and get sound is suspect. I was working with an IC the other day and getting weird results. Later I found it was not seated in my breadboard well.
Do you want more power (volume)? Use your op-amp as an amp.
 

Thread Starter

Simon Larsen

Joined Feb 22, 2015
31
1. Arduino is capable of decent small signal output
2. The resistor in series would lower your voltage, parallel-your current.
3. Not sure why you are using a voltage follower.
For the unused op-amp, look at this - http://www.electronicproducts.com/A...rs/Properly_terminating_an_unused_op_amp.aspx
4. To not have sound in 3., add a resistor and get sound is suspect. I was working with an IC the other day and getting weird results. Later I found it was not seated in my breadboard well.
Do you want more power (volume)? Use your op-amp as an amp.
the reason that I am using a voltage follower is to avoid drawing too much current out of arduino. Arduino can deliver 20mA and I want to avoid damaging the arduino. I can draw up to 80mA from the voltage follower.
 
Top