DIY “Solid State Drive” Puts Four Bytes In Your Pocket

In a relatively short amount of time, the average capacity of USB flash drives has skyrocketed. It wasn’t so long ago that two and four gigabyte drives were considered to be on the high end, but today you can grab a 512 GB drive for less than $50 USD. In fact they’ve gotten so large that it can feel wasteful using them for some tasks, and we occasionally find ourselves wishing we could find some modern USB drives that didn’t rival the storage capacity of our whole computer.

That said, this USB-C tetrabyte drive created by [Glen Akins] might be slightly too small for our tastes. No, that’s not a typo. As in the Greek tetra, this drive can hold a massive four bytes at a time. Even better, you don’t need a computer to write to it: the 32 DIP switches let you key in the content on the fly, bit-by-bit.

Reading out the first byte from the DIP switches.

As explained in a Twitter thread, [Glen] was inspired to create this gadget after another user posted a picture of a 32 position DIP switch with a caption that said it was a “One Tetrabyte SSD” back in December. He apparently couldn’t track down the same switch, but the four red Grayhill 76 Series switches arguably make it a bit clearer when entering in your bytes.

Each of the individual DIP switches are connected to one of the GPIO pins of the 8-bit EFM8UB2 microcontroller, and the code simply reads the state of each pin in order and saves the binary results in a variable to put together the “file” it presents to the OS when plugged in.

We’ve seen our fair share of unusual USB flash drives in the past, but this one is truly in a league of its own. Can’t say we can think of any four bytes of data important enough to hold on a dedicated piece of hardware, but we certainly appreciate the effort to store it in the most robust way possible.

Thanks to [J. Peterson] for the tip.

71 thoughts on “DIY “Solid State Drive” Puts Four Bytes In Your Pocket

        1. So, I’ve never heard of a tetrabyte before. But I take it to be 4 bytes and I see you did say “tetrabyte” in your reply. So, what’s the problem? So, who else is walking around with a 4 tetrabyte USB stick who will steal your computer? You’re just trolling me, right?

          1. a 4 byte password in extended ascii is 4 characters long. most websites require at least 8 characters, and some won’t allow you to register with that little. so if you want to make a device like this for storing passwords, it is possible but should be designed for the 8 to 16 byte range.

          2. I’m sorry. My eyes aren’t as good as they once were. Thank you for pointing out my terrible, undecipherable mistake. You really are a lurking, nerd of a troll who should be banned from this site. This site is for intelligent people with something to contribute.

            And so, I will add this for other people reading this, I am a long time assembly code programmer. So this device looks like something i might use when debugging code that I might be writing to communicate with the USB port. I have built many such devices when developing code, usually also containing a one byte readout so that I can display a byte to give me a hint as to what’s going on in my new code.

          3. Only trolling so much as the creator is: look at the source link.

            4 bytes isn’t useful, and hasn’t been a useful amount of storage, really, at any point in computer history. The device is a learning exercise, nothing less, nothing more.

          4. bob below doesn’t understand data sets. You’d have nearly 4.3 billion binary combinations in an unsigned 32 bit value, very similar to an IPv4 address as they utilize the same byte size.

          5. I’m confused why you haven’t heard of a Tetrabyte. Neither had I until today, but I read the article before turning to the comments section, by which time I had *had* heard of a tetrabyte.

          1. Terra is the next level up from Giga which is the next level up from Mega, up from Kilo. Each, being 1024 times larger than the next.
            K = 1024, M = 1,048,576
            G = 1,073,741,824
            T = 1.099511 x 10 ^12

        2. 8 bits is a byte, 4 bits a nybble. When 16 bits became prevalent that became a word but as bus sizes went to I.e. 32 and 64 bit the word “word” can mean the same thing or some call I.e 64 bits quad word.

    1. SSD stands for Solid State Drive. That could, but is not limited to, be implemented in flash. If you’d have objected to this drive having “moving” parts in its storage methodology, than you’d have a point though.

      1. If you read it as a bitstream instead of as four individual 8-bit bytes, and have the reading software ignore the 8th bit for the four digits.

        PIN read as four 7 bit words 1111111-1111111-1111111-1111111
        How to encode a date that’s 6 digits and a CVV (Creditcard Verification Value) that is usually 3 digits but some cards like American Express use 4 digits, into 4 bits?

  1. To me this system seems to be rather unreliable
    – put it in your pocket, take it out later and it might have turned into a random number generator as they got unintentionally changed …
    At least the switches should be covered.

  2. When I started working in the electronic security field in the early 80s the common way to program alarm communicators was to blow a 74S387 256×4 fusible link PROM. To program these devices using only logic devices (too early to be using microprocessors) a large PCB covered with DIP switches was used. That amounted to a 1kbit drive (and they required a lot of maintenance to replace failed switches).

    1. I could do something with hex rotary dip switches and a button that is a USB HID keyboard. Select the password you want, press the button, and it types the password just like a keyboard. No more worrying about disabled paste functions on password forms. Although just about anything that could snoop a keyboard could snoop the password too.

      1. And, unlike a browser extension or a browser’s built-in password manager, it won’t be able to check that you’re not on a phishing site with a similar-looking domain name to the real site.

  3. I went to look up if this could be better with some rotary switches. Wurth Elektronik makes a 16 position rotary switch that is surface mount and 10 mm square. That’s 4 bits for only $4.92. Two of them would probably be as large as one 8 switch DIP switch. More expensive and no improvement of density.
    Another fun and perhaps cheaper and in a weird way more practical is the woven wire method. Look Mum No Computer did a nice live stream build that shows how to build the ferrite core transformer and amplifier necessary to get this to work. It’s surprising straight forward of a build. https://youtu.be/DnBZQuYJIgg

    1. One of the suggestions I received on Twitter was to make a USB core memory using the Arduino core memory shield. Basically create a virtual file on a USB mass storage device that accesses the underlying small number of bits of core memory. I have virtual file code already running on a PIC18F45K50 dev board so it’d really just be a matter of buying the kit, assembling it, and figuratively gluing the kit and dev board together.

  4. In programming speak it would be a double word, or sword, or just double as it’s type I believe, so 32 bits is all, and as one previously mentioned it’s only 4 characters, but fun to play with if that’s your thing.

  5. Does anyone know if you can get DIP switches that aren’t just an array of 8 single pole single throw switches?

    Flash long ago gave up on density alone and went to multi-level cells(outside of some reliability-critical applications; or areas where including enough logic to paper over the defects isn’t viable); and if you could get dual throw or better you could increase the density of DIP switch storage in an analogous way.

    1. There are indeed SPDT and DPDT DIP switches (Grayhill even makes some 2, 3, and 4PSTs); in the other direction of density, there are octal, BCD, and hexadecimal rotary switches.

    2. Trim pots are multi-level storage devices that can provide higher density storage on a PCB. Note that some trim pots aren’t suitable for frequent use. One data sheet said the pot was only rated for 10 adjustments. Read the trim pot as often as you want, but very limited writes, just like some flash.

      There are many microcontrollers with multiple A/D inputs. I recommend adding more pots and using ECC if you plan on storing lots of bits per potentiometer.

  6. There are hexadecimal rotary switches, and thumbwheel switches. Two of those would allow you select a byte value.
    Two more would give you an address range of 256 bytes. You could fit a password, or a short message, in that.
    Add a pushbutton to trigger a “read” of the switches, to avoid accidental data entry.

    Just as music has the demisemiquaver, this would be a Demi Semi Kilobyte (I still refuse to use Kibibytes)

  7. To truly over-engineer this, you should add the capacity to flip the switches by writing back to the file from the host device. Just two questions: how small can a solenoid be, and what’s the weight bearing capacity of a USB port?

    1. Solenoids can, presumably, be as small as one can manufacture them. If you take apart a laptop optical drive (the common tray kind shaped like a square with one corner cut off at 45°) you’ll find one about the size of a DIP switch. It’s used to release the tray for (spring-loaded) ejection.

    1. Except that without inserting it into a USB port one can read the password directly from the DIP switches. The write-protect cover would have to be opaque and lockable. What’s more, you would want to password protect access to the device; best to add a bit of flash for the required software. ;)

Leave a Reply to JuergenUKCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.