Arduino Forum

Using Arduino => Storage => Topic started by: extremesnow on Sep 14, 2015, 05:07 am

Title: Hard Drive
Post by: extremesnow on Sep 14, 2015, 05:07 am
Im Creating a Paintball Agr (Black Ops 2 Tank)
I Was Wondering if I can attach a Hard Drive to my arduino and tell it to look from the hard drive for its data  If you can please help

its going to be a big tank I it will have a gun, feed system, sensor, camera, tracks, and so on I really dont want to overload my arduino so I would use a hard drive to save my data and the arduino to run the data

Title: Re: Hard Drive
Post by: fat16lib on Sep 14, 2015, 09:01 pm
It is possible to connect a USB hard drive to an Arduino.  It will be slower than an SD.

The easiest way is to use a Mega ADK.  You will need an drive that can be powered by an external power supply.  The drive must be formatted FAT32.

I wrote the UsbFat ( library for USB drives.

Here is output from the UsbDriveInfo example with a 500 GB drive connected to a Mega ADK.

UsbFat version: 20141220
FreeRam 7119
Type any character to begin
USB initialized.
Volume initialized.

Volume Size: 499982.59 MB (MB = 1,000,000 bytes)
Volume is FAT32
blocksPerCluster: 64
clusterCount: 15258258
fatStartBlock: 2080
fatCount: 2
blocksPerFat: 119206
rootDirStart: 2
dataStartBlock: 240492
Determining free cluster count -  please wait.
freeClusters: 15258240
freeSpace: 499982.00 MB (MB = 1,000,000 bytes)

A 32GB Sd card is a lot of storage and would be easier.  SdFat will accept SDXC cards that are formatted FAT32.  You can buy this ( 256GB cards for about $82.  512GB cards are available but cost about $450.