3

I am interested in connecting a 3.5" hard drive to an IoT device that I am building based on a microcontroller (e.g. an Arduino) which doesn't run a mainstream operating system.

As far as I know, to use a 3.5" hard-drive you need a full operating system (such as Linux or Windows) for device drivers to connect a 3.5" hard drive. Is this assumption correct?

Is there a way of implementing drivers for SATA/USB and the FAT filesystem, so that I can save files to a USB or hard drive? Are there any pre-existing projects or drivers that I can re-use for this purpose?

I would prefer not to use an SD card because the capacity that I want will be more expensive.

Sean Houlihane
  • 10,524
  • 2
  • 26
  • 62

2 Answers2

11

There is a project FatFs - Generic FAT File System Module that offers FAT access for microcontrollers.

FatFs is a generic FAT/exFAT file system module for small embedded systems. The FatFs module is written in compliance with ANSI C (C89) and completely separated from the disk I/O layer. Therefore it is independent of the platform. It can be incorporated into small microcontrollers with limited resource, such as 8051, PIC, AVR, ARM, Z80, 78K and etc.

Petit FatFs is for tiny (8 bit) microcontrollers.

Petit FatFs is a sub-set of FatFs module for tiny 8-bit microcontrollers. It is written in compliance with ANSI C and completely separated from the disk I/O layer. It can be incorporated into the tiny microcontrollers with limited memory even if the RAM size is less than sector size. Also full featured FAT file system module is available here.

So, yes, IoT devices that are based on microcontrollers that could run FatFs or Petit FatFs could access hard-disk drives without a full-blown OS.

Ghanima
  • 2,539
  • 1
  • 19
  • 46
5

Since the Raspberry Pi supports Windows 10, that is at least one example. You could certainly attach an external 3.5" drive by USB.

I have no doubt that other IoT devices can too. Just Google & I am sure that you will find plenty of information. Or, is there a specific device or o/s which interests you?

Mawg
  • 3,147
  • 1
  • 13
  • 35