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

Thread: Audio + Teensy 4.1 problem

  1. #1

    Audio + Teensy 4.1 problem

    Hi all.
    I am building a project using the Teensy 4.1 that will log data from a 125ccm shifter kart and that will also be used as an Walkie-Talkie to communicate to the pits.
    Because of space restraints I decided to try to solder the Audio shield components myself directly on the PCB I designed. (I also bought some PJRC Audio Shields just in case. If you have the space, I highly recommend buying the Audio Shield because hand soldering everything is not that easy )
    The problem is that as it stands now, the audio is not working. Here is the schematic I used:
    Click image for larger version. 

Name:	Teensy Audio Schematic.png 
Views:	25 
Size:	128.2 KB 
ID:	21059

    I am trying to use mobile headphones (Samsung) connected to an audio jack. It all works when I use the PJRC Audio shield. But when using the PCB i designed the audio does not work.
    You can find my project here, where you will be able to see the different layers of the PCB with the connections.

    I used the schematic for the Audio shield from the PJRC website leaving out the areas marked in pink.

    Click image for larger version. 

Name:	schematic_audio4.png 
Views:	30 
Size:	38.1 KB 
ID:	21060

    I checked and the 3.3V is present, the 1.8V on pin 30 of the SGTL5000 is present.
    When I power the PCB, I can hear a very short crackling sound in the headphones (like unplugging a microphone while the volume is still on). The Hardware test in the Arduino IDE examples is Serial printing the Beep1, but I cannot hear the beep in the headphones.

    I think the soldering is not the problem (done manually). Here is the soldered chip:
    Click image for larger version. 

Name:	IMG_1984.jpg 
Views:	17 
Size:	116.0 KB 
ID:	21061

    Am I doing something wrong? Is it a problem leaving some pins of the SGTL5000 chip unconnected? Any help would be very much appreciated.

    Thank you very much.
    Last edited by guzu; 07-21-2020 at 10:11 AM.

  2. #2
    I just noticed that I did not connect the PAD to GND. (pin 33 on the schematic above) Could that be a problem?

  3. #3
    Senior Member
    Join Date
    May 2017
    Posts
    106
    Hello,

    I don't see the 2.2k pull ups for SDA and SCL in your schematic.
    Dit you forget them, then I2C bus might not work.

  4. #4
    The 2.2k pull ups are placed on the PCB (just in another part of the schematic).
    I think the I2C bus works because I have a MPU6050 chip that uses I2C also and it works.

  5. #5
    Senior Member
    Join Date
    May 2017
    Posts
    106
    On your jack pj-313E-8A you might have mistaken pin 1 with pin 4.

    Also you should have two seperate jacks for mic and headphones, because you cannot connect mic ground with headphone ground (see PCB pictures here: https://www.pjrc.com/store/teensy3_audio.html)
    I don't know if it matters, but the capacitor on pin 10 (VAG) is on audio board 0,15uF, your value is 0.1 uF.

    Hope it helps.

  6. #6
    Thank you very much for taking the time to help me. I believe the pins on the jack are correct (I have used the Audio board with a previous project in which the jack was connected exactly like this.)
    The capacitor is indeed 0.1 uF instead of 0.15uF. Could anyone tell me if this is indeed a problem.
    I noticed that the values for the capacitors on the schematic provided by Paul and the ones on the datasheet of the SGTL5000 chip are different in some cases.

  7. #7
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    277
    Quote Originally Posted by guzu View Post
    I just noticed that I did not connect the PAD to GND. (pin 33 on the schematic above) Could that be a problem?
    I wouldn't be surprised if that is indeed a problem. The datasheet is pretty insisting on that point:

    Click image for larger version. 

Name:	Capture2.PNG 
Views:	2 
Size:	24.6 KB 
ID:	21088

    Click image for larger version. 

Name:	Capture1.PNG 
Views:	5 
Size:	20.6 KB 
ID:	21089

    The pad may not only be there for thermal reasons but is probably also a required electrical connection. Although it's not the original Audio Adapter schematics, I do see a pad with a via underneath the chip:

    Click image for larger version. 

Name:	Capture3.PNG 
Views:	14 
Size:	548.3 KB 
ID:	21090

    The Rev C backside photo even shows a solder blob on that via.

    Paul

  8. #8
    Thank you very much PaulS. I will try to connect the pad to GND and will report back the results.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,458
    The couple prototypes I built (long ago) worked without soldering the bottom pad.

  10. #10
    Quote Originally Posted by PaulStoffregen View Post
    The couple prototypes I built (long ago) worked without soldering the bottom pad.
    Thank you Paul for this information.
    Could I ask if the rest of the schematic I used is correct? Because it seems that now the SGTL5000 is not working. I will solder the pad to GND, but I would like to know if the rest is ok.

  11. #11
    After MANY tries to make it work, my setup is not yet working. I connected the PAD to GND but no change. (When I power on the board I hear 2 very faint clicks in the headphones. When I power off the board I hear a crackling sound - like a microphone unplugged while the volume is on.) I think the SGTL5000 is somewhat working because when the chip is not soldered on the PCB, I hear nothing, not even the sounds I mentioned.

    I tried placing the PJRC Audio shield in place of my own setup and everything works as intended. So this must mean that the actual traces from the Teensy to the SGTL5000 and the jack are correct, but maybe something is wrong with the parts I used maybe.

    Do the capacitors for example need to be a certain type?
    Could I somehow test the SGTL5000 chip to see if it works?
    Is there any signal on some of the pins that would indicate that the chip is not damaged?

    Any help would be greatly appreciated since I am running out of ideas to try. If any of you need to see the actual schematic and PCB I used, you ca see the links in post #1.

    Thank you very much.

  12. #12
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    277
    Since you verified that all power is present on the SGTL5000 [please recheck], next step would be to check whether the I2C bus is up.
    Run the I2Cscanner and check for I2C device found at: 0xA.
    Mind you: you need to modify the I2Cscanner sketch to wake up the SGTL5000 first, otherwise there is no I2C response.
    Here is the modified sketch.
    I just checked on a Teensy 3.2 + Audio Adapter Rev C and got the I2C device found at: 0xA response.

    Paul

  13. #13
    Quote Originally Posted by PaulS View Post
    Since you verified that all power is present on the SGTL5000 [please recheck], next step would be to check whether the I2C bus is up.
    Run the I2Cscanner and check for I2C device found at: 0xA.
    Mind you: you need to modify the I2Cscanner sketch to wake up the SGTL5000 first, otherwise there is no I2C response.
    Here is the modified sketch.
    I just checked on a Teensy 3.2 + Audio Adapter Rev C and got the I2C device found at: 0xA response.

    Paul
    I just ran the modified sketch and got this result:

    Click image for larger version. 

Name:	I2C.jpg 
Views:	6 
Size:	72.1 KB 
ID:	21128

    It seems that the i2c bus is working and it sees the SGTL5000.
    (The 0x68 address is for the MPU6050 chip soldered in the board.)

    Is there anything else I could check?
    Last edited by guzu; 07-25-2020 at 05:32 PM.

  14. #14
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,458
    Opps, looks like this may all be due to a long-standing error on the schematic. The info in the signal names & description table was right, and the pinout were correct, but pins 7 & 8 were swapped on the Rev D schematic. I've fixed that and I've updated the web page and added "Din" and "Dout" on the signal names.

    Try swapping the signals routed Teensy pins 7 and 8. Maybe that will make it all just magically work?!

    Just to confirm, this is the update / correct schematic. Pin 25 on SGTL5000 is supposed to connect to Teensy 4.x pin 8. Pin 26 on SGTL5000 is supposed to connect to Teensy 4.x pin 7.

    Click image for larger version. 

Name:	schematic_audio4.png 
Views:	17 
Size:	20.5 KB 
ID:	21130
    Last edited by PaulStoffregen; 07-25-2020 at 07:40 PM. Reason: added schematic image

  15. #15
    Quote Originally Posted by PaulStoffregen View Post
    Opps, looks like this may all be due to a long-standing error on the schematic. The info in the signal names & description table was right, and the pinout were correct, but pins 7 & 8 were swapped on the Rev D schematic. I've fixed that and I've updated the web page and added "Din" and "Dout" on the signal names.

    Try swapping the signals routed Teensy pins 7 and 8. Maybe that will make it all just magically work?!

    Just to confirm, this is the update / correct schematic. Pin 25 on SGTL5000 is supposed to connect to Teensy 4.x pin 8. Pin 26 on SGTL5000 is supposed to connect to Teensy 4.x pin 7.

    Click image for larger version. 

Name:	schematic_audio4.png 
Views:	17 
Size:	20.5 KB 
ID:	21130
    IT WORKS!
    Thank you very much PaulStoffregen. It was indeed the RX ant TX pins that had to be reversed. Following the revised schematic everything works just fine.

    Thank you all for the great input. PaulStoffregen, PaulS, and larry_berlin thank you for taking the time to help me.

Posting Permissions

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