phatIO is file system based USB I/O

phatIO a different way of interfacing a computer with the world that you might be used to. I first saw phatIO uses file system to control external hardware article at that mentioned phatIO. phatIO is an USB I/O device that uses a mass storage file system for control.

Using mass storage for I/O controlling might sound strange at first, but after a little bit thinking it starts to make. Remember Unix and Linux systems where practically everything is modeled as files. phatIO simply extends the same basic idea across multiple platforms. The idea in mass storage for I/O controlling is that any operating system can manipulate files on a USB storage device: any alterations you make to its file system will result in pin manipulation on the I/O header. Each of the 20 general purpose I/O pins can be controlled by saving a “0” or “1” to their control file. You can also control the mode in which the pin operates. Besides normal digital input and output, 12 can also be used ADC inputs and 5 pins can be configured to be PWM outputs.

When plugged into a computer’s USB port, phatIO appears as a USB filesystem/memory stick. You can control devices connected to phatIO by writing to files on that filesystem. Any computer that can write to a USB memory stick and any program/language that can write to a file can talk to phatIO and control things. In this way phatIO significantly reduces the typical effort needed to control things with a computer – no drivers have to be installed or low level libraries needs to be used. Once connected to your computer phatIO should appear as a filesystem (the exact name and location will depend on your computer).

At the time phatIO uses file system to control external hardware article was posted, the the board was not yet in production. But the product seemed to be interesting and reasonably priced (27 Euros), so I decided that I should check this out. phatIO is currently in beta stage and I was pleased that got the board quite soon. Good thing the product was also that it was “Made in Finland” (I give plus to product manufactured in my home country).


phatIO board is small and compact (44 by 36mm). It has 2×14 IO socket. A sticker is supplied to label the IO pins when used in prototyping or on a Breadboard. Each of the 20 I/O pins can be used for digital input and output, 12 of the pins can be also be used for reading an analog input and 5 for PWM output. The I/O pins can be made to work with 5V and 3.3V TTL level signals.

The board is based on Atmel MEGA32U4 microcontroller (same microcontroller as used by MaKey MaKey and Arduino Leonardo. The other main component is 128 MB microSD memory card that contains the device software.


I have done some basic testing with the board and the file operations seem to work on initial tests well. I will plan to do some more testing later.

The file system idea is nice and simple, but it has also downsides. One issue with acting as a filesystem is that operating systems will often try to cache its content to improve performance. This means that once it’s read a phatIO file it doesn’t expect the contents to change on the device. This has most effect on reading the values of the “pins/*” files when the pin is acting as an input (both digital and analog). Systems like Linux can be told to destroy the cache and reread the contents of the file.

For cases where this can’t be easily done phatIO also provides a script language based condition mechanism that allows something to be done when the analog/digital inputs change: phatIO could change output pins automatically or simulate someone pressing a sequence of keys on a keyboard. In addition to this the scripting language can be used for many other things according to phatIO GuidephatIO Guide and phatIO Hardware and Electrical characteristics. I have used those documents as sources when I have written this article.

The phatIO page has also some interesting looking example uses. There the traditional web interface shown in Controlling phatIO from HTML in a web browser example. That looks quite normal stuff.

A more interesting and less conventional Dropbox Integration: The files on phatIO can be exported to Dropbox allowing a cheap way of exporting the phatIO functionality to other computers or other devices that support Dropbox. Tests have been done editing the phatIO’s pin files on a dropbox capable text editor on an ipad, with the relevant pins going high/low after 2 to 4 seconds because Dropbox is not a realtime communication system. Unfortunately this is said to work only works if the phatIO is hosted on a Linux and OS X computer. I have not tried this, but looks interesting.


  1. Laurel says:

    Gгeate ρost. Keep posting such kinԁ of info on your
    sіte. Im rеally impгeѕѕed by your blog.

    Hi thеre, You’ve performed a fantastic job. I’ll сertаinly ԁigg it anԁ indіvіdually suggеst to my friends.

    I am confident theу’ll be benefited from this web site.

  2. Tomi Engdahl says:

    Windows Update

    First, Dropbox Integration was succesfully tested on Windows 8 – it should work with all versions of Windows from Vista onwards. This means that a phatIO directory can be exported to dropbox and the files edited remotely – even shared with other users. This is a very cheap way of remoting IO – you can send something to a display or turn a device on, from across the world, by simply plugging in a phatIO and installing Dropbox.

    Windows C# code that retrieves the value of the phatIO pin files, bypassing the Windows/Filesystem Cache

  3. Remote control with Dropbox « Tomi Engdahl’s ePanorama blog says:

    [...] control with Dropbox I some time ago wrote about phatIO file system based USB I/O and this is a continuation to this [...]

  4. earn money for free at home says:

    Yes! Finally something about business venture.

  5. Tomi Engdahl says:

    new business card

    AT90USB82/162 from Atmel as it is quite cheap but also because there are a few libraries available for it: Lufa and the teensy examples

  6. Tomi Engdahl says:

    Passive Infra Red Sensors

    This short document illustrates how to connect a passive infrared sensor (PIR sensor) to phatIO.

    The PIR device has 3 pins: 5V, GND, and OUT. When connected to phatIO’s 5V and GND pins the OUT pin will be at 0V until movement is detected, it then goes to 3V – this is high enough to be read as a digital 1 by phatIO when connected to one of its IO pins. The PIR modules ‘time’ and ‘sensitivity’ trimpots can be used to alter how long the PIR OUT pin stays high and how soon it will detect movement respectively. I found the default values to be fine.

    Turn off Computers Screen Saver

    The phatIO config below (copy to run.lio on your phatIO device) will send a shift key to the computer when it detects movement after 60 seconds of no movement.

    This is useful used in conjunction with a screen saver to turn off your monitor after a few minutes of inactivity (when you walk away from the computer) but keep it on whist moving around your desk or walk back into range.

    Other Ideas
    Using techniques from Keyboard Hacks to launch applications on the host computer it would be possible to make the host computer capture an image with a webcam when it detects movement (see CommandCam and imagesnap).

  7. Tomi Engdahl says:

    Somewhat similar concept:

    Add Digital inputs and outputs, Analog inputs, PWM outputs, multiple SPI, I2C and 1-Wire master buses to your computer.

    Flyfish FF32 Gets GUI

    [CWroos] has written an impressive GUI for the Flyfish FF32. The Flyfish is a port expander of sorts, allowing the user access to a large array of I/O , analog inputs, SPI, I2C and a few other connectivity options over a USB connection. There is no driver as it uses a native HID driver in the operating system of the device it’s attached to. It’s not just tethered to a PC either. It works with Raspberry Pi, Beaglebone and several other SBCs.

    [CWroos]’s GUI makes it easier than ever to interact with the FF32. It has a script editor allowing you to run and edit scripts on the fly


Leave a Comment

Your email address will not be published. Required fields are marked *