Unwanted Noise: Teensy PT8211 Sine Test

Status
Not open for further replies.
Hello dear Teensy Lovers. I decided to put my hands on the Teensy's Audio capabilities, because what I saw on the PJRC website is absolutely amazing!
So I put some parts together and wanted to make the Teensy PT8211 Sine Test provided from the Examples Library.

I didn't changed the code at all, but for clarity I will post it here:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioSynthWaveform       waveform1;      //xy=110,75
AudioOutputPT8211        pt8211_1;          //xy=303,78
AudioConnection          patchCord1(waveform1, 0, pt8211_1, 0);
AudioConnection          patchCord2(waveform1, 0, pt8211_1, 1);
// GUItool: end automatically generated code

void setup() {
    AudioMemory(15);
    waveform1.begin(WAVEFORM_SINE);
    waveform1.frequency(440);
    waveform1.amplitude(0.99);
}

void loop() {
}
I do not have a PT8211 Teensy Breakoutboard, so I build it up on a simple breadboard and connected all things together:
The Button on the breadboard can be ignored. It has no effect.
0f35xIfwSveN4wL9MhUfsQ_thumb_cb4.jpg UNADJUSTEDNONRAW_thumb_cb7.jpg

So now my problem: The recorded Waveform in Ableton is by all mean not a sine wave

Image 31.08.20 at 11.18.jpg

However touching the caps will produce this waveform:
Image 31.08.20 at 11.20.jpg

So I've no idea what's causing the problem and would be very helpful for any advice how to fix this :)
THX Gruftgrabbler

PS: Forgot to mention that I use a Teensy 3.2

PS2: I already read the Thread: https://forum.pjrc.com/threads/45345-PT8211-Audio-Kit-Playback-Distortion, but this was not very helpful for me, so I decided to make a new one
 
Last edited:
I'd remove battery and just connect PT8211's pin 5 directly to the 3.3V pin on Teensy. You don't need the 10 ohm resistor for testing.

Can you get closer photos? Maybe it's just the camera angle, but hard to tell which wires really connect where. Looks like one of the white wires connects to PT8211 pin 7 but should connect to pin 8.
 
In fact the RC Circuit for the power supply of the PT8211 causes the error! Uff I'm so stupid. I should just tested this before before wasting my and your time writing this post, haha. However After removing the Cap and the 10 Ohm resistor I get a clean sine wave. Hurra :)

Thx for this response. :)

PS: And yes LOL I connected the right channel to NC, but luckily I didn't used it at all, so it doesn't mattered
 
The 10 ohm resistor is in the wrong place, so the chip's not got proper decoupling, so there's no guarantee its able to function
at all. The 100nF decoupling capacitor should be ceramic and be right on the Vdd pin with the shortest possible path to ground
on the other side of the caps.

Also the recommended output (reconstruction) filter circuit from the PT8211 datasheet is missing - it may be the Focusrite isn't
set to 44.1kSPS too, which will produce beats if there's no reconstruction filter.

So move that 10 ohm to where it should be, add some sort of output low-pass filter (even RC is better than nothing), check you are
sampling at 44100.
 
MarkT Thank you. Quickly learned something. And yes without a RC Filter at the end I will have problems with aliasing. I will fix that when I start to prototype a serious circuit with that. I am planning "big" things to make with the teensy :)
 
BTW when posting a graph please indicate the timescale - that would show immedately if the spurious variations were
a beat-frequency (such as 3.9kHz) due to sampling 44.1kSPS at 48kSPS or whatever.
 
Status
Not open for further replies.
Back
Top