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

Thread: Teensy 3.2 Noise generated by analogread

  1. #1
    Senior Member
    Join Date
    Jun 2013
    Posts
    296

    Teensy 3.2 Noise generated by analogread

    Hi, all. I have a problem with noise in my opamp circuit for reading an AC signal. Based on my tests, the noise appears to be generated by the call to analogRead. Below is the output of my scope. Each spike is related to a call to analogRead. Below the image of the scope, is diagram of the opamp circuit. Does anyone know how I can modify my circuit to get rid of that noise?
    Click image for larger version. 

Name:	SDS00004.png 
Views:	15 
Size:	21.9 KB 
ID:	16248
    Click image for larger version. 

Name:	circuit.jpg 
Views:	8 
Size:	34.3 KB 
ID:	16250

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,412
    The "problem" might be that you have added capacitors to Vcc and to the buffered Vcc/2 after the first op-amp. Both sources are Lo-Z, so that there is no true RC low-pass filter effect. I'd modify the circuit as follows:
    Click image for larger version. 

Name:	fullsizeoutput_20e6.jpg 
Views:	7 
Size:	38.5 KB 
ID:	16251

  3. #3
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    fwiw, not 100% whether that's what you're seeing, but i remember i had weird noise issues when directly interfacing the T3.x ADCs with an op amp. a small series resistor (51R or so) fixes/d it.

  4. #4
    Senior Member
    Join Date
    Jun 2013
    Posts
    296
    No dice. Thanks for your suggestions, though. I don't think there's anything I can do. Even if I connect the teensy input pin directly to Vcc/2, GND or VCC, I still get that noise.

  5. #5
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,412
    Then, you'd check if this noise gets through to the ADC results. It might be that the sampled results are ok, though, since the the integration period of these SAR-delta-sigma converters is probably longer than these spikes. Or it might be that you just see false positives because of a too high oscilloscope probe ground lead inductance...

    I'm not trying to minimize your problem with words. But what I wrote above are effects which I have already seen.

  6. #6
    Senior Member
    Join Date
    Jun 2013
    Posts
    296
    It's definitely causing small problems with the ADC; I wouldn't have hooked up the scope in the first place if there wasn't an issue. The noise level isn't so much terrible as it is a nuisance that I can live with. If I ever come across a fix, I'll report it here.

Posting Permissions

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