Section on Neurophysiology, NIMH/LSN

 

USB Flash Drive Adapter for DOS

Read the article on this design from Circuit Cellar #226 May 2009

 

General Description

The Vinculum VDRIVE2 is a USB flash disk reader that works with microcontrollers. By adding a level converter, it will also work with a serial port. We have designed a level converter (cleverly called "Level Converter") and written DOS programs so that anyone can read or write to a USB flash drive using DOS.

 


The Vinculum VDRIVE2 is a special device for
reading flash drives. It can be purchased from
Mouser Electronics for about $25.

Level Converter for using a serial port

The Level Converter and the VDRIVE2 require 5 volts to operate. The Level Converter provides two options for power, a wall transformer or a USB port. The wall transformer must be able to deliver 9 to 15 volts direct current at 100 ma. An on-board regulator brings this down to 5 volts. If you use a USB port, the port just supplies power; no data passes through the USB connector. A small switch on the Level Converter selects the power source.

This is a do-it-yourself project with all the information posted on this page. The VDRIVE2 and Level Converter can be packaged any way you choose. We use an inexpensive plastic box modified with tin snips, an Xacto knive, and/or a Dremmel tool to assemble a complete unit.


VDRIVE2 and Level Converter in plastic case.

 

Building the Level Converter

The Level Converter requires a printed circuit board and a handful of parts. To get the printed circuit board, you send our design to ExpressPCB and they will make three boards. Each board has two copies of the circuit, so after cutting the boards in half you get 6 useable circuit boards for about $10 each. The details are discussed below.

The complete list of parts and part numbers are in the Excel file listed below. All parts except the VDRIVE2 can be ordered from Digikey. The parts list includes information about a useable wall transformer and the plastic box pictured above.

The picture here will help with placement of the parts on the printed circuit board.

Assembled PCB Board
Assembled printed circuit board. Certain parts can be omitted.
Click on image to view larger image.

If you plan to use only one of the power options (USB or wall transformer), omit the unused connector (J2 or J3). The switch can be replaced with a jumper. If you plan to package the Level Converter in the plastic box we use, omit H1 connector. The VDRIVE2 cable should be wired directly into the H2 socket, which has exactly the same pin-out as H1. Using H2 helps make the rather tight packaging easier. If you do use H1, cut off pin number 7 as a reminder of how the VDRIVE2 cable is supposed to be oriented. (The VDRIVE2, itself has pin 7 removed.)

When you assemble the printed circuit board, make sure the notch at the end of U1 is pointing in the proper direction, that the flat side of U2 is in the proper direction, and that C5 and C6 have their + wire in the proper holes.

The four mouting holes must be reamed out slightly to fit #4-40 screws. Those holes are not used for the plastic box.


Packaging the Level Converter

The part number of the plastic box is listed in the documentation spread sheet. An end-plate that fits the serial port connector is sold separately. The box requires a little modification using simple tools to cut the plastic. This is how the circuitry looks packed into the box.


VDIRVE2 and Level Converter in recommended plastic box (top removed).


The serial port fits into a special end plate on one end (left side in this drawing). The other end plate (right side in this drawing) must have a slot cut from the top of the end plate. The cut must be 1 3/8" wide and 13/16" long to fit the VDRIVE2. Likewise, one side of the top cover must be cut to allow exposure of the power connectors. If you use only one power connector, only one cut is necessary. The two cutouts are at 1" and 2" from the nearest end (left end in this photograph). The DC connector cutout is 1/2" wide; the USB connector cutout is 5/8" wide. Note, the cutout for the DC power connector cuts some of the plastic away from a screw post. This is necessary to make room for the DC connector. The only only modification for the plastic box is to cut off two of the four screw mounting from the bottom of the case.


Top cutouts for DC and USB connectors.


Inside view of top cutouts. Some of the screw post is removed.


Two screw mounts cut away on the bottom



End plate coutout for VDRIVE2

 

 

Software

The VDRIVE2 imposes a few important limitations to the reading and writing of a USB flash disk. The most severe limitation is that the VDRIVE2 only handles FAT files with all uppercase DOS "8.3" type file names. Also, the VDRIVE2 does not keep track of the directory structure for you. If you are in a subdirectory, it will not tell you the full path. You have to keep track of the path yourself. We are developing some simple software to move DOS files onto and off of a flash disk. In fact, you are best off not using a complicated directory structure. Here are the commands that will work in DOS.

FPUT [file name] copy a file from the DOS computer to the USB drive, unless it would overwrite an existing file
FPUT /Y [file name] copy a file from the DOS computer to the USB drive, allow overwrite of an existing file
FGET [file name] copy a file from the USB drive to DOS, unless it would overwrite an existing file
FGET /Y [file name] copy a file from the USB drive to DOS, allow overwrite of an existing file
FDEL [file name] delete a file from the USB drive
FDIR list the current directory of the USB drive
FDIR /W list the current directory using a wide listing format
FCD [path] change the current USB drive directory to the new path, which can be one level up or down
FCD /R change to the root directory of the USB drive

Simple wild-card and DOS pipes can be used, such as:

FDIR *.DAT > LIST.TXT

This command will place a listing of all files with the DAT extension into a text file called LIST.TXT.

Documentation

Schematic
Parts descriptions and sources
Printed circuit board

Alternative link to download these files

 

Fabricating small printed circuit boards

A number of projects on this web site use small custom printed circuit boards. We don't sell the boards, but we provide a cheap and easy way for you to have them sent to you. The ExpressPCB "MiniBoard" service will send you three circuit boards for about $60. We supply the board design using the free ExpressPCB software, and this software allows you to order the boards on-line from the company. Here is how to use the designs we provide.

  1. Download the free ExpressPCB CAD software from http://www.expresspcb.com/.
  2. Install the software, which gives you two applications, ExpressSCH and ExpressPCB. You only need ExpressPCB to get the boards; ExpressSCH is needed only to modify the circuit design.
  3. Download the printed circuit board design file from this web site. The printed circuit board design file will have the .pcb extension.
  4. Start ExpressPCB and use it to open the .pcb file.
  5. Under the Layout menu, select Order Boards Via the Internet.
  6. Step through the process, filling in your name, contact information and shipping address.
  7. Select MiniBoard Service.
  8. Enter your credit card information.
  9. When you complete the process, the boards will be manufactured and shipped to you. Boards take about one week to arrive on the East Coast of the US.

While we have been very happy with the designs and with the ExpressPCB service, we make no warrantee on the suitability, quality, or any other aspect of the process or product. If you follow these directions, use the service, or use our files, you do so at your own risk.

 

 

 


[Home][DIRP] [NIMH] [NIH]

Return to the Home Page
Send web site comments to the WEBMASTER.

last updated 29 July 2009