Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 15 of 15

Thread: teensy + audio shield messing with sound system

  1. #1

    teensy + audio shield messing with sound system

    Hello Forum Members,

    I have been working on a portable speaker project that uses the teensy + audio shield to produce a light show. I have noticed two strange things today that are confusing.

    1. When audio is hooked up to the teensy circuit for the light show sound quality is dramatically decreased. Lots of fuzzy distortion.
    2. When audio is not hooked up to the teensy circuit, but the circuit is running, the lights still produce a FFT show when volume is super loud.. This was what has confused me the most. The amplifier is hooked up to 12v + ground on the bread board. The 12v is used to power a limiter circuit that sends audio into the audio shield. All grounds are connected but not Vcc. The mic is not the reason for this. I tested it with out the mic hooked up.

    Im thinking that maybe some diodes might fix problem one but problem two is very strange.

    Any ideas out there?

    Thank you for your time,

    Rex

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,929
    My guess, without photos or diagrams of how everything is actually connected, would be a ground loop!

  3. #3
    This is my first time hearing of a ground loop. This morning I have quickly attempted to eliminate the ground loop problem with out any luck. This might take some time.. I also noticed that the hum comes when the usb is connected to the computer and teensy but that the poor sound quality is only associated with the audio jack in. It is not from my power supply either because I have a ground pin for my computer but not the power source to the circuit.

    thank you for you help Paul Stoffregen.

  4. #4
    Can you walk us through how you've connected the Audio board to the sound system?

    Are you using the headphone connector on the Audio board, or the line in/outs?

  5. #5
    The audio gets split two directions.

    Direction 1: goes directly into the the amplifier which powers the speaker. The amp is powered by 12v into the bread board.

    Direction 2: goes to a limiter circuit then a small op amp circuit. This is the limiter circuit I used (http://www.electronics-lab.com/wp-co...4037177160.png) and this is the op amp circuit using the TL82 http://www.rason.org/Projects/opamps/opamps.htm. These circuits have been altered a bit because of the components I could get my hands on. Also I dont have a potentiometer, just a resister, this way its always the same volume going into the shield. These two circuits are running on the same 12v as the amp. The output of the op amp circuit goes into the line in on the audio board.

    The teensy and audio board are both powered by the usb and bread board powered by 12v is grounded to the bread board with the teensy boards.

    The music distorts slightly with the usb plugged in and creates a hum.

    when the audio goes into direction 2 the music distorts a lot. There is no noticeable hum when audio goes direction 2 and the usb is unplugged.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,929
    For testing purposes, can you run the amp from a 12V battery *without* any ground connection, other than the 1 ground wire to the audio board?

    For this test, it's essential for the amp to be powered separately, so no connections to the other 12V stuff.

  7. #7
    ok that sounds like a good idea. I will try that out right now.

  8. #8
    That got rid of the usb hum but not the distortion from the audio going into direction 2.

    Does it matter where on the common ground sections get grounded? ex. closer or further from power source.
    Last edited by rexhex; 02-15-2016 at 11:05 PM.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,929
    Well, at least one problem solved!

    Honestly, this is as much as I can do from only your description of the wiring. Photos and maybe a diagram might help. The details of exactly where all the ground wires connect, and which things are powered from each source, are particularly important. If the USB cable is connected, the power and ground connections for the USB host also matter. Ground loops are subtle, difficult to understand problems where currents flow through the ground connections in unexpected ways.

  10. #10
    Yeah! Im happy that the hum is gone. When the project is complete it will all run off the same 12v battery so I will need to find a way to make that work.

    Im not sure about the ground connections for the USB host. The usb is plugged into my MacBook. Hum does not change when the computer is plugged in or not.

    Do you recommend any sources to read so I can learn about these subtle ground loops?

  11. #11
    Many of the ground-loop documents are written from a more generic electrical perspective.

    Here's one that covers them as related to sound systems:

    http://www.jensen-transformers.com/w...4/08/an004.pdf

    And to repeat an important question: are you using the headphone connection for anything?

  12. #12
    I'm not using the headphone connection on the audio board. Just the line in section. ( left right and ground). Thank you for the source. I have been looking over one from MIT in my spare time.

  13. #13
    Update:

    I have shortened ALL of the wires as much as possible and have reduced about 50 to 60% of audible distortion. Im using only one power source and the teensy is ran of of the circuit rather than the USB. A Hum is still present but has also reduced in volume significantly.

    On the oscilloscope hooked up to +12v and ground I see +-68mV of noise with no sound. When the volume is turned up about 50% on the Amp this goes significantly to the music.
    Last edited by rexhex; 02-18-2016 at 05:59 AM.

  14. #14
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,929
    Yup, ground loops are tough problems.

    Often the quick fix involves little audio isolation transformers.

  15. #15
    Junior Member
    Join Date
    Dec 2012
    Posts
    18
    This is a cheap, easy solution:
    http://www.amazon.com/Mpow-Ground-Is...+loop+isolator

    If there's still a radio shack near you, they also sell ground loop isolators.

    One thing to remember is that your USB connection is likely very noisy. I am able to remove any hiss and hum by just plugging the micro USB cable into a USB battery power pack, but that's not a great solution when debugging (What do you MEAN it won't upload????).

    Try an isolator, and if you still have problems, you can then try adding one of these around your USB cable:
    http://www.amazon.com/UF-50B-Noise-S.../dp/B009ENG6TI

    OR, if you want to go nuts and be sure your USB connection doesn't muck about with you, get what I use for my Blofeld synth (notorious for having a poor response to USB noise):
    http://www.amazon.com/Audioquest-ADQ...bug+usb+filter (about $50)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •