SdFat

Post Reply
rickyelqasem
Posts: 4
Joined: Fri May 18, 2018 1:20 pm

SdFat

Post by rickyelqasem » Fri May 18, 2018 1:25 pm

Did anyone try SdFat on this device? I cannot get it working. My code works on a Mega but not on this board. I contacted the developer of SdFat and he claims he runs it on a Zero.

I need help with this.

He claims the default begin() method works just fine :

if (!sd.begin(SD_CS_PIN, SD_SCK_MHZ(50))) {
sd.initErrorHalt();
SerialUSB.println("unable to open sd");
}

Bertus Kruger
Site Admin
Posts: 1261
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: SdFat

Post by Bertus Kruger » Sun May 20, 2018 8:16 pm

Thanks for your post on Github... https://github.com/greiman/SdFat/issues ... -390409243

The Regulator was selected to accommodate for very low power applications. (LDO 4uA in sleep mode)

I think the best option would be to have an external 3.3V power supply. I looked at 500ma regulators and there are a few but it needs to be tested with the current circuitry.

http://static6.arrow.com/aropdfconversi ... .pdfid.pdf

The USB ports can mostly supply up to 500ma.

Another option is to add a large power capacitor on the power line to smooth the SD card current draw.

rickyelqasem
Posts: 4
Joined: Fri May 18, 2018 1:20 pm

Re: SdFat

Post by rickyelqasem » Sun May 20, 2018 8:43 pm

How large a capacitor? and where across the GND and 3.3V driving the SD card? I could give that a try.

rickyelqasem
Posts: 4
Joined: Fri May 18, 2018 1:20 pm

Re: SdFat

Post by rickyelqasem » Sun May 20, 2018 8:50 pm

Also I tried a self-built regulator which has 9v which I can connect to the VIN to power the board and 5v regulated which I can power the SD module.. The board just became unresponsive. I even tried a powering the SD module from a external USB with now joy. The board would not see the SD card unless it was attached directly to connected to the 3.3v/GND on the board and only with a low-class SD card.

I have a full-sized SD module turn up today so i will give that a whirl too as it claims to work on 3.3v. I know that doesn't fix the mA problem but worth a shot.

How large a capacitor? and where across the GND and 3.3V driving the SD card? I could give that a try.

Bertus Kruger
Site Admin
Posts: 1261
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: SdFat

Post by Bertus Kruger » Tue May 22, 2018 1:30 am

rickyelqasem wrote:
Sun May 20, 2018 8:50 pm
How large a capacitor? and where across the GND and 3.3V driving the SD card? I could give that a try.
100uf or more is a good start and connected to GND and 3.3V

Bertus Kruger
Site Admin
Posts: 1261
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: SdFat

Post by Bertus Kruger » Tue May 22, 2018 1:31 am

SD Cards run at 3.3V so be careful to not fry them.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest