Arduino unique identifier - Page 1
Forum section: electronics / projects

author: mvinc17
author_rank: Newbie
timestamp: April 23, 2014, 11:36:33 am
content: Hi All,I am new here, so please forgive any mistakesI am working on a system in which an Arduino microcontroller needs to have a hardware unique ID, it does need to be absolutely unique as it is to be used as a registration token for a web service. I am wondering if there are any chips or other devices out there which will give this effect?Thanks in advance,Michael

author: Codemonkey
author_rank: Regular Contributor
timestamp: April 23, 2014, 11:46:03 am
content: I seem to recall Dallas/Maxim did something like that.

author: Rerouter
author_rank: Super Contributor
timestamp: April 23, 2014, 11:46:52 am
content: This eeprom seems to get used for it, Dallas DS2401Otherwise considering they are using the internet, you could just use the mac address off the Ethernet interface, not likely to repeat,

author: ConKbot
author_rank: Super Contributor
timestamp: April 23, 2014, 11:50:23 am
content: +1 to DS2401, or if you like tiny annoying packages, the DS2411

author: sacherjj
author_rank: Frequent Contributor
timestamp: April 23, 2014, 12:22:45 pm
content: I have a project, still in the planning stages, that I needed similar functionality. The least expensive way I could figure out how to do it is with something like this:http://ww1.microchip.com/downloads/en/DeviceDoc/20002124E.pdfThey have 48 and 64 bit GUIDs, in addition to usable EEPROM space. Seemed about 1/3 the price of anything else I found. $0.20-0.25

author: sportq
author_rank: Regular Contributor
timestamp: April 23, 2014, 12:37:54 pm
content: The Arduino, or more precisely, the ATmega has this already. There is code, possibly a library, I forget, for storing the ethernet shields MAC address in it but you could equally use it for your own unique ID.EDIT, here it is:http://arduino.cc/en/Reference/EEPROMPeter

author: sacherjj
author_rank: Frequent Contributor
timestamp: April 23, 2014, 12:41:54 pm
content: Quote from: sportq on April 23, 2014, 12:37:54 pmThis is fine if the quantity is low and you don't mind manually programming each to a unique value. That gets really old, really quick, if you are making many. Then it is nice to have that "programmed" with a device soldered on.

author: jwm
author_rank: Regular Contributor
timestamp: April 24, 2014, 01:45:45 am
content: Every 1-wire device has a globally unique 64 bit number you can use. They make ones that are dedicated to just having a serial number like the DS2401, but if you happen to need something like a temperature sensor, eeprom, or battery manager/monitor then you can use a 1-wire one and get the unique id for free.

author: theatrus
author_rank: Frequent Contributor
timestamp: April 24, 2014, 04:11:08 am
content: Note that the DS2411 will work for identification, but not authentication.

author: dannyf
author_rank: Super Contributor
timestamp: April 24, 2014, 11:02:17 am
content: QuoteWhy not just code it in your program (flash or eeprom)? Simple, and effective.If you don't want to generate it manually, you can write a small piece of code that at each invocation writes a unique ID. Put it in your make and you are done.

author: MacAttak
author_rank: Unknown
timestamp: April 24, 2014, 07:30:48 pm
content: If you are calling a web service then you could just rely on server provisioning. In other words, when the client starts up if it has never retrieved a unique id then it would contact the server and ask for one. The server generates it and sends it back, and the client would store that generated id in nonvolatile memory. From that point forward, the client would always use that assigned id for future requests. The server would most likely also keep a copy of the id for verification of later communication requests.It has the benefit of flexibility in that you don't need to worry about id collisions since the server could guarantee uniqueness. It's also exceptionally simple to implement since you already have network comm in your design.You could also make this id generation / storage a part of your fabrication / qc process so that when you ship new units they have already been provisioned with a unique ID. In this case you would probably use a separate web service for id generation that isn't published externally (so that only devices manufactured by you would have legitimate ids).