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

Thread: High noise spikes when connecting Teensy 3.2

  1. #1
    Junior Member
    Join Date
    Jan 2018
    Posts
    19

    High noise spikes when connecting Teensy 3.2

    Hi there

    I'm using a Teensy 3.2 to make potentiometer readings for a MIDI controller. The idea is that the controller is USB powered.
    I know USB power is very noisy, that's why I've tried everything in my hand to filter that noise:
    - In this FTDI application note recommends to use a filter just before the usb 5v pin.
    - This filtered voltage goes to a LDO to get 3.3v, and from there to the potentiometers and also to the AREF pin.
    - The cursor of the potentiometers have a capacitor to AGND. The pots are also AGN grounded.
    - Also I'm using some software filtering to smooth the readings.

    After the LDO the noise is reduced a little bit, but it looks like the poor LDO can't handle the spikes. Trying to figure out where this noise is coming from, I was that without the Teensy connected to the circuit the USB power, although noisy, is "quiet" compared to when the Teensy is plugged in (see attachments). First file with Teensy unplugged, second with Teensy plugged. The yellow measurement is taken directly from the USB 5v pin (1), and the pink one is taken after the passive filter (2).

    So, is that normal? Are this spikes coming from the Teensy itself, or maybe they come from the computer, when a load is connected? I tried with 3 different Teensy 3.2 boards, and results are the same, so maybe is the second option...
    Anyway, any ideas on how to improve this?

    Thank you!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	NewFile3.png 
Views:	12 
Size:	48.1 KB 
ID:	15601   Click image for larger version. 

Name:	NewFile3 4.png 
Views:	13 
Size:	59.1 KB 
ID:	15602  

    Click image for larger version. 

Name:	20190115_120831.jpg 
Views:	14 
Size:	94.9 KB 
ID:	15603  

  2. #2
    Junior Member
    Join Date
    Jan 2018
    Posts
    19
    No ideas?

  3. #3
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,191
    Instead of potentiometers, use Alps rotary encoders. These are cheaper and less bulky than potentiometers. Especially for Midi stuff, where almost everything is quantified in 0 to 127 steps, using analog potentiometers and 12bit ADCs is probably overkill.

  4. #4
    Junior Member
    Join Date
    Jan 2018
    Posts
    19
    Quote Originally Posted by Theremingenieur View Post
    Instead of potentiometers, use Alps rotary encoders. These are cheaper and less bulky than potentiometers. Especially for Midi stuff, where almost everything is quantified in 0 to 127 steps, using analog potentiometers and 12bit ADCs is probably overkill.
    Thank you Theremingenieur. Yes, using encoders is an option, but before changin all the design I'd like to try with potentiometers (I like much more the analog style.

    The main issue here are the spikes that shows up when turning on the controller. They go through the filter and the LDO almost intact, and I don't know why...
    Maybe is there any filter configuration I haven't tested yet?
    Cheers!

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,262
    All sorts of measurement artifacts can create these sorts of spikes, including a possible ground loop through the scope's and compter's earth ground connection.

    The sort of filtering you're using should be very effective, so my guess is you're seeing some sort of artifact due to the way the measurement is made.

  6. #6
    Junior Member
    Join Date
    Jan 2018
    Posts
    19
    Hi Paul.
    Yes, I think you are right. I made some research and found this article: https://teledynelecroy.com/doc/makin...-oscilloscopes

    Where precisely talk about this king of stuff. Then I discover that my oscilloscope (Rigol DS1054z) has an "Hig resolution mode". I repeated the measurements an the spikes are gone.
    You always learn a new thing every day! Thanks!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	DS1Z_QuickPrint3.png 
Views:	1 
Size:	39.9 KB 
ID:	15790  

Posting Permissions

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