audio and opamp basics

Discussion in 'General Electronics Chat' started by Simon Larsen, Feb 22, 2015.

  1. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    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.
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,768
    4,804
    It would really be helpful if you posted a schematic of what you have -- we are NOT mind readers.
     
  3. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    hahah... I will do that! thanks
     
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    I'm guessing that you forgot to bias the inputs of the opamp halfway between 0V (Vss) and 6V (Vdd).
     
  5. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    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.
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,768
    4,804
    Do you have access to an oscilloscope of any kind?
     
  7. #12

    Expert

    Nov 30, 2010
    16,338
    6,823
    It's supposed to be. That's why you aren't getting answers in about 20 seconds. :D
     
  8. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    Unfortunately not.
     
  9. WBahn

    Moderator

    Mar 31, 2012
    17,768
    4,804
    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.
     
  10. #12

    Expert

    Nov 30, 2010
    16,338
    6,823
    Yes, it's a dual.
     
    • 5150.pdf
      File size:
      521.6 KB
      Views:
      23
  11. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    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.
     
  12. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    jpg with comments
     
  13. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    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).
     
  14. KLillie

    Member

    May 31, 2014
    126
    14
    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.
     
  15. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    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.
     
Loading...