Go Down

Topic: Accessing a Flash drive from an Arduino Duemilanov (Read 7 times) previous topic - next topic

stonechild

Does  anyone have any experience with using a Flashdrive for extended storage on an Arduino? I'm looking at {b]uALFAT USB Board[/b] from http://www.ghielectronics.com/product/3. I've become throughly confused as to what the USB port is for exactly on many of the products I've looked at.

Ran Talbott

The Arduino is only able to act as a "slave" to a USB "master" like a PC.  It can't control another USB device like a flash drive.

For mass storage,  most folks are using SD cards:  http://www.arduino.cc/playground/Learning/SDMMC

Ran

stonechild

I think maybe my question was not entirely clear. I didn't plan to use the Arduino's USB port.  What I was thinking of was a separate device that the Flash drive would  be connected to. The Arduino would then communicate with this device using something like a serial port or some other means of transferring data to and from the Arduino.

I'm a beginner so I beg patience.

florinc


Anachrocomputer

The Flash drive is a USB slave (you can't change that), so it must be plugged in to a USB master device.  The most convenient USB master is a PC or Mac, which means that you'll need a whole desktop computer in order to connect to the memory stick.

trialex

Actually there is a module that you can use to connect a USB drive to arduino - it's called a VDIP1. Google around for it.

There is a lot of discussion on this forum in regards to the problems using this module. check that out too.

stonechild


After a bit of research there are at least three suppliers of devices that provide USB host support:

As has been mentioned by trialex there is the VDIP! from FTDI. They offer a wide variety of USB host devices based on the Vinculum VNC1L Embedded USB Host Controller IC. One of the uses for the VNC1L is connection to MCUs in order to add support for flash drives, MP3 playback or data logging. The FAT file system is supported for the flash drive.

Their website is at:
http://www.vinculum.com/.

There is also a presentation of  their techmology at:
http://www.vinculum.com/documents/archive/Vinculum%20-%20ESC%20Taipei%20Seminar.pdf


The second company is GHI Electronics: They produce a PCB called the uALFAT- USB. FAT file system support is provided by the uALFAT chip set and USB hosting by the MAX3421 USB host controller.

uALFAT USB Board
http://www.ghielectronics.com/product/3

If you just want the MAX3421 USB host controller
Maxim Integrated Products
http://www.maxim-ic.com/

stonechild

One last thing. So far I've found the following site to be the best so far if you're interested in any of the Vinculum products. They also have links to lots of documentation.

http://microcontrollershop.com/

retrolefty

#8
Apr 18, 2009, 07:12 am Last Edit: Apr 18, 2009, 07:14 am by retrolefty Reason: 1
Here is one I've been playing with that can use either serial or I2C interface to the Arduino. It's a simple storage module that reads and writes 512 byte blocks. It has no FAT format capabilities so you can't pop the module out and plug it into a PC for file sharing, however if you just want lots of local storage it works real well. It's not hard to include code to upload or download storage content to a PC using the Arduino serial link to the PC. I picked it because if your willing to give up FAT media compatibility then it's software 'overhead' in a sketch becomes much smaller, plus the added data memory that the 328 chip brought us allows using a 512 byte buffer array without much penalty.

http://www.sparkfun.com/commerce/product_info.php?products_id=8567

Lefty

stonechild

#9
Apr 19, 2009, 04:36 pm Last Edit: Apr 19, 2009, 04:40 pm by Dennis_Meade Reason: 1
Lefty,

An SD card would also be a solution for me , but for some reason I would rather a flashdrive.  The Vinculum line is also less expensive for some of their boards.

The company that produces your card also makes some other interesting things like their LCD, OLED devices, so thanks for that information. Now I have another thing on my wish list.

See: http://www.4dsystems.com.au/  

sumatra

Have you made any progress in your quest to host a flash drive?

I too have been looking at the Vinculum (VDIP1 looks good to me) and GHI's uALFAT.  I don't have either device yet, but I've done a lot of research on forums and blogs.

The VDIP1 is attractive because it is more general purpose.  In addition to hosting a flash drive, it can also host other USB peripherals such as a USB mouse, keyboard, or game controller.  From various forums, it appears that the Vinculum works OK via the serial interface, but their SPI interface is very non-standard and doesn't work well with Arduino/AVR SPI interface.  Unfortunately, Arduino has only one UART, and it's already busy doing something else.

The uALFAT looks like it's better documented and more standard with respect to SPI.  It also accepts I2C or Serial.  But it's twice the price of Vinculum, and only works with storage devices, not other USB peripherals.

I'd appreciate your thoughts on the two devices based on your research.

Thanks,
--jb.

trialex

Quote
The VDIP1 is attractive because it is more general purpose.  In addition to hosting a flash drive, it can also host other USB peripherals such as a USB mouse, keyboard, or game controller.


You sure about that? I'm pretty sure that's incorrect - it can only be used for a USB removable drive

sumatra

You're right in a limited sense.  The VNC1L integrated circuit supports two USB ports, 1 and 2.  Port 2 can only talk to a USB drive, but Port 1 can talk to other devices.

The VDIP1 has only one USB connector, which is connected to Port 2, and thus you can only connect a USB drive there.  But Port 1 is brought out to the edge connectors on the card, and you can wire a second USB connector to it.  That second connector could accept other devices.  The VDIP2 board has both connectors populated.

See the vinculum application note AN_102, Data-Logging Using the vinculum VNC1L.  The App Note uses the VEval board, but I don't see any reason that a VDIP1 or VDIP2 couldn't be used.

stonechild

sumatra,

Sorry I haven't replied sooner. I'm not that far along with deciding on a device. I had no idea that the VDIP1 doesn't play nice with SPI. Not sure if I would need to use SPI as yet. I'm looking at the VDRIVE1 and the VMUSIC1 which, of course, are only meant for flash drives.

As far as which supports what, it is my understanding that the VDIP1 and VDIP2 support a variety of USB devices with one of their two USB connections. Just as you said.  It depends on the firmware, it seems. Both the VDIPs come with the VDAP firmware installed.

sumatra

#14
May 07, 2009, 07:02 pm Last Edit: May 07, 2009, 07:29 pm by sumatra Reason: 1
Stonechild,

Here's another thread with more about the SPI problems with Vinculum.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238171695

re: multiple devices:  As I read the datasheet, port 2 is a USB host for mass storage devices, and port 1 could be a USB host for various devices.  But in another forum (forget where) someone said that only one port is a host, and the other is a USB slave.  I don't know which is correct.

edit:  I checked the Vinculum firmware manual again.  It seems pretty clear that both ports can be hosts.



Go Up