Limited storage?


This isn’t a complaint, I’m just curious about the economics of embedded design. I know next to nothing about hardware.

I can buy a 16 GB micro SD card for $7, but the model 01 apparently has something like 2 orders of magnitude less storage than this.

  • Exactly what are the capacities of the various storage pools inside a model 01? (I have the vague impression that there’s more than one, or if there is one pool that it has to be split in some manner.)
  • Why are they so small?
  • Why can’t commodity SD cards serve the same purpose?


(Gergely Nagy) #2

There’s a total of 32kb of program space on the controller unit, 4kb of which is used by the bootloader. There’s 2kb of RAM, and 1kb of EEPROM. This is all integrated onto the MCU. They are so small, because this is a very tiny unit, a 8-bit controller (an Atmega32u4, if you’re curious). The program space is read-only, and can only be overwritten by flashing a new firmware. RAM is RAM, it does not persist through device reboots. EEPROM does persist, and it is the place where configuration data should be stored, data that you want to change without re-flashing the keyboard.

Because they are all integrated onto the very tiny MCU. Being a 8-bit controller, it is much, much simpler than more powerful controllers (like an ARM would be, for example). Being simpler decreases the chances of failure, even if only a little.

To support an SD card, we’d need a more powerful controller, one that can read SD cards (or interface with a reader), along with doing its job as a keyboard controller. This is a bit complicated, and doesn’t fit in within the constraints of the MCU used. It’s certainly possible to build a keyboard that supports an SD card reader, but that’s more complex under the hoods, with all kinds of new failure modes.

(Christopher Browne) #3

It’s using an 8 bit controller chip, with just 32 KB (e.g. - 32768 bytes) of storage.

It doesn’t use much power, is plenty fast for the purpose.

I suspect that the disk controller for an SD card might need to be a more powerful CPU requiring more memory for buffering than the CPU we’re using to control the keyboard. (Possibly I’m wrong, but not by much!)

Once you head down the road of having WAY more storage and WAY more memory, there’s a temptation to also need a multi-user, multi-tasking operating system that sucks way more computing power than what we’ve got.

Now, I think I wish that there was more RAM and storage on the Model 01. A lot of the things one would want to do with the LEDs will easily chew up memory, and the ~28K of storage available once space is occupied by bootloader isn’t all that much. There’s merit to trying to get perhaps up to 128K. I think there are members of the processor family that do head that high…