Working on a format for filament identification codes. These would be on spools from the manufacturer in the form of QR codes, and transfered to an EEPROM chip on a reusable cartridge so that a printer can automatically adapt to new filament without mucking with slicer settings.
Originally shared by Whosa whatsis
WRT size of the codes, I think we should see if we can get a short-form version (possibly not including the version number, diameter and tolerance?) into 512 bits (64 bytes) so that it can be stored on and attiny85 that is also running a filament measuring apparatus as a drop-in replacement for the static memory, so that it can be used in place of the eeprom chip instead of in addition to it. 512 bits is also the size of a version 4 (33x33) QR code with medium error correction.
Failing that, 1024 bits is the number to shoot for to fit the cheapest eeprom chips, with additional features enabled by using a 4096-bit chip. A version 7 (45x45, low error correction) or 8 (49x49) QR code will be needed to match the 1024 size, though the code can be smaller if it doesn’t use the whole 1024, and I see no reason to enforce the use of certain QR code sizes, so long as the data is formatted to fit the length requirements once information not needed by the eeprom (like URIs) is removed.
What we need to pack in:
Version number (give it a byte for room to grow?)
Filament size (9 bits measuring 100ths of a mm would give us .01mm resolution and would be sufficient for measurements up to 5.12mm).
Tolerance in the same units? If so, 6 bits should be plenty? Maybe make it 7 bits to round out two bytes with the filament size?
Temperature up to 306 °C will fit in 1 byte if we add 50 to the value. Would adding 100 instead give a better range (100-356)?
Max temperature same measurement as above, temperature not to be exceeded, 1 byte
Platform temperature and Chamber temperature will fit in a byte each without the addition, leaving 0 available for unheated.
Color including transparency can be represented with plenty of resolution in 4 bytes
If we go with standard UPC codes for product identification, that will take at least 37 bits (which we might as well round up to 5 bytes unless we can squeeze something else into the other three bits)
Manufacturer’s serial number should have at least 3 bytes) to have room to grow (might get away with 2 if they count separately for each UPC and take the extra 3 bits.
Formula code will require a lookup table, which we’ll have to build before we know how big it needs to be, though depending on how specific we can get, I imagine it would fit in 1 byte, at least for version 1.
For amount of filament, we need a unit. I would suggest cubic centimeters, of which a 1kg spool has approximately 850-1000 depending on density, though we should be prepared to spools up to at least 10lb. Maybe measure 10ths of a CC and use 2 bytes?
That’s about 22 bytes so far out of 64 for our minimum spec. Figure 20 characters upper-case alphanumeric for a human-readable ID string, what will fit in 14 bytes with QR alphanumeric encoding, or 20 if we use UTF-8 or ISO 8859-1 (adds lower-case, and avoids confusing mixed encoding). Maybe another 20 for a short URL? That would make a total of 62. What else do we need to pack in? Any problems with my math?