Pages: [1]   Go Down
Author Topic: Large Quantity Manufacturing and Serial Numbers  (Read 630 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

We have an internal use product we want to manufacture based on Arduino. Probably about 4,000 units.  We are having a hard time coming up with how to efficiently serialize these boards and the cases they are in.

Has anyone used the Maxim DS2401 silicon serial number chip in an Arduino environment?  It looks like the DS2401 meets our need. But I am at a loss on how to get these serial numbers in an efficient way so we can print those serial numbers on a label for the PCB case and box.

The only way I can think of is the following process:
1) when the pcb boards come off the assembly line they are flashed with the Arduino boot loader and our sketch which queries the DS2401 and outputs it to the screen.
2) we then manually copy that outputed serial number to a label maker to print out 2 labels, one for the case and one for the box. And then finally copy the number over to a spreadsheet for historical tracking.

It seems really labor intensive and anyone's feedback would be helpful. It would be great to hear some alternative solutions too, outside the DS2401.  We are just trying to make it as easy as possible.  Thanks.

Left Coast, CA (USA)
Offline Offline
Brattain Member
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Might you just create and write a unique serial number for each arduino based device by storing it in the internal eeprom space inside the AVR chip right after you burn the bootloader, by loading a serial number creation sketch before loading the end use sketch?


Offline Offline
Shannon Member
Karma: 223
Posts: 12630
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hard to visualise how you're going to go about building and dispatching these things or what sort of interfaces you have available, but I assume you're going to install a sketch on them before shipping. Is there any way for the sketch to receive a serial number via SPI, serial or whatever other interface you have available and write that to EEPROM? The aim would be to do this at the same time you print the corresponding label, and perhaps do both of those at the same time you upload the sketch if that's something you're doing yourself. In other words physically plug the device in, push the button to upload the sketch and serial number, that causes your labels to be printed, Arduino and labels go onward to packaging.

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Faraday Member
Karma: 68
Posts: 2806
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have not used one of these but it may be your solution.


    Equipment Registration
    Network-Node Identification
    PCB Identification
    Reference Design License Management


The way you have it in your schematic isn't the same as how you have it wired up! That goes for me too.

Offline Offline
Full Member
Karma: 2
Posts: 148
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have not used one of these but it may be your solution.


    Equipment Registration
    Network-Node Identification
    PCB Identification
    Reference Design License Management

beat me to it. we used these in something similar you speak of for your product. LarryD is right its a good solution, plus easy solution, we came up with too. here is something im working on at home for box inventory, mostly just me fooling around and this isnt finished but you get the idea. works great so far.

#include <OneWire.h>
#include <avr/pgmspace.h>
//#undef PROGMEM
//#define PROGMEM __attribute__((section("")))
OneWire  ds(7);
byte addr[8];
byte i;
byte boxnumber;
byte xIndex = 0;
byte yIndex = 0;
char buffer[30];

prog_char box1_0[] PROGMEM = "Box 1";  
prog_char box1_1[] PROGMEM = "Items: stuff";
prog_char box1_2[] PROGMEM = "Location: Den";
prog_char box1_3[] PROGMEM = "String 3";
prog_char box1_4[] PROGMEM = "String 4";
prog_char box1_5[] PROGMEM = "String 5";
prog_char box1_6[] PROGMEM = "String";
prog_char box1_7[] PROGMEM = "String";
prog_char box1_8[] PROGMEM = "String 3";
prog_char box1_9[] PROGMEM = "String 4";
prog_char box1_10[] PROGMEM = "String 5";

PROGMEM const char *box1_table[] =  
  box1_10 };

prog_char box2_0[] PROGMEM = "Box 2";  
prog_char box2_1[] PROGMEM = "Items: IC Chips";
prog_char box2_2[] PROGMEM = "Location: ";
prog_char box2_3[] PROGMEM = "DS1305 2EA";
prog_char box2_4[] PROGMEM = "DS1302 3EA";
prog_char box2_5[] PROGMEM = "ISD100P";
prog_char box2_6[] PROGMEM = "ADC0831 3EA";
prog_char box2_7[] PROGMEM = "AD8400 3EA ";
prog_char box2_8[] PROGMEM = "X9511WP";
prog_char box2_9[] PROGMEM = "DS1620 2EA";
prog_char box2_10[] PROGMEM = "TLC071";
prog_char box2_11[] PROGMEM = "LS7210";  
prog_char box2_12[] PROGMEM = "PCF8574";
prog_char box2_13[] PROGMEM = "X24165P 2EA";
prog_char box2_14[] PROGMEM = "U2403B";
prog_char box2_15[] PROGMEM = "DS1669";
prog_char box2_16[] PROGMEM = "QT110";
prog_char box2_17[] PROGMEM = "AT25128";
prog_char box2_18[] PROGMEM = "MAX7219";
prog_char box2_19[] PROGMEM = "MAX7221";
prog_char box2_20[] PROGMEM = "24LC256";
prog_char box2_21[] PROGMEM = "MAX619 2EA";
prog_char box2_22[] PROGMEM = "DS1615";  
prog_char box2_23[] PROGMEM = "74HCT125N";
prog_char box2_24[] PROGMEM = "74FO4N";
prog_char box2_25[] PROGMEM = "ATTINY85";
prog_char box2_26[] PROGMEM = "BQ2000 2EA";
prog_char box2_27[] PROGMEM = "DS275 2EA";
prog_char box2_28[] PROGMEM = "DS1232";
prog_char box2_29[] PROGMEM = "  ";
prog_char box2_30[] PROGMEM = "String 3";
prog_char box2_31[] PROGMEM = "String 4";
prog_char box2_32[] PROGMEM = "String 5";
// Then set up a table to refer to your strings.

PROGMEM const char *box2_table[] =  
prog_char box3_0[] PROGMEM = "Box 3";  
prog_char box3_1[] PROGMEM = "Items: stuff";
prog_char box3_2[] PROGMEM = "Location: Den";
prog_char box3_3[] PROGMEM = "String 3";
prog_char box3_4[] PROGMEM = "String 4";
prog_char box3_5[] PROGMEM = "String 5";
prog_char box3_6[] PROGMEM = "String";
prog_char box3_7[] PROGMEM = "String";
prog_char box3_8[] PROGMEM = "String 3";
prog_char box3_9[] PROGMEM = "String 4";
prog_char box3_10[] PROGMEM = "String 5";

// Then set up a table to refer to your strings.

PROGMEM const char *box3_table[] =  
  box3_10 };

prog_char box4_0[] PROGMEM = "Box 4";  
prog_char box4_1[] PROGMEM = "Items: stuff";
prog_char box4_2[] PROGMEM = "Location: Den";
prog_char box4_3[] PROGMEM = "String 3";
prog_char box4_4[] PROGMEM = "String 4";
prog_char box4_5[] PROGMEM = "String 5";
prog_char box4_6[] PROGMEM = "String";
prog_char box4_7[] PROGMEM = "String";
prog_char box4_8[] PROGMEM = "String 3";
prog_char box4_9[] PROGMEM = "String 4";
prog_char box4_10[] PROGMEM = "String 5";

// Then set up a table to refer to your strings.

PROGMEM const char *box4_table[] =  
  box4_10 };

void setup(){
void loop()
  if ( ! {

    //    Serial.println( "No more addresses" );
    //    Serial.println();
  Serial.print("ROM =");
  for( i = 0; i < 8; i++) {
    Serial.write(' ');
    Serial.print(addr[i], HEX);

  if (OneWire::crc8(addr, 7) != addr[7]) {
    Serial.println("CRC is not valid!");
  if (addr[0]==0x01 && addr[1]==0xD5 && addr[2]==0x04)
  else if (addr[0]==0x01 && addr[1]==0x34 && addr[2]==0xDF)
  else if (addr[0]==0x01 && addr[1]==0x34)
  else if (addr[0]==0x01 && addr[1]==0x34)
  else boxnumber=0;
  switch (boxnumber) {
  case 0:

    Serial.println( "No Box for this address." );

  case 1:
    for (int i = 0; i < 11; i++)
      strcpy_P(buffer, (char*)pgm_read_word(&(box1_table[i])));
      Serial.println( buffer );

  case 2:
    for (int i = 0; i < 29; i++)
      strcpy_P(buffer, (char*)pgm_read_word(&(box2_table[i])));
      Serial.println( buffer );

  case 3:
    for (int i = 0; i < 11; i++)
      strcpy_P(buffer, (char*)pgm_read_word(&(box3_table[i])));
      Serial.println( buffer );

  case 4:
    for (int i = 0; i < 11; i++)
      strcpy_P(buffer, (char*)pgm_read_word(&(box4_table[i])));
      Serial.println( buffer );


« Last Edit: July 06, 2013, 09:11:27 pm by grendle » Logged

Pages: [1]   Go Up
Jump to: