Where to get SD Card reader

I'ld like to play with an SD card and a 16F886 or'690 or so. Where can I get an SD card reader to, say, SPI?

Reply to
sdeyoreo
Loading thread data ...

Most SD cards can be accessed slowly in SPI mode with no adapter needed, something they inherited from the older MMC cards. This spec is published. To get the details for implementing the full 4-bit protocol of SD you have to pay money. But if you are bridging to spi anyway, why bother?

Of potential greater software concern is parsing a file system especially on a system with limited ram. Nobody says you have to use a traditional one - you can just treat it as a buffer of bytes. But if you do that and want to also access it from a PC, you will need a setup for raw access to the device - easy under linux, a bit harder under windows but still possible.

Usual places like digikey have the card slots. Or you can salvage one out of a cheap reader. Or you can solder wires directly to a cheap card. Last time I mentioned that, someone said he buys micro-SD cards and solders wires to the adapter.

Reply to
cs_posting

schreef in berichtnieuws snipped-for-privacy@e24g2000vbe.googlegroups.com...

:-D Which is exactly what I've done and would have suggested would I not have read your reply. Actually, I used a pin-stripe so I could plug the adapter into a breadboard (to be able to easily experiment with it)

Take care though, as MicroSD cards run on voltages near 3v, and will be fried if-and-when you connect them to 5v systems.

Allso, do *not* use a simple diode to step-down the voltage if you are working with a 5v system (something I've seen in several schematics found on the Web). The current the different MicroSD cards use varies wildly, and the varying voltage-drop by the diode could mean you can send some commands but that the actual reading or writing of the memory fails (due to the larget power consumption).

Regards, Rudy Wieser

Reply to
R.Wieser

You have to explain this comment to me. The voltage drop on a diode once you forward bias it should be pretty constant. In a worst case a diode or two plus a load resistor to ensure that minor current at least always flows should be OK. For example, at 3V, it seems like at 10K resistor in parallel with the card should do it.

Give me more info. I don't understand how what you say is possible.

Reply to
Jujitsu Lizard

Hello Jujitsu,

Most of the schematics did put the diodes (two of them) directly at VCC of the card. This means that the bias current flowing is equal to the current thru the card. And that is *way* to low.

Even with a LED & resistor as a dummy-load over the card (taking/wasting about 15 ma) the voltage varied to much to be of use. I've even tried to enlarge the bias-current to way above that and use three diodes instead of two to account for the lesser voltage-drop per diode. It just would not work.

In the end I just took a simple one transistor, zenerdiode and resistor solution, which works fine up until this moment.

Hope that clarifies it

Regards, Rudy Wieser

-- Origional message Jujitsu Lizard schreef in berichtnieuws ieWdnfDuRY5-K8bUnZ2dnUVZ snipped-for-privacy@giganews.com...

not

found

and

flows

parallel

Reply to
R.Wieser

f

rent

ied to

f

ot

No, in fact something is very wrong. When you say that you enlarged the bias crrent and added another diode "to account for the lesser voltage drop per diode", that is a bit like a friend who would say "I cut this board off three times and it's *still* too short!"

Do I misunderstand what you are saying? The voltage drop across a diode shouldn't vary a lot (depending on the definition of "a lot") if you double the current. So if your design uses 10 mA and you add a resistor to draw 10 mA of current, you should see a fairly stable voltage as the design current changes between 0 and 10 mA. If you have a much wider range of current you need to add a small regulator. A zener diode can be used instead of a regulator. It makes the circuit draw a constant current that must be more than the max of the design without the zener. Are you familiar with zener regulator circuits?

Rick

Reply to
rickman

Hello rickman,

Hmm ... I can only tell you what I observed. When using a larger current the voltage over the diodes dropped. Same as with the parallel stabilisation I also tried.

On a system which defines its supply-voltage in tenths of a volt (the MicroSD card) a drop of 0.05 volts is a lot, and 0.1 volts a full step on its scale.

The voltage-change I observed was in that order. Enough to make the card switch itself off.

Allso, the card itself draws less than a single mA when the memory is not accessed, but can draw upto 50 mA when doing so (probably write-mode, the data-sheets do not specify)

I think so.

Regards, Rudy Wieser

P.s. Looking tru my stored info regarding the specifics to the current-draw I noticed your name on a post from back in 25-11-2006 (3.3v 5v interfacing @ 15Mhz) :-)

-- Origional message

rickman schreef in berichtnieuws snipped-for-privacy@b1g2000yqg.googlegroups.com...

No, in fact something is very wrong. When you say that you enlarged the bias crrent and added another diode "to account for the lesser voltage drop per diode", that is a bit like a friend who would say "I cut this board off three times and it's *still* too short!"

Do I misunderstand what you are saying? The voltage drop across a diode shouldn't vary a lot (depending on the definition of "a lot") if you double the current. So if your design uses 10 mA and you add a resistor to draw 10 mA of current, you should see a fairly stable voltage as the design current changes between 0 and 10 mA. If you have a much wider range of current you need to add a small regulator. A zener diode can be used instead of a regulator. It makes the circuit draw a constant current that must be more than the max of the design without the zener. Are you familiar with zener regulator circuits?

Rick

Reply to
R.Wieser

nt

When you say larger current, was this the current through the diodes or in parallel with the diodes? If it was through the diodes, maybe you are using a tunnel diode with negative resistance...

What is "a lot" depends on the spec. What is the voltage tolerance stated in the spec? If you are talking about a 3.3 volt supply, they are typically 5% and sometimes 10%. That would be 0.15 volts + or -. Anything within this range is completely acceptable.

rd

Exactly what voltage did you measure? Even if you are outside of the spec'd voltage range, devices like this seldom cut off right at the stated limit.

I am not recommending diodes to drop the supply voltage for a logic device, but they should work in many applications. However, there is nothing wrong with using a simple three terminal regulator. They are cheap, small and simple.

One place where a diode is perfect for power supply voltage adjustment is when using a CMOS switch as a voltage shifter. The supply voltage on the switch chip needs to be above 3.3 volts and 5 volts is a bit too much. 4.3 volts is about perfect to allow the switch to pass 3.3 volt signals while limiting the output from rising much above 3.3 volts. However, the chips I use have the diode on the inside.

Oh, I read back and see a zener is what you used.

ng

Yes, is that post relevant?

Rick

Reply to
rickman

Hello rickman,

When using the parallel stabilisation I only measured the voltage over them (as that is what I was interrested in). In that case the larger current-draw (1mA -> 30~50 mA) by the card ment so much voltage-drop over the resistor (in series with the diode//Card) that nothing was left to work with.

The diodes I used where all 1N4148.

I'm not quite sure anymore, but the voltage dropped from somewhere around

3.1v to a bit below 2.9v . Thats at least a a 0.2v variation.
*If* you can get them in small ( Oh, I read back and see a zener is what you used.

In the course of testing I tried zeners as well as simple diodes. The final solution (using a transistor) uses a 3v9 zener.

Not for the current discussion, but it did help me to with what to do for the signals themselves.

Regards, Rudy Wieser

-- Origi> Hello rickman,

When you say larger current, was this the current through the diodes or in parallel with the diodes? If it was through the diodes, maybe you are using a tunnel diode with negative resistance...

What is "a lot" depends on the spec. What is the voltage tolerance stated in the spec? If you are talking about a 3.3 volt supply, they are typically 5% and sometimes 10%. That would be 0.15 volts + or -. Anything within this range is completely acceptable.

Exactly what voltage did you measure? Even if you are outside of the spec'd voltage range, devices like this seldom cut off right at the stated limit.

I am not recommending diodes to drop the supply voltage for a logic device, but they should work in many applications. However, there is nothing wrong with using a simple three terminal regulator. They are cheap, small and simple.

One place where a diode is perfect for power supply voltage adjustment is when using a CMOS switch as a voltage shifter. The supply voltage on the switch chip needs to be above 3.3 volts and 5 volts is a bit too much. 4.3 volts is about perfect to allow the switch to pass 3.3 volt signals while limiting the output from rising much above 3.3 volts. However, the chips I use have the diode on the inside.

Oh, I read back and see a zener is what you used.

interfacing

Yes, is that post relevant?

Rick

Reply to
R.Wieser

Try these 3:

formatting link

formatting link

formatting link

Reply to
Core2Duo

em

rk

Ok, if I understand you correctly, the diodes were *NOT* in series with the load. The diodes were parallel with the load and a resistor was in series with both. This is how you would use a zener diode and yes, as the current in the load increases, the current in the diodes decreases with a resulting lower voltage. I am not familiar with

1N4148, but if you have a 50 mA load, you need to use a resistor that allows a much higher current through the diodes with no load. It also helps if the diodes are rated for much more than this as diode voltage drop gets linear at currents near the rated value. So pick a load resistor to allow 200 mA with no load and use diodes rated for 500 mA to 1 Amp.

Even then, diodes will give some variation in voltage. As I said, I always use a three terminal regulator.

0.2 volt variation should be no problem for a 3.3 volt device. If the no load voltage is 3.4 volts and the full load voltage is 3.2 volts that is only a 3 percent variation.

Why not? Digikey sells them in qty 1.

final

A zener has the same problem as a diode, the voltage is not completely stable over current. Using the transistor minimizes the current variation in the diode or zener and so reduces the voltage change.

Ok, good. For converting logic levels I always use a CMOS switch part powered from 5 volts with an internal diode. This limits the voltage on the 3.3 volt side to about 3.3 volts.

Rick

Reply to
rickman

... snip ...

I think it is high time Mr Wieser provided a schematic of his circuit. It should look something like:

______ 5v source __________|\|_______| load |______, |/| ^ ------ | diode | _____ ^ ___ ground V here _

And, as shown, with a silicon diode, V should be about 4.3V. With two diodes in series, I would expect about 3.4 V. I.e. about 0.7 v drop per diode. Maybe 0.6 V.

--
Merry Christmas, Happy Hanukah, Happy New Year
 Joyeux Noel, Bonne Annee, Frohe Weihnachten
 Click to see the full signature
Reply to
CBFalconer

I know I have been saying this can work, but here is one reason why it should never be done this way. Say the tolerance on the 5 volt supply is 5% which equals +- 0.25 volts. Say the tolerance on the 3.3 volt supply is 5% which is +-0.165 volts. Clearly if the circuit works by subtracting a fixed value from the 5 volt supply the tolerance of the output voltage is going to be greater than +-0.165 volts.

The parallel arrangement he refers to is uses some combination of diodes (zener or other) to give a voltage drop of about 3.3 volts. In this case the only error in the output voltage is from the diodes themselves.

Rdrop

5 Vin o------/\/\/------------------- Vout | | | 3.3v | ----- +---+ \ / | | v | | Load --- | | | +---+ | | | | ___ ___ \ / \ / v v

Or better yet, a three terminal regulator eliminates all the hassle and reduces the power draw.

Rick

Reply to
rickman

Hello rickman,

I'm, sorry, but no. As I mentioned before, I tested *both* methods (series as well as parallel stabilisation). I tested the series stabilisation with a resistor parallel to the MicroSD card as well as without (the latter a method I found on the Web). I later allso tested the parallel method, only to end with the transistor-zener-resistor stabilisation method.

Thank, but no thanks. To use a 200 mA permanent current so I can stabilize a

50 mA some-of-the-time current is just a bit to wastefull to me. The above described solution sounds way better.
3.4 / 0.2 => 5.8%+ actually.

Only with the use of a credit-card, something that is not the standard means of payment in the Netherlands (and I therefore do not need or have) ...

:-) Correct. But the variation is, as you mention, *much* less (a factor of, for a simple BC547, 300+) and therefore does not cause a problematic voltage-variation on the output.

Regards, Rudy Wieser

-- Origi> Hello rickman,

them

work

Ok, if I understand you correctly, the diodes were *NOT* in series with the load. The diodes were parallel with the load and a resistor was in series with both. This is how you would use a zener diode and yes, as the current in the load increases, the current in the diodes decreases with a resulting lower voltage. I am not familiar with

1N4148, but if you have a 50 mA load, you need to use a resistor that allows a much higher current through the diodes with no load. It also helps if the diodes are rated for much more than this as diode voltage drop gets linear at currents near the rated value. So pick a load resistor to allow 200 mA with no load and use diodes rated for 500 mA to 1 Amp.

Even then, diodes will give some variation in voltage. As I said, I always use a three terminal regulator.

0.2 volt variation should be no problem for a 3.3 volt device. If the no load voltage is 3.4 volts and the full load voltage is 3.2 volts that is only a 3 percent variation.

Why not? Digikey sells them in qty 1.

final

A zener has the same problem as a diode, the voltage is not completely stable over current. Using the transistor minimizes the current variation in the diode or zener and so reduces the voltage change.

Ok, good. For converting logic levels I always use a CMOS switch part powered from 5 volts with an internal diode. This limits the voltage on the 3.3 volt side to about 3.3 volts.

Rick

Reply to
R.Wieser

Hello CBFalconer,

Which one ? As I mentioned before, I tested *several*, series as well as parallel.

Yes, that is the one I got off the web.

The problem with that method is that it only works for a somewhat large current. A stand-by current of a MicroSD card of less of a single mA is way to low for that, meaning the diode will, with that curent, still respond as a normal resistor. And that is an undesirable behaviour.

After realizing that I tried *several* other setups, none of which worked (due to the to large variation in the current drawn by the card)

Regards, Rudy Wieser

-- Origi> > "R.Wieser" wrote:

Reply to
R.Wieser

ries

with

only

No, actually, you have yet to explain what circuit you have taken what measurements from. I can assure you that if you put more current through a standard diode, it will drop a larger voltage, unless you get it so hot it shorts. But even then if you run the test again, it will be shorted for the low current as well as the high ;^)

e a

bove

Well, duh! If you even considered a parallel approach you indicated a willingness to waste power. The parallel approach *always* draws more current than the load needs worst case. That is how it regulates, by letting the load steal current from the zener as needed so that the total current through the resistor is constant. You can only do this by passing a larger current through the zener under no load conditions than the load will ever need.

No, +-0.1 volt relative to 3.3 volts =3D 3.03%.

ans

Jeeze, if you can't buy stuff, how do you get the parts you have? No, actually I don't think I want to know that one. This conversation is getting a bit odd. You seem to be working with limitations that most people don't have so my experience is of little value.

actor

But you have to use several components compared to a single regulator. I guess your designs don't have any space limitations either.

My only point is that if you properly design, diodes can be quite sufficient for low current designs. It is the poor man's solution and I would never have a reason to use this, but it is completely workable if you know how to do it.

Rick

Reply to
rickman

The way I read him, rickman, is that the 3.3V is sometimes developed by inserting two diodes, series arrangement, from +5 to the +3.3 -- on the assumption that 0.85V is dropped by each diode. I also gather he is talking about 1N4148s, which have 0.7V at 10mA and have an emission coefficient that yields about 0.1V change per 10X in current. So I assume the designers using two 1N4148s are planning on 100mA or so as a load. I think he is saying that during communications that doesn't involve writing data take place, the load is more on a scale of 1mA and that because of that fact the two diodes really only drop together about 1.2V, leaving 3.8V on the sd card. I believe he is arguing that this is not safe -- too high.

He also seems to say that when writing is taking place, loads can be as high as 50mA. So I think he is saying that the situation involves a factor of 50 change in current (1mA region when not writing, up to

50mA when writing.)

I think he added that when shunting another 15mA by way of an LED, the

1mA to 50mA variations on the sd card were poor -- and I think you would say "well, duh!" in that circumstance, since you already made the suggestion below that the parallel load of 50mA itself might provide not-to-bad regulation (factor of 2 in current is maybe 30mV each on 1N4148s, so a total variation of 60mV would be expected in the case you gave.) He has a 50X current load variation to cope with and doesn't like the idea of wasting 50mA just to convert a 50X variation into a 2X variation.

A zener/resistor by itself probably wouldn't cut it -- he'd have to pass at least 50mA through the zener so there was enough for the load's peak and then a fair bit more to get much voltage regulation over load -- and that would put him just about right back where you were talking about a 50mA parallel load, which we already know he doesn't like.

So the BJT emitter follower becomes obvious. Which is where he's at. It's not all that great itself because the Vbe variation on load current will probably be on the order of ... I get 102mV using my calculator with log_10(50)*60mV and since I know the 60mV is just a tad high I'll call it 100mV. So even with an unflinching zener, there is still a 100mV variation there. But I gather it's acceptable.

The 3-term regulator can be nice. But although it's not said here yet, it will likely cost more than a zener (a few pennies), a BJT (one or two pennies -- last batch I bought was 1000 for US$10), and a resistor (a penny at most.) Better, but costs more. (And I think I have a 35mm can here with salt-crystal sized BJTs in it -- I'd be more certain about it if I could actually see the darned things without a microscope. So I'm not sure how far the size argument goes... but then I admit I'm ignorant of some details there.)

Jon

Reply to
Jon Kirwan

Hello rickman,

From a series diodes together with a dummy-load. Although the same problem (a too-large voltage-swing when the drawn curent changed) popped up every time. I thouight I allready mentioned that.

:-) Nope. It expressed my willingness to *check*, to see if *something* would work. A decision about how acceptable the result would be would be made later.

And yes, I soon realized that the parallel stabilisation with a (zener-)diode would be way to wastefull.

Ah, calculated that way. I calculated the full voltage-swing in regard to the upper voltage.

They get here by donkey-train. :-) Simple, I have to make do with what I have or can get (which is not all too much).

Your buying-experience was not the one that was needed in the current problem.

Not as long as I'm experimenting After that I can decide which solution is usable (much current isn't, expensive parts is neither).

Well, what configuration would *you* use. 5.0v in, 3.3v out with a 5% (max) tolerance, no matter if the card draws below a single or upto 50 mA ...

Regards, Rudy Wieser

P.s. One of the schematics I was referring to can be found here :

formatting link
(the left image).

-- Origi> Hello rickman,

No, actually, you have yet to explain what circuit you have taken what measurements from. I can assure you that if you put more current through a standard diode, it will drop a larger voltage, unless you get it so hot it shorts. But even then if you run the test again, it will be shorted for the low current as well as the high ;^)

a

Well, duh! If you even considered a parallel approach you indicated a willingness to waste power. The parallel approach *always* draws more current than the load needs worst case. That is how it regulates, by letting the load steal current from the zener as needed so that the total current through the resistor is constant. You can only do this by passing a larger current through the zener under no load conditions than the load will ever need.

No, +-0.1 volt relative to 3.3 volts = 3.03%.

means

Jeeze, if you can't buy stuff, how do you get the parts you have? No, actually I don't think I want to know that one. This conversation is getting a bit odd. You seem to be working with limitations that most people don't have so my experience is of little value.

But you have to use several components compared to a single regulator. I guess your designs don't have any space limitations either.

My only point is that if you properly design, diodes can be quite sufficient for low current designs. It is the poor man's solution and I would never have a reason to use this, but it is completely workable if you know how to do it.

Rick

Reply to
R.Wieser

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.