Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:45 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : unreliable sd card reader?

     Page 2 of 4    
Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 02:19pm 16 Jun 2023
Copy link to clipboard 
Print this post

I see now it's a micro sd adaptor. Got loads of them. I'm surprised they don't melt.
It's a useful idea.
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 123
Posted: 06:50am 19 Jun 2023
Copy link to clipboard 
Print this post

hello again.

meanwhile the sd card reader runs.

but not always. from time to time occur errors like "sd card not found" etc. if i restart the picomite or eject an enter the sd card it mostly functions.

sometimes occurs a "hard error" and it is more complicated to save data (via pc or mac)

here is an image...


 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 123
Posted: 06:51am 19 Jun 2023
Copy link to clipboard 
Print this post

... and there are strange symbols in the directory, and strange files and filesizes...
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 123
Posted: 06:52am 19 Jun 2023
Copy link to clipboard 
Print this post

on my mac you cannot see this strange data!
 
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 07:10am 19 Jun 2023
Copy link to clipboard 
Print this post

That's exactly what mine was doing.

I just bridged out the inline resistors.  Check if your SD slot has any inline resistors.  Any bought from the web normally have 1k (102) but mine had 10k (103) and was far too large for the application.
I'd give my left arm to be ambidextrous
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 07:11am 19 Jun 2023
Copy link to clipboard 
Print this post

Have you got the 3V3 power supply to the card reader filtered? They can be very fussy sometimes. Use 2R2 resistor then 10uF and 100nF capacitors in parallel to GND.

If the power is good then I only have two suggestions: bad contacts on the breadboard or a bad/incompatible SD card.

(I think he's using an adapter soldered to pins now, Ian)
Edited 2023-06-19 17:12 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 07:43am 19 Jun 2023
Copy link to clipboard 
Print this post

Put the capacitors (10uF+100nF) right at the SD card contact pins.
Sometimes people wire SD card header to a breadboard through patch wires.
You should keep the capacitors as close as possible to the connector, and the patch wires < 10cm.

And in case this is a "shared" SPI bus with LCD and Touch, minimize the total length of SPI wires. The "shared" SPI bus (used in the normal PicoMite) is not as forgiving as individual connected SD cards (like in PicomiteVGA).

Volhout
Edited 2023-06-19 17:47 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 07:51am 19 Jun 2023
Copy link to clipboard 
Print this post

Also - you can use *any* pins for a SD card. They don't have to be specific SPI pins. It may be worth trying it elsewhere.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 123
Posted: 12:28pm 19 Jun 2023
Copy link to clipboard 
Print this post

the reader is shown in this topic above. here a smaller image...





it is connected via breadboard with long cables - 20-30cm -...

i have the problems at all picos, picomiteVGA and "normal" picomite (here is only the sd-card reader connected (the picomiteVGA has VGA, SD card reader, ps/2- keyboard, rtc etc...

the problems occur more often at the picomiteVGA...

i have tested the connections several times, mostly all is running but not always.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 12:51pm 19 Jun 2023
Copy link to clipboard 
Print this post

I've just compared it to the ones I've been using, and which I've proved to work, and it's not the same. Both *seem* to have 4x 10K pullup resistors (but mine are separate, not in a pack) and supply decoupling capacitor (but mine only has one rather than two).  It might be an idea to check that those resistors actually are pullups and aren't in series with the data lines. If they are in series then you are lucky that the adapter is working as well as it does now!

Long cables are no use at SPI speeds. No more than about 10cm absolute maximum from the pico to the card holder IMHO. You may get away with it for a LCD display, but just a single bit error on a SD card gives corrupt data.

If you're having problems with more than one PicoMite then I'm starting to wonder about your power supply, although if it's USB from a PC it *should* be ok. Have you got a powered hub that you could use to feed it? Or you could feed a separate 5V into VSYS via a diode to isolate it from the USB power. That would make sure that that problems with the  USB power supply wouldn't cause a problem. Note that some USB leads are truly horrible when it comes to volt drop!
Edited 2023-06-19 23:02 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 123
Posted: 03:37pm 19 Jun 2023
Copy link to clipboard 
Print this post

i think two good hints from mixtel90:

1. shorter cables

2. power supply

i will try to solve it...
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 123
Posted: 03:59pm 19 Jun 2023
Copy link to clipboard 
Print this post

first i change the power supply. from a 5w to 10w adapter (picomiteVGA with many features...)

after intense testing... no errors or mistakes until now!

i will continue to tell about my experiences...

hhtg
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 09:46pm 19 Jun 2023
Copy link to clipboard 
Print this post

I soldered the sdcard adaptor but not tried yet. I smelt burning plastic.

 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 10:07pm 19 Jun 2023
Copy link to clipboard 
Print this post

Should be fine. The burning plastic fumes are good for you and come as a bonus. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 10:41pm 19 Jun 2023
Copy link to clipboard 
Print this post

I have this for 2040 lcd waveshare. not sure sharing spi. I'll try vga, it's in the manual.  
PicoMite MMBasic Version 5.07.07
OPTION SYSTEM SPI GP10,GP11,GP28
OPTION HEARTBEAT OFF
OPTION LCDPANEL ST7735S, LANDSCAPE,GP8,GP12,GP9,GP25
OPTION AUDIO GP0,GP1, ON PWM CHANNEL 0
>
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 06:24am 20 Jun 2023
Copy link to clipboard 
Print this post

If you put the SD card socket on the System SPI all you need to add is a CS pin for it.
If you put it on different pins then you have to specify all of them.
It's in the manual.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 07:06am 20 Jun 2023
Copy link to clipboard 
Print this post

Those SD/uSD card modules are a REAL landmine.  AVOID! AVOID! AVOID!

I have lost count of how many people have TRIED those modules, and they more often then not WON'T work, cos of the extra electronics on the board.

If you want to connect an SD card or uSD card to the PicoMite or PicoMite WEB, then you MUST DIRECTLY CONNECT.

The ONLY extra circuit you need, is the 2R2 resistor feeding the 10uF and 100n filter arrangement on Vcc.

ANYTHING other then that, causes issues.

In all my designs(about ten PM ones so far), I have DIRECTLY connect the PM pins to the SD card connector, and it NEVER fails to work from the very first attempt.

The issue that is cropping up, is that the Chinese modules that can be had so cheaply, include components that simply are not needed with the PM, and this seems to be seriously screwing with how the SD or uSD cards work with the PM, when you use said modules.

Look for SD/uSD modules that have NOTHING AT ALL - other then the SD/uSD card socket itself on the board.  A "Breakout" board that only routes out the pins to a more happy pin-spacing, but that adds ZERO extra parts.
Smoke makes things work. When the smoke gets out, it stops!
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 07:37am 20 Jun 2023
Copy link to clipboard 
Print this post

Like  THIS
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 07:49am 20 Jun 2023
Copy link to clipboard 
Print this post

TOTALLY 100% agree.  That board is ideal.
Although, the price is a bit high for what it is, but it IS directly connected, which is what we need.

Perhaps we should design a PM, PM VGA or PM WEB SD/uSD board that does the job and is then the recommended thing.  

The number of times that 3rd party SD/uSD boards from eBay or AliExpress etc have shown up here and users complain that they don't work, would suggest that perhaps we here develop and release a free-CAD design for a carrier board that DOES work.

Thoughts?
Smoke makes things work. When the smoke gets out, it stops!
 
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 151
Posted: 08:15am 20 Jun 2023
Copy link to clipboard 
Print this post

Got mine for my VGA setup from the pi hut

Very simple and works ( be tter than the one on the LCD screen)
I'd give my left arm to be ambidextrous
 
     Page 2 of 4    
Print this page
© JAQ Software 2024