Welcome! Log In Create A New Profile

Advanced

Debate over having USB over SD on motherboard V1.2

Posted by Grogyan 
Debate over having USB over SD on motherboard V1.2
July 25, 2009 12:30AM
I've started a debate with Zach about whether the Sanguino motherboard should support USB to read a flash drive over reading from SD card.

Thumbs up for you would prefer having the mobo read a USB flash/thumb drive
thumbs up

or

Thumbs down for keeping the SD card slot
thumbs down

Personally I don't have a device which I can attach to my computer to write files to an SD card so this would be an unforeseen extra expense.

So i'm thumbs up for having USB supported in a future revision of the board

I do realise that it is a lot harder to program USB hosting capability in an embedded device, but the trade off would be that anyone can design something, go to someone with a RepRap to print something out, while they themselves may not really want a 3D printer yet.
Re: Debate over having USB over SD on motherboard V1.2
July 25, 2009 12:52AM
Buying a small USB SD card reader, such as this would probably cost less than the added complexity of a USB host on the motherboard.


Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing.
Anyone can edit the wiki!
Re: Debate over having USB over SD on motherboard V1.2
July 25, 2009 01:37AM
A very quick browse shows taht a similar USB card reader costs ~NZ$25 not counting the SD card, where as buying an adapter chip like the Max3421E costs ~NZ$20
plus support bits (like an actual USB connector and 12MHz crystal), and its about the same.

Its more of convenience to the other person.

A guy has managed to make a breakout board
[www.circuitsathome.com]

And because it uses SPI (on the MAX3421E), it more about coding it than anything else.
Re: Debate over having USB over SD on motherboard V1.2
July 25, 2009 10:18PM
Why not have both on the board and let people populate whichever one they can get parts for easiest? smileys with beer


-------------------------------------------------------

Hell, there are no rules here - we're trying to accomplish something.

Opportunity is missed by most people because it is dressed in overalls and looks like work.

Thomas A. Edison
Re: Debate over having USB over SD on motherboard V1.2
July 25, 2009 11:29PM
Hmmm, the artical referenced talks about human input devices like a keyboard or a mouse, that seems to be a long way from a USB memory stick.

Even the Sanguino is limited on the amount of RAM it has, my understanding the support for the SD card is taxing that, let along having to add USB overhead to it?

The question is is it worth adding a $8.00 chip and lots of engineering time to save having to buy a $20.00 adapter?

thumbs down
Re: Debate over having USB over SD on motherboard V1.2
July 26, 2009 02:50AM
I know from talking with a friend who uses USB (slave mode) that you can strip a lot of the stuff out.


Forrest Higgs Wrote:
-------------------------------------------------------
> Why not have both on the board and let people
> populate whichever one they can get parts for
> easiest? smileys with beer

This is a good idea, plug in SPI boards, that way, you could choose to have MMC or SD or USB flash.
It could also mean that it is another thing to make them (makerbot) more money.
Re: Debate over having USB over SD on motherboard V1.2
July 26, 2009 06:13AM
The designs are all open source, and if you get this working I'm sure Zach would be happy to merge it back into the main board.

However regarding asking him to do this: This is a massive amount of work, with very little gain over the current design. I don't want to speak for him, but I expect he would rather spend his time working on real enhancements to the working of the machines. And these days you can pick up SD card readers for next to nothing.
Re: Debate over having USB over SD on motherboard V1.2
July 28, 2009 08:07AM
I've got this on the board I designed, but I'm still trying to get it to work. I'm using an STM32103VBT Arm Cortex M3 processor, and to optimise pin usage, my pin assignments are somewhat different than those in the starter kits.

What you want implemented, is known as the USB "MSD" (Mass Storage Device), and it's a nasty piece of software implemented in a large number of C and H files. I haven't got it to work yet, although I can mess with the + USB pin state to get the PCB properly recognised by Windows. (probably Linux too). The recommended (demo) pin functionality of USB is actually less clean to implement than for RS232, and I'm not yet certain if it's just the demo schematic implementation, or a weakness in the STM32 USB on board hardware implementation.

I've actually taken a break from it for a couple of weeks, because of my frustrations, and used the time to push forward another project.


My CNC/extruder creation: [grael-minifactory.blogspot.com]
Re: Debate over having USB over SD on motherboard V1.2
July 29, 2009 03:01AM
Cool.
I know its not easy, just more convenient to buy a flash drive, plop on some stl files and print, without having to try and find a device to write an SD card.

Its easy to buy a reader/writer here in NZ, Aussie, UK and US, I just don't know about everywhere else.

Its even easier to buy a flash drive just about anywhere.
Re: Debate over having USB over SD on motherboard V1.2
July 29, 2009 04:12AM
There's some discussion over at the Bits from Bytes forum about using the USB port (slave) on the Rapman PCB for sending files directly from your computer to the SD card. At the moment the USB port is only used for uploading firmware updates. I dont think Zachs board has a slave usb port but this might be a lot easier than adding USB master capabilities. It turns your board into a card reader smiling smiley
sid
Re: Debate over having USB over SD on motherboard V1.2
July 29, 2009 07:05AM
Sorry, I don't get it;
SD-Card Reader are not only cheap around here, You'll get them as a present sometimes when you buy a SD-Card
And if not, there is always a 2Bucks Cardreader laying around at the next shop.
this one comes in disgusting colors (mine was yellowish-green and a present for buying a 2GB Card)
[de.sourcingmap.com]

So why do you have to add the 8 dollar Chip again?

'sid
Re: Debate over having USB over SD on motherboard V1.2
July 29, 2009 02:24PM
I'm sorry, but i've searched locally, and they are available, but not cheap.

Good to see that they are very cheap in Germany, but its a long bus trip to go for a ~$2 reader, as I live in NZ
sid
Re: Debate over having USB over SD on motherboard V1.2
July 30, 2009 09:16PM
Since they're all made in China I guess, you're much closer to the source than I am, aren't you winking smiley

But honestly, they're not pricey in australia:
[www.crazysales.com.au]

I'm sure you'll find something like that in NZ too.
Just keep your eyes open winking smiley

Oh btw, if you have a camera that uses SD Cards (which is most likely)
you can use that as a Card reader.
If you have a nokia cellphone. buy micro-sd cards for it from kingston (they come with an sd-card adapter) so you can use your phone as a card reader...

Modern printers come with an inbuild card reader (that IS readable from your PC)
Needless to say that all laptops I've come across lately have an inbuild card reader too.

Well, don't get me wrong,
I've nothing against an usb port
but all that additional (useless) costs are getting us farer from hitting the "500bucks in total" goal, right?

'sid
Re: Debate over having USB over SD on motherboard V1.2
July 31, 2009 03:45PM
I have a Nokia phone, that uses micro SD. Though mine is from SanDisk, and came with no adapter. Did find a few places that sell micro SD's with adapters, they are as hard to find as places that sell SD readers.

I have not much against using SD cards, I feel as though that with my example, it can be difficult to find and acquire SD card readers/adapters, and after all the running about i'll do to find one, I would have spent that much in travel to the cost of one.

I do realize that i'm all alone here, lol, I just think that to give everyone, regardless of where they are, the ability to use this functionality, and it is easy to find USB flash drives as they are quite ubiquitous, where as SD isn't yet.
sid
Re: Debate over having USB over SD on motherboard V1.2
July 31, 2009 07:21PM
Well in fact they are!
I myself, have in total three old MP3 players , four digital cameras, two digital picture frames
and if you let me count in microSD three Phones no four, that are making use of SD Cards in this household.
And I guess that's pretty average (well at least if you don't throw your old stuff away winking smiley
Needless to say that I have just one laptop (My good old omnibook 800ct with that beautiful tiny Pop-out mouse... cute) that is incapable of reading them by default.

But yes, I do have more than just one usb flash drive too;
so it doesn't make any difference for me.

Maybe you'll stroll over a flea market one day and you'll find one for cheap.
Until then, you may have a close friend that will let you use his grinning smiley

'sid
Re: Debate over having USB over SD on motherboard V1.2
July 31, 2009 09:07PM
Well, I forgot that camera shops sell them, so I went round to kodak and asked them.

SD reader ~$25
SD/MicroSD ~$35

Its good to know they have em', so until my repstrap is built they are staying on the shelf. I'll experiment with that feature later on

Maybe one day the mobo will have USB hosting capability for flash drives, until then I guess were all have to accept the SD card format.
Re: Debate over having USB over SD on motherboard V1.2
July 31, 2009 10:54PM
[www.dealextreme.com]
Here. $3.66 USD shipped for free anywhere in the world. Direct from China. There are others on the site for even cheaper. SD cards are used everywhere nowadays.

Edited 1 time(s). Last edit at 08/01/2009 12:07AM by NewPerfection.


Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing.
Anyone can edit the wiki!
Re: Debate over having USB over SD on motherboard V1.2
August 01, 2009 03:10PM
You know, it'd probably be cheaper and easier to just make the reprap motherboard able to write the card, either just for the purposes of the machine or as a full-blown SD card writer. USB devices are easier to do than USB host adapters. The first option probably wouldn't require anything but software, too. Cheaper than doing USB hosting, at least - might not be cheaper to do the USB-to-SD adapter in hardware, given how cheap dealextreme is. Might get some advantages from a full USB interface, though.
sid
Re: Debate over having USB over SD on motherboard V1.2
August 01, 2009 07:03PM
writing an SD Card is no too trivial task unfortunately.

Somehow it's pretty easy to end the cards lifetime in a very short time,
by just making the right errors winking smiley
For example writing a full fat everytime can blow a 2GB Card in less than 1000 files (write mode).
formating the card will help just one or two times, then it's just a 2GB ROM sad smiley

'sid
Re: Debate over having USB over SD on motherboard V1.2
August 02, 2009 01:08PM
'sid,
Really, where did you see that? I would have thought that the SD card would do wear leveling at the block level. After all USB pens and SD cards are the same NAND flash devices with different interfaces. With multi level NAND flash you have to be able to correct errors using Reed Solomon or BEH error correcting codes. About 10000 writes wears out a block, so you have move things about. My understanding is that these things should all be done by the controller in the card or the pen, so the host software using does not have to worry about such details.


[www.hydraraptor.blogspot.com]
Sorry for doubleposting, I don't have my password in mind, so I'm in guest-mode...
please merge winking smiley

stupid me forgot to READ!
I'll quote further on:
Quote

Initially I tought of a bug in the code, so I checked stack sizes, removed unnecessary interrupt code, and placed error traps on the AVR-DOS calls. The traps intercepted an error 23 and "file not found" errors, so I inspected the card with the FS-Interpreter tool. What I found was an apparently-good subdirectory, except it missed the links to the parent directory. This drives the file deletion system crazy.

Thinking of a bug in the AVR-DOS library, I contacted its Author, Franz Joseph Voegel, and he was so kind to try a debug version of the code on his system (using both compactflash and hard disk drives). The code worked for days of continuous recording, writing many GB of flawless data.
Joseph suggested that this could be a card wearout problem, as the AVR continually rewrites the FAT (file allocation table) and the directories as it is writing a new file. If the number of writes of a logic sector is limited, then the sectors assigned to the FAT and DIR could exceed the maximum numbers of rewrites quite rapidly. However, creating a flash file system almost invaribly requires you to separate logic sectors from phisical sectors (the ones that actually wear out), so I'm not incline to think SD-card designers overlooked the problem.

I guess that's what I was referring to

'sid
Re: Debate over having USB over SD on motherboard V1.2
August 02, 2009 08:51PM
No problem, 'sid.


-------------------------------------------------------

Hell, there are no rules here - we're trying to accomplish something.

Opportunity is missed by most people because it is dressed in overalls and looks like work.

Thomas A. Edison
sid
Re: Debate over having USB over SD on motherboard V1.2
August 02, 2009 09:06PM
Hi Forrest,
So, got home quickly, for reporting my own post winking smiley

Stupid me shouldn't post in forums when not awake grinning smiley

So since the first of my "not at home" posts is gone already,
here the full set of information bundled:
I've read about that issue some month ago at:
[www.riccibitti.com]
Here a short quote
Quote

.... I got a broken card (the 1 GB Kingston, but I know of a 512MB Peak with similar issues). Before its final breathe, I noticed sporadic directory corruptions. This usually happened after writing about 500MB...2GB of data, but the card was still functional after reformatting. Then things got worse, and now I'm unable to reformat or use it anymore.
To date, the cause of this problem is not clear.
.....
Thinking of a bug in the AVR-DOS library (Franz Joseph Voegel) ...
The code worked for days of continuous recording, writing many GB of flawless data.
....
this could be a card wearout problem, as the AVR continually rewrites the FAT (file allocation table) and the directories as it is writing a new file. If the number of writes of a logic sector is limited, then the sectors assigned to the FAT and DIR could exceed the maximum numbers of rewrites quite rapidly.

And now "ab ins Bett" since I'm obviously not in working condition ;9

'sid
VDX
Re: Debate over having USB over SD on motherboard V1.2
August 03, 2009 05:47AM
Hi sid,

... did you receive my email regarding milling the 8mm-holes?

Viktor
Sorry, only registered users may post in this forum.

Click here to login