Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 2 1 2 LastLast
Results 1 to 25 of 26

Thread: SMD I/O and SD Card I/O

  1. #1
    Junior Member
    Join Date
    Jul 2021
    Posts
    14

    SMD I/O and SD Card I/O

    I need a connector for the QSPI memory I/O

    tl;dr

    I am working on a project which will require 48 channels of I/O. I have used the teensy 4.0 before and was looking to use the Teensy 4.1 but I am having trouble finding the hardware to connect the QSPI Memory I/O to my board.

    My first thought was more headers, such [below] or similar, but when I look more into the footprint for these devices the header pads don't overlap with the QSPI Memory pads. (same pitch but different spacing)
    https://www.digikey.com/en/products/...F-D-TR/6699815

    I'm happy to use a short cable to connect them as well, but I cannot find anything that matches up with the pads either.

    If anyone has used these pins before I would appreciate any guidance. All I/O is low amperage and low frequency so any solution that lines up should work.

    Also, if there is a way to get to the SD card terminals that may be useful in the future. I have looked for a SD card to ribbon or similar but I cannot find anything there either.

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Location
    Wales
    Posts
    122
    it depends on how neat a solution you're looking for.

    If you're making a PCB to receive the teensy, you could place pogo pins to contact the pads.
    Or you might have to look around and find a connector that fits if you trim the legs to size. Male pins might be easier for this.
    You could get a flexible PCB made up to solder in.
    Or just solder a bit of ribbon cable.

    It depends on what kind of setup you're looking for. You can if you have the right tools desolder the SD card, and then connect to the pads.

    Consider also using an IO expander, over I2C or SPI, that will give you more pins without needing to do any of the above.

  3. #3
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Quote Originally Posted by Edward View Post
    it depends on how neat a solution you're looking for.

    If you're making a PCB to receive the teensy, you could place pogo pins to contact the pads.
    Or you might have to look around and find a connector that fits if you trim the legs to size. Male pins might be easier for this.
    You could get a flexible PCB made up to solder in.
    Or just solder a bit of ribbon cable.

    It depends on what kind of setup you're looking for. You can if you have the right tools desolder the SD card, and then connect to the pads.

    Consider also using an IO expander, over I2C or SPI, that will give you more pins without needing to do any of the above.
    I am making a PCB to receive the Teensy, and I've thought about pogo pins but I've never used them before. It may be time to try them out.

    As for my first option, connectors, The best fit I've found so far is
    https://www.digikey.com/en/products/...3VBDN/12344237
    https://www.metz-connect.com/externa...BDN/905446.PDF

    I like the flexible PCB option the best. I've not made a flexy PCB but I'm up to try it.

    As for the SD card I had not thought to just de-solder the holder, great idea. I shouldn't need those IO yet but I'll keep it in mind.

    The IO expander is a good idea but my application is very specific on timing & I need to update outputs at ~2Mhz. Adding those in would add quite a bit of complexity.


    I will make a flexy PCB with a connector to make things easy & post the files for others to use. I'm still open to other ideas if there's a better one.

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Location
    Wales
    Posts
    122
    I'd recommend Pogos, I think they'd be a lot less faff than trying to get a connector to fit. The issue I've had with connectors is getting them to line up on the SMD pads so they mate properly. There's a lot of pins on the T4.1 to line up as it is.

    OshPark's flexible PCBs are pretty good. If you create a castellation (where you mark a hole over the edge of the board) they do solder in pretty well.

  5. #5
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Click image for larger version. 

Name:	flexpcb.PNG 
Views:	26 
Size:	11.5 KB 
ID:	25438

    I'm looking at something like this

  6. #6
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Click image for larger version. 

Name:	flexpcb.PNG 
Views:	27 
Size:	12.3 KB 
ID:	25441
    better image ^

    ~$1 for the flex pcb & ~$1 for the connectors for 12 additional IO.

  7. #7
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    823
    7 additional I/O, 5 pins are duplicated to both packages.

  8. #8
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Quote Originally Posted by vjmuzik View Post
    7 additional I/O, 5 pins are duplicated to both packages.
    Click image for larger version. 

Name:	Terms.png 
Views:	24 
Size:	138.6 KB 
ID:	25442

    Thanks for that, it's still enough to get me up to 48.

    Do you know that because you've used these before? If so, I'm curious how you go to those pins.

  9. #9
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Since I only have 7 connections I bumped the connectors down to:
    https://www.digikey.com/en/products/...-5V-91/3977785
    https://www.digikey.com/en/products/...0-5V-51/669964

    I just need to make sure my dimensions are correct on the pads then I should be good to go.
    (The website doesn't give me good detail on the dimensions)
    https://www.pjrc.com/teensy/dimensions_teensy41.png

    Click image for larger version. 

Name:	flexpcb.PNG 
Views:	33 
Size:	22.5 KB 
ID:	25443

  10. #10
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    823
    Quote Originally Posted by kyouryoku8 View Post
    Click image for larger version. 

Name:	Terms.png 
Views:	24 
Size:	138.6 KB 
ID:	25442

    Thanks for that, it's still enough to get me up to 48.

    Do you know that because you've used these before? If so, I'm curious how you go to those pins.
    I know because of the schematic and because it was talked about before, though personally if I've ever needed more I/O I just use various I/O expanders depending on my needs. Unless you absolutely need 48 direct connections for very high speed purposes it's more economical to just add a couple low cost ICs to get more I/O.

  11. #11
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Quote Originally Posted by vjmuzik View Post
    I know because of the schematic and because it was talked about before, though personally if I've ever needed more I/O I just use various I/O expanders depending on my needs. Unless you absolutely need 48 direct connections for very high speed purposes it's more economical to just add a couple low cost ICs to get more I/O.
    Unfortunately that's exactly what I need... I'm then going to chain 6 of these together so I have 288 high speed channels.

  12. #12
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    823
    Why the need for so many?

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,095
    Quote Originally Posted by kyouryoku8 View Post
    I just need to make sure my dimensions are correct on the pads then I should be good to go.
    (The website doesn't give me good detail on the dimensions)
    I will confirm the dimensions which are regarding the pads on Teensy 4.1. Other dimensions on your diagram pertain to the design choices of your project. I'm not going to get involved in those.

    The pin pitch on both 8 pin parts is indeed 1.27mm. The 8 larger pads are each 0.61mm wide by 2.90mm tall (not 2.642 on your diagram). The smaller 8 pads are each 0.61mm wide by 2.13mm tall (very close to 2.207 on your diagram).

    With the pad dimensions and distance between outside edges of the pads on the website (9.60mm and 7.97mm), you can compute the distance between the inside edges. I don't understand why you would need that for this design where your flexible PCB would fully cover that area, but it's simple to calculate.

    Likewise, knowing the pin pitch is 1.27mm, you can compute the distance between the 2 parts from the 6.86mm center-to-center distance shown on the website. I see you already did that, with 3.302mm on your diagram. Please check that work. Each of those pads is 1.27 * 1.5 from the center its 8 pin part. I believe the math works out to be 3.05mm, not 3.302mm.

    Before you send the PCB design to be fabricated, I would highly recommend printing on paper. It's easy to cut the shape with scissors and simply lay it onto the mating part to check the fit. Before doing this, best to print a test PCB of nearly the paper size and check with a ruler that the printing scale is accurate. Simple and obvious as this sounds, many engineers have made PCBs the wrong size or shape or with other incorrect dimensions which could have been easily noticed with a simple but accurately scaled paper print.

  14. #14
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,095
    Quote Originally Posted by kyouryoku8 View Post
    I'm then going to chain 6 of these together so I have 288 high speed channels.
    Unless you get a really good price on the flexible PCBs (and free labor to solder them), your total cost might work out less to just use a 7th Teensy 4.1.

  15. #15
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,120
    Don't forget to account for the SMD part between the pad sets - unless that is going to be removed - it won't allow the flexible PCB to lie flat.

    @loglow/TallDog used a flexible PCB for the Teensy 4.0 Breakout that connected to the 4.0 USB Host and SD card bottom pads and this should work better than that with more solder space and wiggle room across those pads.

  16. #16
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,258
    No ground returns on the ribbon? Not a good idea, you have two ground pins you can use for this.

  17. #17
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Thank you, I think I have everything I need.
    I threw all the dimensions up there because I didn't want to miss something and do it twice.

    We have a milling type PCB system at the university I will use to make a prototype board before I send them off to be made. I don't think there should be any problems here, it's a simple design. I just wanted to make sure the pins would line up.

  18. #18
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Quote Originally Posted by defragster View Post
    Don't forget to account for the SMD part between the pad sets - unless that is going to be removed - it won't allow the flexible PCB to lie flat.

    @loglow/TallDog used a flexible PCB for the Teensy 4.0 Breakout that connected to the 4.0 USB Host and SD card bottom pads and this should work better than that with more solder space and wiggle room across those pads.
    Thank you, I had not seen that breakout before.

    I also added a cutout for the cap so it will lay flat.

  19. #19
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Quote Originally Posted by MarkT View Post
    No ground returns on the ribbon? Not a good idea, you have two ground pins you can use for this.
    I already have 3 grounds coming off of the board.

    I suppose I should add one so if anyone else uses the design differently they will have a GND available.

  20. #20
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Quote Originally Posted by vjmuzik View Post
    Why the need for so many?
    It's a research project. I started with a proof of concept of 12, moved up to 48, and now I'm here.

    The teensys have worked great for this. I have the code executing ~2M/s which leaves me ~300 clock cycles for code, which is enough.

  21. #21
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Quote Originally Posted by PaulStoffregen View Post
    Unless you get a really good price on the flexible PCBs (and free labor to solder them), your total cost might work out less to just use a 7th Teensy 4.1.
    I appreciate the salesmanship
    No worries, I always get spares so you'll get that 7th sale.

    I'm already getting several dozen PCBs, I can just tack this onto the end of my order & I can do the soldering myself.

    Thanks to everyone who gave me input. When I get into the lab next week and build a quick test I will post a picture with files, and a BOM.

    Click image for larger version. 

Name:	flexpcb.jpg 
Views:	30 
Size:	53.5 KB 
ID:	25460

  22. #22
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,120
    Quote Originally Posted by kyouryoku8 View Post
    Thank you, I had not seen that breakout before.

    I also added a cutout for the cap so it will lay flat.
    That T_4.0 breakout is a nice unit - though Paul made the T_4.1 so quickly ...
    Tindie pics don't show the flexible PC in full light:
    Click image for larger version. 

Name:	20210731_164048_e.jpg 
Views:	24 
Size:	122.2 KB 
ID:	25461
    It is nicely flexible and good enough for reliable 480 Mbps USB and SDIO data transfer to the breakout! Much harder than the posted use here should be with the close alignment needed to pass the USB in the middle and the SDIO on the end - and not get any bridging under the PCB.

    Glad I mentioned the cutout - as the @loglow unit shows they can punch out and give accurate USB castellated edges, so leaving the CAP there will give decoupled power traveling with the signals ... to pick up fresh noise

  23. #23
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,258
    Quote Originally Posted by kyouryoku8 View Post
    I already have 3 grounds coming off of the board.
    Each signal should have a ground return running alongside it at logic speeds. Logic edges are "damn fast", you risk
    crosstalk and other issues without good layout. I'd suggest 1 ground wire for each pair of signal wires at least
    if you can, for instance arranged SGSSGSSGS - that way each signal has a ground return next to it.

    This is more important running high speed clocked signals (like SPI) than 9600 baud serial, but its good practice to
    avoid the risk of such issues. If there are no ground returns in that ribbon, the signals will use each other
    for the high speed return currents.

  24. #24
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,120
    Since the flexible PCB is dual sided - according to the last image - adding GND as appropriate (whatever that might be) would make sense.

    The pic in p#22 shows that GND and 3.3V were not taken from the Teensy (close proximity made soldering more fault prone) and it 'perhaps by luck' carries working the 480 Mbs USB Host and fast 4 bit SPI SDIO from the T_4.0 underside to the breakout plug connector. It is single sided and folds back under itself to reach the connector right under the device USB connector.

  25. #25
    Junior Member
    Join Date
    Jul 2021
    Posts
    14
    Quote Originally Posted by MarkT View Post
    Each signal should have a ground return running alongside it at logic speeds. Logic edges are "damn fast", you risk
    crosstalk and other issues without good layout. I'd suggest 1 ground wire for each pair of signal wires at least
    if you can, for instance arranged SGSSGSSGS - that way each signal has a ground return next to it.

    This is more important running high speed clocked signals (like SPI) than 9600 baud serial, but its good practice to
    avoid the risk of such issues. If there are no ground returns in that ribbon, the signals will use each other
    for the high speed return currents.
    That's reasonable, I pulled both GNDs down from their pads.

    I have that sorted for my project. I'm also dealing with low frequency signals. Everything is below 50kHz
    (although the code executes 2M times a second). The important part for me is dynamically modifying the
    phase of each low frequency signal.

Posting Permissions

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