Shop OBEX P1 Docs P2 Docs Learn Events
Connecting a Hard Drive to a STAMP for data logging — Parallax Forums

Connecting a Hard Drive to a STAMP for data logging

KatyBriKatyBri Posts: 171
edited 2013-06-11 06:32 in BASIC Stamp
Hard drives are fairly inexpensive these days. Has anyone interfaced one to a STAMP as a data logger, or know of threads about this subject?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-15 04:47
    Hard drives may be inexpensive, but they need a lot of I/O pins to interface and the file system needs a bit of variable space to handle, something the Stamps are not known for. You will have more luck by using a USB hard drive interface and a USB host that can handle mass storage drives like Parallax's Memory Stick Datalogger which should be able to handle USB hard drives exactly the same as USB flash drives. Any of the other available USB hosts should work just as well (like FTDI's Vinculum VDrive2 or VMusic2 or GHI Electronics' USBwiz).

    Considering how cheap a 1GB flash memory drive is these days, why bother with a hard drive? The only moving part is the cap that covers the USB plug and the power consumption is lower as well.
  • Tex4uTex4u Posts: 30
    edited 2008-01-19 04:35
    I agree with Mike. MicroCenter has 8Gig thumb drives for $29. Assuming you need 8 gig of data space. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The more I look for common sense in the world...

    the more·I·find how un-common it is.
    ·
  • jhdragusjhdragus Posts: 2
    edited 2013-06-10 07:27
    Mike Green wrote: »
    Hard drives may be inexpensive, but they need a lot of I/O pins to interface and the file system needs a bit of variable space to handle, something the Stamps are not known for. You will have more luck by using a USB hard drive interface and a USB host that can handle mass storage drives like Parallax's Memory Stick Datalogger which should be able to handle USB hard drives exactly the same as USB flash drives. Any of the other available USB hosts should work just as well (like FTDI's Vinculum VDrive2 or VMusic2 or GHI Electronics' USBwiz).

    Considering how cheap a 1GB flash memory drive is these days, why bother with a hard drive? The only moving part is the cap that covers the USB plug and the power consumption is lower as well.




    Do you have the BS2 connection for USBwiz?. Thanks.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-06-10 08:51
    USBwiz is an obsolete chip from GHI Electronics and there are several boards they sell for their newer ALFAT chip. All of these use a standard logic level serial interface that would work with the SERIN and SEROUT statements of the BS2. Optionally, they can use an SPI interface using the SHIFTIN and SHIFTOUT statements. The ALFAT can use I2C which I wouldn't recommend for use with a BS2.

    Read the documentation for the board you have and read the Basic Stamp Syntax and Reference Manual sections on the SERIN and SEROUT statements. If you provide a link to the documentation for the USBwiz board you want to use, we'll be happy to help you with wiring suggestions, but it should be straightforward.
  • jhdragusjhdragus Posts: 2
    edited 2013-06-10 16:24
    http://www.ghielectronics.com/downloads/man/ALFAT_SoC_Processor_User_Manual.pdf

    I
    have the ALFAT USB BOARD


    428-0_small.jpg




    ALFAT USB includes a Full-Speed USB 2.0 port.
    All required signals are exposed through a 1x18 pinmount.
    Also, if the desired interface is UART, all
    signals required are exposed through a secondary 2x5
    pin-mount.
    ALFAT USB Pinout
    1x18 pin-mount
    Pin Name Pin Name
    1 UART_TX 10 ACTIVE
    2 UART_RX/SPI_BUSY/
    I2C_BUSY
    11 Reserved
    3 I2C_SCL 12 VBAT
    4 I2C_SDA 13 Internal 3.3V (Do not connect)
    5 SPI_SCK 14 RESET (not 5V tolerant)
    6 SPI_MISO/UART_BUSY 15 GND
    7 SPI_MOSI 16 Not connected
    8 SPI_SSEL 17 Not connected
    9 WAKE 18 5 Volts


    2x5 pin-mount
    Pin Name Pin Name
    1 Internal 3.3V (Do not
    connect)
    2 5V
    3 UART_TX 4 SPI_MOSI
    5 UART_RX/SPI_BUSY/I2C
    _BUSY
    6 SPI_MISO/UART_BUSY
    7 Reserved 8 VBAT
    9 GND 10 RESET (not 5V tolerant)
    270 x 204 - 47K
  • JasonDorieJasonDorie Posts: 1,930
    edited 2013-06-10 18:19
    Easier still (and much smaller): https://www.sparkfun.com/products/9530

    $25, logs serial output automatically to an SD file, cycles the filenames, and supports multiple baud rates.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-06-11 06:32
    I would use the 2x5 connector and connect #2 to a +5V supply (Vdd), #9 to ground (Vss), #3 and #5 to any available Stamp I/O pins. Optionally, you could also connect #6 to another I/O pin. #3 would be used with SERIN. #5 would be used with SEROUT. Depending on how it's used by the USBwiz, #6 could be used for handshaking.

    Note that the USBwiz's default Baud is 115.2KB. The Stamps can't handle this speed. You'd have to use a PC or some other source of 115.2KB data to change the USBwiz's Baud to something like 9600 Baud.
Sign In or Register to comment.