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

Thread: Noise in audio circuit output when Teensy connected via USB

  1. #1
    Junior Member
    Join Date
    Aug 2015
    Posts
    5

    Noise in audio circuit output when Teensy connected via USB

    Hi Guys,

    I have built an audio circuit that is connected via an ADC to the Teensy 3.1. I have split the VUSB and the VIN, and am powering the Teensy with my own workbench power supply. When the USB cable is connected to my laptop I get about an extra 15mV of noise on my power line as can be seen in my scope output:

    USB disconnected:
    Click image for larger version. 

Name:	Screen Shot 2015-10-04 at 8.50.31 AM.png 
Views:	122 
Size:	165.9 KB 
ID:	5207

    USB connected:
    Click image for larger version. 

Name:	Screen Shot 2015-10-04 at 8.49.42 AM.png 
Views:	105 
Size:	175.1 KB 
ID:	5208

    I thought it might be something in the code but have removed everything and am left with this:

    Code:
    #include <stdint.h>
    
    
    void setup() {
    
    } 
    
    void loop() {
      return;
    }

    My amplifier design is not great as I don't have any filters and now this noise on the power line is being picked up:
    Click image for larger version. 

Name:	Screen Shot 2015-09-17 at 8.01.02 AM.png 
Views:	251 
Size:	32.2 KB 
ID:	5206


    I have already soldered the board so any modifications to it are going to be a bit of a hack but might be necessary, the real pain being that there are 5 of these amps on the board...

    My question is then, if I have separated the VIN and VUSB how does this noise get into my power line and is there anything I can do to remove it?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	amp.png 
Views:	373 
Size:	31.9 KB 
ID:	5205  

  2. #2
    Senior Member
    Join Date
    Dec 2014
    Posts
    306
    My analog electronics isn't great, but I believe this is a result of the ground connection to your PC via the usb cable, looping through your bench power supply (a 'ground loop').

  3. #3
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,551
    I second Cosford. The ground of most PCs and Laptops is "dirty" since these are operated by switched mode voltage regulators which is "poison" for whatever analog signal. To get clean, studio-like results, I would totally separate the analog from the digital circuit, using audio transformers and differential inputs which allows to work groundless. But this might be overkill.

    What I actually see is that you bias the op-amp inputs with voltage dividers directly from Vin through the 100k resistor dividers which makes that every "dirt" on Vin will be divided by 2 and then be amplified more than 20 times which means that the "over all dirt gain" is around 100 in that two stage configuration.

    I would try first to filter the bias voltages by sending Vin through a 300u inductor in series with an 1k resistor, then adding a 10u electrolytic capacitor in parallel with a 100n ceramic multilayer capacitor towards ground, before feeding that filtered voltage into R1, R2 and R3.
    Last edited by Theremingenieur; 10-04-2015 at 12:10 PM.

  4. #4
    Junior Member
    Join Date
    Aug 2015
    Posts
    5
    Thanks for the help guys. I switched back to powering the Teensy via USB, keeping it separate from the analog. I connected the grounds of the USB and Teensy together and added in some ceramic caps in parallel to R6 and R7 for some basic filtering. This has worked well.

  5. #5
    Hi manatok,

    I experience the same problem, I also have pre-amp, could you please explain what exact changes have you done to solve this noises?
    Does your Analog 5V feeded from seperate power supply? or you got it from the teensy?

    thanks in advance..

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,288
    Often this is the simplest solution:

    https://www.pjrc.com/store/audio_ground_isolator.html

  7. #7
    Quote Originally Posted by PaulStoffregen View Post
    Often this is the simplest solution:

    https://www.pjrc.com/store/audio_ground_isolator.html
    Thanks... I dont think it will fit my project requirements, and I've got dimensions limits so I am trying to solve it without adding more units.
    I've changed some things and it's better now, but I till got some strange noises :
    Click image for larger version. 

Name:	noi.JPG 
Views:	46 
Size:	67.4 KB 
ID:	10561
    you can see the lowers and the 1K,2K,3K..
    What can be the cause for this noises?

  8. #8
    Senior Member
    Join Date
    Jan 2013
    Posts
    843
    The USB SOF is sent at 1kHz.

    If you only need USB for power, try setting the USB type to 'No USB'.

  9. #9
    Quote Originally Posted by tni View Post
    The USB SOF is sent at 1kHz.

    If you only need USB for power, try setting the USB type to 'No USB'.

    thanks tni, good to know !
    The problem is that I am using the USB Audio type, because I am sending audio to the PC (to connect with MAX MSP).
    Is there any way to filter this noises?
    I didnt connect the 3.3V straight to the analog part, I've connected 1K resistor in series and 10uF cap to the ground, and from there I am feeding the analog part.. it's better but not enough
    Any other suggestion?

    I just scrolled the frequencies with equalizer and I found that I've got peaks on 50Hz,250Hz and the harmonics of the 1Khz..

Posting Permissions

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