Instructables

Simple mass storage for your microcontroller project

Featured
Picture of Simple mass storage for your microcontroller project
Do you want gigabytes of storage for your microcontroller? Would you like a simple way to tranfer files from your PC to your picaxe or arduino or other micro project?

This little projects demonstrates the uDrive that can be set up as an extra drive on a PC. Copy files to and from the SD card, then put it in the uDrive and talk to it with 5 simple commands:

Read - Read a file off the drive
Write - Write a file to the drive
Dir - get the directory listing of files on the drive
Erase - erase a file
Initialise - send 1 byte at your preferred baud rate
 
Remove these adsRemove these ads by Signing Up

Step 1: Connecting to your microcontroller

Picture of Connecting to your microcontroller
Connection uses 5 wires: Gnd, Power, Tx, Rx and an optional reset line. The reset line can be left unconnected if no reset is needed.

The uDrive works from 3 to 5V so can interface to a wide range of controllers.

Step 2: Copying files across

Picture of Copying files across
Copying involves taking the micro SD card out of the uDrive and putting it into a micro-to-standard SD adaptor. This goes into a USB adaptor that plugs into the PC and then the SD card appears as another drive on the PC. The micro SD is the small purple part seen on the left of this picture. The USB to SD adaptor cost $5 including shipping on ebay. Most micro SD cards come with micro to standard adaptors and the total cost of the package is under $10 for gigabytes of storage.
ratgod4 years ago
I know this may be a little off topic, but do you sell those SBC's that you posted the links to hackaday about? I love the Z80 and I'm dying to put the ones I have to use.
Dr_Acula ratgod4 years ago
Sure, there are lots of variants. Are you interested in the real Z80 or the propeller emulation? 
ratgod Dr_Acula4 years ago
I'm mainly interested in the real Z80, I don't know much about the propeller unfortunatly.
Dr_Acula ratgod4 years ago
please email me moxhamj@internode.on.net. Sorry about the delay, the Instructables website is down most of the time - I've been trying to reply for the last 2 days!
James Moxham (author) 5 years ago
Breaking news - the udrive has now been interfaced with a $4 picaxe 08M chip. http://www.picaxeforum.co.uk/showthread.php?t=12448

Surprisingly, the picaxe BASIC code ended up much smaller than the equivalent VB.NET code. Next project is getting this working on a CP/M board (N8VEM). Maybe someone could look at coding it for an Arduino?

I might give the picaxe community a chance to post suggestions and then write this up as a new Instructable.
I needed ur help. How do u get hex files from vb.net or vb2008?

khaledkhal5 years ago
More than perfect! THANKS A lot man!
DadlyEdly5 years ago
I am unfamiliar with this device. Where does the microSD card fit? Thanks!
James Moxham (author)  DadlyEdly5 years ago
Yes, sorry, it isn't entirely clear from the photo. If you look at the green led the top of the sd card is a purple line. But that isn't clear if you don't know where to look. So have a look at this website http://www.4dsystems.com.au/prod.php?id=22 Even that isn't very clear but just under the big picture on the left are three smaller pictures. Click on the one to the left, and you can see the micro sd socket from behind the board.
ste54425 years ago
Nice work - I have a friend who needs to stream accelerometer data to a card (or something!) and use the card to 'buffer' the last hour or so.
I will take a look at Sparkfun for the card and see if it is suitable.
I guess the write speed is fairly limited :-(

PCBPolice
UltraMagnus5 years ago
this would be much more interesting, if you actually made the module too...
James Moxham (author)  UltraMagnus5 years ago
I have made one - but it ended up too big!

See http://hackaday.com/2009/03/04/n8vem-computer-with-a-3km-wireless-link/

There are two boards there. I made the middle one from scratch by designing the schematic in Eagle, having the board made, soldering it up and getting it working. The latest version can talk to a SD card via 4 lines of an 82C55. The N8VEM has 4 serial ports, so it can be programmed to convert an SD card to serial and replicate the uDrive.

I didn't make the board on the right, but that also could replicate a uDrive. It is a Propeller chip and has a serial port and provision on the board for an SD card. It is smaller than the N8VEM but still bigger than the uDrive.

But both of these options cost more than a uDrive and are larger and use more power. So the uDrive gets a big thumbs up from me because it solves a problem more elegantly. And also, because having built similar things using "old skool" technology, I have an appreciation for the cleverness of making a complicated device simple to use.

Let me know if you need any help incorporating mass storage in a micro project.
RetroTechno5 years ago
Since this project requires the 4D module to work, you should put some sort of information about where this item can be purchased.
James Moxham (author)  RetroTechno5 years ago
Sure. You can get it at Sparkfun http://www.sparkfun.com/commerce/product_info.php?products_id=8567

Or direct from 4dsystems (and save some money but shipping time would be longer) http://www.4dsystems.com.au/prod.php?id=22