Unique ID

  • by

Hello,

I have played with Arduino (Atmega328p) for a long time. In an old project, I needed to differentiate two Arduino Uno, so I try to find some kind of a Serial Number on the datasheet form the Atmega328p. The datasheet doesn’t have anything about Serial Number, and I implemented some ID with random and EEPROM, because I thought Atmega328p doesn’t have a Serial Number, but I found something interesting.

Last year I bought some SMD chips for a LoRa project, and I bought the Atmega328pb by mistake. This chip is kinda boosted version of the Atmega328p. A link of the difference between Atmega328p and Atmega328pb [here].

The interesting thing is this boost version chip has a Serial Number (10 bytes). So I can use this Serial Number to create a Unique ID for my Arduino/RFM95 device. Works perfect, but the boost chip just because of this feature… It’s much easier to buy an Arduino Pro Mini (Atmega328p).

Wait…

Maybe the Atmega328p have a Serial Number but the datasheet doesn’t say anything… And yes, Arduino chips have an unofficial Serial Number. By my tests looks like the Atmega328p has 9 Serial bytes. And I found an old datasheet of the Atmega328pb how shows 9 Serial bytes and confirm my assumption [here].

Maybe all AVR chips have a Serial Number. So I tested some Atmega328p and Atmega2560. All board I tested looks like have this unofficial Unique Serial Number.

That’s great!

Arduino has a Unique ID. And apparently, nobody knows… It’s an interesting building feature, for some projects this Unique ID is handy.

To make everything easier. I created a library to get the Unique ID (8 bytes) of the chip. ArduinoUniqueID.

That’s some Unique ID I collected.

 Serial Unique ID: 34 39 31 30 36 0C 05 20 
Serial Unique ID: 36 31 32 37 32 05 1B 17
Serial Unique ID: 36 35 30 32 37 10 17 0E
Serial Unique ID: 37 36 35 33 32 15 1B 15
Serial Unique ID: 37 36 35 33 32 15 19 0E
Serial Unique ID: 37 36 35 33 32 0F 1F 09
Serial Unique ID: 37 36 35 33 32 0F 1F 1A

I want to test others AVR Microcontrollers to check if the others boards have this Serial Number too.

If you find this feature useful, be free to use!

Stay tuned.