Pcb & sd card, errors in spi communication

I am in the process of making a cell phone project. So I built a pcb, but being a beginner I have some problems:
the power supply works correctly and supplies a stable and regulated 3.3v esp32. The latter is wired to 3 spinnaker devices: a screen (disconnected for testing), a touch controller (also disconnected), and a micro SD card. I've been trying to get it to work for a few weeks but can't.
The code is the default example to test SD cards ("SD test" or something like that) with the only addition of a digitalWrite on the power pin of the SD card and modification of the CS.
I think the errors don't come from the code but directly from the pcb; I specify that the sd cards work correctly in an earlier prototype.

here is the wiring diagram and a picture of the pcb

PCB_PCB_prototype 1_2_2022-12-09 (1)

23:45:15.366 -> [  4909][W][sd_diskio.cpp:104] sdWait(): Wait Failed
23:45:15.366 -> [  4909][W][sd_diskio.cpp:512] ff_sd_initialize(): sdWait fail ignored, card initialize continues
23:45:15.366 -> [  4911][W][sd_diskio.cpp:180] sdCommand(): crc error
23:45:15.963 -> [  5515][W][sd_diskio.cpp:104] sdWait(): Wait Failed
23:45:15.963 -> [  5515][E][sd_diskio.cpp:126] sdSelectCard(): Select Failed
23:45:15.963 -> [  5515][W][sd_diskio.cpp:516] ff_sd_initialize(): GO_IDLE_STATE failed
23:45:15.963 -> [  5520][E][sd_diskio.cpp:802] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
23:45:16.460 -> [  6028][W][sd_diskio.cpp:104] sdWait(): Wait Failed
23:45:16.493 -> [  6028][E][sd_diskio.cpp:126] sdSelectCard(): Select Failed
23:45:16.493 -> Card Mount Failed

thank you in advance!

Summarizing discord topic:

  1. SD_power comes from ESP pin - can't do that, need to connect directly to LDO or other high power supply (peak consumption reaches 100 mA)
  2. There must be no copper or traces under ESP32's antenna - you need to redesign that part of the board. Copper beneath antenna makes its WiFi practically unusable (although if you never use its WiFi/BLE and don't plan to, then there is no need to fix that).
  3. it's unclear how GSM antenna is connected. You want u.fl connector placed right next to antenna pin for that.

But most importantly - sim800 is powered in a wrong way here. I'm attaching a schematics snapshot from a project I made some years ago, it actually worked, so connections are either completely or mostly right :slight_smile: (we never used mic/speaker in that project, so that part needs adjustment - but power was supplied in the right way for sure)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.