Pages: [1]   Go Down
Author Topic: Arduino serial number S/N ?  (Read 3484 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have a project of doing a network of Arduino with CANBUS.
Each card must have a unique identifier, so i thought each card has a S/N (serial number), but is it true?
If it's true how i can accessed this S/N?

Thanks
Logged

UK
Offline Offline
Faraday Member
**
Karma: 17
Posts: 2884
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, it isn't true, but you could put one in EEPROM
Logged

Per Arduino ad Astra

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks
Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Each card must have a unique identifier, so i thought each card has a S/N (serial number), but is it true?
The FTDI USB/Serial chip used on many Arduino's has a unique serial number. You can read this number through the host interface (e.g. Windows).
Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not all arduinos have an FTDI.  Some are RS232 based, and sadly the new UNO has changed ICs.

Even if your arduino has an FTDI, there is no way for the arduino to query itself.

EEPROM sounds like the best bet.

-j
Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1655
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just a wild thought: One-Wire DS2401

http://pdfserv.maxim-ic.com/en/ds/DS2401.pdf

These get used in things like InkJet Ink cartridges.  It might work for what you need.  It saves EEPROM and eliminates the need for special coding and the possibility of duplicates.

You won't need ALL the numbers in the chip for CANBUS though.
« Last Edit: October 26, 2010, 08:16:55 pm by pwillard » Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 133
Posts: 6749
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Even if your arduino has an FTDI, there is no way for the arduino to query itself.
Feature request: The arduino IDE (or perhaps avrdude) should be able to suck the serial number out of an arduino and stick it into the flash or eeprom during download...  That should be just about possible.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27069
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So you think the ATMega48/88168/328 have some S/N built into the hardware that can be read somehow? I haven't come across that in the 566+ page datasheet yet.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 133
Posts: 6749
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
you think the ATMega48/88168/328 have some S/N built into the hardware that can be read somehow?
No.  The FTDI chip has a serial number.  The mega8u (used on Uno) has a serial number, at least by the time it has become a LUFA-based USB/Serial converter.   Pretty much any other usb device would have a serial number...
Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
mega8u (used on Uno) has a serial number, at least by the time it has become a LUFA-based USB/Serial converter.
Really?

Quote
Pretty much any other usb device would have a serial number.
Many (most?) USB devices do not have a serial number.  Prolific USB/RS232 chipsets, Keyspan USB/RS232 adapters, and some USB disk enclosures are among devices I've personally dealt with that do not have serial numbers.

Some drivers pretend to uniquely identify a device, but really all they're doing is assigning some identifier based on the the device's location in the USB "tree" - if you plug it in to a different port, or add a hub to the mix, the "identifier" will change.  Keyspan's driver for OS X is one example.

-j
« Last Edit: October 28, 2010, 07:10:13 am by kg4wsv » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27069
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I use ProMini's as an embedded controller, it does not have an FTDI chip - so all my PC would see is whatever the FTDI programmer had, and the application program would not even see it.
And there are wireless interfaces too.

Anyway, I think I'm getting offtrack from the original question.

This is the kind of thing being discussed?
http://en.wikipedia.org/wiki/Controller_area_network


Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes that's about CAN.
But is'it possible to put some informations in the EEPROM with the EEMEM directive?

Thanks
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27069
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I would say so.

http://www.arduino.cc/en/Reference/EEPROM

Have not done it myself yet, but others certainly have.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 133
Posts: 6749
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The new bootloader does not support programming EEPROM from the IDE...
Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The new bootloader does not support programming EEPROM from the IDE...
True, but there is always the option to write a small sketch to do the EEPROM programming.
« Last Edit: October 28, 2010, 11:24:10 am by borref » Logged

Pages: [1]   Go Up
Jump to: