Mohit Mahajan (Lists) wrote: > Hello, > > We manufacture a lot of different kinds of instruments (but each in > small quantities). Our serial numbering scheme so far is pretty basic: > ABCD-EFGH. AB tells us the week and CD the last two digits of the year. > EFGH starts at 0000 every year in January, and increases count with each > instrument manufactured. It gives no indication which model or what was > manufactured. This info would be given by a spreadsheet where the > description of the instrument is entered next to the serial number. So > we'd have to look up the serial number in this sheet to know what > instrument we're talking about. > > I'd like suggestions for a serial number scheme that could indicate the > instrument model/type, date of manufacture (for warranty purposes). And > it shouldn't be too long, about 8-10 characters. > > It would be great to know what schemes members here or their companies > use to number their products. I've been toying with the idea of using: MMMMMRR-YYWW-NNNNNN i.e.: MMMMM 5-digit model number RR 2-letter hardware revision code (AA to ZZ) YY last two digits of manufacturing year WW week of manufacture NNNNNN 6-digit incremental serial number (# of unit built in that week) But that's a little long (17 characters), so let's try and bring it down to 10 characters... Well, you could use an alphanumeric model number. So to represent around half of the different possible model numbers of the first scheme, you'd need four alphanumeric digits. Let's reduce this to Base32 and use 0-9, A-Z and skip the letters I, O, Z and S (can be confused for 1, 0, 2 and 5 respectively). Now it's unlikely you're going to have 50,000 different devices, so let's narrow it down a little. Two digits would provide 1024 combinations, which should be enough to start with. You can always reserve a range for future expansion. So that gives us our two-digit model ID. Date of manufacture should ideally be human-readable; I'd use YY-WW format (year, week of year). Or you could sacrifice a little accuracy and go for YY-MM (year, month). In any case you can always search your database for an accurate date of manufacture; the one in the serial number should really be for quick-reference only. In either case, that's 4 digits, plus the 2 previous, giving six total so far. The last four can be the serial number, decimal or Base32, which means you can uniquely identify up to 10,000 (decimal) or 1,048,576 (Base32) individual units in a given month or week. So that's ten digits in the following format: MMYYWWNNNN MM Model number YY Year of manufacture (last 2 digits) WW Week of manufacture NNNN Index of unit manufactured in a given week If you wanted, you could add an extra digit for a hardware revision. Then you can change hardware and say something along the lines of "all devices with serial numbers starting 1RA, 1RB or 1RC require Firmware 1.0; 1RD onwards requires Firmware 2.0". Obviously you'd make any flash upgraders check the hardware serial number in EEPROM to make sure it's suitable _before_ reflashing the firmware... If you can squeeze it onto the label, a barcode might also be a good idea. Though entering 10 digits isn't difficult, it saves a little effort and risk of incorrect entry. Speaking of which, I'd be sorely tempted to add a check digit to that serial number scheme... Just so you can check in software to make sure it's been entered correctly, and beep furiously at the operator if that isn't the case :) -- Phil. piclist@philpem.me.uk http://www.philpem.me.uk/ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist