EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: colombo on July 16, 2013, 07:39:40 pm

Title: sd card swithing
Post by: colombo on July 16, 2013, 07:39:40 pm
Hi  I'm new here in the forum and need help in this
 
Because it is not possible to connect one sd card to two devices at
 the same time
I am looking for a solution that will allow me to switch between the card and two devices

So I drew this -I need to switch the input lines (sd card) between output A to B that representing my two devices

(http://www.lirtex.com/he/%D7%A4%D7%95%D7%A8%D7%95%D7%9E%D7%99%D7%9D/download/file.php?id=333&sid=7a43cd072aee47df2351e6ce6aedbab9)

I guess there are many controlers thet  can do it - But I do not know much about it
I'm looking for the least complicated option, the cheapest, and most reliable

9 inputs / outputs are actually nine contacts of the SD card, some of which transmit information / identification / Power
http://pinouts.ru/Memory/sdcard_pinout.shtml (http://pinouts.ru/Memory/sdcard_pinout.shtml)
(I do not know if I should use all the sd card pins)
Title: Re: sd card swithing
Post by: fcb on July 16, 2013, 08:17:10 pm
Unless you need to make this small or fancy reading up on the specification of the SD card and doing it using logic (perhaps you have a size constraint?) then I would be tempted to common the ground pins (2 of the 9 pins) and 4x BT47 type DPCO relays to switch between cards.

Title: Re: sd card swithing
Post by: colombo on July 16, 2013, 09:51:14 pm

Very interesting but it's too big
and it is not abut size as it is about simplicity

4x BT47 are too complicated. this is too many elements
Title: Re: sd card swithing
Post by: David_AVD on July 16, 2013, 10:19:38 pm
Sounds like you need to specify your requirements more clearly.  Size, power, cost as well as the reason for the switching.
Title: Re: sd card swithing
Post by: fcb on July 17, 2013, 12:51:21 am

Very interesting but it's too big
and it is not abut size as it is about simplicity

4x BT47 are too complicated. this is too many elements

So it's not about size..... but it's too big

And four relays is too complicated... :-//
Title: Re: sd card swithing
Post by: amyk on July 17, 2013, 11:48:49 am
http://www.fairchildsemi.com/pf/FS/FSSD07.html (http://www.fairchildsemi.com/pf/FS/FSSD07.html)
Title: Re: sd card swithing
Post by: mrflibble on July 17, 2013, 06:30:31 pm
Use whichever cpld you happen to have lying around. Or lemme guess, while a cpld based solution is not too big, it is too complicated. And of course cpld's do not have banana flavor and as such fail to conform to your unwritten flavor constraint. Well, so much for an otherwise damn fine plan.  :-//
Title: Re: sd card swithing
Post by: fcb on July 18, 2013, 03:59:52 pm
I got the impression this wasn't a volume/commercial project, so getting the FSSD07 will be tricky.

I always thought the fun bit was solving the problem yourself..
Title: Re: sd card swithing
Post by: abyrvalg on July 18, 2013, 05:13:03 pm
CPLD way is not so straightforward for this task, data lines are bidirectional and direction must be decoded from cmd line protocol.
Title: Re: sd card swithing
Post by: mrflibble on July 18, 2013, 06:09:55 pm
An FSM that keeps track of the CMD line is far more straightforward to implement than poorly specified man-in-the-middle-attack SD card multiplexers...

You mention "this task" ... but right now we don't even know exactly what "this task" is. :P So I think I'll wait for clarification by the OP.

Or maybe colombo is taking fcb's suggestion and is having fun by solving the problem himself. :)
Title: Re: sd card swithing
Post by: David_AVD on July 18, 2013, 10:38:02 pm
The OP registered and posted on the same day, so quite likely that we won't hear back until the next project.  Seems to happen a lot (post and run).
Title: Re: sd card swithing
Post by: amyk on July 19, 2013, 10:44:07 am
I got the impression this wasn't a volume/commercial project, so getting the FSSD07 will be tricky.
You can ask for some samples.
Title: Re: sd card swithing
Post by: colombo on July 19, 2013, 02:01:47 pm
Hello again
I'm sorry that I didn't responded since I published this post. And sorry for my English
I really appreciate your effort to help

The original purpose of this project is to connect one sd card to two computers using an adapter
True. It's really simple and inexpensive to use two sd cards or perform some synchronization
But I need to write&read the same sd card directly (without the use of network)

At first I thought I just plug the card in to both computers by bridging
But then I checked a bit and realized it was a problem from all kinds of reasons
  Especially because of the dual voltage supplying that can even cause damage to the computer

That's how I understood only other option is to switch the sd card between the two computers
And perform this task seems to make more sense with a microcontroller Than using electronic components
(It can be applied also to other memory devices and other machinery besides computers!!)
I need that connection to be small.  and if possible not too complex. as fore cost.. Lowest Of course.


I want to mention - I have a general knowledge of electronics and a little less of microcontrollers
  (I studied electronics in college in my past. But I have not used it since)
Title: Re: sd card swithing
Post by: fcb on July 19, 2013, 02:13:56 pm
Relays... Relays... Relays...
Title: Re: sd card swithing
Post by: colombo on July 19, 2013, 02:57:06 pm
Relays look like a suitable solution Because it is straightforward and simple

But  (Based on what I found online) the amount of ports/entries is very limited
And as you said earlier - I would have to use at least four, or even more
And it will no longer be small or simple.  This also increases the complexity and the cost
Title: Re: sd card swithing
Post by: abyrvalg on July 19, 2013, 03:17:36 pm
Be aware that you'll need to steer the "card present" signals also - the switching process must be seen as card removal on one computer and card insertion on the other (to trigger init/deinit, or there will be card state mismatch)
Title: Re: sd card swithing
Post by: mrflibble on July 19, 2013, 03:26:51 pm
Dumb question: what's the use case for this sd card switching thingy?
Title: Re: sd card swithing
Post by: dr.diesel on July 19, 2013, 04:08:45 pm

The original purpose of this project is to connect one sd card to two computers using an adapter
True. It's really simple and inexpensive to use two sd cards or perform some synchronization
But I need to write&read the same sd card directly (without the use of network)

I'm curious, you can wire (SD card switch hack) between the two computers but can't use network?  Can you explain why?
Title: Re: sd card swithing
Post by: Crazy Ape on August 12, 2013, 11:36:07 am
You might find a bilateral switch that will do the trick.