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.
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”
This is obivuously a password device. But, it could also be a test device to experiment with a program you’re writing that reads the ports.
A tetrabyte password? Brave man! I’d offer to shake your hand, but given how often your identity is likely to be stolen, how would one know that it’s you?
I understood this to be a four byte “memory” device. Not a terrabyte. And it’s not even 4 butes of memory, it’s just 4 8 bit dip switches. Did I read that wrong?
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?
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.
Terrabyte = 1000 Gigabytes = 1000 Megabytes = 1000 Kilobytes = 1000 bytes. 4 bytes ≠ 1 terabyte. 1000000000000 bytes = 1 terabyte.
FIRST, you have to define what a “BUTE” is. A great news conveyor, I’m sure!
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.
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.
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.
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.
terra? like earth?
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
Either you misspelled Gigga, Megga, and Killo, or you missed the joke that’s poking fun at Tera being misspelled as Terra.
Yup, Terrabyte is the next generation after Gaiabyte.
But it’s programmable memory.
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.
Here’s your four bytes worth of data: 0xFFFF.
That’s actually only two :P
01000110 01010101 01000011 01001011
Where? When? Whom? ;)
How can this be called a “Drive” without implementing the SCSI protocol?
There’s also a single-byte USB thumbstick version featuring a Microchip PIC16F1459 and a unique rainbow-colored DIP switch from ERG. https://twitter.com/bikerglen/status/1482516332432162820
I hope to get both of these projects written up on my website soon.
You could literally “flip a bit”
I thought I was ripping the place off when I bought a 256 meg drive for under 50$ … Apparently I was as Comp-USA went out of existence the a few years later
It’s not a flash drive if you can’t write to it.
Well, it could be a dead one at least…
It can be written to, it just uses flesh protocol to do so.
Nobody claims it to be a flash drive
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.
“the four red Grayhill 76 Series switches arguably make it a bit clearer when entering in your bytes”
A *bit* clearer. Very droll; well done!
“Can’t say we can think of any four bytes of data important enough to hold on a dedicated piece of hardware,”
A bank card PIN
You’d only need 14 out of the 32 provided bits for that, so if you were inclined, with 32 bits, you could also squeeze in the the expiry date and the CCV
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?
But you only need a byte, a nibble and two bits for any four number PIN.
The smallest binary number to represent 0-9999 is 14 bits. 8 + 4 + 2
But you’re not storing a (as in: one) number. You are storing four numbers in the 0-9 range.
This would give you the equivalent of a 10 (decimal) digit PIN
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.
Write protect option: https://www.digikey.com/en/products/detail/grayhill-inc/76P08/14819726
Write protect option is available. Google Grayhill 76P08.
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).
I’m confused by all the comments by people who apparently didn’t real the short article. It’s 4 bytes in a file. EOF.
Looks perfect for use with one of Ben Eater’s 8-bit breadboard computers.
I’m a bit behind—he’s added a USB port by now?
NAND memories have air gap..
this would be a great password manager – store all your passwords in the microcontroller and set the bytes to select the password you want.
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.
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.
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
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.
Switch State Drive ?
This is perfect. I’m stealing it.
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.
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.
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.
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.
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)
Watch as an absolutely massive cosmic ray flips one of those bits !
Great for setting an IP address! (v4 only)
And I can see that used for dark web invites… There you only need an IP address to enter into the browser
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?
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.
something like this, to write your bytes.
That’s it! Make that pocket-sized and you’ve got a winner. I don’t know what I was thinking with solenoids. XD
This are a fancy kind of usb dongle , or a rudimentary password dongle. Why not?
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. ;)
Please be kind and respectful to help make the comments section excellent. (Comment Policy)