T4 Unreliable Connection with Breakout SD Socket

Status
Not open for further replies.

Bill Greiman

Well-known member
I have been using a Teensy 4.0 beta-2 on a breakout board Paul sent. I am using it for development of SdFat.

Initially the connection to the SD seemed OK. When the breakout arrived, I checked the connection to pins with this program.

Code:
void setup() {
  Serial.begin(9600);
  for (int pin = 34; pin < 40; pin++) {
    pinMode(pin, INPUT_PULLUP);
  }
}

void loop() {
  for (int pin = 34; pin < 40; pin++) {
    Serial.print(pin);
    Serial.print(": ");
    Serial.print(digitalRead(pin));
    Serial.print(' ');
  }
  Serial.println();
  delay(2000);
}

I placed a SparkFun microSD Sniffer in the SD socket and grounded each signal pin. I get a zero for the grounded pin and ones for all other pins. I checked VCC and GND on the sniffer and all seemed OK.

I ran into strange problems in development so I decided to wait until the productionT4 was release with non-beta software. This was in late July.

A few days ago I tried the 1.47 release and nothing worked. I tried SD.h and uSDFS examples and they failed.

I ran the above program and found four pins appeared to be disconnected.

I had never removed the T4 from its socket on the breakout board before this so I couldn't understand what happened. I removed the T4 and and used an ohm meter between the T4 pads and the SD sniffer and some pins seemed to be intermittently connected.

I suspected that the sharp bend in the FFC cable might be a problem. The Pogo pins on D+ D- cause a sharp bend.

I put a SD in the socket and held the T4, pinching the FFC cable against the bottom of the board. The SD.h CardInfo and other examples ran correctly.

I placed the T4 back in the breakout board socket and the above program shows some pins don't connect to the SD.

Any suggestions how I can setup a reliable development environment for SdFat on T4?
 
Are you using the SD socket on the breakout board or the audio shield?

I could be wrong but my understanding is the ribbon cable connects to the SD socket on the breakout board. This SD socket is not wired correctly for SPI (maybe why 4 pins appear disconnected) and since SDIO is not working this socket is not usable yet (hopefully soon). The SD socket on the audio shield is connected using some of the pogo pins so maybe you're having some connection issues there.
 
I am using the the SDIO socket to develop an fast SDIO driver for SdFat.

This socket works intermittently when I remove the T4 from its connector and pinch the FFC ribbon cable's blue area against the T4.

I looked at the connector on the T4 under a 5X magnifier and several of contacts in the connector seem recessed. Maybe the connector is marginal and the sharp bend doesn't allow a reliable connection.
 
I knew your name was familiar! :rolleyes:

Did you try reversing the cable around so the side with the bend is attached to the breakout board instead of the teensy4. Wish I could be more help.

And thanks so much for SdFat! =)
 
I see this is a known problem.

https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=211858&viewfull=1#post211858

You can't plug the T4 into it's socket without a bend in the stiff blue backing of the cable because of the D- D+ pogo pins. I suspect this keeps marginal contacts in the connector from being reliable.

If this is the case, the problem is with the connector on the T4 or really the need for the sharp bend.

I am going to put T4 development aside until I have a better solution.
 
Both POGO and later Ribbon SD cards working on the breakout used here. Only intermittent use - but used off an on since arrived - including again the last week when testing SD card on USB or the board mounted SD adapter. Not seen where the Ribbon boards sent out had troubles reported.

Sounds like something odd/hinky with the soldering or cable or connects in the setup there :( Never disconnected the cable - but have had it in and out headers a few times - soldered wires to bottom and added POGO pins and other ...

@loglaw making a breakout for T4 - Initial Beta units just shipping. Saw one arrive note - one will be here tomorrow to assemble with his custom Flex cable from T4 to his Breakout.

You might ping that thread - it would take a fresh T4 ( $18 from OSHPark +3 shipping ). @loglow might be open for another tester.
 
Sounds like something odd/hinky with the soldering or cable or connects in the setup there :( Never disconnected the cable - but have had it in and out headers a few times - soldered wires to bottom and added POGO pins and other ...

I think I see the problem. Its the cable. The kink in the cable cracked the foil. The kink was extreme and in the blue stiffener.

When I removed the T4 and pinched the cable flat, the ends of the foil at the crack made contact and it worked. Now the gap is too large.

I will order more cables from DigiKey.

I may remove the pogo pins for D-, D+ to insure the SDIO is reliable.

Wonder why it happened? I didn't remove the T4 from its socket until I knew there was a problem.
 
I think I see the problem. Its the cable. The kink in the cable cracked the foil. The kink was extreme and in the blue stiffener.

When I removed the T4 and pinched the cable flat, the ends of the foil at the crack made contact and it worked. Now the gap is too large.

I will order more cables from DigiKey.

I may remove the pogo pins for D-, D+ to insure the SDIO is reliable.

Wonder why it happened? I didn't remove the T4 from its socket until I knew there was a problem.

Bummer. Sounds like the cable was defective - or got creased/folded badly during initial assembly.

You can see a photo of mine here on this page: https://www.pjrc.com/breakout-board-for-teensy-4-0/ - scroll down to ribbon Teensy 4 against Yellow background.

I just pulled ( yanked opps ) my T4 off again and put it back on and the 'Test logger_RawWrite' sample to SDIO from the USBHost thread is working to the Breakout Socket.

The TallDog/@loglow T4 Breakout arrived today … feeling compelled to assemble that … parts soo tiny … 1mm looks much nicer in pictures
 
Bummer. Sounds like the cable was defective - or got creased/folded badly during initial assembly.

You can see a photo of mine here on this page: https://www.pjrc.com/breakout-board-for-teensy-4-0/ - scroll down to ribbon Teensy 4 against Yellow background.

My cable had an almost 90 degree sharp bend in the blue stiffener right at the connector. I ordered lots of cables so I will try to do a gentle bend and keep the Pogo pins.

The new SdFat-beta can support USB drives on Adruino ADK so it might be nice to have USB support on T4.
 
My cable had an almost 90 degree sharp bend in the blue stiffener right at the connector. I ordered lots of cables so I will try to do a gentle bend and keep the Pogo pins.

The new SdFat-beta can support USB drives on Adruino ADK so it might be nice to have USB support on T4.

That sounds extreme on the bending at that not so flexible part of the cable.

USB support is cool. I see you visited this thread : USBHost_t36-USB-Mass-Storage-Driver-Experiments, will be interesting if that gets improved with your work.
 
yep. my microSD on T4B2R stopped working after a few weeks. no known physical trauma to cause it (to my knowledge). I never did get it to work.

Not cool - didn't recall seeing that noted. Just tested mine to work again. I have two same SanDisk cards - one has gone not working - the other does above USBHost MSC test at 6 MB/sec
 
You tell us, as you have system and new information

I had explained it in my post. Everything is well connected and I am using PJRC's SD card along with an 85io. When both SD and Ethernet are active, the SD crashes after a few writes.

When Ethernet is disabled, the SD still crashes but after maybe 50 writes. When I disabled the display (i2c) library, the SD still crashes but after about 70 writes.

I do not know enough about debugging the SPI library but I do not think it is a circuit issue ...
 
I ordered these FFC adapters.

https://www.amazon.com/SUKRAGRAHA-Connector-Adapter-2-54mm-Through/dp/B07T7FCBVS

It would be great if Paul would sell a T4 with the FFC connector.

A little adapter with a FFC connector and SD socket would then be another nice product.

As has been talked about, I'm sure there are several solder challenged folk that would prefer a Teensy 4.0 follow on that is in a Teensy 3.5/3.6 form factor and includes the micro SD drive. I'm sure however, Paul is probably exhausted by the whole ordeal getting the current Teensy 4.0 out of the door.....

At least with the forthcoming 4.0 audio board, that would be another way to add a micro SD card (and possibly flash memory) easily.
 
Hello @ MichaelMeissner

While no solder expert :), I suspect a software rather than a hardware issue for the problems I am having with my SD installation with the T4.

Commenting out the i2c display and Ethernet code always improves the write problems but do not eliminate them ....
 
Happiness - New Cable Fixed Problem

New cables arrived from Digi-Key. I put the T4 on stacking headers to avoid the kink.

DSC_0032.jpg

Tried Paul's SD.h on SDIO and it worked.

Code:
Initializing SD card...Wiring is correct and a card is present.

Card type: SDHC

Volume type is FAT32

Volume size (Kbytes): 31248384
Volume size (Mbytes): 30516

Files found on the card (name, date and size in bytes): 
SYSTEM~1/     2019-09-08 11:09:22
  WPSETT~1.DAT  2019-09-08 11:09:22 12
  INDEXE~1      2019-09-08 11:09:22 76
BENCH.DAT     1980-00-00 00:00:00 5000000

Tried SdFat bench example on Audio Card with SPI.
Code:
Type is FAT32
Card size: 32.01 GB (GB = 1E9 bytes)

Manufacturer ID: 0X1B
OEM ID: SM
Product: 00000
Version: 1.0
Serial number: 0X1550FE3
Manufacturing date: 10/2015

FILE_SIZE_MB = 5
BUF_SIZE = 512 bytes
Starting write test, please wait.

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
3731.34,2083,136,137
3734.13,152,136,137

Starting read test, please wait.

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
3756.57,138,135,136
3767.90,139,135,135

3,767 KB/sec SPI with 512 byte buffer is not bad but not what I expected, I ask for 50 MHz clock. SCK must be much less than 50 MHz.

Ordered two more T4, FFC connectors for Teensy and these breakouts so I can make quick test setups on a perf board.

ffccrop.jpg
https://www.amazon.com/gp/product/B07T7FCBVS

While I am solder challenged, can't drag solder a fine pitch SMD, I can do 1 mm pitch with my 0.015 solder, fine tip iron and surgical telescope or magnifier.

Happiness!
 
Hi Bill

Glad your new cable worked out for you. Kind of been following this thread but couldn't add much to what's already been said. Looking forward to see what you do with the T4 :)

@jimmie - not sure what the problem is that you are having but may be some sort of conflict with your wiznet/sdcard. I just ran the data logger example using an external sd card adapter and it ran a whole heck of a lot more than 60 writes - probably a few hundred before I stopped it. I had also tested the data logger using the SD library on the builtin one on the PJRC breakout without a problem. Didn't seem to have the same problem as some with the cable. Lucky I guess. Also tried Bill's lib on SPI without issue. Just couldn't get it working for SPI1/SPI2.
 
Hello @mjs513:

Thank you for responding as this problem has been extremely frustrating to me. I am glad to hear that the SD card is working.

Because my Wiznet is soldered to the SD attachment, it is not possible for me to separate the two but I can build another rig that does not have the Ethernet attachment and test.

I was under the impression though that since I commented out the Ethernet code, that the SD circuitry should not be affected? And indeed, the system lasts a lot longer without Ethernet but eventually crashes.

So is it possible that the Ethernet electronics would interfere even if it is not initialized in software? I do not have enough experience .....

Is there a workaround as I need both devices in my project ....

Thanks again for your help.
 
Status
Not open for further replies.
Back
Top