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

Thread: Shematic for Teensy 4.1 compatible Pt8211-Kit?

  1. #1
    Junior Member
    Join Date
    Jan 2022
    Posts
    6

    Shematic for Teensy 4.1 compatible Pt8211-Kit?

    Hi!

    Sadly, there is no schematic for the PT8211-kit on the page (https://www.pjrc.com/store/pt8211_kit.html).
    I would love to integrate it to my Teensy 4.1

    The one schematic i found does not fit with the picture on the site (see pin4 of the PT8211..)
    Name:  pt8211_t4_pcb.jpg
Views: 144
Size:  25.5 KB
    vs
    https://forum.pjrc.com/threads/29284...l=1#post141252

    Thank you!
    Jan

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,337
    This is probably something that only Paul could fully answer,

    As mentioned the product page does mention Schematic... to do.

    But I am wondering more specifically what you are asking.

    If you are asking should this bersion of the board work with T4.1, I am pretty sure it should. That is if you solder sockets on top of T4.1 and plug it in same orientation, i.e. usb connection to left, first 11 pins with jack on the daughter board also to left...

    As for Pin 4 of of PT8211, it appears to be routed to the small capacitor, which makes sense, I have not checked to see where the capacitor runs to, but am assuming ground as this is I am pretty sure the decoupling capacitor C14 shown in the schematic you mentioned. I am guessing that Pin 5 should connect to the other side of that capacitor. And both of these signals should also connect to one of the other larger caps (C11).

  3. #3
    Junior Member
    Join Date
    Jan 2022
    Posts
    6
    Thanks KurtE for clarification!
    I try to integrate the circuit into a bigger PCB wich comes with some connectors etc for building a synth.
    Trying to fit this into a very small case, which is why i try to avoid the audioboard as well.

    While the P4 goes into the C14 capacitor at Pauls Design, the Design from the Forum does not - but you're right , this might be an good idea

  4. #4
    Junior Member
    Join Date
    Jan 2022
    Posts
    6
    But this means: P4 connects to P5 on the PT... does this feel right?

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,337
    Quote Originally Posted by vdbrey View Post
    But this means: P4 connects to P5 on the PT... does this feel right?
    Sorry I don't have the T4 version board, I did have an older kit for t3.x in box of spare stuff...
    But I will assume that is same except: what is shown in the product page:
    Update: We are now including 2 circuit boards with this PT8211 kit. This new board brings the 3 signals to pins 7, 20, 21 used by Teensy 4.0. If you are using Teensy 3.2, 3.5 or 3.6, solder the parts to the original board, without text between the capacitors. If using Teensy 4.0, solder with this new board which has "T4" printed between the capacitors.
    Again if you look at the Schematic with these two scribbled up photos...
    Click image for larger version. 

Name:	screenshot.jpg 
Views:	15 
Size:	103.2 KB 
ID:	27190
    Click image for larger version. 

Name:	screenshot2.jpg 
Views:	13 
Size:	317.1 KB 
ID:	27191

    Where Red is the +3.3v (and 3.3v after inline resistor ) And black is ground

    As far as I can tell they match...

  6. #6
    Junior Member
    Join Date
    Jan 2022
    Posts
    6
    Wow, THANK you so much! On these images its much clearer.
    I try and route it that way for now

    If it works, i posts the files

  7. #7
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    You can use the i2s port 2 which is pin to pin compatible with the pt8211 the routing is much nicer that way
    Teensy pins
    2 3 4
    Pt8211 pins
    3 2 1

  8. #8
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    606
    That way you can also separate the pt8211 instead of having it underside the teensy you just have it on the side, and the routing wires are all short and nice

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,214
    I've updated the PT8211 page with schematics for both T3 and T4 versions.

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

    Hopefully that helps?

  10. #10
    Junior Member
    Join Date
    Jan 2022
    Posts
    6
    Paul, that's awesome! (like all your work btw!)
    Thank you, this helps so much.

    *closed!

  11. #11
    Member
    Join Date
    Dec 2021
    Location
    No. 1s Business, USA
    Posts
    60
    Quote Originally Posted by manicksan View Post
    You can use the i2s port 2 which is pin to pin compatible with the pt8211 the routing is much nicer that way
    Teensy pins
    2 3 4
    Pt8211 pins
    3 2 1
    Yes, this is the modified pin configuration on the PT8211_2 AudioOutput object that I needed to use in order to stack the PT8211 shield with the SGTL5000 quad shields for hex audio. It worked great, until last night while working with a laser image.
    Suddenly, for no apparent reason, there was no output from the PT8211, but the SGTL5000 outputs were fine. Closer troubleshooting this morning revealed that there is no I2S signal on T4.1 pin 2. So, I tried another 'fresh' T4.1. Same deal, even when 'repatching' the working waveforms from the SGTL5000 to either of the PT8211_2 inputs.
    I remembered some Arduino updates. So, I reinstalled Teensyduino (w/o uninstalling anything/don't know how). No joy.
    Does the audio library only provide an I2S signal to pin #2, if the PT8211_2 is detected? IOW, am I not getting an I2S port 2 signal because of a dead PT8211 shield or is my PT8211 shield dead because there is no I2S signal?
    On the other hand, did the audio library change last night to correct the discrepancy between the PT8211_2 pin definitions and the physical PT8211 T4 kit?
    Thanks for your help.
    :-)

  12. #12
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,214
    Quote Originally Posted by TheHermit View Post
    Does the audio library only provide an I2S signal to pin #2, if the PT8211_2 is detected?
    Teensy does not, can not, detect whether a PT8211 chip is connected. All 3 signals are outputs. Teensy simply transmits the data, even if nothing is connected.

    If you show the complete code, I'll try running it here on a Teensy 4.1 with the latest 1.57-beta1 Teensyduino and connect my oscilloscope to pins 2, 3, 4 to see the waveforms.

  13. #13
    Member
    Join Date
    Dec 2021
    Location
    No. 1s Business, USA
    Posts
    60
    Thank you, Paul.
    This is a basic Hex audio test sketch, which was working fine, prior to last night. At the time of failure, I was intermittently (between code edits and downloads) generating several (~4) 600 Hz sine waveforms on the PT8211, which is safely housed inside an acrylic enclosure. Perhaps it failed due to overheating?
    But, since the 'fresh' T4.1 also failed to provide the I2S signal, then it must have been damaged by the 'dead' PT8211. IOW, another 2 T4.1's down and only 1 spare. Haven't even started the MIDI desk, yet.
    I checked for continuity between DIN and Gnd on the PT8211, but there wasn't if that is any indication that I2S wasn't shorted to Gnd within a blown IC.
    Thank you for testing this code and helping me to avoid damaging another T4.


    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    
    // GUItool: begin automatically generated code
    AudioSynthWaveform       waveform1;      //xy=82.00463104248047,28
    AudioSynthWaveform       waveform2;      //xy=82.00463104248047,65
    AudioSynthWaveform       waveform3;      //xy=82.00463104248047,101
    AudioSynthWaveform       waveform4;      //xy=82.00463104248047,136
    AudioSynthWaveform       waveform5;      //xy=82.00463104248047,172
    AudioSynthWaveform       waveform6;      //xy=83.00463104248047,208
    AudioOutputI2SQuad       i2s_quad1;      //xy=344.00463104248047,159
    AudioOutputPT8211_2      pt8211_2_1;     //xy=354.00463104248047,92
    AudioConnection          patchCord2(waveform3, 0, pt8211_2_1, 0);
    AudioConnection          patchCord3(waveform4, 0, pt8211_2_1, 1);
    AudioConnection          patchCord1(waveform1, 0, i2s_quad1, 1);
    AudioConnection          patchCord4(waveform2, 0, i2s_quad1, 2);
    AudioConnection          patchCord5(waveform5, 0, i2s_quad1, 3);
    AudioControlSGTL5000     sgtl5000_2;     //xy=351.00463104248047,249
    AudioControlSGTL5000     sgtl5000_1;     //xy=356.00463104248047,209
    // GUItool: end automatically generated code
    
    
    
    
    
    
    void setup() {
      Serial.begin(9600);
      AudioMemory(20);
      Wire.begin();
    
    
      sgtl5000_1.setAddress(LOW);
      sgtl5000_1.enable();
      sgtl5000_1.unmuteHeadphone();
      sgtl5000_1.volume(.8);
    //  sgtl5000_1.muteLineout();
      sgtl5000_2.setAddress(HIGH);
      sgtl5000_2.enable();
      sgtl5000_2.unmuteHeadphone();
      sgtl5000_2.volume(.8);
    //  sgtl5000_2.muteLineout();
    
    
      waveform1.begin(WAVEFORM_SINE);   //Orange Left X
      waveform1.frequency(101);
      waveform1.amplitude(0.8);
      waveform2.begin(WAVEFORM_SINE);   //Yel Right Y 
      waveform2.frequency(200);
      waveform2.amplitude(0.8);
      waveform3.begin(WAVEFORM_SINE);
      waveform3.frequency(300);
      waveform3.amplitude(0.8);
      waveform4.begin(WAVEFORM_SINE);   //Red
      waveform4.frequency(200);
      waveform4.amplitude(0.8);
      waveform5.begin(WAVEFORM_SINE);   //Green
      waveform5.frequency(300);
      waveform5.amplitude(0.8);
      waveform6.begin(WAVEFORM_SINE);   //Blue
      waveform6.frequency(400);
      waveform6.amplitude(0.8);
    }
    
    
    void loop() {
    }
    UPDATE: Encouraged by your information, I installed only the PT8211 code from the above code onto the unused T4.1. The 'good news' is that it also had no I2S in pin #2, but had FS & BCK signals on pins #3 & 4.
    IMHO, that proves that my Teensyduino install was corrupted by the Arduino updates. I had hoped that reinstalling Teensyduino on top of my existing install would correct that. Is there an uninstaller or should I simply delete the Teensyduino folders, then run the installer? Otherwise, would running the installer as administrator accomplish the desired restoration?
    Sorry for asking so many questions, but this situation is a little too close to the 'cutting edge' for comfort. Only a few more wrong moves could put this project on hold until the end of IC shortages.
    Last edited by TheHermit; 05-09-2022 at 06:22 AM. Reason: Update

  14. #14
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,214
    As promised, I copied the code from msg #13 into Arduino and uploaded to Teensy 4.1.

    These are the waveforms my scope sees on pins 2, 3, 4.

    Click image for larger version. 

Name:	file.png 
Views:	3 
Size:	52.1 KB 
ID:	28327

    Pin 2 definitely has a digital audio bitstream. Any chance you might have a cold solder or otherwise physically broken connection between pin 2 on Teensy and the data input on your PT8211?

  15. #15
    Member
    Join Date
    Dec 2021
    Location
    No. 1s Business, USA
    Posts
    60
    Thank you, Paul for testing a Teensy 4.1 with the latest 1.57-beta1 Teensyduino.
    After you had explained that the Teensy will produce those DIN, FS, & BCK signals, regardless of whether the PT8211 is connected, I mustered the courage to test the same sketch (w/o the SGTL5000 lines of code) on a new unused T4.1, without any shields to avoid damaging it. It doesn't even have header pins soldered on yet, so my scope probes were clipped directly onto the through holes. There was still no signal on pin #2 of the T4.1, but FS & BCK signals wee present on pins #3 & 4..
    I'm guessing that you didn't see my update on msg #13. I had hoped to save you the effort of further testing. On the other hand, it is reassuring to know that the new beta still supports this hex audio configuration. So, thank you for that.
    These tests seem to prove that my Arduino/Teensyduino installation was corrupted by those updates I had noticed, close to the time of failure. But, it also proves that simply reinstalling Teensyduino (which I had tried) doesn't correct the problem, so I'll try running the installer again as administrator.
    I'm no aware of an uninstaller and briefly searched the forum last night, but nothing of relevance caught my eyes. Apart from the obvious complete uninstall of Arduino's IDE and the deletion of all related folders, are there any other procedures that you would recommend to restore Teensyduino?
    Thank you for your time, Paul. Now, there is a glimmer of hope that I haven't damaged the last 3 of my 4 T4.1's.

  16. #16
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,214
    Quote Originally Posted by TheHermit View Post
    are there any other procedures that you would recommend to restore Teensyduino?
    .... procedures for MacOS, Windows, or Linux?

    If Windows, 2 ways.

    #1: Just run Arduino's installer again. It will delete the old copy. Then run the Teensyduino installer. Your data is kept in {Documents}/Arduino and prefs in {AppData}/Arduino, so if you want to fully purge everything, find and delete those locations. Maybe back up any important code before purging {Documents}/Arduino.... if your computer isn't set up to regularly do full backups of important data.

    #2: Look for info online about "Portable Arduino". Unzip the non-admin ZIP file Arduino provides. Convert it to portable mode. Then run the Teensyduino installer on it (by default the installer finds the location Arduino's installer uses, so be careful to manually choose the location where you made the portable copy). The Teensyduino installer specifically detects if you have the portable Arduino and supports it, so you end up with a completely self-contained Arduino+Teensyduino. But later, having 2+ copies of Arduino gets confusing if you're in the habit of clicking files and letting Windows automatically launch the software. You don't get to explicitly control which copy it runs, so it's easy to get into a confusing situation where you're running a different copy than intended.

    Similar for Linux. MacOS doesn't support portable Arduino. Default locations of prefs are in ~/.arduino15 on Linux and ~/Library on MacOS.

  17. #17
    Member
    Join Date
    Dec 2021
    Location
    No. 1s Business, USA
    Posts
    60
    Thank you, Paul. That's very helpful.
    ".... procedures for MacOS, Windows, or Linux?"
    Sorry, I should have previously specified. Windows #1 procedure sounds like the best option forward. I won't waste more of your time on the details, but you should soon see a project demo video on my Teensy Laser Control thread (I probably should not have said that.).
    BR.


  18. #18
    Member
    Join Date
    Dec 2021
    Location
    No. 1s Business, USA
    Posts
    60
    Paul,
    Just a quick heads-up regarding the missing I2S port 2 issue. Clean installs of Arduino and Teensyduino didn't fix the issue.
    It appears that the problem is being caused by Adafruit's Audio library ver 1.0.4 being upgraded to 1.0.5 by the Arduino IDE. I was only able to fix it by including Audio-master.zip. Initially, I was able to reproduce the issue by downgrading to ver 1.0.4 then allowing the IDE to perform updates. But, the results were inconsistent and now, both versions appear to be working ok.
    Just thought you should know what I've learned.

Posting Permissions

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