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.
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: Arduino Playground - SDMMC
Ran
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.
Flash drive, like SD/MMC?
This is one the most read thread around:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235125412/0
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.
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.
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
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.
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.
Lefty
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.
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.
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
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.
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.
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.
Hi
I use http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/434/Default.aspx?txtSearch=data+logger from Parallax. It is easy to use though UART or SPI.
I got a sample test program for it on my blog.
enjoy
Thanks for the info Tze-Chien. I haven't had a chance to look at the code yet.
More news about using USB devices. I came across a device called the
Teensy USB Development Board made by PJRC. They claim that the USB connection can be any type of device. There are two versions based on the AT90USB162 or AT90USB646. They range from $19 to $27. Pretty good deal since you get a MCU as well.
PJRC: Teensy USB Development Board
AT90USB162 and AT90USB646:
The Parallax device looks like a clone of the VDIP1. It uses the same Vinculum chip, so it will have the same problems with SPI. Tze-Chien's sample code uses the serial interface, which works OK on the Parallax or VDIP1.
I've looked at the Teensy boards, but I don't really understand what USB functionality you get. I think it just gives you some USB hardware and maybe some drivers, which allows you write your own USB code. But I'm guessing you don't get a file system, etc. So you'd have to write the equivalent of the Vinculum chip if you want the FAT file system.
If you or anyone else has more info about what you get on the AT90USBxxx chips, I'd love to hear about it. Thanks!
The tennsy++ looks like a very interesting product. They have a beta release for allowing it to be used with a modified Arduino IDE. This seems to me to be a significant new product for the Arduino community?
http://www.pjrc.com/teensy/teensyduino.html
Lefty
The tennsy++ looks like a very interesting product.
I've been using the Teensy for a few weeks now and I'm very pleased. Pleased enough that I'm about to order two Teensy++. It appears as a serial port to the computer and draws power from USB. If you have questions about it, I'd be happy to try and help.
Basically, I installed the software, plugged in the Teensy, and started development :).
- Brian